diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/caption/caption.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/caption.sty | 37 |
1 files changed, 26 insertions, 11 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 |