* Don't typeset the initial `;' as commentary; handle multiple initial
`;;' in sequence.
* Add new commands for general inside-comment typesetting, and for
C-style `/* ... */' comments. Maybe there should be a thing for
C++-style comments, but I don't tend to use them anyway.
* Highlight code text in commentary.
kw_unkhook = oldunk; \- @\\ \\
\} while (0)
\\+
kw_unkhook = oldunk; \- @\\ \\
\} while (0)
\\+
- /* Example of use */ \\
+ @/* Example of use */ \\
int f; \\
KW_TEST(f, somefunc(1, "two", 3, KWARGS_TEST("shiny", 68.7))); \\
int f; \\
KW_TEST(f, somefunc(1, "two", 3, KWARGS_TEST("shiny", 68.7))); \\
- /\=* now f is nonzero if `somefunc' accepts the `shiny' keyword \+ \\
- {}* (which we hope wants a double argument) \\
+ /\=* \comment{now @|f| is nonzero if @|somefunc| accepts the
+ @|shiny| keyword} \+ \\
+ {}* \comment{(which we hope wants a @|double| argument)} \\
\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