diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/ccaption/ccaption.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/ccaption/ccaption.dtx | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/Master/texmf-dist/source/latex/ccaption/ccaption.dtx b/Master/texmf-dist/source/latex/ccaption/ccaption.dtx index d8d92d7135d..a7ebcb96ed6 100644 --- a/Master/texmf-dist/source/latex/ccaption/ccaption.dtx +++ b/Master/texmf-dist/source/latex/ccaption/ccaption.dtx @@ -126,6 +126,7 @@ % \cs{caption} with subfigure option} % \changes{v3.1c}{2003/11/14}{Made \cs{label} work after \cs{contcaption}} % \changes{v3.2}{2005/03/21}{Support for bilingual captions in longtable} +% \changes{v3.2a}{2005/03/29}{Fix bicaption labels} % % \def\dtxfile{ccaption.dtx} % \def\fileversion{v2.6c} \def\filedate{2000/03/15} @@ -139,6 +140,7 @@ % \def\fileversion{v3.1b} \def\filedate{2002/10/18} % \def\fileversion{v3.1c} \def\filedate{2003/11/14} % \def\fileversion{v3.2} \def\filedate{2005/03/21} +% \def\fileversion{v3.2a} \def\filedate{2005/03/29} % \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package % \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option % \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file @@ -434,7 +436,7 @@ % \captionstyle{\centerlastline\\} % \captiontitlefont{\scshape} % \setlength{\belowcaptionskip}{10pt} -% \ifx #1\@empty \caption{#2}\else \caption[#1]{#2}} +% \ifx\@empty#1 \caption{#2}\else \caption[#1]{#2}} % \end{verbatim} % \textbf{NOTE:} Any code that involves the |@| sign must be either in % a package (|.sty|) file or enclosed between a |\makeatletter| \ldots @@ -1892,7 +1894,7 @@ % \begin{macrocode} %<*usc> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ccaption}[2005/03/21 v3.2 Extended captioning and new floats] +\ProvidesPackage{ccaption}[2005/03/29 v3.2a Extended captioning and new floats] % \end{macrocode} % In an attempt to avoid name clashes with other packages, all internal @@ -2428,6 +2430,7 @@ % name in % language 2, and short and long in language 2. Both texts are put % into the List of as numbered entries. +% \changes{v3.2a}{2005/03/29}{Fix empty check in \cs{bitwonumcaption}} % \begin{macrocode} \newcommand{\bitwonumcaption}[6][\@empty]{% \begingroup @@ -2439,7 +2442,7 @@ % \end{macrocode} % Do the optional labeling. % \begin{macrocode} - \ifx #1\@empty\else + \ifx\@empty#1\else \label{#1} \fi % \end{macrocode} @@ -2471,6 +2474,7 @@ % short and long in language 1, name in % language 2, and short and long in language 2. Both texts are put % into the List of, but only the first is numbered. +% \changes{v3.2a}{2005/03/29}{Fix empty check in \cs{bionenumcaption}} % \begin{macrocode} \newcommand{\bionenumcaption}[6][\@empty]{% \begingroup @@ -2482,7 +2486,7 @@ % \end{macrocode} % Do the optional labeling. % \begin{macrocode} - \ifx #1\@empty\else + \ifx\@empty#1\else \label{#1} \fi % \end{macrocode} @@ -2514,6 +2518,7 @@ % short and long in language 1, name in % language 2, and long in language 2. % Only the first text is put into the List. +% \changes{v3.2a}{2005/03/29}{Fix empty check in \cs{bicaption}} % \begin{macrocode} \newcommand{\bicaption}[5][\@empty]{% \begingroup @@ -2525,7 +2530,7 @@ % \end{macrocode} % Do the optional labeling. % \begin{macrocode} - \ifx #1\@empty\else + \ifx\@empty#1\else \label{#1} \fi % \end{macrocode} @@ -3809,6 +3814,18 @@ % The definition of |\@if@contemptyarg| is based on the improved version % that Donald supplied, only the macro names being changed. % +% For checking if an optional argument is present I used code along the +% lines: \\ +% \verb?\newcommand{\com}[4][\@empty]{...? \\ +% \verb?\ifx \@empty#1\else %argument present? \\ +% Unfortunately I was not consistent, as Benjamin Bayart found\footnote{Email +% to me on 2005/03/29.} when he used an optional argument that started with +% a double character, like \verb?\bicaption[ccapt3]{...?, which caused +% nasty things to happen. In these cases I had coded: \\ +% \verb?\ifx #1\@empty\else %argument present? \\ +% I really should have known better as this results in TRUE with +% \verb?apt3? being left dangling (and typeset). +% % \bibliographystyle{alpha} % % \begin{thebibliography}{MCCG95} |