summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/autonum/autonum.pdfbin278034 -> 278308 bytes
-rw-r--r--Master/texmf-dist/doc/latex/autonum/test-autonum.pdfbin88845 -> 90055 bytes
-rw-r--r--Master/texmf-dist/doc/latex/autonum/test-autonum.tex134
-rw-r--r--Master/texmf-dist/source/latex/autonum/autonum.dtx29
-rw-r--r--Master/texmf-dist/tex/latex/autonum/autonum.sty13
5 files changed, 128 insertions, 48 deletions
diff --git a/Master/texmf-dist/doc/latex/autonum/autonum.pdf b/Master/texmf-dist/doc/latex/autonum/autonum.pdf
index 58a3642caa1..0f18d528ef8 100644
--- a/Master/texmf-dist/doc/latex/autonum/autonum.pdf
+++ b/Master/texmf-dist/doc/latex/autonum/autonum.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/autonum/test-autonum.pdf b/Master/texmf-dist/doc/latex/autonum/test-autonum.pdf
index 1949e6499c3..49857f80912 100644
--- a/Master/texmf-dist/doc/latex/autonum/test-autonum.pdf
+++ b/Master/texmf-dist/doc/latex/autonum/test-autonum.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/autonum/test-autonum.tex b/Master/texmf-dist/doc/latex/autonum/test-autonum.tex
index 6a568b94494..c220992cba4 100644
--- a/Master/texmf-dist/doc/latex/autonum/test-autonum.tex
+++ b/Master/texmf-dist/doc/latex/autonum/test-autonum.tex
@@ -1,5 +1,9 @@
\documentclass{article}
+% \usepackage[english,ngerman]{babel}
+% \usepackage[utf8]{inputenx}
+% \usepackage[utf8x]{inputenx}
+
\usepackage{amsmath}
\usepackage[hypertexnames=false]{hyperref}
\usepackage{cleveref}
@@ -9,6 +13,21 @@
\renewcommand{\theHequation}{\thechapter.\arabic{Hequation}}
\makeatletter
\g@addto@macro\equation{\stepcounter{Hequation}}
+
+\listfiles
+
+\@ifpackageloaded{autonum}{%
+ \def\ifautonum#1{#1}%
+}{%
+ \def\ifautonum#1{}%
+}
+
+\@ifpackageloaded{cleveref}{%
+ \def\ifcleveref#1{#1}%
+}{%
+ \def\ifcleveref#1{}%
+}
+
\makeatother
\begin{document}
@@ -24,8 +43,9 @@
% % \stop
% \begin{equation}\label{ee}b\end{equation}
\section*{Tests}
- Additionally test, that deactivating the package does not reuslt in compile errors during the next run if only basic features are used.
\begin{itemize}
+ \item Additionally, test that deactivating the package does not result in compile errors during the next run if only basic features are used.
+ \item Additionally, test that everything works with and without the above inputenx package (after deactivating the very strange label below).
\item Having a referenced equation with reference before \ref{referenceBefore}
\begin{equation}\label{referenceBefore}
d - d = 0
@@ -47,10 +67,27 @@
\begin{equation}\label{unreferenced}
\sqrt{a}
\end{equation}
- \item Having a labeled equation with a very strange label \ref{äöüÄÖÜß?:, 3075µ!/§}
+ \item Having a labeled equation with a very strange label \ref{äöüÄÖÜß?:, 3075µ!/§} does only work without package inputenx
\begin{equation}\label{äöüÄÖÜß?:, 3075µ!/§}
\sqrt{b}
\end{equation}
+ \item Having a labeled equation with a colon in the label \ref{label:colon}
+ \begin{equation}\label{label:colon}
+ \sqrt{c}
+ \end{equation}
+ \item Having an equation with a following label with a colon in the label \ref{labelAfter:colon}
+ \begin{equation}
+ \sqrt{d}\label{labelAfter:colon}
+ \end{equation}
+ \item Having an equation with a following label with a colon in the label
+ \begin{equation}
+ \sqrt{e}\label{referenceAfter:colon}
+ \end{equation}
+ and referencing \ref{referenceAfter:colon} only afterwards
+ \item Having a labeled equation with umlauts in the label \ref{äöüÄÖÜßLabel}
+ \begin{equation}\label{äöüÄÖÜßLabel}
+ \sqrt{c}
+ \end{equation}
\item Check for spurious whitespace around reference (\ref{checkWhitespace})
\begin{equation}\label{checkWhitespace}
b_c
@@ -59,46 +96,54 @@
\begin{equation}\label{checkStarred}
c_D
\end{equation}
- \item Check if the starred version of cref does also work (\cref*{checkStarredCref})
- \begin{equation}\label{checkStarredCref}
- d_E
- \end{equation}
+ \ifcleveref{
+ \item Check if the starred version of cref does also work (\cref*{checkStarredCref})
+ \begin{equation}\label{checkStarredCref}
+ d_E
+ \end{equation}
+ }
\item Placing the number in long equations \ref{long}
\begin{equation}\label{long}
\sum\sum\sum\sum\sum\sum\sum\sum\sum\sum\sum\sum\sum\sum\sum\sum\sum\sum\sum a
\end{equation}
- \item Printing the number without referencing (needs autonum)
- \begin{equation+}
- E = mgh
- \end{equation+}
+ \ifautonum{
+ \item Printing the number without referencing (needs autonum)
+ \begin{equation+}
+ E = mgh
+ \end{equation+}
+ }
\item Using a ref inside a caption
\begin{figure}
ref
\caption{\ref{long}}
\end{figure}
- \item Using a cref inside a caption
- \begin{figure}
- cref
- \caption{\cref{long}}
- \end{figure}
- \item Using cref with one argument
- \begin{equation}\label{crefOne}
- g
- \end{equation}
- \cref{crefOne}
- \item Using cref with two arguments
- \begin{equation}\label{crefTwo}
- cr = ef
- \end{equation}
- \cref{crefOne,crefTwo}
- \item Using otherwise unused cref with two arguments (needs autonum)
- \[\label{crefThree}
- cr = ef
- \]
- \[\label{crefFour}
- cr = ef
- \]
- \cref{crefThree,crefFour}
+ \ifcleveref{
+ \item Using a cref inside a caption
+ \begin{figure}
+ cref
+ \caption{\cref{long}}
+ \end{figure}
+ \item Using cref with one argument
+ \begin{equation}\label{crefOne}
+ g
+ \end{equation}
+ \cref{crefOne}
+ \item Using cref with two arguments
+ \begin{equation}\label{crefTwo}
+ cr = ef
+ \end{equation}
+ \cref{crefOne,crefTwo}
+ \ifautonum{
+ \item Using otherwise unused cref with two arguments (needs autonum)
+ \[\label{crefThree}
+ cr = ef
+ \]
+ \[\label{crefFour}
+ cr = ef
+ \]
+ \cref{crefThree,crefFour}
+ }
+ }
\item Using align \ref{alignOne}, \ref{alignThree}
\begin{align}
a\label{alignOne}\\
@@ -133,10 +178,12 @@
\end{alignat}
\item short one-line shortcut \[n\]
% \item shortcut environment with two lines, referencing \ref{firstShortcut} \[n_1\label{firstShortcut} \\ n_2\]
- \item align, numbering always \begin{align+} a=l \end{align+} (needs autonum)
- \item gather, numbering always \begin{gather+} g=a \end{gather+} (needs autonum)
- \item multline, numbering always (and avoiding overfull hbox warning) \begin{multline+} m=u\line(1,0){220}=v \end{multline+} (needs autonum)
- \item equation, numbering always \begin{equation+} e=q \end{equation+} (needs autonum)
+ \ifautonum{
+ \item align, numbering always \begin{align+} a=l \end{align+} (needs autonum)
+ \item gather, numbering always \begin{gather+} g=a \end{gather+} (needs autonum)
+ \item multline, numbering always (and avoiding overfull hbox warning) \begin{multline+} m=u\line(1,0){220}=v \end{multline+} (needs autonum)
+ \item equation, numbering always \begin{equation+} e=q \end{equation+} (needs autonum)
+ }
\item shortcut and split \ref{split} \[ \label{split}\begin{split} s \\ p \end{split} \] (needs autonum)
\item equation and split \ref{splitEquation} \begin{equation} \label{splitEquation}\begin{split} s \\ p \end{split} \end{equation}
% \item super-short \[\(a+b\\d+e\)\]
@@ -158,11 +205,12 @@
% \end{equation}
\end{itemize}
\section{Using ref in section \ref{i1}}\label{i1} text
- \section{Using cref in \cref{i2}}\label{i2} text
- \begin{figure}
- \caption{Ref 2: \cref{i2} and \ref{i2}}
- \end{figure}
+ \ifcleveref{
+ \section{Using cref in \cref{i2}}\label{i2} text
+ \begin{figure}
+ \caption{Ref 2: \cref{i2} and \ref{i2}}
+ \end{figure}
+ }
\tableofcontents
\listoffigures
-\end{document}
-
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/source/latex/autonum/autonum.dtx b/Master/texmf-dist/source/latex/autonum/autonum.dtx
index b1424f0cbd8..43d053fed81 100644
--- a/Master/texmf-dist/source/latex/autonum/autonum.dtx
+++ b/Master/texmf-dist/source/latex/autonum/autonum.dtx
@@ -85,7 +85,7 @@ and the derived files autonum.ins,
%</internal>
%<*package>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{autonum}[2013/06/15 v0.3.5 autonum LaTeX package]
+\ProvidesPackage{autonum}[2013/10/13 v0.3.6 autonum LaTeX package]
\PassOptionsToPackage{hypertexnames=false}{hyperref}
\RequirePackage{etoolbox}
\RequirePackage{amsmath}
@@ -133,6 +133,7 @@ and the derived files autonum.ins,
%\changes{v0.3.3}{2013/04/20}{Fix using cleveref inside section.}
%\changes{v0.3.4}{2013/04/28}{Gracefully handle deactivating the package.}
%\changes{v0.3.5}{2013/06/15}{Support reference commands with optional arguments or stars.}
+%\changes{v0.3.6}{2013/10/13}{Fix special characters regression. Fix deactivating the package with TOC and LOF}
%
% \section{Introduction}
% With \LaTeX, the user has to decide manually to not number an equation by adding a star in the math environment. Authors who do not want to think about the numbering during the writing (and maybe they should not), often use the environments without stars. As default, these users get all equations numbered, although there are \href{http://tex.stackexchange.com/q/29267/7323}{different opinions} about what should be numbered.
@@ -265,6 +266,8 @@ and the derived files autonum.ins,
%
% \section{Further Ideas}
% \begin{itemize}
+% \item For equations with multiple lines, which have a width close to the linewidth, but whose width at the middle/end is not so large, the equation number should not be set below the equation but next to the equation as it is done if the equation is smaller.
+% \item Every label and every reference string could be transformed by \cmd{\pdfmdfivesum} if pdftex and inputenc with utf8 are used. This would enable support for all sort of special characters
% \item A similar approach could be used for figure and table environments to print a warning, if such an environment is not referenced. With the subfig package, the solution would be harder, as a figure or table may be unreferenced, if all subfloats are referenced. Similarly, a subfloat may be unreferenced, if its parent environment is referenced. So the warning should only be printed if an unreferenced parent environment either does not have any child environment or if there is an unreferenced child environment.
% \item A warning could be printed, if another compile is necessary.
% \item A "*" could be used instead of a "+".
@@ -288,6 +291,7 @@ and the derived files autonum.ins,
% \item Joseph Wright
% \begin{itemize}
% \item created a \href{http://tex.stackexchange.com/a/64271/7323}{correctly working} \cmd{\csxdefaux} what lead to the support of special characters
+% \item sent an MWE showing a regression in the support of special characters what lead to its fix
% \end{itemize}
% \item Jonas Nyrup
% \begin{itemize}
@@ -323,6 +327,11 @@ and the derived files autonum.ins,
% \item Michel Voßkuhle
% \begin{itemize}
% \item found a bug when using autonum together with the subcaption package due to the missing support of starred reference commands in autonum which lead to its fix
+% \item sent an MWE showing a regression in the support of special characters what lead to its fix
+% \end{itemize}
+% \item Pascal Germroth
+% \begin{itemize}
+% \item sent an MWE showing a regression in the support of special characters what lead to its fix
% \end{itemize}
% \end{itemize}
%
@@ -348,11 +357,16 @@ and the derived files autonum.ins,
% \end{macrocode}
% The commented and the uncommented lines should do the same. The longer variant has the advantage, that there is no error the first run after the deactivation of the autonum package, as \cmd{\xdef}, read from the aux file, is always a known command, whereas \cmd{\csxdef} might not be known in that case, as with the deactivation of autonum it might happen, that etoolbox is not loaded anymore, too.
% \begin{macrocode}
-% \csxdef{\detokenize{#1}}{#2}%
- \expandafter\string\expandafter\xdef\expandafter\string\csname #1\endcsname{#2}%
+ \csxdef{\detokenize{#1}}{#2}%
}%
}
% \end{macrocode}
+% Do not abort compilation, if the package has been deactivated from the last compilation to the current one and thus \cmd{\csxdef} might have become undefined (as etoolbox might not be loaded anymore). Therefore, add a dummy implementation of \cmd{\csxdef} to the aux file, which gets loaded if the real implementation is not available any longer.
+% \begin{macrocode}
+\protected@write\@mainaux{}{%
+ \string\providecommand\string\csxdef[2]{}%
+}
+% \end{macrocode}
%\end{macro}
%\begin{macro}{\csxdefall}
@@ -785,6 +799,15 @@ and the derived files autonum.ins,
}%
}%
% \end{macrocode}
+% Do not abort compilation, if the package has been deactivated from the last compilation to the current one and thus the table of content or the list of figure files might reference the now undefined \cmd{\autonum@processReference} command. Therefore, add a dummy implementation to both files, which gets loaded if the real implementation is not available any longer. The dummy implementation is only written, if the respective files exist (are otherwise used).
+% \begin{macrocode}
+\addtocontents{toc}{%
+ \string\providecommand\string\autonum@processReference[2]{}%
+}
+\addtocontents{lof}{%
+ \string\providecommand\string\autonum@processReference[2]{}%
+}
+% \end{macrocode}
%\end{macro}
%\begin{macro}{\autonum@processReference}
diff --git a/Master/texmf-dist/tex/latex/autonum/autonum.sty b/Master/texmf-dist/tex/latex/autonum/autonum.sty
index 2b60e8db144..ee745a2cf84 100644
--- a/Master/texmf-dist/tex/latex/autonum/autonum.sty
+++ b/Master/texmf-dist/tex/latex/autonum/autonum.sty
@@ -13,7 +13,7 @@
%% ----------------------------------------------------------------
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{autonum}[2013/06/15 v0.3.5 autonum LaTeX package]
+\ProvidesPackage{autonum}[2013/10/13 v0.3.6 autonum LaTeX package]
\PassOptionsToPackage{hypertexnames=false}{hyperref}
\RequirePackage{etoolbox}
\RequirePackage{amsmath}
@@ -22,9 +22,12 @@
\def\csxdefaux#1#2{%
\protected@write\@mainaux{}{%
-\expandafter\string\expandafter\xdef\expandafter\string\csname #1\endcsname{#2}%
+\csxdef{\detokenize{#1}}{#2}%
}%
}
+\protected@write\@mainaux{}{%
+\string\providecommand\string\csxdef[2]{}%
+}
\def\csxdefall#1#2{%
\csxdefaux{#1}{#2}%
@@ -238,6 +241,12 @@
\autonum@processReferenceHelper{#1}{#2}{}%
}%
}%
+\addtocontents{toc}{%
+\string\providecommand\string\autonum@processReference[2]{}%
+}
+\addtocontents{lof}{%
+\string\providecommand\string\autonum@processReference[2]{}%
+}
% Mark label as referenced and call the old reference command. Do not write in the PDF's TOC, as this would lead to a write inside of a write when, e.g., calling \cmd{\cref} inside of a section command. Also use \cmd{\vanishprotect} to avoid writing \cmd{\autonum@markLabelAsReferenced} into the aux file or similar files. This avoids errors after deactivating the autonum package.
\def\autonum@processReferenceHelper#1#2#3#4{%