Article View: comp.text.tex
Article #1034TeX Numbering lines on page
From: barr
Date: Fri, 07 Aug 1992 13:49
Date: Fri, 07 Aug 1992 13:49
45 lines
1270 bytes
1270 bytes
| I'm looking for a macro to automatically number lines on pages,
| using TeX not LaTex, for editorial purposes. Each page would
| have 55 consecutively numbered lines.
There are probably many ways of doing this. Assuming all lines are
exactly the same height, the following seems to work satisfactorily:
\baselineskip=11.9pt
\parskip=11.9pt
\vsize=652.59967pt
\parindent=0pt
\newcount\linenum
\newbox\linenumbox
\setbox\linenumbox\vbox{\kern26.5pt \loop\advance\linenum by 1
\hbox{\number\linenum}\ifnum\linenum<55 \repeat\vss}
\headline{\hbox to 0pt{\kern -20pt\copy\linenumbox\hss}\hss}
This is a line
This is a line
This is a line
This is a line
This is a line
This is a line
This is a line
This is a line
This is a line
This is a line
This is a line
This is a line
\bye
Michael Barr
Technical Details
Message-ID:
<9208071349.AA01709@triples.math.mcgill.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!noiro.acs.uci.edu!unogate!mvb.saic.com!info-texShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!noiro.acs.uci.edu!unogate!mvb.saic.com!info-tex From: <barr@triples.Math.McGill.CA> Newsgroups: comp.text.tex Subject: TeX Numbering lines on page Message-ID: <9208071349.AA01709@triples.math.mcgill.ca> Date: Fri, 7 Aug 92 09:49:52 EDT Organization: Info-Tex<==>Comp.Text.Tex Gateway X-Gateway-Source-Info: Mailing List Lines: 45