Debian Codegraph @

texmf-dist/tex/latex/caption/caption_1995-04-05.sty

raw
1 %%
2 %% This is file `caption_1995-04-05.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% fallback/v1/caption.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/06/01]
39 \ProvidesPackage{caption}[1995/04/05 v1.4b caption package (AS)]
40 \newcommand{\captionsize}{}
41 \newcommand{\captionfont}{\captionsize}
42 \newcommand{\captionlabelfont}{}
43 \newlength{\captionmargin}
44 \newcommand{\as@normalcaption}[2]{%
45 #1 #2\par}
46 \newcommand{\as@isucaption}[2]{%
47 \sbox{\as@captionbox}{#1\space}%
48 \addtolength{\as@captionwidth}{-\wd\as@captionbox}%
49 \usebox{\as@captionbox}\parbox[t]{\as@captionwidth}{\leavevmode#2}}
50 \newcommand{\as@centercaption}[2]{%
51 \parbox[t]{\as@captionwidth}{{\centering#1 #2\par}}}
52 \newcommand{\as@annecaption}[2]{%
53 \addtolength{\leftskip}{0pt plus 1fil}%
54 \addtolength{\rightskip}{0pt plus -1fil}%
55 \setlength{\parfillskip}{0pt plus 2fil}%
56 #1 #2\par}
57 \let\as@shortcaption\as@centercaption
58 \ifx\thesubfigure\undefined
59 \newcommand{\as@subcapsize}[1]{}
60 \else%
61 \typeout{\space\space\space\space\space\space\space\space\space
62 `subfigure' package detected}
63 \let\as@subcapsize\subcapsize
64 \renewcommand{\@thesubfigure}{{\captionlabelfont\thesubfigure}\space}
65 \renewcommand{\@thesubtable}{{\captionlabelfont\thesubtable}\space}
66 \fi
67 \DeclareOption{normal}{\let\as@caption\as@normalcaption}
68 \DeclareOption{isu}{\let\as@caption\as@isucaption}
69 \DeclareOption{hang}{\ExecuteOptions{isu}}
70 \DeclareOption{center}{\let\as@caption\as@centercaption}
71 \DeclareOption{anne}{\let\as@caption\as@annecaption}
72 \DeclareOption{centerlast}{\ExecuteOptions{anne}}
73 \DeclareOption{nooneline}{\AtBeginDocument{\let\as@shortcaption\as@caption}}
74 \DeclareOption{scriptsize}{%
75 \renewcommand{\captionsize}{\scriptsize}
76 \as@subcapsize{\scriptsize}}
77 \DeclareOption{footnotesize}{%
78 \renewcommand{\captionsize}{\footnotesize}
79 \as@subcapsize{\scriptsize}}
80 \DeclareOption{small}{%
81 \renewcommand{\captionsize}{\small}
82 \as@subcapsize{\footnotesize}}
83 \DeclareOption{normalsize}{%
84 \renewcommand{\captionsize}{\normalsize}
85 \as@subcapsize{\footnotesize}}
86 \DeclareOption{large}{%
87 \renewcommand{\captionsize}{\large}
88 \as@subcapsize{\normalsize}}
89 \DeclareOption{Large}{%
90 \renewcommand{\captionsize}{\Large}
91 \as@subcapsize{\large}}
92 \DeclareOption{up}{\renewcommand{\captionlabelfont}{\upshape}}
93 \DeclareOption{it}{\renewcommand{\captionlabelfont}{\itshape}}
94 \DeclareOption{sl}{\renewcommand{\captionlabelfont}{\slshape}}
95 \DeclareOption{sc}{\renewcommand{\captionlabelfont}{\scshape}}
96 \DeclareOption{md}{\renewcommand{\captionlabelfont}{\mdseries}}
97 \DeclareOption{bf}{\renewcommand{\captionlabelfont}{\bfseries}}
98 \DeclareOption{rm}{\renewcommand{\captionlabelfont}{\rmfamily}}
99 \DeclareOption{sf}{\renewcommand{\captionlabelfont}{\sffamily}}
100 \DeclareOption{tt}{\renewcommand{\captionlabelfont}{\ttfamily}}
101 \DeclareOption{ruled}{\newcommand\as@ruled{}}
102 \ExecuteOptions{normal}
103 \ProcessOptions
104 \newsavebox{\as@captionbox}
105 \newlength{\as@captionwidth}
106 \newcommand{\as@makecaption}[2]{%
107 \setlength{\leftskip}{\captionmargin}%
108 \setlength{\rightskip}{\captionmargin}%
109 \addtolength{\as@captionwidth}{-2\captionmargin}%
110 \captionfont%
111 \sbox{\as@captionbox}{{\captionlabelfont #1:} #2}%
112 \ifdim \wd\as@captionbox >\as@captionwidth
113 \as@caption{{\captionlabelfont #1:}}{#2}%
114 \else%
115 \as@shortcaption{{\captionlabelfont #1:}}{#2}%
116 \fi}
117 \renewcommand{\@makecaption}[2]{%
118 \vskip\abovecaptionskip%
119 \setlength{\as@captionwidth}{\linewidth}%
120 \as@makecaption{#1}{#2}%
121 \vskip\belowcaptionskip}
122 \ifx\@makerotcaption\undefined
123 \else
124 \typeout{\space\space\space\space\space\space\space\space\space
125 `rotating' package detected}
126 \renewcommand{\@makerotcaption}[2]{%
127 \captionfont%
128 \sbox{\as@captionbox}{{\captionlabelfont #1:} #2}%
129 \ifdim \wd\as@captionbox > .8\vsize
130 \rotatebox{90}{%
131 \setlength{\as@captionwidth}{.8\textheight}%
132 \begin{minipage}{\as@captionwidth}%
133 \as@caption{{\captionlabelfont #1:}}{#2}%
134 \end{minipage}}\par
135 \else%
136 \rotatebox{90}{\usebox{\as@captionbox}}%
137 \fi
138 \hspace{12pt}}
139 \fi
140 \ifx\floatc@plain\undefined
141 \else
142 \typeout{\space\space\space\space\space\space\space\space\space
143 `float' package detected}
144 \renewcommand\floatc@plain[2]{%
145 \setlength{\as@captionwidth}{\linewidth}%
146 \as@makecaption{#1}{#2}}
147 \ifx\as@ruled\undefined
148 \else
149 \renewcommand\floatc@ruled[2]{%
150 \setlength{\as@captionwidth}{\linewidth}%
151 \captionfont%
152 \as@caption{{\captionlabelfont #1:}}{#2}}
153 \fi
154 \fi
155 \endinput
156 %%
157 %% End of file `caption_1995-04-05.sty'.