From c55b9cc88871282bb3ecc28eb12f63382d8b4d2b Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sat, 5 Sep 2020 15:45:35 +0100 Subject: [PATCH] mdwtools.tex: Partition stuff as front/main/back matter if available. If we detect a document class which supports the distinction, set the table of contents as frontmatter and the index as backmatter. --- mdwtools.tex | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mdwtools.tex b/mdwtools.tex index 391ae90..1a0d37e 100644 --- a/mdwtools.tex +++ b/mdwtools.tex @@ -36,7 +36,7 @@ % % \end{meta-comment} % -% \CheckSum{691} +% \CheckSum{709} %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z @@ -636,6 +636,7 @@ \def\do##1##2{\addtocontents{##1}{\protect\end{multicols}}}% \docontents% \fi% + \ifx\backmatter\@@undefined\else\backmatter\fi% \PrintIndex% } % \end{macrocode} @@ -1139,6 +1140,7 @@ % % \begin{macrocode} \begin{document} + \ifx\frontmatter\@@undefined\else\frontmatter\fi% \maketitle% % \end{macrocode} % @@ -1167,6 +1169,7 @@ % Input the main file now. % % \begin{macrocode} + \ifx\mainmatter\@@undefined\else\mainmatter\fi% \DocInput{\@basefile}% % \end{macrocode} % -- 2.11.0