summaryrefslogtreecommitdiff
path: root/man/header.t2t
diff options
context:
space:
mode:
Diffstat (limited to 'man/header.t2t')
-rw-r--r--man/header.t2t31
1 files changed, 31 insertions, 0 deletions
diff --git a/man/header.t2t b/man/header.t2t
new file mode 100644
index 0000000..edc8cb2
--- /dev/null
+++ b/man/header.t2t
@@ -0,0 +1,31 @@
+%!target: man
+%!encoding: UTF-8
+
+% Special formatting for certain constructs. They, unfortunately
+% have to be post-processed. The _italic_ hack is necessary for
+% italicising things like /_foo_/, which txt2tags will ignore.
+% The others need to work in ``` lines.
+%!postproc(man): (<.*?>) \\fI\1\\fR
+%!postproc(man): \b_(.*?)_ \\fI\1\\fR
+%!postproc(man): `(.*?)` \\fB\1\\fR
+%!postproc(man): (\[.*?\]) \\fI\1\\fR
+%!postproc(man): \+$ \n.P
+%!postproc(man): (\$[a-zA-Z_]+) \\fB\1\\fR
+%!postproc(man): (\${[a-zA-Z_]+)(.*?)} \\fB\1\\fR\2\\fB}\\fR
+
+%!postproc(html): (<.*?>) (:arg \1:)
+%!postproc(html): \b_(.*?)_ (:emph \1:)
+%!postproc(html): `(.*?)` (:code \1:)
+%!postproc(html): \+$ <br/>
+
+%!postproc(html) \(:(\w+)\s*(.*):\) <span class="\1">\2</span>
+
+% Well, it seems that txt2tags isn't particularly well suited
+% to troff output. These two hacks make multi-level definition
+% lists possible.
+%!postproc(man): ^\s*>>$ .RS 8
+%!postproc(man): ^\s*<<$ .RS -8
+
+%!postproc(html): ^\s*>>$
+%!postproc(html): ^\s*<<$
+