Debian Codegraph @

texmf-dist/tex/latex/lwarp/lwarp-subfig.sty

raw
1 %%
2 %% This is file `lwarp-subfig.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% lwarp.dtx (with options: `subfig')
8 %% This is a generated file.
9 %% Copyright 2016-2026 Brian Dunn
10 %%
11 %% This work may be distributed and/or modified under the
12 %% conditions of the LaTeX Project Public License, either version 1.3
13 %% of this license or (at your option) any later version.
14 %% The latest version of this license is in
15 %% http://www.latex-project.org/lppl.txt
16 %% and version 1.3 or later is part of all distributions of LaTeX
17 %% version 2005/12/01 or later.
18
19
20 \LWR@ProvidesPackagePass{subfig}[2005/06/28]
21
22 \VerifyCommand[lwarp][subfig]{\sf@@@subfloat}{B29FEC2418FD15B9E58ACF593B81BA93}
23
24 \long\def\sf@@@subfloat#1[#2][#3]#4{%
25 \begin{minipage}{\linewidth}% lwarp
26 \IfValueTF{#2}{%
27 \LWR@setlatestname{#2}%
28 }{%
29 \IfValueTF{#3}{%
30 \LWR@setlatestname{#3}%
31 }{}%
32 }%
33 \LWR@stoppars% lwarp
34 \@ifundefined{FBsc@max}{}%
35 {\FB@readaux{\let\FBsuboheight\relax}}%
36 \@tempcnta=\@ne
37 \if@minipage
38 \@tempcnta=\z@
39 \else\ifdim \lastskip=\z@ \else
40 \@tempcnta=\tw@
41 \fi\fi
42 \ifmaincaptiontop
43 \sf@top=\sf@nearskip
44 \sf@bottom=\sf@farskip
45 \else
46 \sf@top=\sf@farskip
47 \sf@bottom=\sf@nearskip
48 \fi
49 \leavevmode
50 \bgroup
51 \bgroup
52 \ifcase\@tempcnta
53 \@minipagefalse
54 \or
55 \or
56 \ifdim \lastskip=\z@ \else
57 \fi
58 \fi
59 \sf@ifpositiontop{%
60 \ifx \@empty#3\relax \else
61 \sf@subcaption{#1}{#2}{#3}%
62 \fi\egroup
63 \LWR@startpars% lwarp
64 #4
65 \LWR@stoppars% lwarp
66 }{%
67 \LWR@startpars% lwarp
68 \@ifundefined{FBsc@max}%
69 {
70 #4
71 }%
72 {\ifx\FBsuboheight\relax
73 #4
74 \else
75 #4
76 \fi}%
77 \LWR@stoppars% lwarp
78 \egroup
79 \ifx \@empty#3\relax \else
80 \sf@subcaption{#1}{#2}{#3}%
81 \fi
82 }%
83 \egroup
84 \@ifundefined{FBsc@max}{}%
85 {\addtocounter{FRobj}{-1}%
86 \ifnum\c@FRobj=0\else
87 \subfloatrowsep
88 \fi}%
89 \ifmaincaptiontop\else
90 \global\advance\@nameuse{c@\@captype}\m@ne
91 \fi
92 \end{minipage}% lwarp
93 \LWR@startpars% lwarp
94 \endgroup\ignorespaces%
95 }%
96
97 \VerifyCommand[lwarp][subfig]{\sf@subcaption}{63123F93BADE8F3BBC127012A832A4C4}
98
99 \long\def\sf@subcaption#1#2#3{%
100 \LWR@stoppars% lwarp
101 \ifx \relax#2\relax \else
102 \bgroup
103 \let\label=\@gobble
104 \let\protect=\string
105 \def\@subcaplabel{%
106 \caption@lstfmt{\@nameuse{p@#1}}{\@nameuse{the#1}}}%
107 \sf@updatecaptionlist{#1}{#2}{\the\value{\@captype}}{\the\value{#1}}%
108 \egroup
109 \fi
110 \bgroup
111 \ifx \relax#3\relax
112 \let\captionlabelsep=\relax
113 \fi
114 \@ifundefined{FBsc@max}%
115 {
116 \LWR@traceinfo{sfsubcap B1}% lwarp
117 \LWR@figcaption% lwarp
118 \caption@make
119 {\@nameuse{sub\@captype name}}%
120 {\@nameuse{thesub\@captype}}%
121 {\LWR@isolate{#3}}%
122 \endLWR@figcaption% lwarp
123 \LWR@traceinfo{sfsubcap B2}% lwarp
124 }%
125 {\dimen@\ht0%
126 \advance\dimen@\dp0%
127 \ifdim\dimen@>\FBsc@max
128 \global\FBsc@max\dimen@
129 \fi
130 \FB@readaux{\let\FBsubcheight\relax}%
131 \ifx\FBsubcheight\relax
132 \def\next{
133 }%
134 \else
135 \def\next{
136 }%
137 \fi
138
139 \LWR@traceinfo{sfsubcap C1}% lwarp
140 \caption@make
141 {\@nameuse{sub\@captype name}}%
142 {\@nameuse{thesub\@captype}}%
143 {#3}
144 \LWR@traceinfo{sfsubcap C1}% lwarp
145
146 }%
147 \egroup
148 \LWR@startpars% lwarp
149 }
150
151 \xpretocmd{\subfloat@label}
152 {\LWR@ensuredoingapar}
153 {}
154 {\LWR@patcherror{subfig}{subfloat@label}}
155
156 \renewcommand{\sf@subref}[1]{%
157 \LWR@subnewref{#1}{sub@#1}%
158 }
159 \renewcommand{\sf@@subref}[1]{\LWR@orig@pageref{sub@#1}}
160 \LetLtxMacro\LWR@orig@newsubfloat\@newsubfloat
161
162 \def\@newsubfloat[#1]#2{%
163 \LWR@orig@newsubfloat[#1]{#2}%
164 \renewcommand{\l@sub#2}[2]{\hypertocfloat{2}{sub#2}{\ext@sub#2}{##1}{##2}}%
165 }
166 \renewcommand{\l@subfigure}[2]{\hypertocfloat{2}{subfigure}{lof}{#1}{#2}}
167 \renewcommand{\l@subtable}[2]{\hypertocfloat{2}{subtable}{lot}{#1}{#2}}
168 \endinput
169 %%
170 %% End of file `lwarp-subfig.sty'.