[OS X TeX] Two issues -- need help

M. Tamer =?ISO-8859-1?B?1g==?=zsu tozsu at sympatico.ca
Mon Aug 8 07:31:45 EDT 2005


Morten,

Thanks, this worked. I knew about the outdated \bf, but decided to put that
off until I got the other problems worked out.

Thanks again for your help.
-- 
M. Tamer Ozsu
University of Waterloo


> From: Morten Høgholm <morten.hoegholm at gmail.com>
> Reply-To: TeX on Mac OS X Mailing List <MacOSX-TeX at email.esm.psu.edu>
> Date: Sun, 07 Aug 2005 22:59:54 +0200
> To: TeX on Mac OS X Mailing List <MacOSX-TeX at email.esm.psu.edu>
> Subject: Re: [OS X TeX] Two issues -- need help
> 
> On Sun, 07 Aug 2005 22:38:17 +0200, M. Tamer Özsu <tozsu at sympatico.ca>
> wrote:
> 
>> Thanks much. I can't believe I missed the \refstepcounter. However,
>> changing
>> \stepcounter to \refstepcounter as follows gives an error:
>> 
>> \newcounter{exmp}[chapter]
>> \newcommand{\bex}{\renewcommand{\theexmp}{\refstepcounter{exmp}\thechapter.a
>> rabic{exmp}}\vspace{11pt}\par\noindent{\bf Example
>> \theexmp}\vspace{11pt}\par\noindent\begin{inpar}\parskip=2pt plus 0.5pt}
>> 
>> However, if I do the following (pulling \refstepcounter{exmp} out of the
>> definition of \renewcommand)
>> 
>> \newcounter{exmp}[chapter]
>> \newcommand{\bex}{\refstepcounter{exmp}\renewcommand{\theexmp}{\thechapter.\
>> arabic{exmp}}\vspace{11pt}\par\noindent{\bf Example
>> \theexmp}\vspace{11pt}\par\noindent\begin{inpar}\parskip=2pt plus 0.5pt}
>> 
>> works without giving an error, assigns the correct example number, but
>> the
>> first \ref gives only the value of the example number, without the
>> chapter
>> prefix, i.e.,
> 
> \theexmp is supposed to give you the representation of the `exmp' counter.
> I think this is closer to what you want.
> 
> \newcounter{exmp}[chapter]
> \renewcommand*\theexmp{\thechapter.\arabic{exmp}}
> \newcommand*\bex{%
>    \par \vspace{11pt}%
>    \noindent
>    \refstepcounter{exmp}%
>    \textbf{Example \theexmp}%
>    \par \vspace{11pt}%
>    \noindent \begin{inpar}%
>      \setlength\parskip{2pt plus 0.5pt}%
> }
> 
> You may note that \bf has been obsolete for more than ten years.
> -- 
> Morten
> --------------------- Info ---------------------
> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>            & FAQ: http://latex.yauh.de/faq/
> TeX FAQ: http://www.tex.ac.uk/faq
> List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
> 


--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the MacOSX-TeX mailing list