diff options
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/autonum/autonum.dtx | 31 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/autonum/autonum.ins | 11 |
2 files changed, 31 insertions, 11 deletions
diff --git a/Master/texmf-dist/source/latex/autonum/autonum.dtx b/Master/texmf-dist/source/latex/autonum/autonum.dtx index 05b7b4658a0..4f5bbb54de2 100644 --- a/Master/texmf-dist/source/latex/autonum/autonum.dtx +++ b/Master/texmf-dist/source/latex/autonum/autonum.dtx @@ -86,7 +86,7 @@ and the derived files autonum.ins, %</internal> %<*package> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{autonum}[2012/08/16 v0.3 autonum LaTeX package] +\ProvidesPackage{autonum}[2012/08/25 v0.3.1 autonum LaTeX package] \PassOptionsToPackage{hypertexnames=false}{hyperref} \RequirePackage{etoolbox} \RequirePackage{amsmath} @@ -128,6 +128,7 @@ and the derived files autonum.ins, %\changes{v0.1}{2012/05/26}{First public release} %\changes{v0.2}{2012/06/21}{Support multi-line environments. Redefine \cmd{\[} to use the new \cmd{\equation}.} %\changes{v0.3}{2012/08/16}{Support alignat and flalign environments. Fix handling of special characters in label names. Fix handling of multiple label names in \cmd{\cref} command.} +%\changes{v0.3.1}{2012/08/25}{Fix of leading whitespace in references. Fix of underfull hbox.} % % \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. @@ -142,7 +143,7 @@ and the derived files autonum.ins, % \cmd{\usepackage\{autonum\}} % \vspace{0.5em} % -% The recommended style is to add a label to each logical equation. Then, simply use the references as needed. Never use the starred forms when defining an equation as they do not make sense with autonum and are deactivated. You can use the (redefined) \texttt{equation} or \cmd{\[}-\cmd{\]}-environment in most cases, if you add the appropriate \cmd{\begin\{split\}}-\cmd{\end\{split\}} pairs when needed. Sometimes, an \texttt{align}, \texttt{multline}, \texttt{gather}, \texttt{flalign} or \texttt{alignat} environment is needed.^^A, rarely use the \texttt{aligned} or \texttt{gathered} environments. +% The recommended style is to add a label to each logical equation. Then, simply use the references as needed. Never use the starred forms when defining an equation as they do not make sense with autonum and are deactivated. You can use the (redefined) \texttt{equation} or \cmd{\[}-\cmd{\]}-environment in most cases, if you add the appropriate \cmd{\begin\{split\}}-\cmd{\end\{split\}} pairs when needed. Sometimes, an \texttt{align}, \texttt{multline}, \texttt{gather}, \texttt{flalign} or \texttt{alignat} environment is needed. Do \href{http://tug.org/pracjourn/2006-4/madsen/madsen.pdf}{not use \texttt{eqnarray}}.^^A, rarely use the \texttt{aligned} or \texttt{gathered} environments. % % Please keep in mind, that using autonum might not always be a good thing. If you hand-in a paper for review with many equations on a page, you might avoid using autonum or if you do, you probably should reference most of your equations or activate line numbers. % @@ -233,7 +234,7 @@ and the derived files autonum.ins, % \item A warning could be printed, if another compile is necessary. % \item A "*" could be used instead of a "+". % \item If a reference is used before the label is defined, the reference information is saved in a variable and can be used later in the current run when processing the label. It does not have to be saved to the aux file. If a reference is used after defining the label, the reference information is saved in the aux file and can be used in the next run when processing the label. The information does not have to be saved into a variable, as a label must only be defined once and the definition has already happened. Unfortunately, this would make it necessary to distinguish between definitions in the current and in the last run, as otherwise this leads either to oscillation or to defining everything in the end (depending if csdefaux or csdefall is used in the not-defined case), which is probably not worth the effort. -% \item The command \cmd{\(} could be an alias for \cmd{begin\{split\}} and \cmd{\)} could be an alias for \cmd{end\{split\}} +% \item The command \cmd{\(} could be an alias for \texttt{begin\{split\}} and \cmd{\)} could be an alias for \texttt{end\{split\}} % \item This \href{http://tex.stackexchange.com/a/5652}{trick} might be handy % \item The \cmd{\crefrange} might be supported. As this would require a lot of work it will only be done if multiple people show interest and there are really convincing real-world examples where using \cmd{\crefrange} is superior to using \cmd{\cref}. Patches are, of course, welcome, too. % \end{itemize} @@ -261,6 +262,16 @@ and the derived files autonum.ins, % \begin{itemize} % \item highlighted, that there are some users who might find valid use of cleveref's \cmd{\crefrange} command % \end{itemize} +% \item Marko Pinteric +% \begin{itemize} +% \item found an underfull hbox error what lead to its removal +% \item found the existance of a spurious whitespace problem what lead to its removal +% \end{itemize} +% \item Heiko Oberdiek +% \begin{itemize} +% \item found the reason of spurious whitespaces what lead to their removal +% \item found an underfull hbox error what lead to its removal +% \end{itemize} % \end{itemize} % % @@ -318,6 +329,7 @@ and the derived files autonum.ins, % \end{macrocode} % If align is redefined before flalign or alignat, autonum.dtx does not build anymore. The error reason is unknown. As the error disappears when align is redefined after both, there is no motivation in finding the underlying problem. % \begin{macrocode} + \newlength{\autonum@environmentWidth}% \forcsvlist{\autonum@patchParametrizedFullEnvironment}{alignat}% \forcsvlist{\autonum@patchFullEnvironment}{equation,gather,multline,flalign,align}% % \end{macrocode} @@ -373,6 +385,11 @@ and the derived files autonum.ins, \begin{textblock}{1}[1,1](0,0)% \begin{#2}% \begin{#1}#3% + % \end{macrocode} + % Avoid underfull hbox warning in multline, by putting content of the correct size in it. The correct size can only be measured here, as the values might change due to the beginning of environments. + % \begin{macrocode} + \deflength{\autonum@environmentWidth}{\linewidth-\multlinegap-\multlinegap}% + \hspace{\autonum@environmentWidth}% % \end{macrocode} % Using global here is necessary to get the information out of the environment. % \begin{macrocode} @@ -425,14 +442,14 @@ and the derived files autonum.ins, \autonum@startChangeEnvironment{#1}{}% }{% \autonum@endChangeEnvironment{#1}% - } + }% \else \renewenvironment{#1}[1]{% \autonum@startChangeEnvironment{#1}{##1}% }{% \autonum@endChangeEnvironment{#1}% }% - \fi% + \fi % \end{macrocode} % Delete the starred versions of the environment, as they sometimes lead to strange errors a long time after using the starred version. By deleting it, the error occurs at the right place. % \begin{macrocode} @@ -554,7 +571,7 @@ and the derived files autonum.ins, \ifcsedef{autonum@\csuse{autonum@currentLabel}Referenced}{% }{% \notag% - } + }% % \end{macrocode} % The current label does not have to be cleaned, as every line is a separate cell \href{http://tex.stackexchange.com/q/58190}{defining a local group} in an displayed math environment. % \begin{macrocode} @@ -589,7 +606,7 @@ and the derived files autonum.ins, \def\autonum@generatePatchedReferenceGeneral#1#2{% \csletcs{autonum@reference#1Old}{#1}% \csdef{#1}##1{% - \csuse{#2}{\autonum@markLabelAsReferenced}{##1} + \csuse{#2}{\autonum@markLabelAsReferenced}{##1}% % \end{macrocode} % Call the old reference command. % \begin{macrocode} diff --git a/Master/texmf-dist/source/latex/autonum/autonum.ins b/Master/texmf-dist/source/latex/autonum/autonum.ins index 56a3a3ddd42..8d5fe6d3839 100644 --- a/Master/texmf-dist/source/latex/autonum/autonum.ins +++ b/Master/texmf-dist/source/latex/autonum/autonum.ins @@ -68,6 +68,7 @@ and the derived files autonum.ins, } \AtBeginDocument{% +\newlength{\autonum@environmentWidth}% \forcsvlist{\autonum@patchParametrizedFullEnvironment}{alignat}% \forcsvlist{\autonum@patchFullEnvironment}{equation,gather,multline,flalign,align}% \def\[#1\]{% @@ -102,6 +103,8 @@ and the derived files autonum.ins, \begin{textblock}{1}[1,1](0,0)% \begin{#2}% \begin{#1}#3% +\deflength{\autonum@environmentWidth}{\linewidth-\multlinegap-\multlinegap}% +\hspace{\autonum@environmentWidth}% \global\cslet{autonum@newline#1}\\% \notag% \ifboolexpr{not test {\ifstrequal{#1}{multline}} or test {\ifcsundef{autonum@label#1}}}{% @@ -129,14 +132,14 @@ and the derived files autonum.ins, \autonum@startChangeEnvironment{#1}{}% }{% \autonum@endChangeEnvironment{#1}% -} +}% \else \renewenvironment{#1}[1]{% \autonum@startChangeEnvironment{#1}{##1}% }{% \autonum@endChangeEnvironment{#1}% }% -\fi% +\fi \global\csundef{#1*}% \global\csundef{end#1*}% } @@ -197,7 +200,7 @@ and the derived files autonum.ins, \ifcsedef{autonum@\csuse{autonum@currentLabel}Referenced}{% }{% \notag% -} +}% }{% \notag% }% @@ -214,7 +217,7 @@ and the derived files autonum.ins, \def\autonum@generatePatchedReferenceGeneral#1#2{% \csletcs{autonum@reference#1Old}{#1}% \csdef{#1}##1{% -\csuse{#2}{\autonum@markLabelAsReferenced}{##1} +\csuse{#2}{\autonum@markLabelAsReferenced}{##1}% \csuse{autonum@reference#1Old}{##1}% }% } |