diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/caption/ltcaption.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/caption/ltcaption.dtx | 802 |
1 files changed, 802 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/caption/ltcaption.dtx b/Master/texmf-dist/source/latex/caption/ltcaption.dtx new file mode 100644 index 00000000000..f7a2e0e9c0c --- /dev/null +++ b/Master/texmf-dist/source/latex/caption/ltcaption.dtx @@ -0,0 +1,802 @@ +% \iffalse meta-comment +% +% This is file `ltcaption.dtx'. +% +% Copyright (C) 2007 Axel Sommerfeldt (caption@sommerfee.de) +% +% -------------------------------------------------------------------------- +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% This Current Maintainer of this work is Axel Sommerfeldt. +% +% This work consists of the files caption.ins, caption.dtx, caption2.dtx, +% and ltcaption.dtx, the derived files caption.sty, caption2.sty, +% caption3.sty, and ltcaption.sty, and the user manuals caption-deu.tex, +% caption-eng.tex, and caption-rus.tex. +% +% \fi +% \CheckSum{333} +% +% \iffalse +%<*driver> +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesFile{ltcaption.drv}% + [2007/09/01 v1.1 This package fixes caption problems with + other-than-centered aligned longtables] +\hbadness=9999 \newcount\hbadness \hfuzz=48pt % Make TeX shut up. +% +\documentclass{ltxdoc} +\setlength\parindent{0pt} +\setlength\parskip{\smallskipamount} +% +\ifx\pdfoutput\undefined\else + \ifcase\pdfoutput\else + \usepackage{mathptmx,courier} + \usepackage[scaled=0.90]{helvet} +% \addtolength\marginparwidth{15pt} + \fi +\fi +% +\usepackage{longtable} +\makeatletter\let\LT@makecaption@ORI\LT@makecaption\makeatother +% +\usepackage{hypdoc} +\hypersetup{pdfkeywords={LaTeX, package, ltcaption},pdfstartview={}} +% +\usepackage{ltcaption}[2007/09/01] +%\usepackage[LTcapwidthtotable]{fr-longtable} +% +\DeclareRobustCommand{\KOMAScript}{\textsf{K\kern.05em O\kern.05em% + M\kern.05em A\kern.1em-\kern.1em Script}} +% +\begin{document} + \DocInput{ltcaption.dtx} +\end{document} +%</driver> +% \fi +% +% \newcommand*\purerm[1]{{\upshape\mdseries\rmfamily #1}} +% \newcommand*\puresf[1]{{\upshape\mdseries\sffamily #1}} +% \newcommand*\purett[1]{{\upshape\mdseries\ttfamily #1}} +% \let\package\puresf +% \let\env\purett \let\opt\purett +% +% \def\thispackage{the \package{ltcaption} package} +% \def\Thispackage{The \package{ltcaption} package} +% \newcommand*\version[2][]{\textit{v#2}} +% +% \GetFileInfo{ltcaption.drv} +% \let\docdate\filedate +% \GetFileInfo{ltcaption.sty} +% +% \title{\texorpdfstring{\Thispackage\thanks{%^^A +% This package has version number \fileversion, last revised \filedate.}}%^^A +% {The ltcaption package}} +% \author{Axel Sommerfeldt\\ +% \href{mailto:caption@sommerfee.de}{\texttt{caption@sommerfee.de}}} +% \date{\docdate} +% \maketitle +% +% \begin{abstract} +% \centering +% \mbox{This package fixes caption problems with other-than-centered aligned longtables.}\\ +% (solves \href{http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=tools/3387}%^^A +% {\LaTeX\ PR \texttt{tools/3387}}) +% \end{abstract} +% +% \tableofcontents +% +% \clearpage +% \section{The user interface} +% +% Just include this package \emph{after} the \package{longtable} package\cite{longtable}, e.g.: +% \begin{quote} +% |\usepackage{longtable,ltcaption}| +% \end{quote} +% +% \bigskip +% +% \DescribeMacro{\LTcapleft} +% \DescribeMacro{\LTcapright} +% You can alter the centering of the caption box (of width |\LTcapwidth|) +% by setting the lengths |\LTcapleft| \& |\LTcapright| to appropriate values. +% These are set to |\fill| by default, just like the values |\LTleft| \& |\LTright|. +% +% \DescribeMacro{\LTcapmarginsfalse} +% Another option is the usage of the command |\LTcapmarginsfalse| which makes +% \thispackage\ using the values |\LTleft| \& |\LTright| instead of +% |\LTcapleft| \& |\LTcapright|. +% +% \emph{Note:} +% If \thispackage\ will be used with one of the \package{NTG} document +% classes\cite{NTGclasses}, |\CaptionLabelFont| \& |\CaptionTextFont| will +% not only be used for |figure| \& |table| captions, but for |longtable| +% captions as well. +% +% \emph{Note:} +% These adaptions do not work when used with one of the \KOMAScript\ +% classes\cite{KOMAScript} |scrartcl|, |scrreprt| or |scrbook|, +% the \KOMAScript\ settings for captions are used instead. +% Same with the \package{caption} package which also uses its own options +% and settings. +% +% \bigskip +% +% \DescribeMacro{\LTcaptype} +% As a bonus feature this package patches the \package{longtable} package +% so |\LTcaptype| will be used internally instead of the fixed caption type +% `table'. So for example this code snipped: +% \begin{quote} +% |\renewcommand\LTcaptype{figure}|\\ +% |\begin{longtable}{ll}|\\ +% |\caption{An example longtable}\\|\\ +% | A & B \\|\\ +% | C & D \\|\\ +% |\end{longtable}| +% \end{quote} +% will result in a longtable like this: +% \setcounter{figure}{6} +% \begingroup +% \renewcommand\LTcaptype{figure} +% \begin{longtable}{ll} +% \caption{An example longtable}\\ +% A & B \\ +% C & D \\ +% \end{longtable} +% \endgroup +% +% \bigskip +% +% \DescribeEnv{longtable*} +% Another bonus feature is the addition of the environment |longtable*| which +% does not increment the |table| counter. (As a consequence, |\caption| is not +% available for such longtables, but |\caption*| still is.) +% +% \clearpage +% \section{Spot the difference} +% +% \begin{minipage}{\linewidth} +% Without \thispackage: +% \makeatletter +% \let\LT@makecaption\LT@makecaption@ORI +% \makeatother +% +% \iffalse show textwidth \fi +% \noindent\rule{\textwidth}{1pt} +% +% \begin{longtable}[l]{l} +% \caption{Left aligned longtable left aligned longtable left aligned +% longtable}\\ +% This is only a test\\ +% \end{longtable} +% +% \begin{longtable}[r]{l} +% \caption{Right aligned longtable right aligned longtable right aligned +% longtable}\\ +% This is only a test\\ +% \end{longtable} +% +% \begin{longtable}[c]{l} +% \caption{Centered longtable centered longtable centered longtable +% centered longtable}\\ +% This is only a test\\ +% \end{longtable} +% +% \noindent\rule{\textwidth}{1pt} +% \end{minipage} +% +% \bigskip +% +% \begin{minipage}{\linewidth} +% With \thispackage\ (and the default value of |\LTcapwidth|): +% +% \noindent\rule{\textwidth}{1pt} +% +% \begin{longtable}[l]{l} +% \caption{Left aligned longtable left aligned longtable left aligned +% longtable}\\ +% This is only a test\\ +% \end{longtable} +% +% \begin{longtable}[r]{l} +% \caption{Right aligned longtable right aligned longtable right aligned +% longtable}\\ +% This is only a test\\ +% \end{longtable} +% +% \begin{longtable}[c]{l} +% \caption{Centered longtable centered longtable centered longtable +% centered longtable}\\ +% This is only a test\\ +% \end{longtable} +% +% \noindent\rule{\textwidth}{1pt} +% \end{minipage} +% +% \bigskip +% +% \begin{minipage}{\linewidth} +% With \thispackage\ and |\LTcapwidth=\linewidth|: +% \LTcapwidth=\linewidth +% +% \noindent\rule{\textwidth}{1pt} +% +% \begin{longtable}[l]{l} +% \caption{Left aligned longtable left aligned longtable +% left aligned longtable left aligned longtable}\\ +% This is only a test\\ +% \end{longtable} +% +% \begin{longtable}[r]{l} +% \caption{Right aligned longtable right aligned longtable +% right aligned longtable right aligned longtable}\\ +% This is only a test\\ +% \end{longtable} +% +% \begin{longtable}[c]{l} +% \caption{Centered longtable centered longtable centered longtable +% centered longtable}\\ +% This is only a test\\ +% \end{longtable} +% +% \noindent\rule{\textwidth}{1pt} +% \end{minipage} +% +% \bigskip +% +% \begin{minipage}{\linewidth} +% With \thispackage\ and |\LTcapleft=0pt| +% resp. |\LTcapright=0pt|: +% +% \noindent\rule{\textwidth}{1pt} +% +% \LTcapleft=0pt\relax +% \LTcapright=\fill +% \begin{longtable}[l]{l} +% \caption{Left aligned longtable left aligned longtable left aligned +% longtable}\\ +% This is only a test\\ +% \end{longtable} +% +% \LTcapleft=\fill +% \LTcapright=0pt\relax +% \begin{longtable}[r]{l} +% \caption{Right aligned longtable right aligned longtable right aligned +% longtable}\\ +% This is only a test\\ +% \end{longtable} +% +% \noindent\rule{\textwidth}{1pt} +% \end{minipage} +% +% \bigskip +% +% \begin{minipage}{\linewidth} +% With \thispackage\ and |\LTcapleft=\tabcolsep|\\ +% resp. |\LTcapright=\tabcolsep|: +% +% \noindent\rule{\textwidth}{1pt} +% +% \LTcapleft=\tabcolsep +% \LTcapright=\tabcolsep plus 1fill +% \begin{longtable}[l]{l} +% \caption{Left aligned longtable left aligned longtable left aligned +% longtable}\\ +% This is only a test\\ +% \end{longtable} +% +% \LTcapleft=\tabcolsep plus 1fill +% \LTcapright=\tabcolsep +% \begin{longtable}[r]{l} +% \caption{Right aligned longtable right aligned longtable right aligned +% longtable}\\ +% This is only a test\\ +% \end{longtable} +% +% \noindent\rule{\textwidth}{1pt} +% \end{minipage} +% +% \bigskip +% +% \begin{minipage}{\linewidth} +% With \thispackage\ and |\LTcapmarginsfalse|: +% \LTcapmarginsfalse +% +% \noindent\rule{\textwidth}{1pt} +% +% \begin{longtable}[l]{l} +% \caption{Left aligned longtable left aligned longtable left aligned +% longtable}\\ +% This is only a test\\ +% \end{longtable} +% +% \begin{longtable}[r]{l} +% \caption{Right aligned longtable right aligned longtable right aligned +% longtable}\\ +% This is only a test\\ +% \end{longtable} +% +% \begin{longtable}[c]{l} +% \caption{Centered longtable centered longtable centered longtable +% centered longtable}\\ +% This is only a test\\ +% \end{longtable} +% +% \noindent\rule{\textwidth}{1pt} +% \end{minipage} +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \StopEventually{%^^A +% \begin{thebibliography}{9} +% \bibitem{longtable} +% David Carlisle: +% \href{ftp://ctan.tug.org/tex-archive/macros/latex/required/tools/longtable.pdf}% +% {\emph{The longtable package}}, +% 2004/02/01 +% +% \bibitem{NTGclasses} +% Victor Eijkhout: +% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/ntgclass/classdoc.pdf}% +% {\emph{An introduction to the Dutch \LaTeX\ document classes}},\\ +% \mbox{3~September~1989} +% +% \bibitem{KOMAScript} +% Markus Kohm \& Jens-Uwe-Morawski: +% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/koma-script/scrguien.pdf}% +% {\emph{KOMA-Script -- a versatile \LaTeXe\ bundle}},\\ +% 2007-01-09 +% +% \bibitem{floatrow} +% Olga Lapko: +% \href{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/floatrow/floatrow.pdf}% +% {\emph{The floatrow package documentation}}, +% 2006/07/24 +% \end{thebibliography} +% } +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \DoNotIndex{\\,\_,\ ,\@@par} +% \DoNotIndex{\@classoptionslist,\@currext,\@currname} +% \DoNotIndex{\@ehc,\@ehd,\@empty,\@expandtwoargs} +% \DoNotIndex{\@for,\@firstofone,\@firstoftwo} +% \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom} +% \DoNotIndex{\@ifnextchar,\@ifpackagelater,\@ifpackageloaded} +% \DoNotIndex{\@ifstar,\@ifundefined,\@latex@error,\@namedef,\@nameuse} +% \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist} +% \DoNotIndex{\@removeelement,\@restorepar,\@secondoftwo,\@setpar} +% \DoNotIndex{\@tempa,\@tempboxa,\@tempdima,\@tempdimb,\@tempdimc,\@tempb,\@tempc} +% \DoNotIndex{\@testopt} +% \DoNotIndex{\@undefined,\@unprocessedoptions,\@unusedoptionlist} +% \DoNotIndex{\p@,\z@} +% \DoNotIndex{\active,\addtocounter,\addtolength,\advance,\aftergroup} +% \DoNotIndex{\baselineskip,\begin,\begingroup,\bfseries,\box} +% \DoNotIndex{\catcode,\centering,\changes,\csname,\def,\divide,\do,\downarrow} +% \DoNotIndex{\edef,\else,\empty,\end,\endcsname,\endgraf,\endgroup,\expandafter} +% \DoNotIndex{\fi,\footnotesize,\global} +% \DoNotIndex{\hangindent,\hbox,\hfil,\hsize,\hskip,\hspace,\hss} +% \DoNotIndex{\ifcase,\ifdim,\ifnum,\ifodd,\ifvoid,\ifvmode} +% \DoNotIndex{\ifx,\ignorespaces,\itshape} +% \DoNotIndex{\Large,\large,\leavevmode,\leftmargini,\leftskip,\let,\linewidth} +% \DoNotIndex{\llap,\long,\m@ne,\margin,\mdseries,\message} +% \DoNotIndex{\newcommand,\newdimen,\newlength,\newline,\newif,\newsavebox} +% \DoNotIndex{\next,\nobreak,\nobreakspace,\noexpand,\noindent,\numberline} +% \DoNotIndex{\normalcolor,\normalfont,\normalsize,\or,\par,\parbox,\parfillskip} +% \DoNotIndex{\parindent,\parskip,\prevdepth,\protect,\protected@edef,\protected@write} +% \DoNotIndex{\providecommand,\quad} +% \DoNotIndex{\raggedleft,\raggedright,\relax,\renewcommand,\RequirePackage} +% \DoNotIndex{\rightskip,\rmfamily} +% \DoNotIndex{\sbox,\scriptsize,\scshape,\setbox,\setlength,\sffamily,\slshape} +% \DoNotIndex{\small,\string,\space,\strut} +% \DoNotIndex{\textheight,\the,\toks@,\typeout,\ttfamily} +% \DoNotIndex{\unvbox,\uparrow,\upshape,\usebox,\usepackage} +% \DoNotIndex{\value,\vbox,\vsize,\vskip,\wd,\width,\z@skip} +% \DoNotIndex{\AtBeginDocument,\AtEndOfPackage,\CurrentOption,\DeclareOption} +% \DoNotIndex{\ExecuteOptions,\GenericWarning,\IfFileExists,\InputIfFileExists} +% \DoNotIndex{\NeedsTeXFormat,\MessageBreak} +% \DoNotIndex{\PackageError,\PackageInfo,\PackageWarning,\PackageWarningNoLine} +% \DoNotIndex{\PassOptionsToPackage,\ProcessOptions,\ProvidesPackage} +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \setlength{\parskip}{0pt plus 1pt} +% \changes{v1.0}{2007/04/15}{First release} +% \changes{v1.1}{2007/07/06}{Support of |\LTcaptype| added} +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \clearpage +% \section{The Implementation} +% \iffalse +%<*package> +% \fi +% +% \subsection{Identification} +% +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{ltcaption}[2007/09/01 v1.1 longtable captions (AR)] +% \end{macrocode} +% +% \subsection{User interface} +% +% \begin{macro}{\LTcaptype} +% |\LTcaptype| is preset to |table|. +% \begin{macrocode} +\providecommand*\LTcaptype{table} +\providecommand*\ext@table{lot} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ext@lstlisting} +% Since the \package{listings} package do not define |\ext@lstlisting|, +% but we needed it when |\renewcommand\LTcaptype{lstlisting}| was done +% by the end user, we define it here. +% \begin{macrocode} +\@ifundefined{caption@AtBeginDocument}\AtBeginDocument\caption@AtBeginDocument{% + \@ifpackageloaded{listings}{% + \providecommand*\ext@lstlisting{lol}% + }{}} +% \end{macrocode} +% \end{macro} +% +% To save \TeX\ memory some stuff will not be defined if the +% \package{caption} package is loaded. +% +% \begin{macrocode} +\@ifpackageloaded{caption}{}{% +% \end{macrocode} +% +% \changes{v1.1}{2007/04/20}{The skips will not be defined if the +% \package{caption} package is loaded} +% +% \begin{macro}{\LTcapleft} +% \begin{macro}{\LTcapright} +% \begin{macro}{\ifLTcapmargins} +% Our skips and the flag belonging to them.\\ +% (Default: Use these skips (and not |\LTleft| \& |\LTright|.)\par +% \begin{macrocode} + \newskip\LTcapleft \LTcapleft=\fill + \newskip\LTcapright \LTcapright=\fill + \newif\ifLTcapmargins \LTcapmarginstrue +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \changes{v1.1}{2007/05/05}{Usage of \cs{CaptionLabelFont} \& +% \cs{CaptionTextFont} added} +% +% \begin{macro}{\CaptionLabelFont} +% \begin{macro}{\CaptionTextFont} +% These commands are provided by the \package{NTG} document classes. +% To make this package work with other document classes as well, +% we need to define |\CaptionLabelFont| \& |\CaptionTextFont| here. +% \begin{macrocode} + \providecommand*\CaptionLabelFont{} + \providecommand*\CaptionTextFont{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macrocode} +} +% \end{macrocode} +% +% \subsection{The longtable patch} +% +% \begin{macro}{\LT@array} +% We insert our stuff into the definition of |\LT@array| here. +% Since the \package{hyperref} package patches |\LT@array| as well +% and since this only works with the original definition of |\LT@array|, +% we have to do this after the \package{hyperref} package, +% i.e. |\AtBeginDocument|. +% \begin{macrocode} +\@ifundefined{caption@AtBeginDocument}\AtBeginDocument\caption@AtBeginDocument{% +% \end{macrocode} +% \begin{macrocode} + \let\ltcaption@ORI@LT@array\LT@array + \renewcommand*\LT@array{% +% \end{macrocode} +% We modify the next |\refstepcounter| resp. |\H@refstepcounter| \& +% |\hyper@makecurrent|, so |\LTcaptype| is used instead of |{table}|. +% \begin{macrocode} + \let\ltcaption@ORI@refstepcounter\refstepcounter + \let\ltcaption@ORI@H@refstepcounter\H@refstepcounter + \def\refstepcounter##1{% + \let\refstepcounter\ltcaption@ORI@refstepcounter + \let\H@refstepcounter\ltcaption@ORI@H@refstepcounter + \refstepcounter\LTcaptype}% + \def\H@refstepcounter##1{% + \let\refstepcounter\ltcaption@ORI@refstepcounter + \let\H@refstepcounter\ltcaption@ORI@H@refstepcounter + \H@refstepcounter\LTcaptype}% +% \end{macrocode} +% \begin{macrocode} + \let\ltcaption@ORI@hyper@makecurrent\hyper@makecurrent + \def\hyper@makecurrent##1{% + \let\hyper@makecurrent\ltcaption@ORI@hyper@makecurrent + \hyper@makecurrent\LTcaptype}% +% \end{macrocode} +% We redefine |\lst@@caption| so |\thelstlisting| will +% printout its counter, too. +% \begin{macrocode} + \def\lst@@caption{\relax}% +% \end{macrocode} +% \begin{macrocode} + \ltcaption@ORI@LT@array}% +% \end{macrocode} +% \begin{macrocode} +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\LT@c@ption} +% The original implementation: +% \begin{verbatim} +% \def\LT@c@ption#1[#2]#3{% +% \LT@makecaption#1\fnum@table{#3}% +% \def\@tempa{#2}% +% \ifx\@tempa\@empty\else +% {\let\\\space +% \addcontentsline{lot}{table}{\protect\numberline{\thetable}{#2}}}% +% \fi} +% \end{verbatim}%^^A +% Our implementation simply uses |\LTcaptype| instead of |{table}|: +% \begin{macrocode} +\def\LT@c@ption#1[#2]#3{% + \LT@makecaption#1{\csname fnum@\LTcaptype\endcsname}{#3}% + \def\@tempa{#2}% + \ifx\@tempa\@empty\else + {\let\\\space + \addcontentsline{\csname ext@\LTcaptype\endcsname}{\LTcaptype}% + {\protect\numberline{\csname the\LTcaptype\endcsname}{#2}}}% + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\LT@makecaption} +% \changes{v1.1}{2007/04/20}{\cs{LT@@makecaption} added} +% |\LT@makecaption|\marg{cmd}\marg{label}\marg{text}\par +% \smallskip +% Original code: +% \begin{verbatim} +% \def\LT@makecaption#1#2#3{% +% \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\LTcapwidth{% +% % Based on article class "\@makecaption", "#1" is "\@gobble" in star +% % form, and "\@firstofone" otherwise. +% \sbox\@tempboxa{#1{#2: }#3}% +% \ifdim\wd\@tempboxa>\hsize +% #1{#2: }#3% +% \else +% \hbox to\hsize{\hfil\box\@tempboxa\hfil}% +% \fi +% \endgraf\vskip\baselineskip}% +% \hss}}} +% \end{verbatim}%^^A +% Our code:\footnote{Adapted to the \package{floatrow} package by Olga Lapko} +% \changes{v1.1}{2007/06/27}{Adapted to the \package{floatrow} package by Olga Lapko} +% \begin{macrocode} +\renewcommand\LT@makecaption[3]{% + \LT@@makecaption{% + \sbox\@tempboxa{#1{{\CaptionLabelFont#2:} }\CaptionTextFont#3}% + \ifdim\wd\@tempboxa>\hsize + #1{\CaptionLabelFont{#2:} }\CaptionTextFont#3% + \else + \hbox to\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \endgraf\vskip\baselineskip}} +% \end{macrocode} +% \begin{macrocode} +\newcommand\LT@@makecaption[1]{% + \caption@LT@make{\hb@xt@\hsize{% + \ifLTcapmargins + \hspace\LTcapleft + \FBifLTcapwidth{\advance\LTcapwidth-\LTcapleft}% + \else + \hspace\LTleft + \FBifLTcapwidth{\advance\LTcapwidth-\LTleft}% + \fi + \FBifLTcapwidth{\advance\LTcapwidth-% + \ifLTcapmargins\LTcapright\else\LTright\fi}% + \parbox[t]\LTcapwidth{#1}% + \ifLTcapmargins + \hskip\LTcapright + \else + \hskip\LTright + \fi}}} +% \end{macrocode} +% This one will be usually defined by the \package{fr-longtable} package, +% which is part of the \package{floatrow} package\cite{floatrow}: +% \begin{macrocode} +\AtBeginDocument{\providecommand*\FBifLTcapwidth[1]{}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@LT@make} +% Typesets the caption as |\multicolumn|\ldots +% \begin{macrocode} +\newcommand\caption@LT@make[1]{% + \noalign{\caption@LT@config}% +% \end{macrocode} +% Note: If used with the \package{array} package |\caption@LTfmt| needs +% to be expanded, therefore we need some |\expandafter| here. +% \begin{macrocode} + \expandafter\LT@mcol\expandafter\LT@cols\expandafter{\caption@LTfmt}{% + \hb@xt@\z@{% + \hspace\caption@LTleft + \parbox[t]\linewidth{#1}% + \hspace\caption@LTright}}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@LT@config} +% |\caption@LT@config| analyses |\LTleft| \& |\LTright| +% and set |\caption@LTleft| \& |\caption@LTright| accordingly +% to the `opposite' values, e.g., |\LTleft=1cm| will result to +% |\caption@LTleft=-1cm| and |\LTleft=0pt plus 1fill| +% will result to |\caption@LTleft=0pt minus 1fill|. +% Furthermore |\caption@LTfmt| is set to the according +% multicolumn format; this is far away from being bulletproof +% (e.g., a stretch or shrink will always be treated as `fill') +% but will hopefully cover all `real' cases. +% \begin{macrocode} +\newcommand*\caption@LT@config{% +% \end{macrocode} +% \begin{macrocode} + \caption@LT@parse\LTleft\caption@LTleft\caption@ifLTleft + \caption@LT@parse\LTright\caption@LTright\caption@ifLTright +% \end{macrocode} +% \begin{macrocode} + \xdef\caption@LTfmt{% + @{}\caption@ifLTleft{\caption@ifLTright{c}{r}}{l}@{}}} +% \end{macrocode} +% \end{macro} +% +% \iffalse +% \def\@defplusminus#1 #2 #3 #4 #5\@nil{% +% \def\@plus{#2}\def\@minus{#4}} +% \@tempskipa=1pt plus 1pt minus 1pt\relax +% \expandafter\@defplusminus\the\@tempskipa\@nil +% \fi +% +% \begin{macro}{\caption@LT@parse} +% Parsing of the skip, we collect a |\@fixpart|, a |@pluspart|, +% and a |\@minuspart| and make our definitions based on that. +% \begin{macrocode} +\newcommand*\caption@LT@parse[3]{% +% \end{macrocode} +% \begin{macrocode} + \let\@pluspart\@undefined + \let\@minuspart\@undefined + \expandafter\caption@LT@parse@\expandafter\@fixpart\the#1 x % +% \end{macrocode} +% \begin{macrocode} + \xdef#2{-\@fixpart + \ifx\@minuspart\@undefined\else + \space\@plus\space\@minuspart + \fi + \ifx\@pluspart\@undefined\else + \space\@minus\space\@pluspart + \fi}% +% \end{macrocode} +% \changes{v1.1}{2007/04/17}{Made it 5 token shorter} +% \begin{macrocode} + \let#3\@firstoftwo + \ifx\@pluspart\@undefined + \ifx\@minuspart\@undefined + \let#3\@secondoftwo + \fi + \fi} +% \end{macrocode} +% \begin{macrocode} +\def\caption@LT@parse@#1#2 {% +% \end{macrocode} +% Note: |\def\@tempa{#2}\ifx\@tempa\@plus|\ldots would not work here +% because of different catcodes. +% \begin{macrocode} + \edef\@tempa{\@car#2\@nil}% + \if p\@tempa + \def\next{\caption@LT@parse@\@pluspart}% + \else\if m\@tempa + \def\next{\caption@LT@parse@\@minuspart}% + \else\if x\@tempa + \let\next\relax + \else + \def#1{#2}% + \def\next{\caption@LT@parse@ @}% + \fi\fi\fi + \next} +% \end{macrocode} +% \end{macro} +% +% \subsection{The \texttt{longtable*} environment} +% \changes{v1.1}{2007/09/01}{Environment \env{longtable*} added} +% +% \begin{environment}{longtable*} +% We simply supress anything which has to do with reference counters +% or hyper links here. +% \begin{macrocode} +\newenvironment{longtable*}% + {\let\refstepcounter\@gobble + \let\H@refstepcounter\@gobble + \let\hyper@makecurrent\@gobble + \let\Hy@raisedlink\@gobble + \let\ltcaption@ORI@LT@c@ption\LT@c@ption + \def\LT@c@ption##1[##2]##3{% + \ifx##1\@firstofone + \PackageError{ltcaption}% + {Not allowed in longtable* environment}% + {If you do not understand this error, please take a closer + look\MessageBreak at the documentation of the `ltcaption' + package.\MessageBreak \@ehc}% + \else + \ltcaption@ORI@LT@c@ption{##1}[{##2}]{##3}% + \fi}% + \longtable}% + {\endlongtable} +% \end{macrocode} +% \end{environment} +% +% \subsection{Adaption for \texorpdfstring{\KOMAScript}{KOMA Script}} +% +% \begin{macrocode} +\@ifundefined{@komalongtablefalse}{}{% + \if@komalongtable +% \end{macrocode} +% \begin{macrocode} + \renewcommand{\LT@makecaption}[3]{% + \noalign{% + \if@captionabove + \vskip\belowcaptionskip + \else + \vskip\abovecaptionskip + \fi + }% + \caption@LT@make{% + \@@makecaption{#1}{#2}{#3}% + \endgraf + \if@captionabove + \vskip\abovecaptionskip + \else + \vskip\belowcaptionskip + \fi + }% + }% +% \end{macrocode} +% \begin{macrocode} + \let\LT@@makecaption\@undefined +% \end{macrocode} +% \begin{macrocode} + \fi} +% \end{macrocode} +% +% \iffalse +%</package> +% \fi +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \Finale +% +\endinput |