Debian Codegraph @

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

raw
1 %%
2 %% This is file `lwarp-floatrow.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% lwarp.dtx (with options: `floatrow')
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
21 \LWR@ProvidesPackageDrop{floatrow}[2008/08/02]
22
23
24
25 \newbool{LWR@subcaptionloaded}
26
27 \AtBeginDocument{
28 \IfPackageLoadedTF{subcaption}
29 {\booltrue{LWR@subcaptionloaded}}
30 {\boolfalse{LWR@subcaptionloaded}}
31 }
32
33 \NewDocumentCommand{\floatbox}{o m o o o +m +m}{%
34 \ifbool{LWR@subcaptionloaded}%
35 {% subcaption
36 \ifbool{LWR@insubfloatrow}%
37 {% subcaption in a subfloatrow
38 \IfValueTF{#3}%
39 {\@nameuse{sub#2}{#3}}%
40 {\@nameuse{sub#2}{\linewidth}}%
41 }% subcaption in a subfloatrow
42 {% subcaption not in subfloatrow
43 \@nameuse{#2}%
44 }% subcaption not in subfloatrow
45 #6
46
47 #7
48 \ifbool{LWR@insubfloatrow}%
49 {\@nameuse{endsub#2}}%
50 {\@nameuse{end#2}}%
51 }% subcaption
52 {% assume subfig
53 \ifbool{LWR@insubfloatrow}%
54 {% subfig in a subfloatrow
55 \begingroup
56 \let\caption\@firstofone
57 \subfloat[#6]{#7}
58 \endgroup
59 }% subfig in a subfloatrow
60 {% subfig package, but not a subfig
61 \@nameuse{#2}
62 #6
63
64 #7
65 \@nameuse{end#2}
66 }% subfig package, but not a subfig
67 }% assume subfig
68 }
69
70 \newcommand*{\nocapbeside}{}
71 \newcommand*{\capbeside}{}
72 \newcommand*{\captop}{}
73 \newlength{\FBwidth}
74 \setlength{\FBwidth}{.3\linewidth}
75 \newlength{\FBheight}
76 \setlength{\FBheight}{2in}
77 \newcommand*{\useFCwidth}{}
78 \newcommand{\floatsetup}[2][]{}
79 \newcommand{\thisfloatsetup}[1]{}
80 \newcommand{\clearfloatsetup}[1]{}
81 \newcommand*{\killfloatstyle}{}
82
83 \NewDocumentCommand{\newfloatcommand}{m m o o}{%
84 \@namedef{#1}{
85 \floatbox{#2}
86 }
87 }
88
89 \NewDocumentCommand{\renewfloatcommand}{m m o o}{%
90 \@namedef{#1}{%
91 \floatbox{#2}
92 }
93 }
94
95 \newfloatcommand{ffigbox}{figure}[\nocapbeside][]
96 \newfloatcommand{ttabbox}{table}[\captop][\FBwidth]
97 \newfloatcommand{fcapside}{figure}[\capbeside][]
98
99 \newenvironment*{floatrow}[1][2]
100 {%
101 \begin{LWR@setvirtualpage}*%
102 \BlockClass{floatrow}%
103 }
104 {
105 \endBlockClass%
106 \end{LWR@setvirtualpage}%
107 }
108 \newcommand*{\LWR@frowkeyplacement}{}
109 \newcommand*{\LWR@frowkeyname}{}
110 \newcommand*{\LWR@frowkeyfileext}{}
111 \newcommand*{\LWR@frowkeywithin}{}
112 \newcommand*{\LWR@frowkeycapstyle}{}
113
114 \define@key{frowkeys}{placement}{}%
115 \define@key{frowkeys}{name}{\renewcommand{\LWR@frowkeyname}{#1}}%
116 \define@key{frowkeys}{fileext}{\renewcommand{\LWR@frowkeyfileext}{#1}}%
117 \define@key{frowkeys}{within}{\renewcommand{\LWR@frowkeywithin}{#1}}%
118 \define@key{frowkeys}{relatedcapstyle}{}%
119
120 \newcommand*{\DeclareNewFloatType}[2]{%
121 \renewcommand*{\LWR@frowkeyplacement}{}%
122 \renewcommand*{\LWR@frowkeyname}{}%
123 \renewcommand*{\LWR@frowkeyfileext}{}%
124 \renewcommand*{\LWR@frowkeywithin}{}%
125 \renewcommand*{\LWR@frowkeycapstyle}{}%
126 \LWR@traceinfo{about to setkeys frowkeys}%
127 \setkeys{frowkeys}{#2}%
128 \LWR@traceinfo{finished setkeys frowkeys}%
129 \ifthenelse{\equal{\LWR@frowkeywithin}{}}%
130 {%
131 \DeclareFloatingEnvironment[
132 placement=\LWR@frowkeyplacement,
133 fileext=\LWR@frowkeyfileext
134 ]{#1}%
135 }%
136 {%
137 \DeclareFloatingEnvironment[
138 placement=\LWR@frowkeyplacement,
139 fileext=\LWR@frowkeyfileext,
140 within=\LWR@frowkeywithin
141 ]{#1}%
142 }%
143 \ifthenelse{\equal{\LWR@frowkeyname}{}}%
144 {}%
145 {%
146 \SetupFloatingEnvironment{#1}{name={\LWR@frowkeyname}}%
147 }%
148 }
149
150 \newcommand{\buildFBBOX}[2]{}
151 \newcommand*{\CenterFloatBoxes}{}
152 \newcommand*{\TopFloatBoxes}{}
153 \newcommand*{\BottomFloatBoxes}{}
154 \newcommand*{\PlainFloatBoxes}{}
155
156 \newcommand{\capsubrowsettings}{}
157
158 \NewDocumentCommand{\RawFloats}{o o}{}
159
160 \newcommand{\RawCaption}[1]{#1}
161
162 \NewDocumentCommand{\floatfoot}{s +m}{%
163 \begin{BlockClass}{floatfoot}
164 #2
165 \end{BlockClass}
166 }
167
168 \newbool{LWR@insubfloatrow}
169 \boolfalse{LWR@insubfloatrow}
170
171 \newenvironment*{subfloatrow}[1][2]
172 {
173 \LWR@forcenewpage
174 \BlockClass{floatrow}
175 \begingroup%
176 \booltrue{LWR@insubfloatrow}%
177 }
178 {%
179 \endgroup%
180 \endBlockClass%
181 \boolfalse{LWR@insubfloatrow}%
182 }
183
184
185 \endinput
186 %%
187 %% End of file `lwarp-floatrow.sty'.