Add a PyMOL builder to SCons and generalize PYMOL_PATH setup.
[thesis.git] / src / package / fr-subfig.sty
1 %%
2 %% This is file `fr-subfig.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% floatrow.dtx  (with options: `frforsubfig')
8 %% 
9 %% IMPORTANT NOTICE:
10 %% 
11 %% For the copyright see the source file.
12 %% 
13 %% Any modified versions of this file must be renamed
14 %% with new filenames distinct from fr-subfig.sty.
15 %% 
16 %% For distribution of the original source see the terms
17 %% for copying and modification in the file floatrow.dtx.
18 %% 
19 %% This generated file may be distributed as long as the
20 %% original source files, as listed above, are part of the
21 %% same distribution. (The sources need not necessarily be
22 %% in the same archive or directory.)
23 \NeedsTeXFormat{LaTeX2e}[1995/06/01]
24 \ProvidesPackage{fr-subfig}
25        [2007/12/24 v0.1g (beta) floatrow: additions for subfig]
26 %%^^A|\newcommand\CenterFloatBoxes{\CADJfalse\OADJfalse|
27 %%^^A
28 %%^^A
29 %%^^A
30 %%^^A
31 %%^^A
32 %%^^A
33 %%^^A
34 %%^^A
35 %%^^A
36 %%^^A
37 %%^^A
38 %%^^A
39 %%^^A
40 %%^^A
41 %%^^A
42 \def\@tempb{2005/06/28 ver: 1.3 subfig package}
43 \expandafter\let\csname @tempa\expandafter\endcsname
44     \csname ver@subfig.\@pkgextension\endcsname
45 \ifx\@tempa\@tempb\else
46     \PackageWarning{fr-subfig}{The additions cooperated with \MessageBreak
47         version `2005/06/28 ver: 1.3' of package subfig,\MessageBreak
48         but only version\MessageBreak
49         \csname ver@subfig.\@pkgextension\endcsname'\MessageBreak
50         is available}\relax
51     \fi
52 \newlength\FBsc@max
53 \newlength\FBso@max
54 \@ifdefinable\FBsubcheight{\let\FBsubcheight\relax}
55 \@ifdefinable\FBsuboheight{\let\FBsuboheight\relax}
56 \newcommand\adjustsubfloats{\@tempswafalse
57   \ifCADJ\@tempswatrue\fi\ifOADJ\@tempswatrue\fi
58   \if@tempswa\FB@writeaux{%
59     \string\global\string\c@FBcnt\thepage
60     \ifCADJ\string\edef\string\FBsubcheight{\the\FBsc@max}\fi
61     \ifOADJ\string\edef\string\FBsuboheight{\the\FBso@max}\fi
62    }\fi
63   \global\let\FBsubcheight\relax\global\let\FBsuboheight\relax
64   \global\FBso@max\z@\global\FBsc@max\z@}
65 \long\def\sf@@@subfloat#1[#2][#3]#4{%
66     \@ifundefined{FBsc@max}{}%
67         {\FB@readaux{\let\FBsuboheight\relax}}%
68     \@tempcnta=\@ne
69     \if@minipage
70       \@tempcnta=\z@
71     \else\ifdim \lastskip=\z@ \else
72       \@tempcnta=\tw@
73     \fi\fi
74     \ifmaincaptiontop
75       \sf@top=\sf@nearskip
76       \sf@bottom=\sf@farskip
77     \else
78       \sf@top=\sf@farskip
79       \sf@bottom=\sf@nearskip
80     \fi
81     \leavevmode
82     \setbox\@tempboxa \hbox{#4}%
83     \ifdim\wd\@tempboxa=\z@\ht\@tempboxa\z@\dp\@tempboxa\z@
84       \setbox\z@\hbox{{\caption@@@make
85            {\caption@lfmt{\@nameuse{sub\@captype name}}%
86            {\@nameuse{thesub\@captype}}\relax}{}}}\@tempdima=\wd\z@
87       \sf@top=\z@
88       \sf@bottom=\z@
89       \sf@capskip\z@
90       \sf@captopadj\z@
91       \let\sf@ifpositiontop\@firstoftwo
92     \else
93       \@tempdima=\wd\@tempboxa
94       \@ifundefined{FBsc@max}{}%
95           {\global\advance\Xhsize-\wd\@tempboxa
96            \dimen@=\ht\@tempboxa
97            \advance\dimen@\dp\@tempboxa
98            \ifdim\dimen@>\FBso@max
99              \global\FBso@max\dimen@
100            \fi}%
101     \fi
102     \vtop\bgroup
103       \vbox\bgroup
104         \ifcase\@tempcnta
105           \@minipagefalse
106         \or
107           \vskip\sf@top
108         \or
109           \ifdim \lastskip=\z@ \else
110             \@tempskipb\sf@top\relax\@xaddvskip
111           \fi
112         \fi
113         \sf@ifpositiontop{%
114           \ifx \@empty#3\relax \else
115             \sf@subcaption{#1}{#2}{#3}%
116             \vskip\sf@capskip
117             \vskip\sf@captopadj
118           \fi\egroup
119           \hrule width0pt height0pt depth0pt
120           \box\@tempboxa
121         }{%
122         \@ifundefined{FBsc@max}%
123             {\box\@tempboxa}%
124             {\ifx\FBsuboheight\relax
125                \box\@tempboxa
126              \else
127                \vbox to \FBsuboheight{\FBafil\box\@tempboxa\FBbfil}%
128              \fi}%
129           \egroup
130           \ifx \@empty#3\relax \else
131             \vskip\sf@capskip
132             \hrule width0pt height0pt depth0pt
133             \sf@subcaption{#1}{#2}{#3}%
134          \fi
135         }%
136       \vskip\sf@bottom
137     \egroup
138     \@ifundefined{FBsc@max}{}%
139         {\addtocounter{FRobj}{-1}%
140          \ifnum\c@FRobj>0%  bugfix
141            \subfloatrowsep
142          \fi}%
143     \ifmaincaptiontop\else
144       \global\advance\@nameuse{c@\@captype}\m@ne
145     \fi
146   \endgroup\ignorespaces}
147 \DeclareFROpt{subcapbesideposition}{\flrow@SFbesidealign{#1}}
148 \newcommand*\flrow@SFbesidealign[1]{%
149   \caption@ifinlist{#1}{t,top}{%
150      \let\flrow@SFBalign\TopFloatBoxes
151   }{\caption@ifinlist{#1}{b,bottom,default}{%
152      \let\flrow@SFBalign\BottomFloatBoxes
153   }{\caption@ifinlist{#1}{c,center}{%
154      \let\flrow@SFBalign\CenterFloatBoxes
155   }{\PackageError{floatrow}%
156      {Undefined sublabel position `#1'}{\flrow@eh}%
157   }}}}
158 \newcommand\flrow@SFBalign{\BottomFloatBoxes}
159 \newcommand\sidesubfloat{%
160   \ifx\@captype\@undefined
161     \@latex@error{\noexpand\subfloat outside float}\@ehd
162      \expandafter\@gobble
163   \else
164     \expandafter\@firstofone
165   \fi
166   {\flrow@sidesubfloat}}
167 \def\flrow@sidesubfloat{\flrow@SFBalign
168   \begingroup
169     \@ifundefined{caption@setfloattype}%
170       \caption@settype
171       \caption@setfloattype
172           \@captype
173     \sf@ifpositiontop{%
174       \maincaptiontoptrue
175     }{%
176       \maincaptiontopfalse
177     }%
178     \caption@setoptions{subfloat}%
179     \caption@setoptions{sub\@captype}%
180     \let\sf@oldlabel=\label
181     \let\label=\subfloat@label
182     \ifmaincaptiontop\else
183       \advance\@nameuse{c@\@captype}\@ne
184     \fi
185     \refstepcounter{sub\@captype}%
186     \setcounter{sub\@captype @save}{\value{sub\@captype}}%
187     \@ifnextchar [%  %] match left bracket
188       {\flrow@@sidesubfloat}%
189       {\flrow@@sidesubfloat[\@empty]}}
190 \long\def\flrow@@sidesubfloat[#1]{%
191     \@ifnextchar [%  %] match left bracket
192       {\flrow@@@sidesubfloat{sub\@captype}[{#1}]}%
193       {\flrow@@@sidesubfloat{sub\@captype}[\@empty{#1}][{#1}]}}
194 \long\def\flrow@@@sidesubfloat#1[#2][#3]#4{%
195     \@ifundefined{FBsc@max}{}%
196         {\FB@readaux{\let\FBsuboheight\relax}}%
197     \@tempcnta=\@ne
198     \if@minipage
199       \@tempcnta=\z@
200     \else\ifdim \lastskip=\z@ \else
201       \@tempcnta=\tw@
202     \fi\fi
203     \sf@bottom=\z@
204     \sf@top=\z@
205     \leavevmode
206     \setbox\@tempboxa \hbox{#2}%
207     \@tempdima\wd\@tempboxa
208     \setbox\@tempboxa \hbox{#4}%
209     \advance\@tempdima\wd\@tempboxa
210     \advance\@tempdima\labelsep
211     \@ifundefined{FBsc@max}{}%
212         {\global\advance\Xhsize-\wd\@tempboxa
213          \dimen@=\ht\@tempboxa
214          \advance\dimen@\dp\@tempboxa
215          \ifdim\dimen@>\FBso@max
216            \global\FBso@max\dimen@
217          \fi}%
218     \begin@FBBOX
219         \ifcase\@tempcnta
220           \@minipagefalse
221         \or
222           \vskip\sf@top
223         \or
224           \ifdim \lastskip=\z@ \else
225             \@tempskipb\sf@top\relax\@xaddvskip
226           \fi
227         \fi
228         \hbox{%
229         \begin@FBBOX
230            \ifx \@empty#3\relax \else
231                \hbox{\caption@@@make
232                   {\caption@lfmt{\@nameuse{sub\@captype name}}%
233                   {\@nameuse{thesub\@captype}}\relax}{}}%
234         \fi
235         \end@FBBOX\hskip\labelsep\ignorespaces
236         \begin@FBBOX
237            \box\@tempboxa
238         \end@FBBOX
239         }%
240         \vskip\sf@bottom
241     \end@FBBOX
242     \@ifundefined{FBsc@max}{}%
243         {\addtocounter{FRobj}{-1}%
244          \ifnum\c@FRobj>0
245            \subfloatrowsep
246          \fi}%
247     \ifmaincaptiontop\else
248       \global\advance\@nameuse{c@\@captype}\m@ne
249     \fi
250   \endgroup\ignorespaces}
251 \newcommand\subfloatlabel{\@ifnextchar[%]
252     {\flrow@subfloatlabel}{\subfloat[]{}}}
253 \@ifdefinable\flrow@subfloatlabel{}
254 \def\flrow@subfloatlabel[#1]{%
255   \ifx\@captype\@undefined
256     \@latex@error{\noexpand\subfloat outside float}\@ehd
257   \fi
258   \begingroup
259     \count@#1\advance\count@\m@ne
260     \csname c@sub\@captype\endcsname\count@\relax
261     \@ifnextchar[%]
262       {\flrow@@subfloatlabel[#1]}%
263       {\subfloat[]{}\endgroup}}
264 \@ifdefinable\flrow@@subfloatlabel{}
265 \@ifundefined{newseparatedlabel}\@tempswatrue\@tempswafalse
266 \if@tempswa
267     \def\FRsf@Flabel{\label}
268 \else
269     \newseparatedlabel\FRsf@Flabel{\@captype}{sub\@captype}
270 \fi
271 \def\flrow@@subfloatlabel[#1][#2]{%
272     \subfloat[]{\FRsf@Flabel{#2}}\endgroup}
273 \endinput
274 %%
275 %% End of file `fr-subfig.sty'.