[OS X TeX] Reflecting numbering in the source
Alain Schremmer
schremmer.alain at gmail.com
Wed Aug 15 11:27:55 EDT 2007
On Aug 15, 2007, at 9:47 AM, Themis Matsoukas wrote:
> On Aug 14, 2007, at 12:40 PM, Alain Schremmer wrote:
>
>> I am using
>>
>> \newcounter{eex}[chapter]
>> \newenvironment{EEXAMPLE}{\textsf{\bfseries{E\smaller{XAMPLE}
>> \hspace{1.5mm}}\refstepcounter{eex}\theeex.\hspace{2.5mm}}\small
>> \sffamily}{\par}
>>
>> along with the macro
>>
>> \begin{EEXAMPLE}%
>> #INS#
>> \end{EEXAMPLE}
>>
>> where, for ease of editing, I reflect the example number (eex)
>> after \begin{EEXAMPLE}%.
>>
>> But of course, when I add or remove example(s), I have to adjust
>> the example number by hand.
>>
>> Would there be a way to do this automatically?
>
> This doesn't answer your question directly but it accomplishes
> essentially what you want: for each example I use a a short tag
> that summarizes that example, something like:
>
> \begin{example}{Sample Integration} blah blah \end{example}
>
> The string "Sample Integration", which is also printed in my
> output, serves as a convenient tag to locate the example without
> having to depend on example numbers, which can change all the time.
My examples are very simple ones and, from one to the next, not very
different so that tags wouldn't serve very well and I would be sure
to forget taking a few out before printing. (My probably very
idiosyncratic work process surely leaves to be desired.)
Grateful regards
--schremmer
------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/
More information about the MacOSX-TeX
mailing list