doc/sod.sty: Add macro for table column heads.
[sod] / doc / sod.sty
index 7a52605..54d8c53 100644 (file)
 \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)}
 
 \atdef !{\m@maybe|\@scripts}
 \def\returns{\m@maybe\longrightarrow\m@maybe@end\hspace{0.5em}\ignorespaces}
 \atdef >{\leavevmode\unskip\hspace{0.5em}\returns}
+\atdef -#1{\if>#1{\ensuremath\rightarrow}\fi}
 
 %% Comment setting.
 \atdef ;#1\\{\normalfont\itshape;#1\\}