01.12.2012 Views

by Trent A. Fisher and Werner Lemberg - The GNU Operating System

by Trent A. Fisher and Werner Lemberg - The GNU Operating System

by Trent A. Fisher and Werner Lemberg - The GNU Operating System

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

40 <strong>The</strong> <strong>GNU</strong> Troff Manual<br />

4.3.5.2 Headings<br />

Use headings to create a hierarchical structure for your document. <strong>The</strong> ‘ms’<br />

macros print headings in bold, using the same font family <strong>and</strong> point size as<br />

the body text.<br />

<strong>The</strong> following describes the heading macros:<br />

.NH curr-level<br />

[Macro]<br />

.NH S level0 . . .<br />

[Macro]<br />

Numbered heading. <strong>The</strong> argument is either a numeric argument to indicate<br />

the level of the heading, or the letter S followed <strong>by</strong> numeric arguments<br />

to set the heading level explicitly.<br />

If you specify heading levels out of sequence, such as invoking ‘.NH 3’<br />

after ‘.NH 1’, groff prints a warning on st<strong>and</strong>ard error.<br />

\*[SN]<br />

[String]<br />

\*[SN-DOT]<br />

[String]<br />

\*[SN-NO-DOT]<br />

[String]<br />

After invocation of NH, the assigned section number is made available in<br />

the strings SN-DOT (as it appears in a printed section heading with default<br />

formatting, followed <strong>by</strong> a terminating period), <strong>and</strong> SN-NO-DOT (with the<br />

terminating period omitted). <strong>The</strong> string SN is also defined, as an alias for<br />

SN-DOT; if preferred, you may redefine it as an alias for SN-NO-DOT, <strong>by</strong><br />

including the initialization<br />

.als SN SN-NO-DOT<br />

at any time before you would like the change to take effect.<br />

\*[SN-STYLE]<br />

[String]<br />

You may control the style used to print section numbers, within numbered<br />

section headings, <strong>by</strong> defining an appropriate alias for the string SN-STYLE.<br />

<strong>The</strong> default style, in which the printed section number is followed <strong>by</strong> a<br />

terminating period, is obtained <strong>by</strong> defining the alias<br />

.als SN-STYLE SN-DOT<br />

If you prefer to omit the terminating period, from section numbers appearing<br />

in numbered section headings, you may define the alias<br />

.als SN-STYLE SN-NO-DOT<br />

Any such change in section numbering style becomes effective from the<br />

next use of .NH, following redefinition of the alias for SN-STYLE.<br />

.SH [match-level]<br />

[Macro]<br />

Unnumbered subheading.<br />

<strong>The</strong> optional match-level argument is a <strong>GNU</strong> extension. It is a number<br />

indicating the level of the heading, in a manner analogous to the currlevel<br />

argument to .NH. Its purpose is to match the point size, at which<br />

the heading is printed, to the size of a numbered heading at the same<br />

level, when the GROWPS <strong>and</strong> PSINCR heading size adjustment mechanism<br />

is in effect. See Section 4.3.3 [ms Document Control Registers], page 33.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!