summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/autonum
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-12-19 23:20:05 +0000
committerKarl Berry <karl@freefriends.org>2014-12-19 23:20:05 +0000
commita3bb5abaf88c429db37fef119741ee780664428a (patch)
treeda08c4163213f6f72c4aa70e11d2b4463efa2be1 /Master/texmf-dist/doc/latex/autonum
parent628f4fa7af89a5208879f94f4893e3361408a497 (diff)
autonum (20dec14)
git-svn-id: svn://tug.org/texlive/trunk@35865 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/autonum')
-rw-r--r--Master/texmf-dist/doc/latex/autonum/README1
-rw-r--r--Master/texmf-dist/doc/latex/autonum/autonum.pdfbin279967 -> 291315 bytes
-rw-r--r--Master/texmf-dist/doc/latex/autonum/test-autonum.pdfbin101725 -> 102991 bytes
-rw-r--r--Master/texmf-dist/doc/latex/autonum/test-autonum.tex119
4 files changed, 106 insertions, 14 deletions
diff --git a/Master/texmf-dist/doc/latex/autonum/README b/Master/texmf-dist/doc/latex/autonum/README
index 251898c06ae..bb0ab5023ed 100644
--- a/Master/texmf-dist/doc/latex/autonum/README
+++ b/Master/texmf-dist/doc/latex/autonum/README
@@ -15,3 +15,4 @@ Usage: \usepackage{autonum}
Everything else should happen automatically.
To use autonum together with other packages, load autonum last.
+
diff --git a/Master/texmf-dist/doc/latex/autonum/autonum.pdf b/Master/texmf-dist/doc/latex/autonum/autonum.pdf
index fb612176019..0587e222e1e 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 d60bab22107..a0f49983eab 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 adc9300fd55..2d2d890cb60 100644
--- a/Master/texmf-dist/doc/latex/autonum/test-autonum.tex
+++ b/Master/texmf-dist/doc/latex/autonum/test-autonum.tex
@@ -1,16 +1,22 @@
\documentclass{article}
+% Load hyperref early to avoid an error on compilation without existing aux-file. This is in contrast to what is recommended in hyperref's documentation. When deleting the aux-file, there was an error on first compilation if hyperref was defined after the \AtEndDocument command below. But as the second compilation run without error and as the error also happened without autonum, this is a problem outside unrelated to autonum.
+\usepackage[hypertexnames=false]{hyperref}
+
% Make this document look like endless paper to avoid page breaks, which make some of the tests useless.
% See http://tex.stackexchange.com/a/27057/7323
\usepackage{geometry}
\geometry{paperwidth=20cm,paperheight=\maxdimen,margin=4cm}
\usepackage{etoolbox}
\AtBeginDocument{
- \setbox0=\vbox\bgroup
- \preto\enddocument{\egroup
- \dimen0=\dp0
- \pdfpageheight=\dimexpr\ht0+10cm\relax
- \unvbox0\kern-\dimen0 }
+ \setbox0=\vbox
+ \bgroup
+}
+\AtEndDocument{
+ \egroup
+ \dimen0=\dp0
+ \pdfpageheight=\dimexpr\ht0+10cm\relax
+ \unvbox0\kern-\dimen0
}
% \usepackage[english,ngerman]{babel}
@@ -18,7 +24,6 @@
% \usepackage[utf8x]{inputenx}
\usepackage{amsmath}
-\usepackage[hypertexnames=false]{hyperref}
\usepackage{cleveref}
\usepackage{autonum}
@@ -75,9 +80,13 @@
\end{equation}
\ref{referenceAfter}
\item Having an unlabeled equation
- \begin{equation}\label{abc}
+ \begin{equation}
a^2 + b^2 = c^2
\end{equation}
+ \item Having a labeled equation with the label at the end of the equation \ref{abc}
+ \begin{equation}
+ a^2 + b^2 = c^2\label{abc}
+ \end{equation}
\item Having a labeled, but unreferenced equation
\begin{equation}\label{unreferenced}
\sqrt{a}
@@ -207,8 +216,89 @@
\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 align with line breaks with extra spacing
+ \begin{align}
+ a
+ \\[\baselineskip]
+ b
+ \end{align}
+ \ifautonum{
+ \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 align and split with the label defined before the split environment \ref{splitAlign}
+ \begin{align}
+ \label{splitAlign}
+ \begin{split}
+ s
+ \end{split}
+ \end{align}
+ \makeatletter
+ \ifdef{\autonum@currentLabel}{TEST FEHLGESCHLAGEN!}{}
+ \makeatother
+ \item align and split with the label defined in the split environment \ref{splitInAlign}
+ \begin{align}
+ \begin{split}
+ s\label{splitInAlign}
+ \end{split}
+ \end{align}
+ \item Align with split and non-split (should have two lines)
+ \begin{align}
+ \begin{split}
+ \text{line 1}
+ \end{split}
+ \\
+ \text{line 2}
+ \end{align}
+ \item Align with non-split and split (should have two lines)
+ \begin{align}
+ \text{line 1}
+ \\
+ \begin{split}
+ \text{line 2}
+ \end{split}
+ \end{align}
+ \item Align with two splits (should have four lines), none referenced)
+ \begin{align}
+ \begin{split}
+ \text{line 1}
+ \\
+ \text{line 2}
+ \end{split}
+ \\
+ \begin{split}
+ \text{line 3}
+ \\
+ \text{line 4}
+ \end{split}
+ \end{align}
+ \item Align with two splits (should have four lines), both referenced \ref{firstSplit} and \ref{secondSplit})
+ \begin{align}
+ \label{firstSplit}
+ \begin{split}
+ \text{line 1}
+ \\
+ \text{line 2}
+ \end{split}
+ \\
+ \label{secondSplit}
+ \begin{split}
+ \text{line 3}
+ \\
+ \text{line 4}
+ \end{split}
+ \end{align}
+ \item Align with split and label at the wrong place should result in the detection of an error
+ {
+ % Redefine \PackageError in a TeX group so the redifinition does not scatter.
+ \def\PackageError#1#2#3{\\\text{Package error successfully detected.}}%
+ \begin{align}
+ \begin{split}
+ 1 = 1
+ \end{split}
+ \label{problematicLabel}
+ \end{align}
+ }
% \item super-short \[\(a+b\\d+e\)\]
% \item Using aligned \ref{alignedOne}, \ref{alignedThree}
% \begin{equation}
@@ -230,39 +320,40 @@
% \begin{equation}
% \sum\sum\sum\sum\sum\sum\sum\sum\sum\sum\sum\sum\sum\sum\sum\sum\sum\sum\sum a
% \end{equation}
- \item Split with a long line and a \texttt{\textbackslash notag} after ending split has too much spacing afterwards, if the split environment is not patched:
+ \item Split with a long line and a \textbackslash\texttt{notag} after ending split has too much spacing below the environment, if the split environment is not patched:
\begin{equation}
\begin{split}
\sum_1^2 a &= 2a\\
&= \sum_3^4 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
\end{split}\notag
\end{equation}
- \item Split with a long line and a \texttt{\textbackslash notag} before ending split has correct spacing afterwards:
+ \item Split with a long line and a \textbackslash\texttt{notag} before ending split has correct spacing below the environment:
\begin{equation}
\begin{split}
\sum_1^2 a &= 2a\\
&= \sum_3^4 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\notag
\end{split}
\end{equation}
- \item Split with a long line should have correct spacing afterwards automatically:
+ \item Split with a long line and without an explicit \textbackslash\texttt{notag} should have the same spacing as directly above and not the spacing as directly below:
\begin{equation}
\begin{split}
\sum_1^2 a &= 2a\\
&= \sum_3^4 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
\end{split}
\end{equation}
- \item Split with a long line should have long spacing afterwards if it is referenced \ref{splitLong}:
+ \item Split with a long line should have long spacing below the environment if it is referenced \ref{splitLong}:
\begin{equation}\label{splitLong}
\begin{split}
\sum_1^2 a &= 2a\\
&= \sum_3^4 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
\end{split}
\end{equation}
- Note, that the \texttt{\textbackslash label} must not be put inside the \texttt{split} environment, as according to the \AmS-math documentation \texttt{split} provides no numbering.
+ Note, that the \textbackslash\texttt{label} must not be put inside the \texttt{split} environment, as according to the \AmS-math documentation \texttt{split} provides no numbering.
\end{itemize}
\section{Using ref in section \ref{i1}}\label{i1} text
\ifcleveref{
- \section{Using cref in \cref{i2}}\label{i2} text
+ % \cref with hyperref makes problems inside of \section: http://tex.stackexchange.com/a/138950. This seems to be unknown for cleveref's author according to 14.2 in cleveref's documentation. If it would be possible to detect that we are inside a moving argument, there could be an automatic solution.
+ \section{Using cref in \texorpdfstring{\cref{i2}}{Section \ref{i2}}}\label{i2} text
\begin{figure}
\caption{Ref 2: \cref{i2} and \ref{i2}}
\end{figure}