Merge branch 'topic/sync-to-go-2'
[s-roff.git] / tmac / ptx.tmac
blob0ad086a9ed852123f56cc6ea61d7f75aa21042fd
1 .\"@ ptx.tmac
2 .\"@ Provide `.xx' macro to format permuted index entries as created by GNU ptx.
3 .\"
4 .\" Written 2008 by Werner Lemberg (wl@gnu.org)
5 .\" Public domain.
6 .\"
7 .\" Adapted to S-roff by Steffen (Daode) Nurpmeso <steffen@sdaoden.eu>.
9 .nr ptx-ref-pos (\n[.l] - .65i)
10 .nr ptx-head-pos (\n[ptx-ref-pos] / 2)
12 .ds ptx-sep-2 "   \"
13 .ds ptx-sep-4 " \"
14 .ds ptx-sep-5 " \"
17 .de xx
18 .  ds ptx-sep-1
19 .  if \w\a\\$2\a \
20 .    ds ptx-sep-1 " \|\"
22 .  ds ptx-sep-3
23 .  if \w\a\\$4\a \
24 .    ds ptx-sep-3 " \|\"
26 .  ds ptx-filler \\*[ptx-sep-4]\f3\a\fP\\*[ptx-sep-5]
27 .  ta (\\n[ptx-ref-pos]u - \w\a\\*[ptx-sep-5]\au)
29 \h\a(\\n[ptx-head-pos]u - \w\a\\$1\\*[ptx-sep-1]\\$2\\*[ptx-sep-2]\au)\a\
30 \\$1\\*[ptx-sep-1]\
31 \\$2\\*[ptx-sep-2]\
32 \\$3\\*[ptx-sep-3]\
33 \\$4\\*[ptx-filler]\
34 \\$5
37 .nf
39 .\" s-ts-mode