From mboxrd@z Thu Jan 1 00:00:00 1970 From: lyndon@orthanc.ca (Lyndon Nerenberg (VE6BBM/VE7TFX)) Date: Tue, 22 Mar 2011 14:55:55 -0800 Subject: [9fans] troff macros for typesetting books/longer texts In-Reply-To: Message-ID: Topicbox-Message-UUID: bf6943a0-ead6-11e9-9d60-3106f5b1d025 > I have only hesitated over the way (as described in my original, 1st, > post) how references that *depend on physical placement* of certain > text are to be coped with. (As with my page headings; or---probably > even harder so that at least 2-runs of troff are > inevitable---references to page numbers where sth is mentioned. But I > really need just the headings now.) For page headers and footers, the tutorial section in the Troff paper should have enough to get you going (/sys/doc/troff.ps, pages 34 on). For section and index cross-references to page numbers, you pretty much have to do two passes, writing the xref data to an external file that gets read in the table of contents or index sections as appropriate. (You read and write the xref data file from inside troff itself using .so and .tm.) For what it's worth, spending a couple of days studying the ms macro package source code should give you a lot of ideas. And a headache ;-) --lyndon