diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-caption.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp-caption.sty | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-caption.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-caption.sty index 2d4637fcf9c..4696791a82b 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-caption.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-caption.sty @@ -19,74 +19,46 @@ \typeout{---} \typeout{Packages lwarp and caption:} \typeout{If a ``Missing \protect\begin\protect{document\protect}'' error occurs here,} -\typeout{try using: \space \protect\usepackage\protect{caption\protect}\space\protect\captionsetup{options}} +\typeout{try using: \space \protect\usepackage\protect{caption\protect}\space% + \protect\captionsetup{options}} \typeout{instead of: \protect\usepackage[options]\protect{caption\protect}.} \typeout{---} -\LWR@ProvidesPackagePass{caption}[2019/09/01] +\LWR@ProvidesPackagePass{caption}[2020/01/03] -\renewcommand\caption@ibox[3]{% - \@testopt{\caption@iibox{#1}{#2}{#3}}{% - \linewidth% lwarp - }% -} -\long\def\caption@iibox#1#2#3[#4]{% - \@testopt{\caption@iiibox{#1}{#2}{#3}{#4}}\captionbox@hj@default +\long\def\caption@iibox@#1#2#3#4{% + \caption@iiibox{#1}{#2}{#3}% + []% lwarp + [\captionbox@hj@default]% + {{#4}}% lwarp } -\long\def\caption@iiibox#1#2#3#4[#5]#6{% +\long\def\caption@iiiibox#1#2#3#4#5[#6][#7]#8{% \begingroup #1*% set \caption@position \caption@iftop{% - \LWR@traceinfo{caption@iiibox top}% \endgroup - \parbox[t]{#4}{% + \minipagefullwidth% + \parbox[t]{\linewidth}{% #1\relax \caption@setposition t% - {\caption#2{#3}}% lwarp - #6% lwarp + {\caption#4{#5}}% + #8% }% }{% - \LWR@traceinfo{caption@iiibox bottom}% \endgroup - \parbox[b]{#4}{% + \minipagefullwidth% + \parbox[b]{\linewidth}{% #1\relax \caption@setposition b% - #6% lwarp - {\caption#2{#3}}% lwarp - }% + #8% + {\caption#4{#5}}% + }% }% -\LWR@traceinfo{caption@iiibox: done}% -} - - -\long\def\caption@@caption#1[#2]#3{% - \ifcaption@star - \else - \caption@prepareanchor{#1}{#2}% - \memcaptioninfo{#1}{\csname the#1\endcsname}{#2}{#3}% - \@nameuse{nag@hascaptiontrue}% - \fi - \par - \caption@beginex{#1}{#2}{#3}% - \caption@setfloatcapt{% - \caption@boxrestore - \if@minipage - \@setminipage - \fi - \caption@normalsize - \ifcaption@star - \let\caption@makeanchor\@firstofone - #3% lwarp - \else% lwarp - \@makecaption{\csname fnum@#1\endcsname}% - {\ignorespaces\caption@makeanchor{#3}}% - \fi% lwarp - \caption@if@minipage\@minipagetrue\@minipagefalse}% - \caption@end% } \renewcommand\caption@@@make[2]{% \LWR@traceinfo{caption@@@make}% + \LWR@stoppars% lwarp \caption@ifempty{#2}{% \let\caption@lsep\@empty \let\caption@tfmt\@firstofone @@ -95,7 +67,7 @@ {\ifcaption@star\else \begingroup \captionlabelfont - #1% + \LWR@isolate{#1}% lwarp \endgroup \fi}% {\ifcaption@star\else @@ -107,27 +79,55 @@ \fi}% {{% \captiontextfont - \caption@tfmt{#2}% + \let\\\newline% lwarp + \LWR@isolate{\caption@tfmt{#2}}% lwarp }}% + \LWR@startpars% lwarp \LWR@traceinfo{caption@@@make done}% } \renewcommand{\caption@@make@}[2]{% - \caption@stepthecounter - \caption@beginhook + \caption@stepthecounter% + \caption@beginhook% \caption@@@make{#1}{#2}% - \caption@endhook + \caption@endhook% } \long\def\caption@makecaption#1#2{% \caption@@make{#1}{#2}% } +\AtBeginDocument{ + \let\@makecaption\caption@makecaption +} + +\AtBeginDocument{ + \def\@xfloat#1[#2]{% + \caption@ORI@xfloat{#1}[#2]% + \caption@settype{#1}% + \LWR@futurenonspacelet\LWR@mynexttoken\LWR@floatalignment% + }% + \def\@xdblfloat#1[#2]{% + \caption@ORI@xfloat{#1}[#2]% + \caption@settype{#1}% + \LWR@futurenonspacelet\LWR@mynexttoken\LWR@floatalignment% + }% +} + +\long\def\caption@lsep@default{.~} +\long\def\caption@lsep@colon{:~} +\long\def\caption@lsep@period{.~} +\long\def\caption@lsep@space{~} +\long\def\caption@lsep@endash{~\textendash~} +\long\def\caption@lsep@arabi{~:~} + +\DeclareCaptionBox{none}{#2} \DeclareCaptionBox{parbox}{% -#2% + #2% } + \DeclareCaptionBox{colorbox}{% -#2% + #2% } \endinput |