* src/roff/troff/TODO: Mention local variables.
[s-roff.git] / tmac / ptx.tmac
blobf8d4da392265f3247632c68a3c2a2e50ebce48dd
1 .\" ptx.tmac
2 .\"
3 .\"   Provide `.xx' macro to format permuted index entries as created
4 .\"   by GNU ptx.
5 .\"
6 .\" Written 2008 by Werner Lemberg (wl@gnu.org)
7 .\"
8 .\" Public domain.
10 .nr ptx-ref-pos (\n[.l] - .65i)
11 .nr ptx-head-pos (\n[ptx-ref-pos] / 2)
13 .ds ptx-sep-2 "   \"
14 .ds ptx-sep-4 " \"
15 .ds ptx-sep-5 " \"
18 .de xx
19 .  ds ptx-sep-1
20 .  if \w\a\\$2\a \
21 .    ds ptx-sep-1 " \|\"
23 .  ds ptx-sep-3
24 .  if \w\a\\$4\a \
25 .    ds ptx-sep-3 " \|\"
27 .  ds ptx-filler \\*[ptx-sep-4]\f3\a\fP\\*[ptx-sep-5]
28 .  ta (\\n[ptx-ref-pos]u - \w\a\\*[ptx-sep-5]\au)
30 \h\a(\\n[ptx-head-pos]u - \w\a\\$1\\*[ptx-sep-1]\\$2\\*[ptx-sep-2]\au)\a\
31 \\$1\\*[ptx-sep-1]\
32 \\$2\\*[ptx-sep-2]\
33 \\$3\\*[ptx-sep-3]\
34 \\$4\\*[ptx-filler]\
35 \\$5
38 .nf
40 .\" eof