<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 13, 2015 at 9:16 AM, Alain Schremmer <span dir="ltr"><<a href="mailto:schremmer.alain@gmail.com" target="_blank">schremmer.alain@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><div>On , at 2015 Dec 12,11:34 PM, Victor Ivrii wrote:</div><br><blockquote type="cite"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 12, 2015 at 10:58 PM, Alain Schremmer <span dir="ltr"><<a href="mailto:schremmer.alain@gmail.com" target="_blank">schremmer.alain@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">When referring to a numbered newenvironment, I have the fancyref "notorious FAQ problem" namely "I get a section number".<br>
<br>
Right now, for \label{Agreement:sign}, \ref{Agreement:sign} returns the chapter.section number instead of, say, Agreement 4.<br>
<br>
What is it that I am missing?<br>
<br>
Hopeful regards<br>
--schremmer<br>
<br></blockquote><div><br></div><div>How do you introduce your \newenvironment? Is there \refstepcounter in its definition?</div></div></div></div></blockquote></div><div><br></div><div><div>\newcounter{agr}</div><div>\newenvironment{AGREE}{</div><div><span style="white-space:pre-wrap">   </span>\textsf{\bfseries{AGREEMENT}</div><div><span style="white-space:pre-wrap">             </span>\refstepcounter{agr}</div><div><span style="white-space:pre-wrap">             </span>\thechapter .\theagr</div><div><span style="white-space:pre-wrap">             </span>.</div><div><span style="white-space:pre-wrap">                </span>\hspace{2.5mm}</div><div><span style="white-space:pre-wrap">           </span>}</div><div><span style="white-space:pre-wrap">        </span>\sffamily</div><div><span style="white-space:pre-wrap">        </span>}</div><div><br></div><div><br></div></div><div></div></div></blockquote></div><div class="gmail_extra"><br></div><div class="gmail_extra">Change to (just moveĀ <span class="" style="white-space:pre">       </span>\refstepcounter{agr})</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">\newcounter{agr}</div><div class="gmail_extra">\newenvironment{AGREE}{<span class="" style="white-space:pre">      </span>\refstepcounter{agr}</div><div class="gmail_extra"><span class="" style="white-space:pre"> </span>\textsf{\bfseries{AGREEMENT}</div><div class="gmail_extra"><span class="" style="white-space:pre">         </span>\thechapter .\theagr</div><div class="gmail_extra"><span class="" style="white-space:pre">         </span>.</div><div class="gmail_extra"><span class="" style="white-space:pre">            </span>\hspace{2.5mm}</div><div class="gmail_extra"><span class="" style="white-space:pre">               </span>}</div><div class="gmail_extra"><span class="" style="white-space:pre">    </span>\sffamily</div><div class="gmail_extra"><span class="" style="white-space:pre">    </span>}</div><div><br></div><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><br>Victor Ivrii</div></div>
</div></div>