From: Mark Wooding Date: Wed, 7 Aug 2019 15:15:31 +0000 (+0100) Subject: doc/sod.sty: Make the `modindex' and `modlabel' argument order less mad. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/sod/commitdiff_plain/aadea863f48c4b1b4cdd20f2d6eeb5fde627c2c4?ds=inline doc/sod.sty: Make the `modindex' and `modlabel' argument order less mad. Now it's {MOD}{CAT}{...}...{NAME}, like (nearly) everything else. --- diff --git a/doc/sod.sty b/doc/sod.sty index d314ee1..75acc2d 100644 --- a/doc/sod.sty +++ b/doc/sod.sty @@ -299,10 +299,10 @@ %% Category-kind methods for plain categories. \@namedef{descargs/plain}#1{#1{}} -\@namedef{desclabel/plain}#1#2#3{#1:\@mod@dispatch{modlabel}{#2}{#3}} +\@namedef{desclabel/plain}#1#2#3{#2:\@mod@dispatch{modlabel}{#1}{#3}} \@namedef{descindex/plain}#1#2#3{% - \@mod@dispatch{modindex}{#2}{#3}!% - \protect\describecategoryname[#2]{#1}% + \@mod@dispatch{modindex}{#1}{#3}!% + \protect\describecategoryname[#1]{#2}% } %% Category-kind methods for `method' categories. Collect an extra argument @@ -328,11 +328,11 @@ } \@namedef{descargs/method}#1#2{#1{{#2}}} \@namedef{desclabel/method}#1#2#3#4% - {#1:\@mod@dispatch{modlabel}{#2}{#3}(#4)} + {#2:\@mod@dispatch{modlabel}{#1}{#4}(#3)} \@namedef{descindex/method}#1#2#3#4{% - \@mod@dispatch{modindex}{#2}{#3}!% - \protect\describecategoryname[#2]{#1}% - \protect\fmtspecs{ specialized at }{#4}% + \@mod@dispatch{modindex}{#1}{#4}!% + \protect\describecategoryname[#1]{#2}% + \protect\fmtspecs{ specialized at }{#3}% } %% Some magic strings. @@ -395,12 +395,12 @@ \if@dheadfirst\global\@dheadfirstfalse\else\relax\\*[\smallskipamount]\fi% \phantomsection% {\let\protect\@empty\let\@uscore\relax% - \edef\temp@{\@desc@dispatch{desclabel}{#2}{#2}{#1}{#4}#3}% + \edef\temp@{\@desc@dispatch{desclabel}{#2}{#1}{#2}#3{#4}}% \def\@uscore{_\@gobble}\expandafter\message\expandafter{\temp@}% \def\@uscore{-\@gobble}\expandafter\label\expandafter{\temp@}}% {\begingroup\lccode`\~=`\_\lowercase{\endgroup\def~{_}}% \protected@edef\@tempa##1{% - \noexpand\index{\@desc@dispatch{descindex}{#2}{#2}{#1}{#4}#3##1}}% + \noexpand\index{\@desc@dispatch{descindex}{#2}{#1}{#2}#3{#4}##1}}% \toks@\expandafter{\@tempa{|)}}% \toks\tw@\expandafter{\after@desc}% \xdef\after@desc{\the\toks\tw@\the\toks@}%