diff options
author | Karl Berry <karl@freefriends.org> | 2018-01-30 21:05:29 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-01-30 21:05:29 +0000 |
commit | 83e0b95d2f78cf405abe952e383dcd0d986eee66 (patch) | |
tree | 322c558d9417cafdf345ae56b31ef814ac057e72 /Master/texmf-dist/tex/latex/lwarp/lwarp-caption.sty | |
parent | 1b674ef86fe17b1011f19a929dfd82253eb90995 (diff) |
lwarp (30jan18)
git-svn-id: svn://tug.org/texlive/trunk@46495 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-caption.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp-caption.sty | 139 |
1 files changed, 139 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-caption.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-caption.sty new file mode 100644 index 00000000000..326fc563905 --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-caption.sty @@ -0,0 +1,139 @@ +%% +%% This is file `lwarp-caption.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `caption') +%% This is a generated file. +%% Copyright 2016-2018 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. + +\LWR@ProvidesPackagePass{caption} + +\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@iiibox#1#2#3#4[#5]#6{% + \begingroup + #1*% set \caption@position + \caption@iftop{% + \LWR@traceinfo{caption@iiibox top}% + \endgroup + \parbox[t]{#4}{% + #1\relax + \caption@setposition t% + {\caption#2{#3}}% lwarp + #6% lwarp + }% + }{% + \LWR@traceinfo{caption@iiibox bottom}% + \endgroup + \parbox[b]{#4}{% + #1\relax + \caption@setposition b% + #6% lwarp + {\caption#2{#3}}% lwarp + }% + }% +\LWR@traceinfo{caption@iiibox: done}% +} + +\def\caption@caption{% + \caption@iftype + {% + \caption@checkgrouplevel\@empty\caption + \caption@star + {\caption@refstepcounter\@captype}% + {\caption@dblarg{\@caption\@captype}}}% + {\caption@Error{\noexpand\caption outside float}% + \caption@gobble}% +} + +\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 + \fi + \@makecaption{\csname fnum@#1\endcsname}% + {\ignorespaces\caption@makeanchor{#3}}\par + \caption@if@minipage\@minipagetrue\@minipagefalse}% + \caption@end% +} + +\renewcommand\caption@@@make[2]{% +\LWR@startpars% lwarp + \caption@ifempty{#2}{% + \let\caption@lsep\@empty + \let\caption@tfmt\@firstofone + }% + \renewcommand{\@@par}{\LWR@closeparagraph\LWR@orig@@par}% lwarp + \caption@applyfont + \caption@fmt + {\ifcaption@star\else + \begingroup + \captionlabelfont + #1% + \endgroup + \fi}% + {\ifcaption@star\else + \begingroup + \caption@iflf\captionlabelfont + \relax\caption@lsep + \endgroup + \fi}% + {{\captiontextfont + \caption@ifstrut + {\vrule\@height\ht\strutbox\@width\z@}% + {}% + \nobreak\hskip\z@skip % enable hyphenation + \caption@tfmt{#2} + \LWR@ensuredoingapar% lwarp + \caption@ifstrut + {\ifhmode\@finalstrut\strutbox\fi}% + {}% + \par}} +\LWR@stoppars% lwarp +} + +\renewcommand{\caption@@make@}[2]{% + \caption@stepthecounter + \caption@beginhook + \caption@@@make{#1}{#2}% + \caption@endhook +} + +\DeclareCaptionBox{parbox}{% +#2% +} +\DeclareCaptionBox{colorbox}{% +#2% +} + +\endinput +%% +%% End of file `lwarp-caption.sty'. |