summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-06-10 20:47:27 +0000
committerKarl Berry <karl@freefriends.org>2020-06-10 20:47:27 +0000
commitab2350d84cd86ce4be11206a765c6625e5cc2e5f (patch)
treee41cf5c553a7741b31843ff26ebcc00bcd2d52ff /Master
parent099bed71ffa7fb4e19f4e614c077a149aae72930 (diff)
caption (10jun20)
git-svn-id: svn://tug.org/texlive/trunk@55507 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/caption/README2
-rw-r--r--Master/texmf-dist/source/latex/caption/caption.dtx75
-rw-r--r--Master/texmf-dist/source/latex/caption/caption3.dtx19
-rw-r--r--Master/texmf-dist/source/latex/caption/ltcaption.dtx11
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption.sty24
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption3.sty5
-rw-r--r--Master/texmf-dist/tex/latex/caption/ltcaption.sty3
7 files changed, 124 insertions, 15 deletions
diff --git a/Master/texmf-dist/doc/latex/caption/README b/Master/texmf-dist/doc/latex/caption/README
index 317e095646c..ed00e7db489 100644
--- a/Master/texmf-dist/doc/latex/caption/README
+++ b/Master/texmf-dist/doc/latex/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/Master/texmf-dist/source/latex/caption/caption.dtx b/Master/texmf-dist/source/latex/caption/caption.dtx
index 06c2832c700..e75d4bd4311 100644
--- a/Master/texmf-dist/source/latex/caption/caption.dtx
+++ b/Master/texmf-dist/source/latex/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/Master/texmf-dist/source/latex/caption/caption3.dtx b/Master/texmf-dist/source/latex/caption/caption3.dtx
index 7319d178df1..84134e79441 100644
--- a/Master/texmf-dist/source/latex/caption/caption3.dtx
+++ b/Master/texmf-dist/source/latex/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/Master/texmf-dist/source/latex/caption/ltcaption.dtx b/Master/texmf-dist/source/latex/caption/ltcaption.dtx
index 343dbf695b4..314528d58b3 100644
--- a/Master/texmf-dist/source/latex/caption/ltcaption.dtx
+++ b/Master/texmf-dist/source/latex/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}
diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty
index 71899f9dcc6..001e324884f 100644
--- a/Master/texmf-dist/tex/latex/caption/caption.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption.sty
@@ -34,7 +34,7 @@
%% caption-deu.tex, caption-eng.tex, caption-rus.tex.
%%
\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)]
\RequirePackage{caption3}[2020/05/10] % needs v1.10 or newer
\caption@ifbool{documentclass}{}{%
\caption@WarningNoLine{%
@@ -910,6 +910,28 @@
}{}%
\caption@undefbool{needfreeze}}
\let\caption@warmup\relax
+\caption@IfPackageLoaded{changepage}[2008/07/23 memoir-v3.7k]{%
+ \newdimen\caption@adjustwidth@hsize
+ \newdimen\caption@adjustwidth@linewidth
+ \providecommand*\caption@set@adjustwidth{%
+ \caption@adjustwidth@hsize\hsize
+ \caption@adjustwidth@linewidth\linewidth}%
+ \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
+ \providecommand\caption@test@adjustwidth{%
+ \ifdim\hsize=\caption@adjustwidth@hsize
+ \ifdim\linewidth=\caption@adjustwidth@linewidth
+ \hsize=\linewidth
+ \fi
+ \fi}%
+\AtBeginCaption{\caption@test@adjustwidth}
+ }{}%
\caption@IfPackageLoaded{chkfloat}[2012/08/19 v0.1]{%
\caption@ifdefined\chkfloat@addcontentsline{%
\renewcommand\caption@chkfloat{\chkfloat@addcontentsline}%
diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty
index 4bbf4307d66..205603c1dc1 100644
--- a/Master/texmf-dist/tex/latex/caption/caption3.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption3.sty
@@ -34,7 +34,7 @@
%% caption-deu.tex, caption-eng.tex, caption-rus.tex.
%%
\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)]
\providecommand\caption@FixArabTeX{%
\def\caption@tempa##1{}%
\ifx\caption@tempa\@gobble
@@ -659,8 +659,9 @@
\DeclareCaptionLabelSeparator{period}{. }
\DeclareCaptionLabelSeparator{space}{ }
\DeclareCaptionLabelSeparator*{quad}{\quad}
-\DeclareCaptionLabelSeparator*{newline}{\\}
+\DeclareCaptionLabelSeparator*{newline}{\captionnewline}
\DeclareCaptionLabelSeparator*{endash}{\space\textendash\space}
+\newcommand*\captionnewline{\\}
\newcommand*\caption@setdefaultlabelsep[1]{%
\ifx\caption@lsep\caption@lsep@default
\caption@set@default@labelsep{#1}%
diff --git a/Master/texmf-dist/tex/latex/caption/ltcaption.sty b/Master/texmf-dist/tex/latex/caption/ltcaption.sty
index f76bfec9b11..2f0130a7f74 100644
--- a/Master/texmf-dist/tex/latex/caption/ltcaption.sty
+++ b/Master/texmf-dist/tex/latex/caption/ltcaption.sty
@@ -34,7 +34,7 @@
%% caption-deu.tex, caption-eng.tex, caption-rus.tex.
%%
\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)]
\@ifpackageloaded{longtable}{}{%
\PackageError{ltcaption}{longtable package not loaded, aborting}{RTFM}}
\providecommand*\LTcaptype{table}
@@ -64,6 +64,7 @@
\def\hyper@makecurrent{%
\caption@LTtype\caption@LT@makecurrent}%
\def\lst@@caption{\relax}%
+ \def\captionnewline{\par}%
\ltcaption@ORI@LT@array}}
\newcommand*\caption@LTtype[2]{%
\edef\caption@LT@tempa{#2}%