Xref: utzoo alt.sys.sun:1888 comp.unix.questions:26615 comp.unix.wizards:23804 Path: utzoo!utgpu!cs.utexas.edu!usc!ucsd!ucbvax!bloom-beacon!drk From: drk@athena.mit.edu (David R Kohr) Newsgroups: alt.sys.sun,comp.unix.questions,comp.unix.wizards Subject: Re: Printing section number with troff -ms macros. Summary: Problem sovled: use \*(SN (Section Number string register) Keywords: troff, ms macros, string register Message-ID: <1990Oct31.223443.5050@athena.mit.edu> Date: 31 Oct 90 22:34:43 GMT References: <1990Oct30.224252.7998@athena.mit.edu> Sender: daemon@athena.mit.edu (Mr Background) Organization: Massachusetts Institute of Technology Lines: 16 In article <1990Oct30.224252.7998@athena.mit.edu> drk@athena.mit.edu (David R Kohr) writes: >I am trying to produce a Table of Contents which includes the section number >as well as page number for each item listed. I am using the regular More careful perusal of Sun's Sun/OS 4.0.3 manuals has revealed a large document which explains how to use number registers and strings, among many other things. It appears that the "ms" macros have an internal string register SN which contains the current section number in an appropriate format; putting \*(SN in the text produces the section numbers I need (although this isn't advertised as necessarily being kosher in the "ms" document). -- David R. Kohr M.I.T. Lincoln Laboratory Group 45 ("Radars 'R' Us") email: DRK@ATHENA.MIT.EDU (preferred) or KOHR@LL.LL.MIT.EDU phone: (617)981-0775 (work) or (617)527-3908 (home)