| www.delorie.com/gnu/docs/groff/groff_55.html | search |
![]() Buy GNU books! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
For documents that do not distinguish between odd and even pages, set the following strings:
For documents that need different information printed in the even and odd pages, use the following macros:
OH and EH macros define headers for the odd and even pages;
the OF and EF macros define footers for the odd and even pages.
This is more flexible than defining the individual strings.
You can replace the quote (') marks with any character not
appearing in the header or footer text.
You control margins using a set of number registers. See section 4.3.3 Document control registers, for details.
The `ms' macros can set text in as many columns as will reasonably fit on the page. The following macros are available; all of them force a page break if a multi-column mode is already set. However, if the current mode is single-column, starting a multi-column mode does not force a page break.
2C macro.
Otherwise, width is the width of each column and
gutter is the space between columns.
The MINGW number register controls the default gutter width.
The facilities in the `ms' macro package for creating
a table of contents are semi-automated at best.
Assuming that you want the table of contents to consist of
the document's headings, you need to repeat those headings
wrapped in XS and XE macros.
.NH 1 Introduction .XS Introduction .XE .LP ... .CW .NH 2 Methodology .XS Methodology .XE .LP ... |
You can manually create a table of contents
by beginning with the XS macro for the first entry,
specifying the page number for that entry as the argument to XS.
Add subsequent entries using the XA macro,
specifying the page number for that entry as the argument to XA.
The following is an example:
.XS 1 Introduction .XA 2 A Brief History of the Universe .XA 729 Details of Galactic Formation ... .XE |
no
groff is a single-pass formatter and
can only print what has been collected up to the point
that the TC macro appears.
The optional argument no suppresses printing
the title specified by the string register TOC.
no
The optional argument no suppresses printing
the title specified by the string register TOC.
The Groff and Friends HOWTO
includes a sed script that automatically inserts
XS and XE macro entries after each heading in a document.
Altering the NH macro to automatically build the table
of contents is perhaps initially more difficult, but would save
a great deal of time in the long run if you use `ms' regularly.
The `ms' macros provide the following predefined strings. You can change the string definitions to help in creating documents in languages other than English.
The following special characters are available(6); g is either an ASCII character or a special
character (\(gg or \[ggg]); the condition
is also true if g has been defined by the char request.
Note that these operators can't be combined with other operators like `:' or `&'; only a leading `!' (without whitespace between the exclamation mark and the operator) can be used to negate the result.
.nr xxx 1
.ie !r xxx \
true
.el \
false
=> false
|
A whitespace after `!' always evaluates to zero (this bizarre
behaviour is due to compatibility with UNIX troff).
.nr xxx 1
.ie ! r xxx \
true
.el \
false
=> r xxx true
|
It is possible to omit the whitespace before the argument to the `r', `d', and `c' operators.
See section 5.4 Expressions.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |