From: Mark Wooding Date: Sun, 30 Aug 2015 09:58:38 +0000 (+0100) Subject: doc/sod.sty: Add macro for table column heads. X-Git-Url: https://git.distorted.org.uk/~mdw/sod/commitdiff_plain/2ba6e0bde273dd3fd6c1288f53edf7b96f6442d1 doc/sod.sty: Add macro for table column heads. Somewhat unpleasant. --- diff --git a/doc/sod.sty b/doc/sod.sty index 2894feb..54d8c53 100644 --- a/doc/sod.sty +++ b/doc/sod.sty @@ -41,6 +41,16 @@ \let\implies\Rightarrow \let\epsilon\varepsilon +%% A table heading cell. Clone and hack \multicolumn. +\def\thd{\omit\@ifnextchar[\thd@{\thd@[l]}} +\def\thd@[#1]#2{% + \begingroup + \tab@multicol \tab@initread \let\tab@looped\tab@err@multi + \tab@preamble{}\def\tab@midtext{\bfseries#2}\tab@readpreamble{#1}% + \the\tab@preamble + \endgroup \ignorespaces +} + %% Unix manpage references. \def\man#1#2{\textbf{#1}(#2)}