summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/caption
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-01-01 21:50:58 +0000
committerKarl Berry <karl@freefriends.org>2020-01-01 21:50:58 +0000
commitee1a9ddb8566d89bdd152fc8d6b84e2467918146 (patch)
tree7061e8d4ed2285b66da957e9a0241299e5e677fb /Master/texmf-dist/tex/latex/caption
parentd4369812d53a63316beb43eb68f3c925d26b2f7b (diff)
caption (1jan20)
git-svn-id: svn://tug.org/texlive/trunk@53291 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/caption')
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption.sty37
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption3.sty31
2 files changed, 39 insertions, 29 deletions
diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty
index f38cc6a59bc..a876598fd56 100644
--- a/Master/texmf-dist/tex/latex/caption/caption.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption.sty
@@ -6,7 +6,7 @@
%%
%% caption.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2019 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%%
%% https://gitlab.com/axelsommerfeldt/caption
%%
@@ -34,8 +34,8 @@
%% caption-deu.tex, caption-eng.tex, caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2019/10/18 v3.4a Customizing captions (AR)]
-\RequirePackage{caption3}[2019/09/09] % needs v1.8e or newer
+\ProvidesPackage{caption}[2020/01/01 v3.4c Customizing captions (AR)]
+\RequirePackage{caption3}[2019/12/31] % needs v1.8f or newer
\caption@ifbool{documentclass}{}{%
\caption@WarningNoLine{%
Unknown document class (or package),\MessageBreak
@@ -457,7 +457,6 @@
\let\label\caption@xlabel
\fi
\caption@start}}
-\newcommand*\caption@typehook{}
\newcommand*\caption@iftype{\caption@ifdefined\@captype}
\caption@ifeTeX{%
\newcommand*\caption@checkgrouplevel[2]{%
@@ -963,6 +962,7 @@
\caption@setstyle*\float@style
\caption@setoptions\float@style
}{}%
+ \caption@float@setname{#1}%
\caption@freezeHref % will be defrosted in \float@makebox
\caption@ORI@float@setevery{#1}}%
\caption@AtBeginDocument{\caption@ifcompatibility{}{%
@@ -972,7 +972,7 @@
\renewcommand\float@makebox[1]{%
\caption@ORI@float@makebox{#1\relax \caption@defrostHref}}%
}}%
- \g@addto@macro\caption@typehook{%
+ \newcommand*\caption@float@setname[1]{%
\expandafter\ifx\csname #1name\endcsname\relax
\expandafter\let\csname #1name\expandafter\endcsname
\csname fname@#1\endcsname
@@ -1175,15 +1175,30 @@
\renewcommand*\caption@hypcapspace{\hypcapspace}%
\fi}{}
\caption@IfPackageLoaded{listings}[2004/02/13 v1.2]{%
+%% \caption@setbool{lst@Init}{0}%
+%% \lst@AddToHook{Init}{\caption@setbool{lst@Init}{1}}%
\let\caption@ORI@lst@MakeCaption\lst@MakeCaption
\def\lst@MakeCaption#1{% #1 is `t' or `b'
\begingroup
- \@tempdima\linewidth
- \advance\@tempdima\lst@xleftmargin
- \advance\@tempdima\lst@xrightmargin
- \ifdim\hsize>\@tempdima
- \hsize\@tempdima
- \fi
+%% \caption@Debug{%
+%% linewidth=\lst@linewidth,
+%% xleftmargin=\lst@xleftmargin,\MessageBreak
+%% xrightmargin=\lst@xrightmargin,
+%% resetmargins=\lst@ifresetmargins true\else false\fi}%
+%% \caption@iflst@Init{}{%\lsthk@PreInit\lsthk@Init => has unwanted side-effects (like an extra horizontal line)
+%% \linewidth\lst@linewidth\relax
+%% \lst@ifresetmargins
+%% \advance\linewidth\@totalleftmargin
+%% \advance\linewidth\rightmargin
+%% \@totalleftmargin\z@
+%% \fi
+%% \advance\linewidth-\lst@xleftmargin
+%% \advance\linewidth-\lst@xrightmargin
+%% \advance\@totalleftmargin\lst@xleftmargin\relax}%
+ \l@addto@macro\caption@beginhook{%
+ \@tempdima\leftmargin
+ \multiply\@tempdima\@listdepth
+ \hskip-\@tempdima\relax}%
\caption@setposition{#1}%
\caption@iftop{%
\@tempdima\belowcaptionskip
diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty
index fe0a5625e34..5a07a5c487c 100644
--- a/Master/texmf-dist/tex/latex/caption/caption3.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption3.sty
@@ -25,19 +25,16 @@
%% This Current Maintainer of this work is Axel Sommerfeldt.
%%
%% This work consists of the files
-%% CHANGELOG, README, SUMMARY, caption.ins,
-%% caption.dtx, caption2.dtx, caption3.dtx,
-%% bicaption.dtx, ltcaption.dtx, subcaption.dtx,
-%% newfloat.dtx, and totalcount.dtx
+%% caption.ins, caption.dtx, caption2.dtx, caption3.dtx,
+%% bicaption.dtx, ltcaption.dtx, subcaption.dtx, totalcount.dtx,
%% the derived files
%% caption.sty, caption2.sty, caption3.sty,
-%% bicaption.sty, ltcaption.sty, subcaption.sty,
-%% newfloat.sty, and totalcount.sty
+%% bicaption.sty, ltcaption.sty, subcaption.sty, totalcount.sty,
%% and the user manuals
-%% caption-deu.tex, caption-eng.tex, and caption-rus.tex.
+%% caption-deu.tex, caption-eng.tex, caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2019/09/09 v1.8e caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2019/12/31 v1.8f caption3 kernel (AR)]
\providecommand\caption@FixArabTeX{%
\def\caption@tempa##1{}%
\ifx\caption@tempa\@gobble
@@ -568,7 +565,8 @@
\DeclareCaptionBox{colorbox}{\colorbox{\caption@boxcolor}{%
\setlength\caption@tempdima{#1}%
\addtolength\caption@tempdima{-2\fboxsep}%
- \linewidth=\caption@tempdima\hsize=\caption@tempdima
+ \linewidth\caption@tempdima
+ \hsize\caption@tempdima
#2}}
\DeclareCaptionOption{boxcolor}{\def\caption@boxcolor{#1}}
\DeclareCaptionOption{boxsep}{\setlength\fboxsep{#1}}
@@ -1290,7 +1288,7 @@
\newcommand\caption@@make@[2]{%
\caption@stepthecounter
\caption@beginhook
- \caption@box\linewidth{%
+ \caption@box\hsize{%
\caption@ifslc{\caption@slc{#1}{#2}\caption@singleline\relax}{}%
\caption@calcmargin
\caption@tempdima\captionmargin
@@ -1331,23 +1329,20 @@
\fi
\fi
\ifdim\captionwidth=\z@
- \captionwidth\linewidth
+ \captionwidth\hsize
\advance\captionwidth by -2\captionmargin
\advance\captionwidth by -\captionmargin@
\else
- \captionmargin\linewidth
+ \captionmargin\hsize
\advance\captionmargin by -\captionwidth
\divide\captionmargin by 2
\captionmargin@\z@
\fi
\caption@Debug{%
\string\hsize=\the\hsize,
- \string\linewidth=\the\linewidth,\MessageBreak
- \string\leftmargin=\the\leftmargin,
- \string\rightmargin=\the\rightmargin,\MessageBreak
- \string\margin=\the\captionmargin,
- \string\margin@=\the\captionmargin@,
- \string\width=\the\captionwidth}%
+ \string\captionwidth=\the\captionwidth,\MessageBreak
+ \string\captionmargin=\the\captionmargin,
+ \string\captionmargin@=\the\captionmargin@}%
}
\newcommand\caption@slc[4]{%
\caption@Debug{Begin SLC}%