[OS X TeX] reference to a numbered newenvironment,

Victor Ivrii vivrii at gmail.com
Sun Dec 13 15:29:33 CET 2015


On Sun, Dec 13, 2015 at 9:16 AM, Alain Schremmer <schremmer.alain at gmail.com>
wrote:

>
> On , at 2015 Dec 12,11:34 PM, Victor Ivrii wrote:
>
>
>
> On Sat, Dec 12, 2015 at 10:58 PM, Alain Schremmer <
> schremmer.alain at gmail.com> wrote:
>
>> When referring to a numbered newenvironment, I have the fancyref
>> "notorious FAQ problem" namely "I get a section number".
>>
>> Right now, for \label{Agreement:sign}, \ref{Agreement:sign} returns the
>> chapter.section number instead of, say, Agreement 4.
>>
>> What is it that I am missing?
>>
>> Hopeful regards
>> --schremmer
>>
>>
> How do you introduce your \newenvironment? Is there \refstepcounter in its
> definition?
>
>
> \newcounter{agr}
> \newenvironment{AGREE}{
> \textsf{\bfseries{AGREEMENT}
> \refstepcounter{agr}
> \thechapter .\theagr
> .
> \hspace{2.5mm}
> }
> \sffamily
> }
>
>
>
Change to (just move  \refstepcounter{agr})


\newcounter{agr}
\newenvironment{AGREE}{ \refstepcounter{agr}
\textsf{\bfseries{AGREEMENT}
\thechapter .\theagr
.
\hspace{2.5mm}
}
\sffamily
}



-- 

Victor Ivrii
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/macostex-archives/attachments/20151213/12d8b901/attachment.html>


More information about the macostex-archives mailing list