]> AND Private Git Repository - LiCO.git/blob - PeCO-EO/subfigure.sty
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Merge branch 'master' of ssh://bilbo.iut-bm.univ-fcomte.fr/LiCO
[LiCO.git] / PeCO-EO / subfigure.sty
1 %%\r
2 %% This is file `subfigure.sty',\r
3 %% generated with the docstrip utility.\r
4 %%\r
5 %% The original source files were:\r
6 %%\r
7 %% subfigure.dtx  (with options: `package')\r
8 %% \r
9 %% Copyright (C) 1986-2002 Steven Douglas Cochran.\r
10 %% \r
11 %% This file is NOT the source for subfigure, because almost all comments\r
12 %% have been stripped from it.  It is NOT the preferred form of subfigure\r
13 %% for making modifications to it.\r
14 %% \r
15 %% Therefore you can NOT redistribute and/or modify THIS file.  You can\r
16 %% however redistribute the complete source (subfigure.dtx and\r
17 %% subfigure.ins) and/or modify it under the terms of the LaTeX Project\r
18 %% Public License, either version 1.2 of this license or (at your option)\r
19 %% any later version. The latest version of this license is in:\r
20 %%      http://www.latex-project.org/lppl.txt\r
21 %% and version 1.2 or later is part of all distributions of LaTeX version\r
22 %% 1999/09/03 or later.\r
23 %% \r
24 %% The subfigure package is distributed in the hope that it will be\r
25 %% useful, but WITHOUT ANY WARRANTY; without even the implied warranty of\r
26 %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the LaTeX\r
27 %% Project Public License for more details.\r
28 %% \r
29 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r
30 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r
31 %% @LaTeX-style-file{\r
32 %%    author     = "Steven Douglas Cochran",\r
33 %%    version    = "2.1.4",\r
34 %%    date       = "2002/07/30",\r
35 %%    time       = "09:34:13",\r
36 %%    filename   = "subfigure.sty",\r
37 %%    address    = "Digital Mapping Laboratory, School of Computer Science\r
38 %%                  Carnegie-Mellon University, 5000 Forbes Avenue\r
39 %%                  Pittsburgh, PA 15213-3890, USA",\r
40 %%    telephone  = "+1 412.268.5654",\r
41 %%    fax        = "+1 412.268.5576",\r
42 %%    email      = "cochran@ieee.org",\r
43 %%    codetable  = "ISO/ASCII",\r
44 %%    keywords   = "LaTeX, float, figure, table, captcont",\r
45 %%    supported  = "yes",\r
46 %%    abstract   = "LaTeX package for providing support for the\r
47 %%                  inclusion of small, `sub', figures and tables.  It\r
48 %%                  simplifies the positioning, captioning and\r
49 %%                  labeling of them within a single figure or table\r
50 %%                  environment.  In addition, this package allows\r
51 %%                  such subcaptions to be written to the List of\r
52 %%                  Figures or List of tables if desired."\r
53 %% }\r
54 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r
55 \NeedsTeXFormat{LaTeX2e}[1994/12/01]\r
56 \ProvidesPackage{subfigure}[2002/07/30 v2.1.4 subfigure package]\r
57 \newif\ifhyperrefloaded\r
58 \AtBeginDocument{%\r
59   \@ifpackageloaded{hyperref}{%\r
60     \hyperrefloadedtrue\r
61     \providecommand\theHsubfigure{\thefigure.\arabic{subfigure}}%\r
62     \providecommand\theHsubtable{\thetable.\arabic{subtable}}%\r
63     \providecommand{\toclevel@subfigure}{1}%\r
64     \providecommand{\toclevel@subtable}{1}}{}}\r
65 \newif\ifsubcaphang\r
66 \newif\ifsubcapcenter\r
67 \newif\ifsubcapcenterlast\r
68 \newif\ifsubcapnooneline\r
69 \newif\ifsubcapraggedright\r
70 \newskip\subfigtopskip     \subfigtopskip    =  5\p@\r
71 \newskip\subfigcapskip     \subfigcapskip    =  0\p@\r
72 \newdimen\subfigcaptopadj  \subfigcaptopadj  =  3\p@\r
73 \newskip\subfigbottomskip  \subfigbottomskip =  5\p@\r
74 \newdimen\subfigcapmargin  \subfigcapmargin  =  \z@\r
75 \newskip\subfiglabelskip   \subfiglabelskip  =  0.33em plus 0.07em minus 0.03em\r
76 \newcommand*{\subcapsize}{}\r
77 \newcommand*{\subcaplabelfont}{%\r
78   \subcaplabelfont@f\subcaplabelfont@c\subcaplabelfont@s}\r
79 \newcommand*{\subcaplabelfont@f}{\fontfamily{\familydefault}\selectfont}\r
80 \newcommand*{\subcaplabelfont@c}{\fontseries{\seriesdefault}\selectfont}\r
81 \newcommand*{\subcaplabelfont@s}{\fontshape{\shapedefault}\selectfont}\r
82 \newcommand*{\subcapfont}{%\r
83   \subcapfont@f\subcapfont@c\subcapfont@s}\r
84 \newcommand*{\subcapfont@f}{\fontfamily{\familydefault}\selectfont}\r
85 \newcommand*{\subcapfont@c}{\fontseries{\seriesdefault}\selectfont}\r
86 \newcommand*{\subcapfont@s}{\fontshape{\shapedefault}\selectfont}\r
87 \newif\ifsf@tight          \sf@tighttrue\r
88 \newcounter{subfigure}[figure]\r
89 \@ifundefined{figuretopcaptrue}{\newif\iffiguretopcap}{}\r
90 \newif\ifsubfiguretopcap\r
91 \let\p@subfigure=\thefigure\r
92 \providecommand*{\thesubfigure}{(\alph{subfigure})}\r
93 \renewcommand*{\thesubfigure}{(\alph{subfigure})}\r
94 \newcommand*{\@thesubfigure}{\thesubfigure\hskip\subfiglabelskip}\r
95 \newcommand*{\@@thesubfigure}{\thesubfigure}\r
96 \let\ext@subfigure=\ext@figure\r
97 \newcommand*{\l@subfigure}{%\r
98   \@dottedxxxline{\ext@subfigure}{2}{3.8em}{2.5em}}\r
99 \newcounter{lofdepth}\r
100 \setcounter{lofdepth}{1}\r
101 \newcounter{subtable}[table]\r
102 \@ifundefined{tabletopcaptrue}{\newif\iftabletopcap}{}\r
103 \newif\ifsubtabletopcap\r
104 \let\p@subtable=\thetable\r
105 \providecommand*{\thesubtable}{(\alph{subtable})}\r
106 \renewcommand*{\thesubtable}{(\alph{subtable})}\r
107 \newcommand*{\@thesubtable}{\thesubtable\hskip\subfiglabelskip}\r
108 \newcommand*{\@@thesubtable}{\thesubtable}\r
109 \let\ext@subtable=\ext@table\r
110 \newcommand*{\l@subtable}{%\r
111   \@dottedxxxline{\ext@subtable}{2}{3.8em}{2.5em}}\r
112 \newcounter{lotdepth}\r
113 \setcounter{lotdepth}{1}\r
114 \DeclareOption{normal}{%\r
115   \subcaphangfalse\r
116   \subcapcenterfalse\r
117   \subcapcenterlastfalse\r
118   \subcapnoonelinefalse\r
119   \subcapraggedrightfalse}\r
120 \DeclareOption{hang}{\subcaphangtrue}\r
121 \DeclareOption{center}{\subcapcentertrue}\r
122 \DeclareOption{centerlast}{\subcapcenterlasttrue}\r
123 \DeclareOption{nooneline}{\subcapnoonelinetrue}\r
124 \DeclareOption{raggedright}{\subcapraggedrighttrue}\r
125 \DeclareOption{isu}{\ExecuteOption{hang}}\r
126 \DeclareOption{anne}{\ExecuteOption{centerlast}}\r
127 \DeclareOption{scriptsize}{\renewcommand*{\subcapsize}{\scriptsize}}\r
128 \DeclareOption{footnotesize}{\renewcommand*{\subcapsize}{\footnotesize}}\r
129 \DeclareOption{small}{\renewcommand*{\subcapsize}{\small}}\r
130 \DeclareOption{normalsize}{\renewcommand*{\subcapsize}{\normalsize}}\r
131 \DeclareOption{large}{\renewcommand*{\subcapsize}{\large}}\r
132 \DeclareOption{Large}{\renewcommand*{\subcapsize}{\Large}}\r
133 \DeclareOption{rm}{\renewcommand*{\subcaplabelfont@f}{\rmfamily}}\r
134 \DeclareOption{sf}{\renewcommand*{\subcaplabelfont@f}{\sffamily}}\r
135 \DeclareOption{tt}{\renewcommand*{\subcaplabelfont@f}{\ttfamily}}\r
136 \DeclareOption{md}{\renewcommand*{\subcaplabelfont@c}{\mdseries}}\r
137 \DeclareOption{bf}{\renewcommand*{\subcaplabelfont@c}{\bfseries}}\r
138 \DeclareOption{up}{\renewcommand*{\subcaplabelfont@s}{\upshape}}\r
139 \DeclareOption{it}{\renewcommand*{\subcaplabelfont@s}{\itshape}}\r
140 \DeclareOption{sl}{\renewcommand*{\subcaplabelfont@s}{\slshape}}\r
141 \DeclareOption{sc}{\renewcommand*{\subcaplabelfont@s}{\scshape}}\r
142 \DeclareOption{RM}{\renewcommand*{\subcapfont@f}{\rmfamily}}\r
143 \DeclareOption{SF}{\renewcommand*{\subcapfont@f}{\sffamily}}\r
144 \DeclareOption{TT}{\renewcommand*{\subcapfont@f}{\ttfamily}}\r
145 \DeclareOption{MD}{\renewcommand*{\subcapfont@c}{\mdseries}}\r
146 \DeclareOption{BF}{\renewcommand*{\subcapfont@c}{\bfseries}}\r
147 \DeclareOption{IT}{\renewcommand*{\subcapfont@s}{\itshape}}\r
148 \DeclareOption{SL}{\renewcommand*{\subcapfont@s}{\slshape}}\r
149 \DeclareOption{SC}{\renewcommand*{\subcapfont@s}{\scshape}}\r
150 \DeclareOption{UP}{\renewcommand*{\subcapfont@s}{\upshape}}\r
151 \DeclareOption{figbotcap}{\figuretopcapfalse}\r
152 \DeclareOption{figtopcap}{\figuretopcaptrue}\r
153 \DeclareOption{tabbotcap}{\tabletopcapfalse}\r
154 \DeclareOption{tabtopcap}{\tabletopcaptrue}\r
155 \DeclareOption{FIGBOTCAP}{\ExecuteOptions{figbotcap}\subfiguretopcapfalse}\r
156 \DeclareOption{FIGTOPCAP}{\ExecuteOptions{figtopcap}\subfiguretopcaptrue}\r
157 \DeclareOption{TABBOTCAP}{\ExecuteOptions{tabbotcap}\subtabletopcapfalse}\r
158 \DeclareOption{TABTOPCAP}{\ExecuteOptions{tabtopcap}\subtabletopcaptrue}\r
159 \DeclareOption{loose}{%\r
160   \subfigtopskip    = 10\p@\r
161   \subfigcapskip    = 10\p@\r
162   \subfigcaptopadj  =  0\p@\r
163   \subfigbottomskip = 10\p@\r
164   \subfigcapmargin  = 10\p@\r
165   \subfiglabelskip  =  0.33em\r
166   \renewcommand*{\@thesubfigure}{\thesubfigure\space}\r
167   \renewcommand*{\@thesubtable}{\thesubtable\space}\r
168   \sf@tightfalse}\r
169 \DeclareOption{tight}{%\r
170   \subfigtopskip    =  5\p@\r
171   \subfigcapskip    =  0\p@\r
172   \subfigcaptopadj  =  3\p@\r
173   \subfigbottomskip =  5\p@\r
174   \subfigcapmargin  =  \z@\r
175   \subfiglabelskip  =  0.33em plus 0.07em minus 0.03em\r
176   \renewcommand*{\@thesubfigure}{\thesubfigure\hskip\subfiglabelskip}\r
177   \renewcommand*{\@thesubtable}{\thesubtable\hskip\subfiglabelskip}\r
178   \sf@tighttrue}\r
179 \ExecuteOptions{normal,footnotesize,FIGBOTCAP,TABBOTCAP,loose}\r
180 \InputIfFileExists{subfigure.cfg}{%\r
181   \typeout{****************************************^^J%\r
182            * Local config file subfigure.cfg used *^^J%\r
183            ****************************************}}{}\r
184 \ProcessOptions\r
185 \newcommand*{\subfigure}{%\r
186   \bgroup\r
187     \let\subfig@oldlabel=\label\r
188     \let\label=\subfloat@label\r
189     \@nameuse{if\@captype topcap}\else\r
190       \advance\@nameuse{c@\@captype}\@ne\r
191     \fi\r
192     \refstepcounter{sub\@captype}%\r
193     \@ifnextchar [%\r
194       {\@subfigure}%\r
195       {\@subfigure[\@empty]}}\r
196 \let\subtable=\subfigure\r
197 \def\@subfigure[#1]{%\r
198     \@ifnextchar [%\r
199       {\@subfloat{sub\@captype}[{#1}]}%\r
200       {\@subfloat{sub\@captype}[\@empty{#1}][{#1}]}}\r
201 \newskip\subfig@top\r
202 \newskip\subfig@bottom\r
203 \long\def\@subfloat#1[#2][#3]#4{%\r
204     \@tempcnta=1\r
205     \ifsf@tight\r
206       \if@minipage\r
207         \@tempcnta=\z@\r
208       \else\ifdim \lastskip=\z@ \else\r
209         \@tempcnta=2\r
210       \fi\fi\r
211     \fi\r
212     \@nameuse{if\@captype topcap}%\r
213       \subfig@top=\subfigbottomskip\r
214       \subfig@bottom=\subfigtopskip\r
215     \else\r
216       \subfig@top=\subfigtopskip\r
217       \subfig@bottom=\subfigbottomskip\r
218     \fi\r
219     \leavevmode\r
220     \setbox\@tempboxa \hbox{#4}%\r
221     \@tempdima=\wd\@tempboxa\r
222     \vtop\bgroup\r
223       \vbox\bgroup\r
224         \ifcase\@tempcnta\r
225           \@minipagefalse\r
226         \or\r
227           \vspace{\subfig@top}%\r
228         \or\r
229           \ifdim \lastskip=\z@ \else\r
230             \@tempskipb\subfig@top\relax\@xaddvskip\r
231           \fi\r
232         \fi\r
233         \@nameuse{if#1topcap}%\r
234           \ifx \@empty#3\relax \else\r
235             \@subcaption{#1}{#2}{#3}%\r
236             \vskip\subfigcapskip\r
237             \vskip\subfigcaptopadj\r
238           \fi\egroup\r
239           \box\@tempboxa\r
240         \else\r
241           \box\@tempboxa\egroup\r
242           \ifx \@empty#3\relax \else\r
243             \vskip\subfigcapskip\r
244             \@subcaption{#1}{#2}{#3}%\r
245           \fi\r
246         \fi\r
247       \vspace{\subfig@bottom}%\r
248     \egroup\r
249     \@nameuse{if\@captype topcap}\else\r
250       \global\advance\@nameuse{c@\@captype}\m@ne\r
251     \fi\r
252   \egroup}\r
253 \newcommand*{\@subfigcaptionlist}{}\r
254 \newcommand{\@subcaption}[3]{%\r
255   \ifx \relax#2\relax \else\r
256     \bgroup\r
257       \let\label=\@gobble\r
258       \let\protect=\string\r
259       \def\@subcaplabel{\@nameuse{@@the#1}}%\r
260       \xdef\@subfigcaptionlist{%\r
261         \@subfigcaptionlist,%\r
262         {\protect\numberline{\@subcaplabel}\noexpand{\ignorespaces #2}}}%\r
263     \egroup\r
264   \fi\r
265   \@nameuse{@make#1caption}{\@nameuse{@the#1}}{#3}}\r
266 \newcommand*{\listsubcaptions}{%\r
267   \@ifstar\r
268     {\gdef\@subfigcaptionlist{}}%\r
269     {\@listsubcaptions{\@captype}}}\r
270 \newcommand*{\@listsubcaptions}[1]{%\r
271   \@ifundefined{@captype}{}{%\r
272     \@ifundefined{ext@sub#1}{}{%\r
273       \@for \sf@temp:=\@subfigcaptionlist \do {%\r
274         \ifx \@empty\sf@temp\relax \else\r
275           \addcontentsline\r
276             {\@nameuse{ext@sub#1}}%\r
277             {sub#1}%\r
278             {\sf@temp}%\r
279         \fi}}}%\r
280   \gdef\@subfigcaptionlist{}}\r
281 \newcommand{\@makesubfigurecaption}[2]{%\r
282   \setbox\@tempboxa\hbox{%\r
283     \subcapsize\r
284     {\subcaplabelfont #1}%\r
285     {\subcapfont\ignorespaces #2}}%\r
286   \@tempdimb=-\subfigcapmargin\r
287   \multiply\@tempdimb\tw@\r
288   \advance\@tempdimb\@tempdima\r
289   \hbox to\@tempdima{%\r
290     \hss\r
291     \ifdim \wd\@tempboxa >\@tempdimb\r
292       \subfig@caption{#1}{#2}%\r
293     \else\ifsubcapnooneline\r
294       \subfig@caption{#1}{#2}%\r
295     \else\r
296       \box\@tempboxa\r
297     \fi\fi\r
298     \hss}}\r
299 \let\@makesubtablecaption=\@makesubfigurecaption\r
300 \newcommand{\subfig@caption}[2]{%\r
301   \ifsubcaphang\r
302     \sbox{\@tempboxa}{\subcapsize\subcaplabelfont #1}%\r
303     \addtolength{\@tempdimb}{-\wd\@tempboxa}%\r
304     \usebox{\@tempboxa}%\r
305     \subfig@captionpar{\@tempdimb}{%\r
306       {\subcapfont\ignorespaces #2}}%\r
307   \else\r
308     \subfig@captionpar{\@tempdimb}{%\r
309       {\subcaplabelfont #1}%\r
310       {\subcapfont\ignorespaces #2}}%\r
311   \fi}\r
312 \newcommand{\subfig@captionpar}[2]{%\r
313   \parbox[t]{#1}{%\r
314     \subcapsize\r
315     \ifsubcapraggedright\r
316       \setlength{\leftskip}{\z@}%\r
317       \setlength{\@rightskip}{\@flushglue}%\r
318       \setlength{\rightskip}{\@rightskip}%\r
319       \setlength{\parindent}{\z@}%\r
320     \else\ifsubcapcenter\r
321       \setlength{\leftskip}{\@flushglue}%\r
322       \setlength{\rightskip}{\@flushglue}%\r
323       \setlength{\parfillskip}{\z@skip}%\r
324     \else\ifsubcapcenterlast\r
325       \addtolength{\leftskip}{\z@ plus 1fil}%\r
326       \addtolength{\rightskip}{\z@ plus -1fil}%\r
327       \setlength{\parfillskip}{\z@ plus 2fil}%\r
328     \fi\fi\fi\r
329     #2}}\r
330 \newcommand*{\@dottedxxxline}[6]{%\r
331   \ifnum #2>\@nameuse{c@#1depth}\else\r
332     \@dottedtocline{0}{#3}{#4}{#5}{#6}\r
333   \fi}\r
334 \let\subfig@end@float=\end@float\r
335 \renewcommand*{\end@float}{%\r
336   \@listsubcaptions{\@captype}%\r
337   \subfig@end@float}\r
338 \let\subfig@end@dblfloat=\end@dblfloat\r
339 \renewcommand*{\end@dblfloat}{%\r
340   \@listsubcaptions{\@captype}%\r
341   \subfig@end@dblfloat}\r
342 \let\subfig@oldcaption=\@caption\r
343 \long\def\@caption#1[#2]#3{%\r
344   \@ifundefined{if#1topcap}%\r
345     {\subfig@oldcaption{#1}[{#2}]{#3}}%\r
346     {\@nameuse{if#1topcap}%\r
347        \@listsubcaptions{#1}%\r
348        \subfig@oldcaption{#1}[{#2}]{#3}%\r
349      \else\r
350        \subfig@oldcaption{#1}[{#2}]{#3}%\r
351        \@listsubcaptions{#1}%\r
352      \fi}}\r
353 \let\subfig@oldlabel=\relax\r
354 \newcommand*{\subfloat@label}{%\r
355   \@ifnextchar(\r
356     {\sf@sub@label}\r
357     {\sf@sub@label(Sub\@captype\space\r
358                    \@ifundefined{thechapter}{}{%\r
359                      \@nameuse{thechapter}\space}%\r
360                    \@nameuse{p@sub\@captype}%\r
361                    \@nameuse{thesub\@captype}.)}}\r
362 \let\sub@label\subfloat@label\r
363 \def\sf@sub@label(#1)#2{%\r
364   \ifhyperrefloaded\r
365     \protected@edef\@currentlabelname{%\r
366       \expandafter\strip@period #1\relax.\relax\@@@}%\r
367   \fi\r
368   \sf@@sub@label{#2}}\r
369 \newcommand*{\sf@@sub@label}[1]{%\r
370   \@bsphack\r
371   \subfig@oldlabel{#1}%\r
372   \ifhyperrefloaded\r
373     \protected@write\@auxout{}{%\r
374         \string\newlabel{sub@#1}%\r
375             {{\@nameuse{@@thesub\@captype}}%\r
376             {\thepage}%\r
377             {\expandafter\strip@period\@currentlabelname\relax.\relax\@@@}%\r
378             {\@currentHref}%\r
379             {}}}%\r
380   \else\r
381     \protected@write\@auxout{}{%\r
382         \string\newlabel{sub@#1}%\r
383             {{\@nameuse{@@thesub\@captype}}%\r
384             {\thepage}}}%\r
385   \fi\r
386   \@esphack}\r
387 \newcommand\subref[1]{%\r
388   \ref{sub@#1}}\r
389 \newcommand\Subref[1]{%\r
390   {\subcaplabelfont\r
391    \ref{sub@#1}}}\r
392 \endinput\r
393 %%\r
394 %% End of file `subfigure.sty'.\r