5 Copyright (C) 2004-2018 Free Software Foundation, Inc.
6 Written by Keith Marshall (keith.d.marshall@ntlworld.com)
8 This file is part of groff.
10 groff is free software; you can redistribute it and/or modify it under
11 the terms of the GNU General Public License as published by the Free
12 Software Foundation, either version 3 of the License, or
13 (at your option) any later version.
15 groff is distributed in the hope that it will be useful, but WITHOUT ANY
16 WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 You should have received a copy of the GNU General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>.
25 .if !rOPMODE .nr OPMODE 1
33 .\" Define section markers, for special document sections,
34 .\" which are to be omitted from regular document processing.
43 .OMIT CS CE \" front cover text, processed independently
44 .OMIT MS ME \" menu definitions, for info documents only
51 .if !'\\*[omit@section]'\\$1' .@error \\$2 without \\$1
61 . ds spdf!opts -D "\\$1"
62 . if \\n(.$>1 .as spdf!opts " -A "\\$2"
63 . if \\n(.$>2 .as spdf!opts " -P "\\$3"
64 . pdfhref L \\*[spdf!opts]
70 .\" Document Outlines, Section Headings and Table of Contents
71 .\" =========================================================
74 .\" Use AFTER .NH n, to define the text of the numbered heading,
75 .\" automatically generating a matching formatted TOC entry, and
76 .\" a PDF document outline entry.
78 .\" String registers XNVS1, XNVS2 and XNVS3 establish additional leading,
79 .\" prior to top level headings, preceding each level of indented subheading,
80 .\" and following each nested level of subheading, respectively
81 .\" (strings are used, rather than numeric registers, so that these
82 .\" additional spacing parameters may be set relative to the current
83 .\" document line spacing, as set by \n[VS]).
86 .while dopt*XN\\$1 \{\
92 .if dxn*ref .XM -N \\*[xn*ref] -- \\$@
94 .pdfhref O \\n[nh*hl] "\\*(SN \\$*"
97 . if !dXNVS1 .ds XNVS1 1.0v \" default leading for top level
98 . if !dXNVS2 .ds XNVS2 0.3v \" default leading at nesting increment
99 . if !dXNVS3 .ds XNVS3 0.6v \" default leading following nested group
100 . if \\n[nh*hl]==1 \{\
104 . ie \\n[nh*hl]<\\n[tc*hl] .if \\n[nh*hl]>1 .sp \\*[XNVS3]
106 . ie \\n[nh*hl]>\\n[tc*hl] .sp \\*[XNVS2]
108 . if !r tc*hl-max .nr tc*hl-max 1
109 . ie \\n[tc*hl-max]>\\n[nh*hl] .sp \\*[XNVS3]
110 . el .nr tc*hl-max \\n[nh*hl]
117 .\".pdfhref L -D \\*[PDFBOOKMARK.NAME] -- \&\\*(SN\h'1n'\\$*
127 .if !dxn*ref .ds xn*ref \\\\$1
131 The content for this section is not yet available.
149 . if \\$1=\\n[PHASE] .nr op:request 1
153 . el .nr op:request 1
154 . if !\\n[op:request]=\\n[OPMODE] \{\
155 . nr OPMODE \\n[op:request]
156 . nop \O[\\n[OPMODE]]\c
163 .if !\\n[SAME-PAGE] .bp
168 .XN -N \\*[nn*name] -- \\$@
181 .XR \\*[nn*name] )\\$1 (
192 .\" Override the standard ms macro,
193 .\" to ensure the document outline cache is flushed
194 .\" BEFORE emitting the table of contents.
200 .if !\\n[PHASE] .tm pdfroff-option:set toc_relocation=enabled
201 .if \\n[OPMODE] .pdf@toc
205 .pdfhref O -T T 1 "\\*[TOC]"
209 .if \\n[OPMODE] .pdfsync
213 .OP \n[PDF-BODY-TEXT]
215 .\" groff "ms" provides the "pg@bottom" macro, which has already
216 .\" been installed as a page transition trap. To ensure proper
217 .\" mapping of "pdfhref" links which overflow the bottom of any
218 .\" page, we need to install the "pdfhref" page transition hook,
219 .\" as an addendum to this macro.
221 .pdfhref I -PT pg@bottom
225 .\" vim: filetype=groff:
226 .\" spdf.tmac: end of file