X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/888d5e58c8cff289ff56a9282608c153b402191c..5f32b8fda0421d16fc3455d1ce9aef746afbd818:/doc/sod.sty?ds=sidebyside diff --git a/doc/sod.sty b/doc/sod.sty index d6a8a65..2b68df4 100644 --- a/doc/sod.sty +++ b/doc/sod.sty @@ -62,13 +62,14 @@ \let\syntright\empty %% Literal code is in sans face. -\let\codeface\sffamily +\def\codeface{\upshape\sffamily} \DeclareRobustCommand\code[1]{% \ifmmode\hbox\else\leavevmode\fi% {\normalfont\codeface\/#1\/}% } \def\ulitleft{\normalfont\codeface} \let\ulitright\empty +\def\lit@i#1#2#3{\ifmmode\leavevmode\hbox\fi{#1{#3\/}#2}} %% Conditionally enter maths mode. Can't use \ensuremath here because we %% aren't necessarily sure where the maths will actually end. @@ -79,7 +80,7 @@ \atdef <#1>{\synt{#1}\@scripts} \atdef "#1"{\lit*{#1}\@scripts} \atdef `#1'{\lit{#1}\@scripts} -\atdef |#1|{\textsf{#1}\@scripts} +\atdef |#1|{\lit*{#1}\@scripts} %% A handy abbreviation; `\\' itself is too good to steal. \atdef \\{\textbackslash} @@ -136,6 +137,7 @@ \def\ind{\quad\=\+\kill} \def\@progcr{\futurelet\@tempa\@progcr@i} {\def\:{\gdef\@progcr@sp}\: {\@progcr}} +\atdef~{\textasciitilde} \def\@progcr@i{% \ifx\@tempa\@sptoken\let\next@\@progcr@sp\else \if1\ifx\@tempa[1\else @@ -152,6 +154,7 @@ \def\@progcr@ii#1{\csname @progcr@#1\endcsname\ignorespaces} \@namedef{@progcr@+}{\prog@@cr[\medskipamount]} \@namedef{@progcr@-}{\prog@@cr*[\jot]} +\def\macsl{\`\textbackslash\hskip\leftmargin} %% Put a chunk of text in a box. \newenvironment{boxy}[1][\q@]{% @@ -185,6 +188,7 @@ \definedescribecategory{be-meth}{before method} \definedescribecategory{af-meth}{after method} \definedescribecategory{cls}{class} +\definedescribecategory{rst}{restart} \definedescribecategory{ty}{type} \definedescribecategory{type}{type} \definedescribecategory{mac}{macro}