From: Mark Wooding Date: Thu, 17 Sep 2015 17:21:05 +0000 (+0100) Subject: doc/sod.sty: Hack underscores in the labels generated by `describe'. X-Git-Url: https://git.distorted.org.uk/~mdw/sod/commitdiff_plain/23e44cba8fe33e8cdde22d1ae14d78d992b9f8bb doc/sod.sty: Hack underscores in the labels generated by `describe'. Turn them into `-' because otherwise everything goes wrong. --- diff --git a/doc/sod.sty b/doc/sod.sty index 105a6c7..7a52605 100644 --- a/doc/sod.sty +++ b/doc/sod.sty @@ -152,7 +152,10 @@ \vspace{\bigskipamount}% \setbox\z@\hbox{\bfseries[\describecategoryname{#2}]}% \dimen@\linewidth\advance\dimen@-\wd\z@% - \def\@temp##1 ##2\q@{\message{#2:##1}\label{#2:##1}}% + \def\@temp##1 ##2\q@{% + \message{#2:##1}% + {\def\@uscore####1{-}\edef\@tempb{\noexpand\label{#2:##1}}\@tempb}% + }% \def\@tempa{#1}\ifx\@tempa\q@\@temp#3 \q@\else\@temp{#1} \q@\fi% \edef\@temp{{\the\linewidth}{@{}p{\the\dimen@}% @{\extracolsep{\fill}}l@{\extracolsep{0pt}}}}%