diff options
author | Norbert Preining <norbert@preining.info> | 2019-10-08 18:47:54 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-10-08 18:49:38 +0900 |
commit | 8c11fe37546bc263967ee51a315a45ed9ed17f78 (patch) | |
tree | e32d1db06b26f3a43aed4895afe2275a5a5fd733 /texmf-dist/tex/latex | |
parent | 85afca4d393e935c93f01a4797141b0261d2743f (diff) |
aeb-minitoc (20191008)
Diffstat (limited to 'texmf-dist/tex/latex')
-rw-r--r-- | texmf-dist/tex/latex/aeb-minitoc/aeb-minitoc.sty | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/texmf-dist/tex/latex/aeb-minitoc/aeb-minitoc.sty b/texmf-dist/tex/latex/aeb-minitoc/aeb-minitoc.sty index 2f0cd2f1..9c3643fb 100644 --- a/texmf-dist/tex/latex/aeb-minitoc/aeb-minitoc.sty +++ b/texmf-dist/tex/latex/aeb-minitoc/aeb-minitoc.sty @@ -19,7 +19,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{aeb-minitoc} - [2018/09/29 v1.7 Creates a simple mini-toc] + [2019/10/06 v1.9 Creates a simple mini-toc] \newif\ifMiniTocListings \MiniTocListingstrue \DeclareOption{nominitocs}{\AtEndOfPackage{\MiniTocListingsfalse \let\insertminitoc\insertminitocNOT}} @@ -124,11 +124,17 @@ \AtEndDocument{\mtoc@start@toc} \def\mtoc@TOC{toc} \def\mtocCL#1#2{#1} -\newcommand\addtocontents@mtoc[2]{% - \def\mt@rgi{#1}\ifx\mt@rgi\mtoc@TOC - \global\advance\@minitocCnt\@ne - \mtoc@addtocontents{#1}{\protect\mtocCL{#2}{\the\@minitocCnt}}\else - \mtoc@addtocontents{#1}{#2}\fi} +\@ifundefined{add@percent@to@temptokena} + {\let\protected@file@percent\@empty\def\mtoc@protect{}} + {\def\mtoc@protect{\protect}} +\newcommand\addtocontents@mtoc[2]{\bgroup + \let\protected@file@percent\@empty + \def\mt@rgi{#1}\ifx\mt@rgi\mtoc@TOC + \global\advance\@minitocCnt\@ne + \mtoc@addtocontents{#1}{\protect + \mtocCL{#2}{\the\@minitocCnt}\mtoc@protect + \protected@file@percent}\else + \mtoc@addtocontents{#1}{#2}\fi\egroup} \AtBeginDocument{\let\mtoc@addtocontents\addtocontents \let\addtocontents\addtocontents@mtoc} \def\tableofcontents{% |