From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@9fans.net Date: Thu, 19 May 2011 16:43:13 +0200 From: Sape Mullender Message-ID: <59b7f7c11e04848db87971028f2813a1@plan9.cs.bell-labs.com> In-Reply-To: References: <6fb78b8227dcf9a5236da0c2f8c81607@quintile.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] line numbers in troff Topicbox-Message-UUID: e6f51fe8-ead6-11e9-9d60-3106f5b1d025 I think at the top of the page you set a trap to go off at the next line. In the trap macro you reset the trap for the line after that. And so on, down the page. Sape > Funny you should mention this. I know there is a way (done for patent > applications). I think I can find it in the troff doc. I have to by > tomorrow so I'll report back. > > brucee > > On Thu, May 19, 2011 at 11:44 PM, Steve Simon wrote: >> macros are easy enough: start them with .de XX and end them with .., e.g. >> start and end code example which I end up adding to most documents I write: >> >> .de EX >> .nj >> .nf >> .CW >> .SM >> .. >> >> .de EE >> .fi >> .ju >> .LG >> .R >> .. >> >> There are quite a few books, see http://www.troff.org/ , my favorite is >> "Document formatting & typsetting on the UNIX system". >> >> I really don't know how you would add line numbers, if you are lucky there >> may be a well-known macro which is run at the start of every line... >> >> -Steve >> >>