[OS X TeX] \linenumbers and only half of the page

Martin Wilhelm Leidig listwatch at onlinehome.de
Thu Feb 22 11:27:32 CET 2007


Am 2007-02-21 um 18.57 schrieb <stephenmoye at cox.net>  
<stephenmoye at cox.net>:
> ---- Joshua Smith <joshua.smith at ucsf.edu> wrote:
>> I only get three line numbers: 1 for Mathematical Model, and 2 and 3
>> for the last two lines.  I get nothing in between.

That's a known problem when using amsmath and lineno together.

> A little Googling on comp.text.tex turned this up:

Looking into lineno's documentation had done, too!  ;-)

> \begin{linenomath} %%<<----- NOTICE
> \begin{gather}
[...]
> \end{gather}
> \end{linenomath} %%<<----- NOTICE

That's correct; but if you have lots of display math it might turn  
out less complicated and more readable to include that into the math  
environment directly.  Due to the somewhat exotic construction of  
amsmath's own display environments one can't just wrap that into  
another environment; so we deploy TeX[the language]'s pattern  
recognition feature to define begin _and_ end tag at once.

Put something like that into the preamble:
---
\def\bgather#1\egather{%
   \begin{linenomath*}\begin{gather}%
   #1%
   \end{gather}\end{linenomath*}}
---
and replace all \begin{gather} and \end{gather} in the text with  
\bgather and \egather, respectively.  Same goes for align, multline  
and their relatives; of course you also could define shorter macro  
names.

Enjoy.


-Moss-
-- 
Martin Wilhelm Leidig, Nadlerstr.6, 68526 Ladenburg, Deutschland
SatzTeXnik und TeXnische Beratung -- Dante e.V. #1580

------------------------- 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 macostex-archives mailing list