doc/sod.sty: Rewrite `@-' to cope with other things following.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 5 Aug 2019 17:06:07 +0000 (18:06 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 5 Aug 2019 17:06:07 +0000 (18:06 +0100)
Also, typesets as a dash, which is probably good.

doc/sod.sty

index 3560c62..1cfc065 100644 (file)
 \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\hbox{--\raisebox{.4pt}{>}}\penalty200\relax\fi}
+\atdef -{\leavevmode\hbox\bgroup\futurelet\ch@\@dash}
+\def\@dash{%
+  \ifx\ch@>%
+    --\raisebox{.4pt}{>}%
+    \def\next@{\@firstoftwo{\egroup\penalty200\relax}}%
+  \else%
+    --%
+    \let\next@\egroup%
+  \fi\fi
+  \next@%
+}
 
 %% Comment setting.
 \def\comment#1{\mbox{\normalfont\itshape\/#1\/}}