Skip to content

Commit d500aca

Browse files
committed
doc: Add a PDF outline for navigation in the reference manual
Also using the "pdfmark" marco package as for PDF metadata. The outline can normally be accessed via sidebar of PDF readers.
1 parent 13677bc commit d500aca

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

doc/etc/ref-toc.so

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
.\" arguments, first is the page title, the second is the page
2323
.\" description. The current page number in the \n% register is
2424
.\" consulted to obtain the page number.
25+
.\" Also the PDF outline entries are inserted here.
2526
.\"
2627
.de XX
2728
.ds Page*Of*\\$1 \\n%
@@ -37,6 +38,8 @@
3738
.rm toc*num
3839
.ev
3940
.di
41+
.ie '\?\\$1\?'\?\?' .pdfbookmark 1 \\$2
42+
.el .pdfbookmark 1 \\$1 - \\$2
4043
..
4144
.\" ---------- TC -----------------------------------------------------------
4245
.\"

doc/etc/reference.man

+3
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,16 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
127127
.\"
128128
.\" Before the TOC to avoid wrong output when moving the TOC up with psselect:
129129
.\" - metadata would contain BUILDING's values otherwise
130+
.\" - the last PDF outline entry would wrongly be positioned at the beginning
130131
.pdfsync
131132
.\"
132133
.\" ---------- Include the Table of Contents --------------------------------
133134
.\"
134135
.if o .bp \" because .TH is going to throw another one
135136
.nr % 1000
136137
.TH "Table of Contents" "SRecord" "SRecord" "Reference Manual"
138+
.pdfbookmark 1 Table of Contents
139+
.pdfsync
137140
.\"
138141
.\" -----
139142
.\" This next section redefines the page footer to use roman numbering

0 commit comments

Comments
 (0)