[alt.text.dwb] problems with "ms" macros

dennis@socs.uts.edu.au (Dennis Cook) (05/14/91)

I'm using the "ms" macros on a Sun machine, and have run into
problems on two fronts:

1)	When I'm in multi-column mode, how do I skip to the
	top of the next column?

2)	In the manual entry for "ms" on our system, it describes
	a macro called ".TC", which it says will generate a 
	table of contents at the end of the document.

	I've tried using this macro at the start and at the
	end of the document, but to no avail.


If the answers are obvious, (and I'm just being stupid) mail me,
but if the answers are enlightening, post them.

--
Dennis Cook
University of Technology, Sydney
-- 

:-D					(dennis@ultima.socs.uts.edu.au)

npn@cbnewsl.att.com (nils-peter.nelson) (05/14/91)

Question was how to force break to next column.
Here is an old trick (from roff):
text
text
text
.br
.ne 60
.br
.ne 0
text for start of next column or page.

The ".ne 60" says "there must be at least 60 lines left
in this {column|page} for you to start new text here."
This will never be true (unless you redefine page length)
and so forces a {column|page} break. The ".ne 0" takes
effect at the top of {column|page} and says "I changed
my mind-- put out whatever you have."
If you find this ungainly, put it in a macro called ".BC".

As for .TC, it's not part of the original -ms,
so I can't speak for it.

davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) (05/14/91)

In article <dennis.674182199@syzygy> dennis@socs.uts.edu.au (Dennis Cook) writes:
| I'm using the "ms" macros on a Sun machine, and have run into
| problems on two fronts:
| 
| 1)	When I'm in multi-column mode, how do I skip to the
| 	top of the next column?

	.de bc \" begin column
	.br
	.ne 60
	.br
	.ne 0
	..

| 2)	In the manual entry for "ms" on our system, it describes
| 	a macro called ".TC", which it says will generate a 
| 	table of contents at the end of the document.

  .TC goes at the end of the document and output the data generated by
use of the .H command. Options allow control of how many levels of
heading are displayed, indentation, and formatting.

As:
  .H 1 "Introduction
  .H 2 "Historical perspective
  Blah, blah, blah.
  .H 2 "Objectives
  More blah.
  .H 2 "Future work
  Yet more.
  .H 1 "The XYZ project
  Hopefully lots of sections here.
  .TC
-- 
bill davidsen	(davidsen@crdos1.crd.GE.COM -or- uunet!crdgw1!crdos1!davidsen)
        "Most of the VAX instructions are in microcode,
         but halt and no-op are in hardware for efficiency"