summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/crumbs/crumbs.sty68
1 files changed, 34 insertions, 34 deletions
diff --git a/Master/texmf-dist/tex/latex/crumbs/crumbs.sty b/Master/texmf-dist/tex/latex/crumbs/crumbs.sty
index 17194892c04..8440f80ba58 100644
--- a/Master/texmf-dist/tex/latex/crumbs/crumbs.sty
+++ b/Master/texmf-dist/tex/latex/crumbs/crumbs.sty
@@ -21,7 +21,10 @@
% SOFTWARE.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{crumbs}[2021/09/12 0.3.0 Navigation Crumbs]
+\ProvidesPackage{crumbs}[2021/09/13 0.3.1 Navigation Crumbs]
+
+\RequirePackage{xkeyval}
+\RequirePackage{etoolbox}
\makeatletter\newif\ifcrumbs@dry\makeatother
\makeatletter\DeclareOption{dry}{\crumbs@drytrue}\makeatother
@@ -29,8 +32,6 @@
\makeatletter\DeclareOption{increment}{\crumbs@incrementtrue}\makeatother
\ProcessOptions\relax
-\RequirePackage{etoolbox}
-
% see https://tex.stackexchange.com/a/12414/1449
\makeatletter\newcommand\crumbs@back{\@backslashchar}\makeatother
% \makeatletter\newcommand\crumbs@percent{\@percentchar}\makeatother
@@ -47,22 +48,22 @@
\endgroup
}
-\newcommand\subcrumbs{
- \ifnum\value{section}=0\else
- \expandafter\ifcsname crumbs\romannumeral\the\value{section}\endcsname
- \csname crumbs\romannumeral\the\value{section}\endcsname{}
- \fi
- \fi
+\newcommand\subcrumbs{%
+ \ifnum\value{section}=0\else%
+ \expandafter\ifcsname crumbs\romannumeral\the\value{section}\endcsname%
+ \csname crumbs\romannumeral\the\value{section}\endcsname{}%
+ \fi%
+ \fi%
}
\makeatletter\newcommand\crumbection[2][]{%
\def\temp{#1}%
\ifx\crumbs\empty%
- \appendtofile{\jobname.crumbs}{
- \crumbs@back ifx \crumbs@back crumbs \crumbs@back empty
- \crumbs@back gappto \crumbs@back crumbs{\crumbs@back setcounter{crumbi}{0}}
- \crumbs@back fi
- \crumbs@back gappto\crumbs@back crumbs{\crumbs@back stepcounter{crumbi}\crumbs@back crumb{\ifx\temp\empty #2\else #1\fi}{#2}}
+ \appendtofile{\jobname.crumbs}{%
+ \crumbs@back ifx\crumbs@back crumbs\crumbs@back empty%
+ \crumbs@back gappto\crumbs@back crumbs{\crumbs@back setcounter{crumbi}{0}}%
+ \crumbs@back fi%
+ \crumbs@back gappto\crumbs@back crumbs{\crumbs@back stepcounter{crumbi}\crumbs@back crumb{\ifx\temp\empty #2\else #1\fi}{#2}}%
}%
\fi%
\ifcrumbs@increment\stepcounter{section}\fi%
@@ -71,24 +72,23 @@
\makeatletter\newcommand\subcrumbection[2][]{%
\def\temp{#1}%
\ifx\crumbs\empty%
- \appendtofile{\jobname.crumbs}{
+ \appendtofile{\jobname.crumbs}{%
\crumbs@back ifcsname crumbs\romannumeral\the\value{section}\crumbs@back endcsname\crumbs@back else
\crumbs@back expandafter\crumbs@back newcommand\crumbs@back csname crumbs\romannumeral\the\value{section}\crumbs@back endcsname{%
- \crumbs@back setcounter{subcrumbi}{0}
- }
- \crumbs@back fi
+ \crumbs@back setcounter{subcrumbi}{0}%
+ }%
+ \crumbs@back fi%
\crumbs@back expandafter\crumbs@back gappto\crumbs@back csname crumbs\romannumeral\the\value{section}\crumbs@back endcsname{%
- \crumbs@back stepcounter{subcrumbi}
- \crumbs@back subcrumb{\ifx\temp\empty #2\else #1\fi}{#2}
- }
+ \crumbs@back stepcounter{subcrumbi}%
+ \crumbs@back subcrumb{\ifx\temp\empty #2\else #1\fi}{#2}}%
}%
\fi%
\ifcrumbs@increment\stepcounter{subsection}\fi%
}\makeatother
-\makeatletter\ifcrumbs@dry
- \message{Since "dry" mode is ON we don't renew "section" and "subsection" commands}
-\else
+\makeatletter\ifcrumbs@dry%
+ \message{Since "dry" mode is ON we don't renew "section" and "subsection" commands}%
+\else%
\NewCommandCopy\crumbs@oldsection\section
\renewcommand\section[2][]{%
\crumbection[#1]{#2}%
@@ -101,16 +101,16 @@
}
\fi\makeatletter
-\ifcsname crumb\endcsname
- \message{The command "crumb" is already defined}
-\else
- \newcommand\crumb[2]{#1}
-\fi
-\ifcsname subcrumb\endcsname
- \message{The command "subcrumb" is already defined}
-\else
- \newcommand\subcrumb[2]{#1}
-\fi
+\ifcsname crumb\endcsname%
+ \message{The command "crumb" is already defined}%
+\else%
+ \newcommand\crumb[2]{#1}%
+\fi%
+\ifcsname subcrumb\endcsname%
+ \message{The command "subcrumb" is already defined}%
+\else%
+ \newcommand\subcrumb[2]{#1}%
+\fi%
\newcommand*\crumbs{}
\newcounter{crumbi}