Debian Codegraph @

texmf-dist/tex/latex/caption/caption-light.sty

raw
1 %%
2 %% This is file `caption-light.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% caption-light.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 \ProvidesPackage{caption-light}[2021/03/21 v1.0a Customizing captions (AR)]
40 \RequirePackage{caption3}[2020/08/30] % needs v2.0 or newer
41 \caption@ifbool{documentclass}{}{%
42 \caption@WarningNoLine{%
43 Unknown document class (or package),\MessageBreak
44 standard defaults will be used}}
45 \@ifpackageloaded{caption2}{%
46 \caption@Error{%
47 You can't use both, the (obsolete) caption2 *and*\MessageBreak
48 the caption-light package}%
49 \endinput
50 }{}
51 \caption@SetupOptions{caption-light}{\caption@setkeys{caption}{#2}}
52 \caption@ProcessOptions*{caption-light}
53 \caption@ifdefined\caption@makecaption
54 {\caption@Info{\noexpand\caption@makecaption is already defined}%
55 \endinput}{}
56 \long\def\caption@makecaption#1#2{%
57 \caption@iftop\caption@belowskip\caption@aboveskip
58 \caption@labelseparator % defines \caption@iflabelfont and \caption@labelsep
59 \caption@singlelinecheck
60 {\sbox\@tempboxa{\caption@@makecaption{#1}{#2}}%
61 \ifdim \wd\@tempboxa >\hsize}%
62 {\iftrue}%
63 \caption@@makecaption{#1}{#2}\par
64 \else
65 \global \@minipagefalse
66 \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
67 \fi
68 \caption@iftop\caption@aboveskip\caption@belowskip
69 \caption@@make@epilogue}
70 \newcommand\caption@@makecaption[2]{%
71 \caption@applyfont
72 \ifcaption@star\else
73 \begingroup
74 \captionlabelfont #1\relax\relax
75 \endgroup
76 \fi
77 \ifcaption@star\else
78 \begingroup
79 \caption@iflabelfont\captionlabelfont
80 \relax\caption@labelsep
81 \endgroup
82 \fi
83 \begingroup
84 \captiontextfont #2%
85 \endgroup}
86 \let\@makecaption\caption@makecaption
87 \caption@AtBeginDocument{%
88 \DeclareCaptionOption{type}{\setcaptiontype{#1}}%
89 \DeclareCaptionOption{type*}{\setcaptiontype*{#1}}%
90 }
91 \newcommand*\setcaptiontype{%
92 \caption@teststar{\def\@captype}{}{}}
93 \caption@AtBeginDocument{%
94 \def\captionof{\caption@teststar\caption@of{\caption*}\caption}}
95 \newcommand*\caption@of[2]{\setcaptiontype*{#2}#1}
96 \endinput
97 %%
98 %% End of file `caption-light.sty'.