Debian Codegraph @

etc/ref-toc.so

raw
1 '\" t
2 .\"
3 .\" fstrcmp - fuzzy string compare library
4 .\" Copyright (C) 2009 Peter Miller
5 .\" Written by Peter Miller <[email protected]>
6 .\"
7 .\" This program is free software; you can redistribute it and/or modify
8 .\" it under the terms of the GNU General Public License as published by
9 .\" the Free Software Foundation; either version 3 of the License, or
10 .\" (at your option) any later version.
11 .\"
12 .\" This program is distributed in the hope that it will be useful,
13 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
14 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 .\" General Public License for more details.
16 .\"
17 .\" You should have received a copy of the GNU General Public License along
18 .\" with this program. If not, see <http://www.gnu.org/licenses/>.
19 .\"
20 .\"
21 .\" ---------- XX -----------------------------------------------------------
22 .\"
23 .\" The XX macro accumulates table of contents entries. It takes two
24 .\" arguments, first is the page title, the second is the page
25 .\" description. The current page number in the \n% register is
26 .\" consulted to obtain the page number.
27 .\"
28 .de XX
29 .ds Page*Of*\\$1 \\n%
30 .da toc*div
31 .ev h
32 .ds toc*num \\n%
33 .ll -8n
34 .in 0
35 \\$1\\t\\$2
36 \\a\\t\\*[toc*num]
37 .br
38 .ll +8n
39 .rm toc*num
40 .ev
41 .di
42 ..
43 .\" ---------- TC -----------------------------------------------------------
44 .\"
45 .\" The TC macro prints the table of contents collected by uses of the
46 .\" XX macro.
47 .\"
48 .de TC
49 .nf
50 .char \[toc*leader-char] .\h'1m'
51 .lc \[toc*leader-char]
52 .ta 2i (u;\\n[.l]-\\n[.i]-\w'000') (u;\\n[.l]-\\n[.i])R
53 .toc*div
54 .fi
55 ..