diff options
author | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2021-06-15 23:30:05 +0200 |
---|---|---|
committer | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2021-06-15 23:30:05 +0200 |
commit | d831434e95c6a3b33a8af04e630d34f078d26e4f (patch) | |
tree | 93965830662798a4c8674634110eac88bdb3a6ab /tmac.toc | |
download | spiewnik-d831434e95c6a3b33a8af04e630d34f078d26e4f.tar.gz spiewnik-d831434e95c6a3b33a8af04e630d34f078d26e4f.zip |
Init
Diffstat (limited to 'tmac.toc')
-rw-r--r-- | tmac.toc | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/tmac.toc b/tmac.toc new file mode 100644 index 0000000..ca6e29a --- /dev/null +++ b/tmac.toc @@ -0,0 +1,48 @@ +.\" generate toc +.de toc.gen +. nr toc.i \\$1 +. br +. mk +. nr toc.ll (\\n[.l]u-\w'\\*[toc.\\n[toc.i].name]') +. nr toc.ll (\\n[toc.ll]u-\w'\\n[toc.\\n[toc.i].num]') +. ad l +. post.url "#toc.\\n[toc.i]" "\\*[toc.\\n[toc.i].name]" +\v'-0em'\l'\\n[toc.ll]u.' +. br +. rt +. ad r +. br +\\n[toc.\\n[toc.i].num] +. nr toc.i +1 +. if !(\\n[toc.i]=\\n[toc.total]) \{\ +. sp 0.5 +. toc.gen \\n[toc.i] +. \} +.. +.\" add to toc +.de toc.mark +. post.mark "\\$*" +. post.name "toc.\\n[toc.idx]" +. tm INDEX.ds toc.\\n[toc.idx].name \\$* +. tm INDEX.nr toc.\\n[toc.idx].num \\n[.%] +. nr toc.idx +1 +. tm INDEX.nr toc.total \\n[toc.idx] +. tm INDEX.nr toc.init 1 +.. +.\" wraper for toc +.de toc +. nr toc.oldad \\n(.j +. if \\n[toc.init] \{\ +. sp +. ce +.ft B +.ps +2 +\\*[toc.tl] +.ft R +.sp 2 +. toc.gen 0 +. \} +. br +. ad \\n[toc.oldad] +.. +.ds toc.tl TABLE OF CONTENTS |