diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/caption/caption_2007-04-16.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/caption_2007-04-16.sty | 455 |
1 files changed, 455 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/caption/caption_2007-04-16.sty b/Master/texmf-dist/tex/latex/caption/caption_2007-04-16.sty new file mode 100644 index 00000000000..2e0a89931a4 --- /dev/null +++ b/Master/texmf-dist/tex/latex/caption/caption_2007-04-16.sty @@ -0,0 +1,455 @@ +%% +%% This is file `caption_2007-04-16.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% fallback/v3.0/caption.dtx (with options: `package') +%% +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% +%% https://gitlab.com/axelsommerfeldt/caption +%% +%% -------------------------------------------------------------------------- +%% +%% 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 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% This Current Maintainer of this work is Axel Sommerfeldt. +%% +%% This work consists of the files +%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx, +%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx, +%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx, +%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, +%% the derived files +%% caption.sty, caption-light.sty, caption2.sty, caption3.sty, +%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, +%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. +%% +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{caption}[2007/04/16 v3.0q Customising captions (AR)] +\RequirePackage{caption3}[=2007/01/31] % needs v1.0l or newer +\@ifpackageloaded{caption2}{% + \caption@Error{You can't use both the caption *and* caption2 package}% + \endinput +}{} +\DeclareCaptionOption{config}[caption]{% + \InputIfFileExists{#1.cfg}{\typeout{*** Local configuration file + #1.cfg used ***}}% + {\PackageWarning{caption}{Configuration + file #1.cfg not found}}} +\DeclareCaptionOption*{figureposition}{\captionsetup[figure]{position=#1}} +\DeclareCaptionOption*{tableposition}{\captionsetup[table]{position=#1}} +\DeclareCaptionOption*{figurename}{\captionsetup[figure]{name=#1}} +\DeclareCaptionOption*{tablename}{\captionsetup[table]{name=#1}} +\DeclareCaptionOption*{normal}[]{\caption@setformat{normal}} +\DeclareCaptionOption*{isu}[]{\caption@setformat{hang}} +\DeclareCaptionOption*{hang}[]{\caption@setformat{hang}} +\DeclareCaptionOption*{center}[]{\caption@setjustification{centering}} +\DeclareCaptionOption*{anne}[]{\caption@setjustification{centerlast}} +\DeclareCaptionOption*{centerlast}[]{\caption@setjustification{centerlast}} +\DeclareCaptionOption*{scriptsize}[]{\def\captionfont{\scriptsize}} +\DeclareCaptionOption*{footnotesize}[]{\def\captionfont{\footnotesize}} +\DeclareCaptionOption*{small}[]{\def\captionfont{\small}} +\DeclareCaptionOption*{normalsize}[]{\def\captionfont{\normalsize}} +\DeclareCaptionOption*{large}[]{\def\captionfont{\large}} +\DeclareCaptionOption*{Large}[]{\def\captionfont{\Large}} +\DeclareCaptionOption*{up}[]{\l@addto@macro\captionlabelfont\upshape} +\DeclareCaptionOption*{it}[]{\l@addto@macro\captionlabelfont\itshape} +\DeclareCaptionOption*{sl}[]{\l@addto@macro\captionlabelfont\slshape} +\DeclareCaptionOption*{sc}[]{\l@addto@macro\captionlabelfont\scshape} +\DeclareCaptionOption*{md}[]{\l@addto@macro\captionlabelfont\mdseries} +\DeclareCaptionOption*{bf}[]{\l@addto@macro\captionlabelfont\bfseries} +\DeclareCaptionOption*{rm}[]{\l@addto@macro\captionlabelfont\rmfamily} +\DeclareCaptionOption*{sf}[]{\l@addto@macro\captionlabelfont\sffamily} +\DeclareCaptionOption*{tt}[]{\l@addto@macro\captionlabelfont\ttfamily} +\DeclareCaptionOption*{nooneline}[]{\caption@setbool{slc}{0}} +\caption@setbool{ruled}{0} +\DeclareCaptionOption*{ruled}[]{\caption@setbool{ruled}{1}} +\DeclareCaptionOption*{flushleft}[]{\caption@setjustification{raggedright}} +\DeclareCaptionOption*{flushright}[]{\caption@setjustification{raggedleft}} +\DeclareCaptionOption*{oneline}[]{\caption@setbool{slc}{1}} +\DeclareCaptionOption*{ignoreLTcapwidth}[]{} +\DeclareCaptionOption*{onelinecaption}[]{\caption@setbool{slc}{1}} +\DeclareCaptionOption*{noonelinecaption}[]{\caption@setbool{slc}{0}} +\DeclareCaptionOption*{tablecaptionabove}[]{\captionsetup[table]{position=t}} +\DeclareCaptionOption*{tablecaptionbelow}[]{\captionsetup[table]{position=b}} +\newcommand*\caption@declarepackage[1]{% + \caption@setbool{pkt@#1}{1}% + \DeclareCaptionOption*{#1}{\caption@setbool{pkt@#1}{##1}}} +\AtEndOfPackage{\let\caption@declarepackage\@undefined} +\newcommand\caption@ifpackage[3]{% + \edef\caption@tempa{% + \caption@ifbool{pkt@#1}% + {\@ifundefined{#2}{AtBeginDocument}{firstofone}}% + {gobble}}% + \caption@Info{#1=\caption@ifbool{pkt@#1}{1}{0} % + (\@ifundefined{#2}{not }{}loaded->\caption@tempa)}% + \caption@ifbool{pkt@#1}{% + \@ifundefined{#2}% + {\let\caption@tempa\AtBeginDocument}% + {\let\caption@tempa\@firstofone}% + }{% + \let\caption@tempa\@gobble + }% + \caption@tempa{\@ifundefined{#2}{}{#3}}% + \caption@undefbool{pkt@#1}} +\AtEndOfPackage{\let\caption@ifpackage\@undefined} +\caption@declarepackage{caption} +\caption@declarepackage{float} +\caption@declarepackage{floatrow} +\caption@declarepackage{hyperref} +\caption@declarepackage{hypcap} +\caption@declarepackage{listings} +\caption@declarepackage{longtable} +\caption@declarepackage{picins} +\caption@declarepackage{rotating} +\caption@declarepackage{sidecap} +\caption@declarepackage{supertabular} +\DeclareCaptionOption{verbose}[1]{% + \caption@setbool{verbose}{#1}% + \caption@ifverbose{% + \def\caption@Info{\PackageInfo{caption}}% + }{% + \let\caption@Info\@gobble + }} +\setkeys{caption}{verbose=0} +\caption@ProcessOptions{caption} +\caption@ifbool{pkt@caption}{}{\endinput} +\caption@undefbool{pkt@caption} +\def\captionof{\@ifstar{\caption@of{\caption*}}{\caption@of\caption}} +\newcommand*\caption@of[2]{\def\@captype{#2}#1} +\DeclareCaptionOption{name}{\caption@setfloatname\@captype{#1}} +\DeclareCaptionOption{type}{\def\@captype{#1}} +\providecommand\ContinuedFloat{% + \@ifnextchar[%] + \@ContinuedFloat + {\ifx\@captype\@undefined + \@latex@error{\noexpand\ContinuedFloat outside float}\@ehd + \else + \@ContinuedFloat[\@captype]% + \fi}} +\def\@ContinuedFloat[#1]{% + \addtocounter{#1}\m@ne + \caption@ContinuedFloat{#1}% + \caption@@ContinuedFloat{#1}} +\let\caption@ContinuedFloat\@gobble +\let\caption@resetContinuedFloat\@gobble +\providecommand*\caption@@ContinuedFloat[1]{} +\newcommand*\caption@begin[1]{% + \caption@resetContinuedFloat{#1}% + \begingroup + \caption@setfloattype{#1}% + \ifx\caption@lfmt\caption@lfmt@default\else + \@namedef{fnum@#1}{% + \caption@lfmt{\caption@floatname{#1}}{\@nameuse{the#1}}}% + \fi + \caption@fixposition + \global\let\caption@fixedposition\caption@position} +\newcommand\caption@beginex[3]{% + \caption@begin{#1}% + \caption@iflof% + {\def\caption@tempa{#2}}% + {\let\caption@tempa\@empty}% + \ifx\caption@tempa\@empty + \long\def\addcontentsline##1##2##3{}% There is no \@gobblethree... + \fi + \caption@ifempty{#3}{\let\caption@ifempty\@secondoftwo}% +} +\newcommand*\caption@end{% + \endgroup + \let\caption@position\caption@fixedposition} +\let\caption@setfloattype\caption@settype +\newcommand*\caption@letfloattype[2]{% + \def\caption@setfloattype##1{% + \caption@settype{##1}#2\caption@settype{#1}}} +\newcommand*\caption@floatname[1]{\@nameuse{#1name}} +\newcommand*\caption@setfloatname[1]{\@namedef{#1name}} +\AtBeginDocument{% + \@ifundefined{cc@caption}{% + \@ifundefined{caption@old}{% + \let\caption@old\caption + \def\caption{\caption@caption\caption@old}% + \def\caption@caption#1{% + \@ifstar{\ContinuedFloat\global\caption@startrue#1[]}{#1}}% + \let\caption@@old\@caption + \long\def\@caption#1[#2]#3{% + \caption@beginex{#1}{#2}{#3}% + \caption@@old{#1}[{#2}]{#3}% + \caption@end}% + }{}}{% + \caption@Info{captcont package v2.0 detected}% + \def\caption@caption#1{#1}% + }% +} +\renewcommand\@makecaption[2]{% + \caption@iftop{\vskip\belowcaptionskip}{\vskip\abovecaptionskip}% + \caption@@make{#1}{#2}% + \caption@iftop{\vskip\abovecaptionskip}{\vskip\belowcaptionskip}} +\@ifundefined{scr@caption}{}{% + \caption@Info{KOMA-Script class detected} + \AtBeginDocument{\let\scr@caption\caption} + \def\onelinecaptionstrue{\caption@setbool{slc}{1}} + \def\onelinecaptionsfalse{\caption@setbool{slc}{0}} + \def\captionabove{% + \caption@setposition{t}\let\caption@setposition\@gobble + \scr@caption} + \def\captionbelow{% + \caption@setposition{b}\let\caption@setposition\@gobble + \scr@caption} +} +\AtBeginDocument{\@ifundefined{f@ffrench}{}{% + \caption@Info{french(le) package detected}% + \@ifundefined{GOfrench}% + {\let\caption@tempa\@firstofone}% + {\def\caption@tempa{\g@addto@macro\GOfrench}}% + \caption@tempa{% + \let\@cnORI\caption + \let\caption@tablescaption\@tablescaption + \def\@tablescaption{\caption@caption\caption@tablescaption}% + \let\@eatDP\@undefined + \let\caption@tempa\@empty + \ifx\f@ffrench\fnum@figure + \l@addto@macro\caption@tempa{\let\fnum@figure\f@ffrench}% + \fi + \ifx\f@tfrench\fnum@table + \l@addto@macro\caption@tempa{\let\fnum@table\f@tfrench}% + \fi + \def\f@ffrench{\ifx\listoffigures\relax\else\figurename~\thefigure\fi}% + \def\f@tfrench{\ifx\listoftables\relax\else\tablename~\thetable\fi}% + \caption@tempa +}}} +\def\caption@setfloatposition{% + \caption@setposition{\@fs@iftopcapt t\else b\fi}} +\caption@ifpackage{float}{@float@setevery}{% + \caption@Info{float package v1.3 (or newer) detected}% + \let\caption@of@float\@gobble + \renewcommand*\caption@of[2]{% + \@ifundefined{fst@#2}{}{% + \let\caption@of@float\@firstofone + \@nameuse{fst@#2}\@float@setevery{#2}}% + \def\@captype{#2}#1}% + \let\caption@@float\float@caption + \long\def\float@caption#1[#2]#3{% + \caption@beginex{#1}{#2}{#3}% + \let\@fs@capt\caption@@make + \caption@@float{#1}[{#2}]{#3}% + \caption@of@float{% + \@ifundefined{hyper@@anchor}{}{% + \begingroup + \@tempdima\prevdepth + \nointerlineskip + \let\leavevmode\relax + \hyper@@anchor\@currentHref\relax + \prevdepth\@tempdima + \endgroup}% + \def\caption@@make##1##2{\unvbox\@floatcapt}% + \@makecaption{}{}}% + \caption@end}% + \let\caption@float@setevery\@float@setevery + \def\@float@setevery#1{% + \def\caption@floatname##1{\@nameuse{fname@#1}}% + \def\caption@setfloatname##1{\@namedef{fname@#1}}% + \expandafter\let\expandafter\caption@tempa\csname @float@c@#1\endcsname + \ifx\caption@tempa\float@caption + \else\ifx\caption@tempa\@caption + \else\ifx\caption@tempa\caption@@float + \caption@Info{\protect\@float@c@#1\space := \protect\float@caption}% + \expandafter\let\csname @float@c@#1\endcsname\float@caption + \else + \caption@Info{\protect\@float@c@#1\space := \protect\@caption}% + \expandafter\let\csname @float@c@#1\endcsname\@caption + \fi\fi\fi + \expandafter\ifx\csname @float@c@#1\endcsname\float@caption + \caption@setfloatposition + \expandafter\let\expandafter\caption@fst\csname fst@#1\endcsname + \edef\caption@fst{\noexpand\string\expandafter\noexpand\caption@fst}% + \edef\caption@fst{\noexpand\@gobblefour\caption@fst}% + \caption@setstyle*\caption@fst + \caption@settype\caption@fst + \fi + \caption@float@setevery{#1}}% + \g@addto@macro\fs@plaintop{\def\@fs@mid{\vspace\abovecaptionskip\relax}}% + \g@addto@macro\fs@boxed{\def\@fs@mid{\kern\abovecaptionskip\relax}}% +} +\captionsetup[boxed]{skip=2pt} +\caption@ifbool{ruled}{% + \captionsetup[ruled]{margin=0pt,singlelinecheck=0}% +}{% + \DeclareCaptionStyle{ruled}{labelfont=bf,labelsep=space,strut=0}% +} +\caption@undefbool{ruled} +\caption@ifpackage{floatrow}{flrow@setlist}{% + \caption@Info{floatrow package v0.1f (or newer) detected}% + \renewcommand*\caption@of[2]{% + \def\@captype{#2}\flrow@setlist{{#2}}#1}% + \renewcommand*\caption@floatname[1]{% + \@nameuse{\@ifundefined{fname@#1}{#1name}{fname@#1}}}% + \renewcommand*\caption@setfloatname[1]{% + \@namedef{\@ifundefined{fname@#1}{#1name}{fname@#1}}}% +} +\caption@ifpackage{hyperref}{theHfigure}{% + \caption@Info{hyperref package v6.74m (or newer) detected}% + \def\caption@ContinuedFloat#1{% + \@ifundefined{theH#1}{}{% + \@ifundefined{CF@#1}{% + \expandafter\caption@newcounter\csname CF@#1\endcsname + \caption@resetContinuedFloat{#1}}{}% + \expandafter\caption@stepcounter\csname CF@#1\endcsname + \expandafter\l@addto@macro\csname theH#1\endcsname{% + .\csname CF@#1\endcsname}% + \let\caption@resetContinuedFloat\@gobble + }}% + \def\caption@resetContinuedFloat#1{% + \@ifundefined{CF@#1}{}{% + \expandafter\caption@setcounter\csname CF@#1\endcsname0}}% +} +\caption@ifpackage{hypcap}{hc@caption}{% + \caption@Info{hypcap package v1.0 (or newer) detected}% + \let\caption@capstart\capstart + \def\capstart{% + \let\hc@org@caption\caption + \begingroup + \let\H@refstepcounter\@gobble + \Hy@hypertexnamesfalse + \caption@capstart + \@ifundefined{hc@hyperref}{}{% hypcap v1.7 + \global\advance\csname c@\@captype\endcsname\@ne}% + \global\let\hc@currentHref\@currentHref + \endgroup + \@ifundefined{hc@hyperref}% + {\let\next\@firstofone}{\let\next\hc@hyperref}% hypcap v1.7 + \next{\def\caption{% + \let\caption\hc@org@caption + \H@refstepcounter\@captype + \@ifundefined{hc@hyperref}{}{% hypcap v1.7 + \global\advance\csname c@\@captype\endcsname\m@ne}% + \caption@caption\hc@caption}}% + }% + \let\caption@hc@@caption\hc@@caption + \long\def\hc@@caption#1[#2]#3{% + \caption@beginex{#1}{#2}{#3}% + \let\caption@hyper@makecurrent\hyper@makecurrent + \def\hyper@makecurrent\@captype{% + \let\hyper@makecurrent\caption@hyper@makecurrent + \global\let\@currentHref\hc@currentHref}% + \caption@hc@@caption{#1}[{#2}]{#3}% + \caption@end}% +} +\caption@ifpackage{listings}{lst@MakeCaption}{% + \caption@Info{listings package v1.2 (or newer) detected}% + \let\caption@lst@MakeCaption\lst@MakeCaption + \def\lst@MakeCaption#1{% + \def\caption@autoposition{\caption@setposition{#1}}% + \caption@begin{lstlisting}% + \caption@lst@MakeCaption{#1}% + \caption@end}% +} +\caption@ifpackage{longtable}{LT@makecaption}{% + \caption@Info{longtable package v3.15 (or newer) detected}% + \def\LT@makecaption#1#2#3{% + \caption@LT@make{% + \caption@startrue#1\caption@starfalse + \caption@letfloattype{longtable}{% + \ifdim\LTcapwidth=4in \else + \setcaptionwidth\LTcapwidth + \fi}% + \let\caption@defaultpos\@firstoftwo + \def\caption@autoposition{% + \caption@setposition{\ifcase\LT@rows t\else b\fi}}% + \caption@begin{table}% + \vskip-\ht\strutbox + \caption@iftop{\vskip\belowcaptionskip}{\vskip\abovecaptionskip}% + \caption@@make{#2}{#3}\endgraf + \caption@iftop{\vskip\abovecaptionskip}{\vskip\belowcaptionskip}% + \caption@end}}% + \newcommand\caption@LT@make[1]{% + \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\hsize{#1}\hss}}}% +} +\caption@ifpackage{picins}{piccaption}{% + \caption@Info{picins package v3.0 (or newer) detected}% + \def\piccaption{\@dblarg\@piccaption} +} +\caption@ifpackage{rotating}{@rotcaption}{% + \caption@Info{rotating package v2.0 (or newer) detected}% + \def\rotcaption{\let\@makecaption\@makerotcaption\caption}% + \def\rotcaptionof{% + \@ifstar{\caption@of{\rotcaption*}}{\caption@of\rotcaption}}% + \long\def\@makerotcaption#1#2{% + \ifdim\captionwidth=\z@ + \setcaptionwidth{.8\textheight}% + \caption@slc{#1}{#2}{.8\vsize}{% + \let\caption@makerot\caption@@make + \setcaptionmargin\z@ + \let\captionbox\@secondoftwo}% + \caption@setbool{slc}{0}% been there, done that + \fi + \rotatebox{90}{\caption@makerot{#1}{#2}}% + \nobreak\hspace{12pt}}% + \newcommand\caption@makerot[2]{% + \begin{minipage}\captionwidth\caption@@make{#1}{#2}\end{minipage}}% +} +\caption@ifpackage{sidecap}{endSC@FLOAT}{% + \caption@Info{sidecap package v1.4d (or newer) detected}% + \@ifundefined{caption@caption}% + {\let\caption@tempa\AtBeginDocument}% + {\let\caption@tempa\@firstofone}% + \caption@tempa{\let\SC@caption=\caption}% + \let\caption@SC@zfloat\SC@zfloat + \def\SC@zfloat#1#2#3[#4]{% + \caption@SC@zfloat{#1}{#2}{#3}[#4]% + \global\let\SC@CAPsetup\@empty + \def\captionsetup##1{\g@addto@macro\SC@CAPsetup{,##1}}% + \let\caption@SC\caption + \def\caption{\caption@caption\caption@SC}% + }% + \let\caption@endSC@FLOAT\endSC@FLOAT + \def\endSC@FLOAT{% + \let\@captype\SC@captype + \caption@esetup\SC@CAPsetup + \caption@letfloattype{SC\@captype}{% + \@listdepth\z@ + \setcaptionmargin\z@ + \@ifundefined{SC@justify}{}{% + \ifx\SC@justify\@empty\else + \let\caption@hj\SC@justify + \let\SC@justify\@empty + \fi}}% + \long\def\caption@ifempty##1{% + \ifx\SC@CAPtext\@empty + \expandafter\@firstofone + \else + \expandafter\@gobble + \fi}% + \caption@endSC@FLOAT}% +} +\def\caption@setSTposition{% + \caption@setposition{\if@topcaption t\else b\fi}} +\caption@ifpackage{supertabular}{ST@caption}{% + \caption@Info{supertabular package detected}% + \let\caption@tablecaption\tablecaption + \def\tablecaption{\caption@caption\caption@tablecaption}% + \long\def\ST@caption#1[#2]#3{\par% + \caption@letfloattype{supertabular}{}% + \let\caption@fixposition\caption@setSTposition + \caption@beginex{#1}{#2}{#3}% + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\protect\numberline{% + \csname the#1\endcsname}{\ignorespaces #2}}% + \@parboxrestore + \normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \caption@end}% +} +\endinput +%% +%% End of file `caption_2007-04-16.sty'. |