~mdw
/
sod
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
doc/: Align layout control commands to right margin in `tabbing' etc.
[sod]
/
doc
/
sod.sty
diff --git
a/doc/sod.sty
b/doc/sod.sty
index
9c9aaf8
..
1f653c9
100644
(file)
--- a/
doc/sod.sty
+++ b/
doc/sod.sty
@@
-62,7
+62,7
@@
\let\syntright\empty
%% Literal code is in sans face.
\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\/}%
\DeclareRobustCommand\code[1]{%
\ifmmode\hbox\else\leavevmode\fi%
{\normalfont\codeface\/#1\/}%
@@
-79,7
+79,7
@@
\atdef <#1>{\synt{#1}\@scripts}
\atdef "#1"{\lit*{#1}\@scripts}
\atdef `#1'{\lit{#1}\@scripts}
\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}
%% A handy abbreviation; `\\' itself is too good to steal.
\atdef \\{\textbackslash}
@@
-119,7
+119,11
@@
\atdef -#1{\if>#1\hbox{--\raisebox{.4pt}{>}}\penalty200\relax\fi}
%% Comment setting.
\atdef -#1{\if>#1\hbox{--\raisebox{.4pt}{>}}\penalty200\relax\fi}
%% Comment setting.
-\atdef ;#1\\{\normalfont\itshape;#1\\}
+\def\comment#1{\mbox{\normalfont\itshape\/#1\/}}
+\atdef /*#1*/{/*\comment{#1}*/}
+\def\@semis{\@ifnextchar;{;\@semis}\@semicomment}
+\def\@semicomment#1\\{\comment{#1}\\}
+\atdef ;#1\\{;\@semis}
%% Environment for setting programs. Newlines are explicit, because
%% otherwise I need comments in weird places to make the vertical spacing
%% Environment for setting programs. Newlines are explicit, because
%% otherwise I need comments in weird places to make the vertical spacing