diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/subfigure/subfigure.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/subfigure/subfigure.dtx | 79 |
1 files changed, 60 insertions, 19 deletions
diff --git a/Master/texmf-dist/source/latex/subfigure/subfigure.dtx b/Master/texmf-dist/source/latex/subfigure/subfigure.dtx index 035d4b17d2b..269b4d5d423 100644 --- a/Master/texmf-dist/source/latex/subfigure/subfigure.dtx +++ b/Master/texmf-dist/source/latex/subfigure/subfigure.dtx @@ -19,9 +19,9 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% @LaTeX-style-file{ %% author = "Steven Douglas Cochran", -%% version = "2.1.4", -%% date = "2002/07/30", -%% time = "09:34:13", +%% version = "2.1.5", +%% date = "2005/04/29", +%% time = "14:24:08", %% filename = "subfigure.sty", %% address = "Digital Mapping Laboratory, School of Computer Science %% Carnegie-Mellon University, 5000 Forbes Avenue @@ -46,7 +46,7 @@ \NeedsTeXFormat{LaTeX2e}[1994/12/01] \ProvidesFile{subfigure.dtx} \documentclass{ltxdoc} -\usepackage[tight,TABTOPCAP]{subfigure}[2002/03/15] +\usepackage[tight,TABTOPCAP]{subfigure}[2005/04/29] \setlength\hfuzz{100pt} \setlength\vfuzz{100pt} \clubpenalty=10000 @@ -177,7 +177,7 @@ % \DoNotIndex{\typeout,\undefined,\upshape,\usebox,\vbox,\vskip,\vspace} % \DoNotIndex{\vtop,\wd,\xdef,\z@,\z@skip} % -% \CheckSum{745}% +% \CheckSum{787}% % ^ Allow a little more freedom in typesetting floats. % \setcounter{topnumber}{8} % \def\topfraction{.8} @@ -217,9 +217,9 @@ % % \makeatother % -% \def\docdate{2002/07/02} -% \def\fileversion{v2.1.4} -% \def\filedate{2002/07/30} +% \def\docdate{2005/03/15} +% \def\fileversion{v2.1.5} +% \def\filedate{2002/03/15} % \def\filename{subfigure.dtx} % % \title{The \Lpack{subfigure} Package\footnote{This paper documents @@ -2341,7 +2341,8 @@ % problems when using the \Lpack{hyperref} package with PDF\LaTeX. % \item{\bf Frederic Darboux} for searching out and finding several % incompatibilities with other packages. -% +% \item{\bf David Kastrup} for the code to check for class or packages +% using \cmd{\let} on \cmd{\end@float} and the like. % \end{itemize} % % \newpage^finalhack @@ -2405,6 +2406,8 @@ % (Available from CTAN as file \texttt{float.dtx}.) % \end{thebibliography}} % +% \newpage^finalhack +% % \section{The Code} % \iffalse %<*package> @@ -2419,9 +2422,53 @@ % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{subfigure}[2002/07/30 v2.1.4 subfigure package] +\ProvidesPackage{subfigure}[2002/03/15 v2.1.5 subfigure package] +% \end{macrocode} +% +% \subsection{Check for Nasty Classes} +% \changes{v2.1.5}{29 Apr 2005}{At the request of David Kastrup, added +% code to check for classes that use \cmd{\let} on \cmd{\end@figure} +% and similar; and to print a warning and fix the problem if detected.} +% +% \begin{macro}{\sf@floatfix} +% +% Some ``broken'' document classes use \cmd{\let} on \cmd{\end@figure} +% and similar, which are used as hooks in the end-processing of, in +% this case, figures. The following code, courtesy of David Kastrup +% (dak\@gnu.org) fixes the problem and prints a warning. +% \begin{macrocode} +\def\sf@floatfix#1#2{% + \ifx#1#2% + \ifx#1\@undefined\else + \PackageWarningNoLine{subfigure}{% +Your document class has a bad definition^^J +of \string#1, most likely^^J +\string\let\string#1=\string#2^^J +which has now been changed to^^J +\string\def\string#1{\string#2}^^J +because otherwise subsequent changes to \string#2^^J +(like done by several packages changing float behaviour)^^J +can't take effect on \string#1.^^J +Please complain to your document class author}% + \def#1{#2}% + \fi + \fi} % \end{macrocode} % +% \begin{macrocode} +\begingroup +\def\next#1#2{% + \endgroup + \sf@floatfix\endfigure\end@float + \sf@floatfix\endtable\end@float + \sf@floatfix#1\end@dblfloat + \sf@floatfix#2\end@dblfloat} +\expandafter\next\csname endfigure*\expandafter\endcsname + \csname endtable*\endcsname +% \end{macrocode} +% +% \end{macro} +% % \subsection{Check for the \Lpack{hyperref} Package} % % \changes{v2.1.4}{02 Jul 2002}{Added the \cmd{\theHsubfigure} and @@ -3070,8 +3117,6 @@ \DeclareOption{TABTOPCAP}{\ExecuteOptions{tabtopcap}\subtabletopcaptrue} % \end{macrocode} % -% \newpage^finalhack -% % \begin{macro}{\subfigtopskip} % \begin{macro}{\subfigcapskip} % \begin{macro}{\subfigcaptopadj} @@ -3178,6 +3223,8 @@ % \end{macrocode} % \end{macro} % +% \newpage^finalhack +% % \subsection{Execution of Options} % \label{sec:startup} % @@ -3267,8 +3314,6 @@ % \end{macro} % % -% \enlargethispage{-24pt}^finalhack -% % \begin{macro}{\@subfigure} % \changes{v2.1.4}{07 Jun 2002}{Added curly brackets around the % argument when passing it on as an optional argument.} @@ -3691,6 +3736,7 @@ % \end{macro} % % \newpage^finalhack +% \enlargethispage{3\baselineskip}^finalhack % % \begin{macro}{\subfig@oldcaption} % \begin{macro}{\@caption} @@ -3777,8 +3823,6 @@ % \end{macro} % \end{macro} % -% \newpage^finalhack -% % \begin{macro}{\sf@sub@label} % % \changes{v2.1.4}{02 Jul 2002}{Moved \cmd{\relax} from the @@ -3852,9 +3896,6 @@ % % \end{macro} % -% \enlargethispage{24pt}^finalhack -% \vspace{-10pt}^finalhack -% % \begin{macro}{\subref} % % The |\subref| command is the same as the |\ref| command except that |