diff options
-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; |