6 Copyright (C) 2004, 2009
7 Free Software Foundation, Inc.
8 Written by Keith Marshall (keith.d.marshall@ntlworld.com)
10 This file is part of groff.
12 groff is free software; you can redistribute it and/or modify it under
13 the terms of the GNU General Public License as published by the Free
14 Software Foundation, either version 3 of the License, or
15 (at your option) any later version.
17 groff is distributed in the hope that it will be useful, but WITHOUT ANY
18 WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 You should have received a copy of the GNU General Public License
23 along with this program. If not, see <http://www.gnu.org/licenses/>.
27 .if !rOPMODE .nr OPMODE 1
35 .\" Define section markers, for special document sections,
36 .\" which are to be omitted from regular document processing.
45 .OMIT CS CE \" front cover text, processed independently
46 .OMIT MS ME \" menu definitions, for info documents only
53 .if !'\\*[omit@section]'\\$1' .@error \\$2 without \\$1
63 . ds spdf!opts -D "\\$1"
64 . if \\n(.$>1 .as spdf!opts " -A "\\$2"
65 . if \\n(.$>2 .as spdf!opts " -P "\\$3"
66 . pdfhref L \\*[spdf!opts]
72 .\" Document Outlines, Section Headings and Table of Contents
73 .\" =========================================================
76 .\" Use AFTER .NH n, to define the text of the numbered heading,
77 .\" automatically generating a matching formatted TOC entry, and
78 .\" a PDF document outline entry.
80 .\" String registers XNVS1, XNVS2 and XNVS3 establish additional leading,
81 .\" prior to top level headings, preceding each level of indented subheading,
82 .\" and following each nested level of subheading, respectively
83 .\" (strings are used, rather than numeric registers, so that these
84 .\" additional spacing parameters may be set relative to the current
85 .\" document line spacing, as set by \n[VS]).
88 .while dopt*XN\\$1 \{\
94 .if dxn*ref .XM -N \\*[xn*ref] -- \\$@
96 .pdfhref O \\n[nh*hl] "\\*(SN \\$*"
99 . if !dXNVS1 .ds XNVS1 1.0v \" default leading for top level
100 . if !dXNVS2 .ds XNVS2 0.3v \" default leading at nesting increment
101 . if !dXNVS3 .ds XNVS3 0.6v \" default leading following nested group
102 . if \\n[nh*hl]==1 \{\
106 . ie \\n[nh*hl]<\\n[tc*hl] .if \\n[nh*hl]>1 .sp \\*[XNVS3]
108 . ie \\n[nh*hl]>\\n[tc*hl] .sp \\*[XNVS2]
110 . if !r tc*hl-max .nr tc*hl-max 1
111 . ie \\n[tc*hl-max]>\\n[nh*hl] .sp \\*[XNVS3]
112 . el .nr tc*hl-max \\n[nh*hl]
119 .\".pdfhref L -D \\*[PDFBOOKMARK.NAME] -- \&\\*(SN\h'1n'\\$*
129 .if !dxn*ref .ds xn*ref \\\\$1
133 The content for this section is not yet available.
151 . if \\$1=\\n[PHASE] .nr op:request 1
155 . el .nr op:request 1
156 . if !\\n[op:request]=\\n[OPMODE] \{\
157 . nr OPMODE \\n[op:request]
158 . nop \O[\\n[OPMODE]]\c
165 .if !\\n[SAME-PAGE] .bp
170 .XN -N \\*[nn*name] -- \\$@
183 .XR \\*[nn*name] )\\$1 (
194 .\" Override the standard ms macro,
195 .\" to ensure the document outline cache is flushed
196 .\" BEFORE emitting the table of contents.
202 .if \\n[OPMODE] .pdf@toc
206 .pdfhref O -T T 1 "\\*[TOC]"
210 .if \\n[OPMODE] .pdfsync
214 .OP \n[PDF-BODY-TEXT]
216 .\" groff "ms" provides the "pg@bottom" macro, which has already
217 .\" been installed as a page transition trap. To ensure proper
218 .\" mapping of "pdfhref" links which overflow the bottom of any
219 .\" page, we need to install the "pdfhref" page transition hook,
220 .\" as an addendum to this macro.
222 .pdfhref I -PT pg@bottom
224 .\" spdf.tmac: end of file: vim: ft=groff