From e9a9d7ef171d4f2a125839da7a046f40f200fc0e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 3 Jun 2018 21:23:43 +0000 Subject: caption git-svn-id: svn://tug.org/texlive/trunk@47917 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/caption/caption.dtx | 22 ++-- Master/texmf-dist/source/latex/caption/caption.ins | 2 +- .../texmf-dist/source/latex/caption/caption3.dtx | 131 ++++++++++++++++++--- .../texmf-dist/source/latex/caption/newfloat.dtx | 33 +++--- .../texmf-dist/source/latex/caption/subcaption.dtx | 17 +-- .../texmf-dist/source/latex/caption/totalcount.dtx | 7 +- 6 files changed, 159 insertions(+), 53 deletions(-) (limited to 'Master/texmf-dist/source/latex/caption') diff --git a/Master/texmf-dist/source/latex/caption/caption.dtx b/Master/texmf-dist/source/latex/caption/caption.dtx index 758ca0f7f66..bee2f4150a8 100644 --- a/Master/texmf-dist/source/latex/caption/caption.dtx +++ b/Master/texmf-dist/source/latex/caption/caption.dtx @@ -2,7 +2,7 @@ % % This is file `caption.dtx'. % -% Copyright (C) 1994-2016 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +% Copyright (C) 1994-2018 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) % % -------------------------------------------------------------------------- % @@ -25,7 +25,7 @@ % and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. % % \fi -% \CheckSum{3571} +% \CheckSum{3579} % % \iffalse %<*driver> @@ -96,7 +96,7 @@ % This package has version number \fileversion, last revised \filedate.}}%^^A % {the caption package}} % \author{Axel Sommerfeldt\\ -% \url{https://github.com/axelsommerfeldt/latex-caption}} +% \url{https://github.com/axelsommerfeldt/caption}} % \date{\docdate} % \maketitle % @@ -218,13 +218,13 @@ % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption}[2017/03/19 v3.3-145 Customizing captions (AR)] +\ProvidesPackage{caption}[2018/05/01 v3.3-147 Customizing captions (AR)] % \end{macrocode} % % \subsection{Loading the kernel} % % \begin{macrocode} -\RequirePackage{caption3}[2016/02/01] % needs v1.7-130 or newer +\RequirePackage{caption3}[2018/05/01] % needs v1.8 or newer % \end{macrocode} % % \subsection{Check against incompatible document classes} @@ -3641,10 +3641,14 @@ % \end{macrocode} % Workaround for bug in \package{listings} package: % If |\hsize| seems not to be set correctly, we set it to |\linewidth|. +% \changes{v3.3}{2018/04/30}{Bugfix from Ulrike Fischer applied, see also \url{https://github.com/axelsommerfeldt/caption/issues/1}} % \begin{macrocode} - \ifdim\hsize>\linewidth - \hsize\linewidth - \fi + \@tempdima\linewidth + \advance\@tempdima\lst@xleftmargin + \advance\@tempdima\lst@xrightmargin + \ifdim\hsize>\@tempdima + \hsize\@tempdima + \fi % \end{macrocode} % First of all, we set |position=#1| and if it was set to `top', % we swap the skips so the default behavior of the \package{listings} package @@ -3658,7 +3662,7 @@ \belowcaptionskip\abovecaptionskip \abovecaptionskip\@tempdima}{}% % \end{macrocode} -% Workaround for issue with wrong skips (should be examined further) +% Workaround for issue with wrong skips (FIXME: should be examined further) % \begin{macrocode} \caption@setup{rule=0}% % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/caption/caption.ins b/Master/texmf-dist/source/latex/caption/caption.ins index 81de7ee1ebd..eb243daec8a 100644 --- a/Master/texmf-dist/source/latex/caption/caption.ins +++ b/Master/texmf-dist/source/latex/caption/caption.ins @@ -8,7 +8,7 @@ Copyright (C) 1994-2018 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) -https://github.com/axelsommerfeldt/latex-caption +https://github.com/axelsommerfeldt/caption -------------------------------------------------------------------------- diff --git a/Master/texmf-dist/source/latex/caption/caption3.dtx b/Master/texmf-dist/source/latex/caption/caption3.dtx index d6f89bd77d7..86e4e10dea8 100644 --- a/Master/texmf-dist/source/latex/caption/caption3.dtx +++ b/Master/texmf-dist/source/latex/caption/caption3.dtx @@ -25,12 +25,12 @@ % and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. % % \fi -% \CheckSum{3671} +% \CheckSum{3848} % % \iffalse %<*driver> \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesFile{caption3.drv}[2015/09/15 v1.7 Implementation of the caption kernel] +\ProvidesFile{caption3.drv}[2015/09/15 v1.8 Implementation of the caption kernel] \hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up. %\errorcontextlines=3 % @@ -57,7 +57,7 @@ \ifpdf\usepackage{hypdestopt}\fi \hypersetup{pdfkeywords={LaTeX, package, caption},pdfstartpage={},pdfstartview={}} % -\usepackage[debug]{caption3}[2013/01/01] +\usepackage[debug]{caption3}[2018/05/01] % \DeclareRobustCommand*\eTeX{\texorpdfstring {\leavevmode\hbox{$\varepsilon$}-\TeX}% @@ -99,7 +99,7 @@ % This package has version number \fileversion, last revised \filedate.}}%^^A % {the caption kernel}} % \author{Axel Sommerfeldt\\ -% \url{https://github.com/axelsommerfeldt/latex-caption}} +% \url{https://github.com/axelsommerfeldt/caption}} % \date{\docdate} % \maketitle % @@ -198,7 +198,7 @@ % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption3}[2018/04/15 v1.7-167 caption3 kernel (AR)] +\ProvidesPackage{caption3}[2018/05/27 v1.8a caption3 kernel (AR)] % \end{macrocode} % % \subsection{Workaround for bug in package \package{arabtex}} @@ -866,7 +866,7 @@ \expandafter\caption@ifempty@list\csname caption@opt@#2\endcsname {\caption@removefromoptlist{#2}}{}% \caption@tempa{\caption@Warning{% - Option `#1' was not in list `#2'\MessageBreak}}} + Option `#1' was not in list `#2'}}} % \end{macrocode} % \end{macro} % @@ -1751,14 +1751,16 @@ % \changes{v1.2}{2007/12/16}{Caption label format \opt{brace} added} % \changes{v1.7}{2015/09/16}{Caption label format \opt{autodot} added} % \changes{v1.7}{2016/05/22}{Caption label format \opt{autodot} fixed} -% There are five pre-defined label formats, called `empty', `simple', -% `parens', `brace', and `autodot'. +% \changes{v1.8}{2016/05/22}{Caption label format \opt{unnumbered} added} +% There are six pre-defined label formats, called `empty', `simple', +% `parens', `brace', `autodot', and `unnumbered'. % \begin{macrocode} \DeclareCaptionLabelFormat{empty}{} \DeclareCaptionLabelFormat{simple}{\bothIfFirst{#1}{\nobreakspace}#2} \DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{\nobreakspace}(#2)} \DeclareCaptionLabelFormat{brace}{\bothIfFirst{#1}{\nobreakspace}#2)} \DeclareCaptionLabelFormat{autodot}{\bothIfFirst{#1}{\nobreakspace}#2\autodot} +\DeclareCaptionLabelFormat{unnumbered}{#1} % \end{macrocode} % % `default' usually maps to `simple'. @@ -2059,13 +2061,80 @@ \DeclareCaptionFont{tt}{\ttfamily} % \end{macrocode} % +% \changes{v1.7}{2018/05/01}{Missing font sizes \texttt{tiny}, \texttt{LARGE}, \texttt{huge}, and \texttt{Huge} added} % \begin{macrocode} +\DeclareCaptionFont{tiny}{\tiny} \DeclareCaptionFont{scriptsize}{\scriptsize} \DeclareCaptionFont{footnotesize}{\footnotesize} \DeclareCaptionFont{small}{\small} \DeclareCaptionFont{normalsize}{\normalsize} \DeclareCaptionFont{large}{\large} \DeclareCaptionFont{Large}{\Large} +\DeclareCaptionFont{LARGE}{\LARGE} +\DeclareCaptionFont{huge}{\huge} +\DeclareCaptionFont{Huge}{\Huge} +% \end{macrocode} +% +% \changes{v1.8}{2018/05/01}{Font size \texttt{smaller} added} +% \begin{macrocode} +\newcommand\caption@smaller{% + \ifx\@currsize\tiny + \relax + \else\ifx\@currsize\scriptsize + \tiny + \else\ifx\@currsize\footnotesize + \scriptsize + \else\ifx\@currsize\small + \footnotesize + \else\ifx\@currsize\normalsize + \small + \else\ifx\@currsize\large + \normalsize + \else\ifx\@currsize\Large + \large + \else\ifx\@currsize\LARGE + \Large + \else\ifx\@currsize\huge + \LARGE + \else\ifx\@currsize\Huge + \huge + \else + \caption@Warning{% + Cannot determine current font size.\MessageBreak + Try setting it with `size=' explicitly}% + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} +\DeclareCaptionFont{smaller}{\caption@smaller} +% \end{macrocode} +% +% \changes{v1.8}{2018/05/02}{Font size \texttt{larger} added} +% \begin{macrocode} +\newcommand\caption@larger{% + \ifx\@currsize\tiny + \scriptsize + \else\ifx\@currsize\scriptsize + \footnotesize + \else\ifx\@currsize\footnotesize + \small + \else\ifx\@currsize\small + \normalsize + \else\ifx\@currsize\normalsize + \large + \else\ifx\@currsize\large + \Large + \else\ifx\@currsize\Large + \LARGE + \else\ifx\@currsize\LARGE + \huge + \else\ifx\@currsize\huge + \Huge + \else\ifx\@currsize\Huge + \relax + \else + \caption@Warning{% + Cannot determine current font size.\MessageBreak + Try setting it with `size=' explicitly}% + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} +\DeclareCaptionFont{larger}{\caption@larger} % \end{macrocode} % % \changes{v1.3}{2011/01/01}{\package{sansmath} package support added} @@ -2742,6 +2811,7 @@ % \changes{v1.5}{2013/04/27}{The \package{beamer} template \texttt{caption label separator} will be used now} % \changes{v1.7}{2016/05/22}{Re-definition of label format \texttt{simpleMagyar} added to \package{beamer} class support} % \changes{v1.7}{2018/04/15}{Re-definition of label format \texttt{simpleMagyar} revised} +% \changes{v1.7}{2018/05/01}{Definition of \package{beamer} default label font revised} % % \begin{macro}{\caption@ifbeamerclass} % \begin{macrocode} @@ -2790,15 +2860,19 @@ % % \begin{macrocode} \DeclareCaptionLabelFormat{default}{% - \caption@ifbeamertemplate{numbered}{% - \caption@lfmt@simple{#1}{#2}}{#1}} + \caption@ifbeamertemplate{numbered}% + \caption@lfmt@simple + \caption@lfmt@unnumbered + {#1}{#2}} % \end{macrocode} % The \package{magyar} babel package redefines the current label format to a one called |simple|\-|Magyar|, % defined within |\@@magyar@caption|\-|fix| which will be executed |\At|\-|Begin|\-|Document|. % \begin{macrocode} \DeclareCaptionLabelFormat{default@magyar}{% - \caption@ifbeamertemplate{numbered}{% - \caption@lfmt@simple@magyar{#1}{#2}}{#1}} + \caption@ifbeamertemplate{numbered}% + \caption@lfmt@simple@magyar + \caption@lfmt@unnumbered + {#1}{#2}} \@ifundefined{@@magyar@captionfix}\AtBeginDocument\@firstofone{% \@ifundefined{@@magyar@captionfix}{}{% \g@addto@macro\@@magyar@captionfix{% @@ -2815,8 +2889,10 @@ \usebeamerfont*{caption}% \usebeamercolor[fg]{caption}} \DeclareCaptionDefaultFont{labelfont}{% + \setbeamercolor*{caption}{}% avoid setting "caption" color additionally \usebeamercolor[fg]{caption name}% - \usebeamerfont*{caption name}} + \setbeamerfont*{caption}{}% avoid setting "caption" font additionally + \usebeamerfont{caption name}} \DeclareCaptionDefaultJustification{\raggedright} % \end{macrocode} % \begin{macrocode} @@ -3443,15 +3519,20 @@ % \changes{v1.1}{2007/06/13}{Redefinition of \cs{(H@)refstepcounter} added} % \changes{v1.1}{2007/08/12}{Redefinition of \cs{label} improved} % \changes{v1.1c}{2007/10/06}{Definition of \cs{caption@l@stepcounter} added} -% |\caption@prepareslc|\par % \changes{v1.3}{2011/07/07}{Bugfix 11-07-06: Redefinition of \cs{footnote} and \cs{footnotemark} added, redefinition of \cs{stepcounter} and \cs{refstepcounter} dropped} % \changes{v1.4a}{2011/10/21}{Redefinition of \cs{pagenote} from \textsf{memoir} document class added} % \changes{v1.4a}{2011/10/22}{Redefinition of \cs{footnote} revised} % \changes{v1.5}{2013/04/13}{Redefinition os \cs{glsunset} added} +% \changes{v1.8}{2018/01/21}{Redefinition of \cs{endnote} added (thanks to Markus Kohm)} +% \changes{v1.8}{2018/05/16}{Redefinition of \cs{acused} added} +% \changes{v1.8}{2018/05/26}{Definition method changed so it can be pre-defined by other packages} +% \changes{v1.8}{2018/05/27}{Redefinition of \cs{hypertarget} added} +% |\caption@prepareslc|\par % Re-define anything which would disturb the single-line-check. % \begin{macrocode} -\newcommand*\caption@prepareslc{% +\@ifundefined{caption@prepareslc}\def\g@addto@macro\caption@prepareslc{% \let\label\caption@gobble + \let\hypertarget\@gobbletwo % \end{macrocode} % \begin{macrocode} \let\caption@footnotemark@ORI\footnotemark @@ -3460,18 +3541,27 @@ \let\@footnotetext\caption@gobble % \end{macrocode} % \begin{macrocode} + \let\caption@endnotemark@ORI\endnotemark + \def\endnote{\caption@withoptargs\caption@endnote}% + \def\endnotemark{\caption@withoptargs\caption@endnotemark}% \let\@endnotetext\caption@gobble % \end{macrocode} % \begin{macrocode} \let\pagenote\caption@gobble % \end{macrocode} +% Adaption to the \package{acronym} package.\par +% See also \url{https://tex.stackexchange.com/questions/428788} +% \begin{macrocode} + \let\acused\@gobble + \let\AC@placelabel\@gobble +% \end{macrocode} % Adaption to the \package{glossaries} package.\par % Please note that while this adaption is usually sufficient % it could give incorrect measuring results if \cs{gls} is both used % for the very first time and more than once (for a particular acronym). % The alternative would be using internal macros of the % \package{glossaries} package which I would like to avoid.\par -% See also \url{http://tex.stackexchange.com/questions/108368} +% See also \url{https://tex.stackexchange.com/questions/108368} % \begin{macrocode} \let\glsunset\@gobble % \end{macrocode} @@ -3488,6 +3578,15 @@ \endgroup} % \end{macrocode} % \begin{macrocode} +\newcommand\caption@endnote[2]{% + \caption@endnotemark{#1}} +\newcommand\caption@endnotemark[1]{% + \begingroup + \let\stepcounter\caption@l@stepcounter + \caption@endnotemark@ORI#1 + \endgroup} +% \end{macrocode} +% \begin{macrocode} \newcommand*\caption@l@stepcounter[1]{% \advance\csname c@#1\endcsname\@ne\relax} % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/caption/newfloat.dtx b/Master/texmf-dist/source/latex/caption/newfloat.dtx index c95fbddb4c1..3a9a1710e30 100644 --- a/Master/texmf-dist/source/latex/caption/newfloat.dtx +++ b/Master/texmf-dist/source/latex/caption/newfloat.dtx @@ -25,7 +25,7 @@ % and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. % % \fi -% \CheckSum{1313} +% \CheckSum{1307} % % \iffalse %<*driver> @@ -531,7 +531,7 @@ % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{newfloat}[2015/09/17 v1.1-109 Defining new floating environments (AR)] +\ProvidesPackage{newfloat}[2018/03/04 v1.1a Defining new floating environments (AR)] % \end{macrocode} % % \begin{macro}{\newfloat@Info} @@ -609,6 +609,7 @@ % \changes{v1.1}{2013/04/27}{Revised, only defines stuff yet undefined now} % \changes{v1.1}{2013/11/03}{Uses \cs{newfloat@capitalize} now} % \changes{v1.1}{2015/09/16}{Support of \cs{autodot} (offered by the \KOMAScript\ classes) added} +% \changes{v1.1}{2018/03/04}{Usage of \cs{ifdefined} replaced by \cs{@ifundefined} to improve compatibility with the \package{listings} package} % |\DeclareFloatingEnvironment|\oarg{options}\marg{environment}\oarg{name}\oarg{list name} % \begin{macrocode} \newcommand*\DeclareFloatingEnvironment{% @@ -626,20 +627,20 @@ % Set |\ftype@|\meta{type} which contains the type number for floats of type \meta{type}\par % (See also \url{http://tex.stackexchange.com/q/32359/2574}) % \begin{macrocode} - \ifdefined\c@float@type % from float package - \expandafter\edef\csname ftype@#2\endcsname{\the\value{float@type}}% - \addtocounter{float@type}{\value{float@type}}% - \else\ifdefined\c@newflo@tctr % from memoir document class - \expandafter\edef\csname ftype@#2\endcsname{\the\c@newflo@tctr}% - \advance\c@newflo@tctr \c@newflo@tctr - \else - \ifdefined\newfloat@ftype \else - \newcount\newfloat@ftype - \newfloat@ftype=8\relax - \fi - \expandafter\xdef\csname ftype@#2\endcsname{\the\newfloat@ftype}% - \advance\newfloat@ftype\newfloat@ftype - \fi\fi + \@ifundefined{c@float@type}% from float package + {\@ifundefined{c@newflo@tctr}% from memoir document class + {\ifdefined\newfloat@ftype \else + \newcount\newfloat@ftype + \newfloat@ftype=8\relax + \fi + \expandafter\xdef\csname ftype@#2\endcsname{\the\newfloat@ftype}% + \advance\newfloat@ftype\newfloat@ftype}% + {\expandafter\edef\csname ftype@#2\endcsname{\the\c@newflo@tctr}% + \advance\c@newflo@tctr \c@newflo@tctr}}% + {\expandafter\edef\csname ftype@#2\endcsname{\the\value{float@type}}% + \addtocounter{float@type}{\value{float@type}}}% +% \end{macrocode} +% \begin{macrocode} \newfloat@Info{float type `#2'=\@nameuse{ftype@#2}}% % \end{macrocode} % Define |\fnum@|\meta{type}, a macro to generate the figure number for a caption diff --git a/Master/texmf-dist/source/latex/caption/subcaption.dtx b/Master/texmf-dist/source/latex/caption/subcaption.dtx index bedb96109a5..2c656a3fb47 100644 --- a/Master/texmf-dist/source/latex/caption/subcaption.dtx +++ b/Master/texmf-dist/source/latex/caption/subcaption.dtx @@ -2,7 +2,7 @@ % % This is file `subcaption.dtx'. % -% Copyright (C) 2007-2016 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +% Copyright (C) 2007-2018 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) % % -------------------------------------------------------------------------- % @@ -30,7 +30,7 @@ % \iffalse %<*driver> \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesFile{subcaption.drv}[2013/04/16 v1.1 Adds a sub-caption feature to the caption package] +\ProvidesFile{subcaption.drv}[2018/05/01 v1.1 Adds a sub-caption feature to the caption package] \hbadness=9999 \newcount\hbadness \hfuzz=74pt % Make TeX shut up. %\errorcontextlines=3 % @@ -115,7 +115,7 @@ % This package has version number \fileversion, last revised \filedate.}}%^^A % {The subcaption package}} % \author{Axel Sommerfeldt\\ -% \url{https://github.com/axelsommerfeldt/latex-caption}} +% \url{https://github.com/axelsommerfeldt/caption}} % \date{\docdate} % \maketitle % @@ -172,7 +172,7 @@ % % The default settings for |sub|captions are: % \begin{quote} -% |margin=0pt,font+=small,labelformat=parens,labelsep=space,|\\ +% |margin=0pt,font+=smaller,labelformat=parens,labelsep=space,|\\ % |skip=6pt,list=false,hypcap=false|~\footnote{%^^A % This means that sub-captions are not listed in the List of Figures % or Tables by default, but you can enable that by @@ -193,7 +193,7 @@ % \item Local settings % {\small(|\captionsetup{|\ldots|}| inside |figure| or |table| environment)} % \item Default `sub' settings -% {\small(|margin=0pt,font+=small,|\ldots, see above)} +% {\small(|margin=0pt,font+=smaller,|\ldots, see above)} % \item Custom `sub' settings % {\small(|\usepackage[|\ldots|]{subcaption}| and |\captionsetup[sub]{|\ldots|}|)} % \item Environmental `sub' settings @@ -898,14 +898,14 @@ % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{subcaption}[2016/05/22 v1.1-161 Sub-captions (AR)] +\ProvidesPackage{subcaption}[2018/05/01 v1.1-162 Sub-captions (AR)] % \end{macrocode} % % \subsection{Initial code} % % Since we base on the \package{caption} package we load it here. % \begin{macrocode} -\RequirePackage{caption}[2012/03/25] % needs v3.3 or newer +\RequirePackage{caption}[2018/05/01] % needs v3.3-147 or newer % \end{macrocode} % % \begin{macro}{\subcaption@CheckCompatibility} @@ -972,10 +972,11 @@ % % We use |\caption@ExecuteOptions| and |\caption@ProcessOptions| here to add % the options to the `|sub|' option list instead of executing them immediately. +% \changes{v1.1}{2018/05/01}{Bugfix: Option \texttt{font+=small} changed to \texttt{font+=smaller}} % \begin{macrocode} \caption@SetupOptions{subcaption}{\captionsetup[sub]{#2}}% \caption@ExecuteOptions{subcaption}{% - font+=small,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0} + font+=smaller,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0} \caption@ProcessOptions*{subcaption} % \end{macrocode} % diff --git a/Master/texmf-dist/source/latex/caption/totalcount.dtx b/Master/texmf-dist/source/latex/caption/totalcount.dtx index d2fc4fb8b1a..6e3190f2fa1 100644 --- a/Master/texmf-dist/source/latex/caption/totalcount.dtx +++ b/Master/texmf-dist/source/latex/caption/totalcount.dtx @@ -2,7 +2,7 @@ % % This is file `totalcount.dtx'. % -% Copyright (C) 2010-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +% Copyright (C) 2010-2018 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) % % -------------------------------------------------------------------------- % @@ -260,7 +260,7 @@ % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{totalcount}[2013/05/12 v1.0-92 Total values of counters (AR)] +\ProvidesPackage{totalcount}[2018/01/21 v1.0a Total values of counters (AR)] % \end{macrocode} % % \subsection{Initial code} @@ -327,6 +327,7 @@ % \end{macro} % % \begin{macro}{\totalcount@set} +% \changes{v1.0a}{2018/01/21}{A negative counter value will be handled correctly now} % |\totalcount@set|\marg{counter name}\marg{value} % \begin{macrocode} \newcommand*\totalcount@set[2]{% @@ -334,7 +335,7 @@ % {\global\@namedef{totalcount@set@#1}{\totalcount@set{#1}{#2}}}% {}% {\global\@namedef{total#1s}{#2\totalcount@xspace}% - \ifnum#2=0\relax \else + \ifnum#2<1\relax \else \global\@nameuse{total#1strue}% \fi}} % \end{macrocode} -- cgit v1.2.3