summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2018-10-05 08:52:48 +0900
committerNorbert Preining <norbert@preining.info>2018-10-05 08:52:48 +0900
commit82a134f3a80a882a0fcfb0a0fb56a6cbddd0c9ad (patch)
treec363999b99237090112d3a937be652587157e2ef
parent2adeb86c51702677b69eaece98d95e352ba8b2ab (diff)
aeb-minitoc (20181005)
-rw-r--r--texmf-dist/doc/latex/aeb-minitoc/README.md4
-rw-r--r--texmf-dist/doc/latex/aeb-minitoc/aeb-minitoc.pdfbin113430 -> 305767 bytes
-rw-r--r--texmf-dist/doc/latex/aeb-minitoc/aebminitocman.pdfbin272326 -> 276674 bytes
-rw-r--r--texmf-dist/doc/latex/aeb-minitoc/aebminitocman.tex8
-rw-r--r--texmf-dist/doc/latex/aeb-minitoc/examples/minitoc-art.pdfbin108828 -> 123829 bytes
-rw-r--r--texmf-dist/doc/latex/aeb-minitoc/examples/minitoc-art.tex20
-rw-r--r--texmf-dist/source/latex/aeb-minitoc/aeb-minitoc.dtx12
-rw-r--r--texmf-dist/tex/latex/aeb-minitoc/aeb-minitoc.sty7
8 files changed, 35 insertions, 16 deletions
diff --git a/texmf-dist/doc/latex/aeb-minitoc/README.md b/texmf-dist/doc/latex/aeb-minitoc/README.md
index bbd169e3..4cd0160e 100644
--- a/texmf-dist/doc/latex/aeb-minitoc/README.md
+++ b/texmf-dist/doc/latex/aeb-minitoc/README.md
@@ -1,12 +1,14 @@
The aeb-minitoc package
Author: D. P. Story
-Dated: 2018-09-21
+Dated: 2018-09-29
This package creates mini-TOCs through the use of the \insertminitoc command.
The system is powerful and flexible and allows for some amount of logic.
The package works for a the usual workflows
+What's New (2018-09-29): Delayed the redefinition of \addtocontents until beginning of document,
+to avoid incompatability with the siunitx package.
D. P. Story
www.acrotex.net
diff --git a/texmf-dist/doc/latex/aeb-minitoc/aeb-minitoc.pdf b/texmf-dist/doc/latex/aeb-minitoc/aeb-minitoc.pdf
index 91d37912..05f0568b 100644
--- a/texmf-dist/doc/latex/aeb-minitoc/aeb-minitoc.pdf
+++ b/texmf-dist/doc/latex/aeb-minitoc/aeb-minitoc.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/aeb-minitoc/aebminitocman.pdf b/texmf-dist/doc/latex/aeb-minitoc/aebminitocman.pdf
index d033cbb0..a224aabf 100644
--- a/texmf-dist/doc/latex/aeb-minitoc/aebminitocman.pdf
+++ b/texmf-dist/doc/latex/aeb-minitoc/aebminitocman.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/aeb-minitoc/aebminitocman.tex b/texmf-dist/doc/latex/aeb-minitoc/aebminitocman.tex
index f3feb993..3ae2c755 100644
--- a/texmf-dist/doc/latex/aeb-minitoc/aebminitocman.tex
+++ b/texmf-dist/doc/latex/aeb-minitoc/aebminitocman.tex
@@ -75,7 +75,7 @@
email={dpstory@acrotex.net},
subject={Documentation for the aeb-minitoc package from AcroTeX: Inserting TOCs within a section},
talksite={\url{www.acrotex.net}},
- version={1.6, 2018/09/21},
+ version={1.7, 2018/09/29},
Keywords={AcroTeX, mini-toc},
copyrightStatus=True,
copyrightNotice={Copyright (C) \the\year, D. P. Story},
@@ -279,7 +279,7 @@ When no option is passed, mini-tocs are created.
\newtopic\noindent\llap{\textcolor{red}{{\small\textit{Warning! }}\ding{042}}\enspace}%
This package modifies the entries in the \cs{jobname.toc} file. For this
package to work as designed, it must be loaded after any other package that
-modifies the TOC file.
+modifies the TOC file.\footnote{Such packages include \pkg{hyperref} and \pkg{siunitx}.}
\section{Commands and methods}\mtoclabel{CandM}
@@ -545,7 +545,7 @@ For those unfamiliar with such a macro, here is a simple example: My name is
\verb~D. P. Stor\mtocgobble{e}y~, this code expands to ``D. P. Stor\mtocgobble{e}y''. Not so impressive,
but the argument of \cs{mtocgobble} is oftentimes another macro or an expression grouped by braces (\texttt{\{\}}).
For example, \verb~\def\dps{ there}Don says `Hi\mtocgobble\dps!'~, which expands to
-\def\dps{ there}``Don says `Hi\mtocgobble\dps!''' See the paragraph \textbf{\nameref{spara:LPg}} on page~\pageref*{spara:LPg}
+\def\dpsi{ there}``Don says `Hi\mtocgobble\dpsi!''' See the paragraph \textbf{\nameref{spara:LPg}} on page~\pageref*{spara:LPg}
for an example of use. The macro is also used in some of the example files.
\subsubsection{Some examples that illuminate}\mtoclabel{SExmpls}
@@ -739,7 +739,7 @@ We mark it with \cs{mtoclabel}. Now we create a \env{minitocfmt} environment:
\begin{minitocfmt}{\minitocFmtstar}
!textbf(\declaretocfmt{subsection*}){\@W{0em}\@D{0em}} %!sffamily( declare a star-section fmt)
\end{minitocfmt}
-\insMinitoctab[myRetirement] %!textsf( !cs(nsMinitoctab) discussed beginning on page !pageref(ss:AltPresent))
+\insMinitoctab[myRetirement] %!textsf( !cs(insMinitoctab) discussed beginning on page !pageref(ss:AltPresent))
{\TOCLevels{section}{subsection}\minitocFmtstar}
\end{Verbatim}
\begin{minitocfmt}{\minitocFmtstar}
diff --git a/texmf-dist/doc/latex/aeb-minitoc/examples/minitoc-art.pdf b/texmf-dist/doc/latex/aeb-minitoc/examples/minitoc-art.pdf
index ec8542e6..9bec1861 100644
--- a/texmf-dist/doc/latex/aeb-minitoc/examples/minitoc-art.pdf
+++ b/texmf-dist/doc/latex/aeb-minitoc/examples/minitoc-art.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/aeb-minitoc/examples/minitoc-art.tex b/texmf-dist/doc/latex/aeb-minitoc/examples/minitoc-art.tex
index d3dd0df1..51a1307b 100644
--- a/texmf-dist/doc/latex/aeb-minitoc/examples/minitoc-art.tex
+++ b/texmf-dist/doc/latex/aeb-minitoc/examples/minitoc-art.tex
@@ -1,10 +1,20 @@
\documentclass{article}
\usepackage{xcolor}
-\usepackage[linktocpage,colorlinks]{hyperref}
+\usepackage[linktocpage,colorlinks,bookmarksnumbered]{hyperref}
\usepackage{booktabs}
\usepackage[!nominitocs]{aeb-minitoc} % try compiling with the nominitocs option
\usepackage{ifthen}
+\title{The \textsf{aeb-minitoc} Package\texorpdfstring{\\[1ex]}{: }Demo for article class}
+\author{D. P. Story}
+
+\hypersetup{%
+ pdftitle={The \textsf{aeb-minitoc} Package\texorpdfstring{\\[1ex]}{: }Demo for article class},
+ pdfauthor={D. P. Story},
+ pdfkeywords={minitoc,latex,pdf},
+ pdfsubject={package to create mini-tocs within a latex document}
+}
+
% Try uncommenting the next line, change subsection to subsection*
% and subsubsection to subsubsection* in the minitocfmt below. What other
% changes are needed to get a good looking mini-toc?
@@ -54,6 +64,8 @@
\begin{document}
+\maketitle
+
\tableofcontents
\newpage
@@ -65,9 +77,9 @@ The topic headings of this section are listed below.
\insMinitoc{\minitocFmt}
-
-For long section headings, for them to wrap around, we need to take the hyperref option
-\texttt{linktocpage}, unless pdflatex or xelatex are used.
+\noindent
+For long section headings to wrap around within the TOC, we need to take the hyperref option
+\texttt{linktocpage}, unless \textsf{pdflatex} or \textsf{xelatex} are used.
\subsection{Now is the time for all good men to come to the aid of their country, so it has been said}
diff --git a/texmf-dist/source/latex/aeb-minitoc/aeb-minitoc.dtx b/texmf-dist/source/latex/aeb-minitoc/aeb-minitoc.dtx
index 48e8a324..873a1e46 100644
--- a/texmf-dist/source/latex/aeb-minitoc/aeb-minitoc.dtx
+++ b/texmf-dist/source/latex/aeb-minitoc/aeb-minitoc.dtx
@@ -16,7 +16,7 @@
%</copyright>
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{aeb-minitoc}
-%<package> [2018/09/21 v1.6 Creates a simple mini-toc]
+%<package> [2018/09/29 v1.7 Creates a simple mini-toc]
%<*driver>
\documentclass{ltxdoc}
\usepackage[colorlinks,hyperindex=false,linktocpage,bookmarksnumbered]{hyperref}
@@ -97,7 +97,7 @@
% signals that there is a non-empty listing; otherwise, it is set to false. It is used to display
% a latex warning to the user that the listing is empty. Also, globally, \cs{ifMiniTocListings}
% is set to false when \IndexOpt{nominitocs}\opt{nominitocs} is taken. The other option
-% is \IndexOpt{\EXCL!nominitocs}\opt{!nominitocs} is a convenience option; it is not `not' version
+% is \IndexOpt[\protect\EXCL]{!nominitocs}\opt{!nominitocs} is a convenience option; it is not `not' version
% of \opt{nominitocs}; when \opt{!nominitocs} is specified, mini-tocs are created. This is the
% same as specifiying no option at all.
% \begin{macrocode}
@@ -171,7 +171,7 @@
\let\mtoc@contentsline\contentsline
\let\mtoc@starttoc\@starttoc
\let\mtoc@tableofcontents\tableofcontents
-\let\mtoc@addtocontents\addtocontents
+%\let\mtoc@addtocontents\addtocontents
% \end{macrocode}
% Some counters and utility macros. The counter \DescribeMacro\@minitocCnt\cs{@minitocCnt} is incremented
% in the redefined \cs{addtocontents} command. The command \DescribeMacro{\mtocgobble}\cs{mtocgobble} is
@@ -344,12 +344,16 @@
\def\mtocCL#1#2{#1}
% \end{macrocode}
% Here, we modify the macro \cs{addtocontents} to insert \cs{mtocCL}.
+% \changes{v1.7}{2018/09/29}{Delay redefinition of \string\cs{addtocontents} until beginning of document,
+% to avoid incompatability with \string\pkg{siunitx}.}
% \begin{macrocode}
-\renewcommand\addtocontents[2]{%
+\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}
+\AtBeginDocument{\let\mtoc@addtocontents\addtocontents
+ \let\addtocontents\addtocontents@mtoc}
% \end{macrocode}
% Modify the \cs{tableofcontents} to \cs{mtoc@tableofcontents}.
% We compensate later by executing \cs{mtoc@start@toc} at the end of the document.
diff --git a/texmf-dist/tex/latex/aeb-minitoc/aeb-minitoc.sty b/texmf-dist/tex/latex/aeb-minitoc/aeb-minitoc.sty
index 44e53789..2f0cd2f1 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/21 v1.6 Creates a simple mini-toc]
+ [2018/09/29 v1.7 Creates a simple mini-toc]
\newif\ifMiniTocListings \MiniTocListingstrue
\DeclareOption{nominitocs}{\AtEndOfPackage{\MiniTocListingsfalse
\let\insertminitoc\insertminitocNOT}}
@@ -28,7 +28,6 @@
\let\mtoc@contentsline\contentsline
\let\mtoc@starttoc\@starttoc
\let\mtoc@tableofcontents\tableofcontents
-\let\mtoc@addtocontents\addtocontents
\newcount\@minitocCnt \@minitocCnt=0\relax
\def\csarg#1#2{\expandafter#1\csname#2\endcsname}
\let\mtoc@One=1 \let\mtoc@Zero=0
@@ -125,11 +124,13 @@
\AtEndDocument{\mtoc@start@toc}
\def\mtoc@TOC{toc}
\def\mtocCL#1#2{#1}
-\renewcommand\addtocontents[2]{%
+\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}
+\AtBeginDocument{\let\mtoc@addtocontents\addtocontents
+ \let\addtocontents\addtocontents@mtoc}
\def\tableofcontents{%
\def\@starttoc##1{\makeatletter
\@input{\jobname.##1}\makeatother}%