From b98ffba4129664936983eb91f2e6dae5117c096b Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 13 Jan 2006 00:08:06 +0000 Subject: subfloat git-svn-id: svn://tug.org/texlive/trunk@1356 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/subfloat/subfloat.sty | 187 ++++++++++++++++++++++ 1 file changed, 187 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/subfloat/subfloat.sty diff --git a/Master/texmf-dist/tex/latex/subfloat/subfloat.sty b/Master/texmf-dist/tex/latex/subfloat/subfloat.sty new file mode 100644 index 00000000000..5ed50e4f67b --- /dev/null +++ b/Master/texmf-dist/tex/latex/subfloat/subfloat.sty @@ -0,0 +1,187 @@ +%% +%% This is file `subfloat.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% subfloat.dtx (with options: `package') +%% +%% subfloat package +%% +%% Copyright 1999, 2002 Harald Harders +%% +%% This program can be redistributed and/or modified under the terms +%% of the LaTeX Project Public License Distributed from CTAN +%% archives in directory macros/latex/base/lppl.txt; either +%% version 1 of the License, or any later version. +%% +%% h.harders@tu-bs.de +%% +\def\packagename{subfloat} +\def\fileversion{2.14} +\def\filedate{2003/08/21} +\def\docdate{2003/08/21} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{subfloat} + [\filedate\space version \fileversion] +\message{Package `subfloat', Version \fileversion\space of \filedate.} +\newif\ifsubfloat@countmax +\DeclareOption{countmax}{\subfloat@countmaxtrue} +\DeclareOption{nocountmax}{\subfloat@countmaxfalse}% +\ExecuteOptions{nocountmax} +\ProcessOptions\relax +\newcommand*\thesubfloatfigure{\themainfigure\alph{subfloatfigure}} +\newenvironment{subfigures}{% + \subfiguresbegin +}{% + \subfiguresend + \global\@ignoretrue +} +\let\c@subfloatfigure=\c@figure +\newif\ifinsubfloatfigures +\newcommand{\subfiguresbegin}{% +\ifinsubfloatfigures + \PackageError{subfloat}{Cannot start subfloatfigures inside + a\MessageBreak subfloatfigure area}{You probably have used + \string\subfiguresbegin\space or \string\begin{subfigures} inside + the^^Jsame environment or after \string\subfiguresbegin.}% +\fi +\global\insubfloatfigurestrue + \refstepcounter{figure}% + \protected@xdef\figure@value{\the\c@figure}% + \protected@xdef\themainfigure{\thefigure}% + \global\let\thefigure@original=\thefigure + \setcounter{figure}{0}% + \gdef\thefigure{\thesubfloatfigure}% + \ifsubfloat@countmax + {\def\@setref##1##2##3{% + \ifx##1\relax + \protect\G@refundefinedtrue + \setcounter{subfloatfiguremax}{0}% + \PackageWarningNoLine{subfloat}{Reference `##3' on page + \thepage \space undefined\MessageBreak + (count subfloatfigures)}% + \else + \setcounter{subfloatfiguremax}{\expandafter\@firstoftwo##1}% + \fi}% + \ref{subfloat@@figure\figure@value}}% + \fi +%% \@ifpackageloaded{subfigure}{% + \let\p@subfigure=\thesubfloatfigure +%% }{}% + \ignorespaces +} +\newcommand{\subfiguresend}{% +\ifinsubfloatfigures +\else + \PackageError{subfloat}{Cannot stop subfloatfigures outside + a\MessageBreak subfloatfigure area}{You probably have used + \string\subfiguresend\space or \string\end{subfigures} without + starting a^^Jsubfloatfigure area using the same environment or + \string\subfiguresbegin.}% +\fi +\global\insubfloatfiguresfalse + \ifsubfloat@countmax + \subfloat@figurelabel{subfloat@@figure\figure@value}% + \fi + \setcounter{figure}{\figure@value}% + \global\let\thefigure=\thefigure@original +%% \@ifpackageloaded{subfigure}{% + \let\p@subfigure=\thefigure +%% }{}% + \ignorespaces +} +%% +\ifsubfloat@countmax + \newcounter{subfloatfiguremax} +\else + \PackageWarningNoLine{subfloat}{Numbers of floats not + counted:\MessageBreak + If you use one of the counters subfloatfiguremax or\MessageBreak + subfloattablemax you will get strange error messages\MessageBreak + containing \string\c@subfloatfiguremax\space or\MessageBreak + \string\c@subfloattablemax:\MessageBreak + Please switch on countmax or + remove the code using\MessageBreak + the counter then.} +\fi +\ifsubfloat@countmax + \newcommand*\subfloat@figurelabel[1]{\@bsphack + \protected@write\@auxout{}% + {\string\newlabel{#1}{{\the\c@figure}{\thepage}}}% + \@esphack} +\fi +\newcommand*\thesubfloattable{\themaintable\alph{subfloattable}} +\newenvironment{subtables}{% + \subtablesbegin +}{% + \subtablesend + \global\@ignoretrue +} +\let\c@subfloattable=\c@table +\newif\ifinsubfloattables +\newcommand{\subtablesbegin}{% +\ifinsubfloattables + \PackageError{subfloat}{Cannot start subfloattables inside + a\MessageBreak subfloatfigure area}{You probably have used + \string\subtablesbegin\space or \string\begin{subtables} inside + the^^Jsame environment or after \string\subtablesbegin.}% +\fi +\global\insubfloattablestrue + \refstepcounter{table}% + \protected@xdef\table@value{\the\c@table}% + \protected@xdef\themaintable{\thetable}% + \global\let\thetable@original=\thetable + \setcounter{table}{0}% + \gdef\thetable{\thesubfloattable}% + \ifsubfloat@countmax + {\def\@setref##1##2##3{% + \ifx##1\relax + \protect\G@refundefinedtrue + \setcounter{subfloattablemax}{0}% + \PackageWarningNoLine{subfloat}{Reference `##3' on page + \thepage \space undefined\MessageBreak + (count subfloattables)}% + \else + \setcounter{subfloattablemax}{\expandafter\@firstoftwo##1}% + \fi}% + \ref{subfloat@@table\table@value}}% + \fi +%% \@ifpackageloaded{subfigure}{% + \let\p@subtable=\thesubfloattable +%% }{}% + \ignorespaces +} +\newcommand{\subtablesend}{% +\ifinsubfloattables +\else + \PackageError{subfloat}{Cannot stop subfloattables outside + a\MessageBreak subfloatfigure area}{You probably have used + \string\subtablesend\space or \string\end{subtables} without + starting a^^Jsubfloatfigure area using the same environment or + \string\subtablesbegin.}% +\fi +\global\insubfloattablesfalse + \ifsubfloat@countmax + \subfloat@tablelabel{subfloat@@table\table@value}% + \fi + \setcounter{table}{\table@value}% + \global\let\thetable=\thetable@original +%% \@ifpackageloaded{subfigure}{% + \let\p@subtable=\thetable +%% }{}% + \ignorespaces +} +%% +\ifsubfloat@countmax + \newcounter{subfloattablemax} +\fi +\ifsubfloat@countmax + \newcommand*\subfloat@tablelabel[1]{\@bsphack + \protected@write\@auxout{}% + {\string\newlabel{#1}{{\the\c@table}{\thepage}}}% + \@esphack} +\fi +\endinput +%% +%% End of file `subfloat.sty'. -- cgit v1.2.3