From e3a95d205140a9c1ec8bc34f9a6125d8074f5e58 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 11 Jun 2020 03:02:13 +0000 Subject: CTAN sync 202006110302 --- macros/latex/contrib/caption/README | 2 +- macros/latex/contrib/caption/caption.dtx | 75 +++++++++++++++++++++++++++++- macros/latex/contrib/caption/caption3.dtx | 19 ++++++-- macros/latex/contrib/caption/ltcaption.dtx | 11 +++-- 4 files changed, 96 insertions(+), 11 deletions(-) (limited to 'macros/latex/contrib/caption') diff --git a/macros/latex/contrib/caption/README b/macros/latex/contrib/caption/README index 317e095646..ed00e7db48 100644 --- a/macros/latex/contrib/caption/README +++ b/macros/latex/contrib/caption/README @@ -1,7 +1,7 @@ ========================================================================== The `caption' package bundle -Release 2020-05-10 +Release 2020-05-30 Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) License: LPPL = LaTeX Project Public Licence diff --git a/macros/latex/contrib/caption/caption.dtx b/macros/latex/contrib/caption/caption.dtx index 06c2832c70..e75d4bd431 100644 --- a/macros/latex/contrib/caption/caption.dtx +++ b/macros/latex/contrib/caption/caption.dtx @@ -28,7 +28,7 @@ % caption-deu.tex, caption-eng.tex, caption-rus.tex. % % \fi -% \CheckSum{2977} +% \CheckSum{3022} % % \iffalse %<*driver> @@ -218,7 +218,7 @@ % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption}[2020/05/10 v3.4j Customizing captions (AR)] +\ProvidesPackage{caption}[2020/05/30 v3.4k Customizing captions (AR)] % \end{macrocode} % % \section{Loading the kernel} @@ -2444,6 +2444,77 @@ % \end{macrocode} % \end{macro} % +% \subsection{The changepage package} +% \changes{v3.4k}{2020/05/30}{Patch of the \package{changepage} package added} +% +% \begin{macrocode} +\caption@IfPackageLoaded{changepage}[2008/07/23 memoir-v3.7k]{% +% \end{macrocode} +% +% Both environments, \env{adjustwidth} and \env{adjustwidth*}, are starting a \env{list} \cs{item}. +% But \cs{hsize} isn't set properly inside a \env{list} item, and therefore \cs{@makecaption} +% (offered by document classes) doesn't work properly when used inside \env{adjustwidth}. +% Therefore we try to detect the situation ``Are we inside a adjustwidth environment?'' +% inside \cs{@makecaption} and fix this. (Sigh!) +% +% We cannot simply set and test a flag here since our adjustment to \cs{hsize} should +% not be done within a \cs{parbox} within a adjustwidth environment for example, +% and therefore we store \cs{hsize} and \cs{linewidth}, and test \cs{hsize} and \cs{linewidth} +% against the stored values instead. If they are equal we are (hopefully) quite save +% to assume that we are now inside a plain \env{adjustwidth} environment and therefore need +% to fix \cs{hsize} before typesetting the caption. (Deep sigh!) +% +% \begin{macro}{\caption@adjustwidth@hsize} +% \begin{macro}{\caption@adjustwidth@linewidth} +% \begin{macrocode} + \newdimen\caption@adjustwidth@hsize + \newdimen\caption@adjustwidth@linewidth +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\caption@set@adjustwidth} +% \changes{v3.4k}{2020/05/30}{This macro and its usage added} +% Store the values of \cs{hsize} and \cs{linewidth}. +% \begin{macrocode} + \providecommand*\caption@set@adjustwidth{% + \caption@adjustwidth@hsize\hsize + \caption@adjustwidth@linewidth\linewidth}% +% \end{macrocode} +% \begin{macrocode} + \providecommand*\caption@patch@changepage[1]{% + \expandafter\let\csname caption@#1\expandafter\endcsname\csname #1\endcsname + \expandafter\renewcommand\csname #1\endcsname[2]{% + \@nameuse{caption@#1}{##1}{##2}% + \caption@set@adjustwidth}}% + \caption@patch@changepage{adjustwidth}% + \caption@patch@changepage{adjustwidth*}% + \let\caption@patch@changepage\relax +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@test@adjustwidth} +% \changes{v3.4k}{2020/05/30}{This macro and its usage added} +% Test if the values of \cs{hsize} and \cs{linewidth} are identical to +% the ones stored in the \env{adjustwidth} environment. +% If yes, set \cs{hsize} to the correct value. +% \begin{macrocode} + \providecommand\caption@test@adjustwidth{% + \ifdim\hsize=\caption@adjustwidth@hsize + \ifdim\linewidth=\caption@adjustwidth@linewidth + \hsize=\linewidth + \fi + \fi}% +% \end{macrocode} +% \begin{macrocode} +\AtBeginCaption{\caption@test@adjustwidth} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} + }{}% +% \end{macrocode} +% % \subsection{The chkfloat package} % \changes{v3.3}{2018/09/06}{Support of the \package{chkfloat} package added} % diff --git a/macros/latex/contrib/caption/caption3.dtx b/macros/latex/contrib/caption/caption3.dtx index 7319d178df..84134e7944 100644 --- a/macros/latex/contrib/caption/caption3.dtx +++ b/macros/latex/contrib/caption/caption3.dtx @@ -28,12 +28,12 @@ % caption-deu.tex, caption-eng.tex, caption-rus.tex. % % \fi -% \CheckSum{3573} +% \CheckSum{3576} % % \iffalse %<*driver> \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesFile{caption3.drv}[2015/09/15 v1.8 Implementation of the caption kernel] +\ProvidesFile{caption3.drv}[2020/05/30 v1.12 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{caption3}[2019/09/09] +\usepackage{caption3}[2020/05/30] % \DeclareRobustCommand*\AmS{\texorpdfstring {{\protect\usefont{OMS}{cmsy}{m}{n}A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}% @@ -191,7 +191,7 @@ % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption3}[2020/05/10 v1.11 caption3 kernel (AR)] +\ProvidesPackage{caption3}[2020/05/30 v1.12 caption3 kernel (AR)] % \end{macrocode} % % \section{Workaround for bug in package \package{arabtex}} @@ -1770,10 +1770,19 @@ \DeclareCaptionLabelSeparator{period}{. } \DeclareCaptionLabelSeparator{space}{ } \DeclareCaptionLabelSeparator*{quad}{\quad} -\DeclareCaptionLabelSeparator*{newline}{\\} +\DeclareCaptionLabelSeparator*{newline}{\captionnewline} \DeclareCaptionLabelSeparator*{endash}{\space\textendash\space} % \end{macrocode} % +% \begin{macro}{\captionnewline} +% \changes{v1.12}{2020/05/30}{This macro added} +% Will be used in the caption label separator |new|\-|line|, +% and re-defined for |long|\-|table| environments. +% \begin{macrocode} +\newcommand*\captionnewline{\\} +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\caption@setdefaultlabelsep} % \changes{v1.2d}{2009/03/29}{This macro added} % \begin{macrocode} diff --git a/macros/latex/contrib/caption/ltcaption.dtx b/macros/latex/contrib/caption/ltcaption.dtx index 343dbf695b..314528d58b 100644 --- a/macros/latex/contrib/caption/ltcaption.dtx +++ b/macros/latex/contrib/caption/ltcaption.dtx @@ -2,7 +2,7 @@ % % This is file `ltcaption.dtx'. % -% Copyright (C) 2007-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +% Copyright (C) 2007-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) % % -------------------------------------------------------------------------- % @@ -28,7 +28,7 @@ % caption-deu.tex, caption-eng.tex, caption-rus.tex. % % \fi -% \CheckSum{378} +% \CheckSum{381} % % \iffalse %<*driver> @@ -464,7 +464,7 @@ % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{ltcaption}[2018/08/26 v1.4a longtable captions (AR)] +\ProvidesPackage{ltcaption}[2020/05/30 v1.4b longtable captions (AR)] % \end{macrocode} % % \begin{macrocode} @@ -554,6 +554,7 @@ % % \begin{macro}{\LT@array} % \changes{v1.1a}{2008/03/21}{Improved redefinition of \cs{refstepcounter} etc.} +% \changes{v1.4b}{2020/05/30}{Re-definition of \cs{captionnewline} added} % We insert our stuff into the definition of |\LT@array| here. % Since the \package{hyperref} package patches |\LT@array| as well % and since this only works with the original definition of |\LT@array|, @@ -582,6 +583,10 @@ % \begin{macrocode} \def\lst@@caption{\relax}% % \end{macrocode} +% Re-define |\caption|\-|newline| so |\par| will be used inside longtables instead of |\\|. +% \begin{macrocode} + \def\captionnewline{\par}% +% \end{macrocode} % \begin{macrocode} \ltcaption@ORI@LT@array}} % \end{macrocode} -- cgit v1.2.3