| 1 |
%% |
| 2 |
%% This is file `ltcaption.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% ltcaption.dtx (with options: `package') |
| 8 |
%% |
| 9 |
%% Copyright (C) 1994-2022 Axel Sommerfeldt ([email protected]) |
| 10 |
%% |
| 11 |
%% https://gitlab.com/axelsommerfeldt/caption |
| 12 |
%% |
| 13 |
%% -------------------------------------------------------------------------- |
| 14 |
%% |
| 15 |
%% This work may be distributed and/or modified under the |
| 16 |
%% conditions of the LaTeX Project Public License, either version 1.3 |
| 17 |
%% of this license or (at your option) any later version. |
| 18 |
%% The latest version of this license is in |
| 19 |
%% http://www.latex-project.org/lppl.txt |
| 20 |
%% and version 1.3 or later is part of all distributions of LaTeX |
| 21 |
%% version 2003/12/01 or later. |
| 22 |
%% |
| 23 |
%% This work has the LPPL maintenance status "maintained". |
| 24 |
%% |
| 25 |
%% This Current Maintainer of this work is Axel Sommerfeldt. |
| 26 |
%% |
| 27 |
%% This work consists of the files |
| 28 |
%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx, |
| 29 |
%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx, |
| 30 |
%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx, |
| 31 |
%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, |
| 32 |
%% the derived files |
| 33 |
%% caption.sty, caption-light.sty, caption2.sty, caption3.sty, |
| 34 |
%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, |
| 35 |
%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, |
| 36 |
%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. |
| 37 |
%% |
| 38 |
\NeedsTeXFormat{LaTeX2e}[1994/12/01] |
| 39 |
\providecommand\DeclareRelease[3]{} |
| 40 |
\providecommand\DeclareCurrentRelease[2]{} |
| 41 |
\DeclareCurrentRelease{v1}{2007-04-15} |
| 42 |
\ProvidesPackage{ltcaption}[2021/01/08 v1.4c longtable captions (AR)] |
| 43 |
\@ifpackageloaded{longtable}{}{% |
| 44 |
\PackageError{ltcaption}{longtable package not loaded, aborting}{RTFM}} |
| 45 |
\providecommand*\LTcaptype{table} |
| 46 |
\providecommand*\ext@table{lot} |
| 47 |
\@ifundefined{caption@AtBeginDocument}\AtBeginDocument\caption@AtBeginDocument{% |
| 48 |
\@ifpackageloaded{listings}{% |
| 49 |
\providecommand*\ext@lstlisting{lol}}{}} |
| 50 |
\@ifpackageloaded{caption}{}{% |
| 51 |
\newskip\LTcapskip \LTcapskip=\abovecaptionskip |
| 52 |
\newskip\LTcapleft \LTcapleft=\fill |
| 53 |
\newskip\LTcapright \LTcapright=\fill |
| 54 |
\newif\ifLTcapmargins \LTcapmarginstrue |
| 55 |
\providecommand*\CaptionLabelFont{} |
| 56 |
\providecommand*\CaptionTextFont{} |
| 57 |
\providecommand*\CaptionLabelSeparator{:} |
| 58 |
} |
| 59 |
\@ifundefined{caption@AtBeginDocument}\AtBeginDocument\caption@AtBeginDocument{% |
| 60 |
\let\ltcaption@ORI@LT@array\LT@array |
| 61 |
\renewcommand*\LT@array{% |
| 62 |
\let\caption@LT@refstepcounter\refstepcounter |
| 63 |
\def\refstepcounter{% |
| 64 |
\caption@LTtype\caption@LT@refstepcounter}% |
| 65 |
\let\caption@LT@Hrefstepcounter\H@refstepcounter |
| 66 |
\def\H@refstepcounter{% |
| 67 |
\caption@LTtype\caption@LT@Hrefstepcounter}% |
| 68 |
\let\caption@LT@makecurrent\hyper@makecurrent |
| 69 |
\def\hyper@makecurrent{% |
| 70 |
\caption@LTtype\caption@LT@makecurrent}% |
| 71 |
\def\lst@@caption{\relax}% |
| 72 |
\def\captionnewline{\par}% |
| 73 |
\ltcaption@ORI@LT@array}} |
| 74 |
\newcommand*\caption@LTtype[2]{% |
| 75 |
\edef\caption@LT@tempa{#2}% |
| 76 |
\ifx\caption@LT@tempa\caption@LT@table |
| 77 |
\caption@LT@type#1% |
| 78 |
\else |
| 79 |
#1{#2}% |
| 80 |
\fi}% |
| 81 |
\newcommand*\caption@LT@type[1]{% |
| 82 |
\expandafter#1\expandafter{\LTcaptype}} |
| 83 |
\newcommand*\caption@LT@table{table}% |
| 84 |
\long\def\LT@c@ption#1[#2]#3{% |
| 85 |
\LT@makecaption#1{\csname fnum@\LTcaptype\endcsname}{#3}% |
| 86 |
\LT@listentry\LTcaptype{#2}} |
| 87 |
\renewcommand\LT@makecaption[3]{% |
| 88 |
\LT@@makecaption{% |
| 89 |
\sbox\@tempboxa{% |
| 90 |
#1{{\CaptionLabelFont#2\CaptionLabelSeparator} }\CaptionTextFont#3}% |
| 91 |
\ifdim\wd\@tempboxa>\hsize |
| 92 |
#1{{\CaptionLabelFont#2\CaptionLabelSeparator} }\CaptionTextFont#3% |
| 93 |
\else |
| 94 |
\hbox to\hsize{\hfil\box\@tempboxa\hfil}% |
| 95 |
\fi |
| 96 |
\endgraf\vskip\LTcapskip}} |
| 97 |
\newcommand\LT@@makecaption[1]{% |
| 98 |
\caption@LT@make{\hb@xt@\hsize{% |
| 99 |
\ifLTcapmargins |
| 100 |
\hspace\LTcapleft |
| 101 |
\FBifLTcapwidth{\advance\LTcapwidth-\LTcapleft}% |
| 102 |
\else |
| 103 |
\hspace\LTleft |
| 104 |
\FBifLTcapwidth{\advance\LTcapwidth-\LTleft}% |
| 105 |
\fi |
| 106 |
\FBifLTcapwidth{\advance\LTcapwidth-% |
| 107 |
\ifLTcapmargins\LTcapright\else\LTright\fi}% |
| 108 |
\parbox[t]\LTcapwidth{#1}% |
| 109 |
\ifLTcapmargins |
| 110 |
\hskip\LTcapright |
| 111 |
\else |
| 112 |
\hskip\LTright |
| 113 |
\fi}}} |
| 114 |
\AtBeginDocument{\providecommand*\FBifLTcapwidth[1]{}} |
| 115 |
\newcommand\caption@LT@make[1]{% |
| 116 |
\noalign{\caption@LT@config}% |
| 117 |
\expandafter\LT@mcol\expandafter\LT@cols\expandafter{\caption@LTfmt}{% |
| 118 |
\hb@xt@\z@{% |
| 119 |
\hspace\caption@LTleft |
| 120 |
\parbox[t]\linewidth{#1}% |
| 121 |
\hspace\caption@LTright}}}% |
| 122 |
\newcommand*\caption@LT@config{% |
| 123 |
\caption@LT@parse\LTleft\caption@LTleft\caption@ifLTleft |
| 124 |
\caption@LT@parse\LTright\caption@LTright\caption@ifLTright |
| 125 |
\xdef\caption@LTfmt{% |
| 126 |
@{}\caption@ifLTleft{\caption@ifLTright{c}{r}}{l}@{}}} |
| 127 |
\newcommand*\caption@LT@parse[3]{% |
| 128 |
\let\@pluspart\@undefined |
| 129 |
\let\@minuspart\@undefined |
| 130 |
\expandafter\caption@LT@parse@\expandafter\@fixpart\the#1 x % |
| 131 |
\xdef#2{-\@fixpart |
| 132 |
\ifx\@minuspart\@undefined\else |
| 133 |
\space\@plus\space\@minuspart |
| 134 |
\fi |
| 135 |
\ifx\@pluspart\@undefined\else |
| 136 |
\space\@minus\space\@pluspart |
| 137 |
\fi}% |
| 138 |
\let#3\@firstoftwo |
| 139 |
\ifx\@pluspart\@undefined |
| 140 |
\ifx\@minuspart\@undefined |
| 141 |
\let#3\@secondoftwo |
| 142 |
\fi |
| 143 |
\fi} |
| 144 |
\def\caption@LT@parse@#1#2 {% |
| 145 |
\edef\@tempa{\@car#2\@nil}% |
| 146 |
\if p\@tempa |
| 147 |
\def\next{\caption@LT@parse@\@pluspart}% |
| 148 |
\else\if m\@tempa |
| 149 |
\def\next{\caption@LT@parse@\@minuspart}% |
| 150 |
\else\if x\@tempa |
| 151 |
\let\next\relax |
| 152 |
\else |
| 153 |
\def#1{#2}% |
| 154 |
\def\next{\caption@LT@parse@ @}% |
| 155 |
\fi\fi\fi |
| 156 |
\next} |
| 157 |
\newcommand*\LT@listentry[2]{% |
| 158 |
\def\@tempa{#2}% |
| 159 |
\ifx\@tempa\@empty\else |
| 160 |
{\let\\\space |
| 161 |
\addcontentsline{\csname ext@#1\endcsname}{#1}% |
| 162 |
{\protect\numberline{\csname the#1\endcsname}{#2}}}% |
| 163 |
\fi |
| 164 |
\ignorespaces} |
| 165 |
\newenvironment{longtable*}{% |
| 166 |
\let\caption@LT@type\@gobble |
| 167 |
\let\caption@LT@raisedlink\Hy@raisedlink |
| 168 |
\def\Hy@raisedlink{% |
| 169 |
\let\Hy@raisedlink\caption@LT@raisedlink |
| 170 |
\@gobble}% |
| 171 |
\let\ltcaption@ORI@LT@c@ption\LT@c@ption |
| 172 |
\def\LT@c@ption##1[##2]##3{% |
| 173 |
\ifx##1\@firstofone |
| 174 |
\PackageError{ltcaption}% |
| 175 |
{\noexpand\caption is not available in longtable* environment}% |
| 176 |
{If you do not understand this error, please take a closer |
| 177 |
look\MessageBreak at the documentation of the `ltcaption' |
| 178 |
package.\MessageBreak \@ehc}% |
| 179 |
\else |
| 180 |
\ltcaption@ORI@LT@c@ption{##1}[{##2}]{##3}% |
| 181 |
\fi}% |
| 182 |
\longtable}% |
| 183 |
{\endlongtable} |
| 184 |
\@ifundefined{@komalongtablefalse}{}{% |
| 185 |
\if@komalongtable |
| 186 |
\renewcommand\LT@makecaption[3]{% |
| 187 |
\noalign{% |
| 188 |
\if@captionabove |
| 189 |
\vskip\belowcaptionskip |
| 190 |
\else |
| 191 |
\vskip\abovecaptionskip |
| 192 |
\fi |
| 193 |
}% |
| 194 |
\caption@LT@make{% |
| 195 |
\@@makecaption{#1}{#2}{#3}% |
| 196 |
\endgraf |
| 197 |
\if@captionabove |
| 198 |
\vskip\abovecaptionskip |
| 199 |
\else |
| 200 |
\vskip\belowcaptionskip |
| 201 |
\fi |
| 202 |
}% |
| 203 |
}% |
| 204 |
\let\LT@@makecaption\@undefined |
| 205 |
\fi} |
| 206 |
\@ifclassloaded{memoir}{% |
| 207 |
\@ifundefined{@@makecaption}{}{% |
| 208 |
\renewcommand\LT@makecaption[3]{% |
| 209 |
\caption@LT@make{% |
| 210 |
\let\@memtempa\relax |
| 211 |
% starred form -> #1 = \@gobble |
| 212 |
\ifx#1\@gobble |
| 213 |
\let\@contnfont\@empty |
| 214 |
\let\@contdelim\@empty |
| 215 |
\@@makecaption{}{#3}% |
| 216 |
\else |
| 217 |
\@@makecaption{#2}{#3}% |
| 218 |
\fi |
| 219 |
\endgraf\vskip\belowcaptionskip}}% |
| 220 |
\let\LT@@makecaption\@undefined |
| 221 |
}}{} |
| 222 |
\endinput |
| 223 |
%% |
| 224 |
%% End of file `ltcaption.sty'. |