X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/3934b7ee2c441fc30d64e401facd0e798fe4978f..638cd32270bb6aa0596a594f590d2f093be5fd7a:/doc/sod.sty

diff --git a/doc/sod.sty b/doc/sod.sty
index eacd977..592ff5c 100644
--- a/doc/sod.sty
+++ b/doc/sod.sty
@@ -73,7 +73,8 @@
 %% Diagram settings.
 \tikzset{
   every picture/.style={>=stealth, thick},
-  lit/.style={font=\sffamily}
+  lit/.style={font=\sffamily},
+  dashed/.style={dash pattern=on 2.19pt off 2.19pt}
 }
 
 %% Metavariables are italics without decoration.
@@ -106,8 +107,8 @@
 
 %% Intercept grammar typesetting and replace the vertical bar with the
 %% maths-font version.
-\let\@@grammar\grammar
-\def\grammar{\def\textbar{\hbox{$|$}}\@@grammar}
+\let\@@syn@shorts\syn@shorts
+\def\syn@shorts{\def\textbar{\hbox{$|$}}\@@syn@shorts}
 
 %% Collect super- and subscripts.  (Note that underscores are active for the
 %% most part.)  When we're done, end maths mode if we entered it
@@ -305,7 +306,14 @@
 \def\@descname@i[#1]#2{%
   \expandafter\let\expandafter\@tempa\csname cat!#2\endcsname%
   \expandafter\let\expandafter\@tempb\csname modcat/#1\endcsname%
-  \ifx\@tempa\relax\@tempb{#2}\else\@tempa\@tempb\fi}
+  \ifx\@tempa\relax\PackageError{sod}{unknown description category `#2'}%
+    {I don't know what `#2' means as a thing you might try to\MessageBreak
+     document.  Maybe you mistyped it, or forgot to say\MessageBreak
+     `\protect\definedescribecategory' for it.  For now I'm going\MessageBreak
+     just use the literal string `#2' and hope that doesn't look\MessageBreak
+     too terrible.}%
+    \@tempb{#2}%
+  \else\@tempa\@tempb\fi}
 
 %% Call a modifier method.
 \def\@mod@dispatch#1#2{\csname #1/#2\endcsname}
