diff options
author | John Ankarström <john@ankarstrom.se> | 2021-06-28 19:00:02 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-06-28 19:00:02 +0200 |
commit | cb9b9ac3de7c47b303398dcf6458aa443caf349c (patch) | |
tree | 10681ce26a4de9699b754c655fc896c02bf6fa30 | |
parent | 6e603db0d71a49b499313eca7bb7d8e7ef9c492e (diff) | |
download | mk-cb9b9ac3de7c47b303398dcf6458aa443caf349c.tar.gz |
README.t: Document 'list' utility
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | README.pdf | bin | 62043 -> 63686 bytes | |||
-rw-r--r-- | README.t | 28 | ||||
-rwxr-xr-x | list/list | 2 |
4 files changed, 30 insertions, 2 deletions
@@ -18,4 +18,4 @@ HACKING.pdf: HACKING.t u.tmac README.pdf: README.t u.tmac TROFFONTS=/usr/pkg/share/fonts/X11/TTF/ \ - <README.t toc/toc list/list -p=.l \| $(PDFROFF) > README.pdf + <README.t toc/toc list/list -p.l \| $(PDFROFF) > README.pdf Binary files differ@@ -834,3 +834,31 @@ See page \n[&refname]. .l) .p (I prefer prefixing my references with an ampersand.) +. +.se How do I include source code without needing to escape it? +.p +The +.i µ +distribution includes a troff preprocessor called +.i list , +which filters text delimited by +.c .l( +and +.c .l) , +escaping standard troff syntax. +.p +To automatically add a +.c .l +request before each listing, set the +.i -p +(prefix) flag accordingly: +.l( +list -p.l +.l) +.p +To transparently pass an input line to troff, +prefix it with +.c \\\\! . +(To disable this behavior, use the +.i -E +flag.) @@ -3,7 +3,7 @@ # list -- escape code listing for troff use Getopt::Std; -BEGIN { getopt('Ep:s:'); } +BEGIN { getopt('Ep:s:') } if (/^\.\s*l\(\s*$/ .. /^\.\s*l\)\s*$/) { not $opt_E and s/^\\!// and next; |