From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- macros/latex/contrib/caption/CHANGELOG | 186 + macros/latex/contrib/caption/README | 84 + macros/latex/contrib/caption/SUMMARY | 1 + macros/latex/contrib/caption/bicaption.dtx | 1384 ++++++ macros/latex/contrib/caption/bicaption.pdf | Bin 0 -> 115778 bytes macros/latex/contrib/caption/caption-deu.pdf | Bin 0 -> 318839 bytes macros/latex/contrib/caption/caption-deu.tex | 4579 +++++++++++++++++++ macros/latex/contrib/caption/caption-eng.pdf | Bin 0 -> 307635 bytes macros/latex/contrib/caption/caption-eng.tex | 4235 +++++++++++++++++ macros/latex/contrib/caption/caption-rus.pdf | Bin 0 -> 718117 bytes macros/latex/contrib/caption/caption-rus.tex | 6229 ++++++++++++++++++++++++++ macros/latex/contrib/caption/caption.dtx | 4968 ++++++++++++++++++++ macros/latex/contrib/caption/caption.ins | 63 + macros/latex/contrib/caption/caption2.dtx | 1384 ++++++ macros/latex/contrib/caption/caption3.dtx | 4176 +++++++++++++++++ macros/latex/contrib/caption/cat.eps | 305 ++ macros/latex/contrib/caption/elephant.eps | 639 +++ macros/latex/contrib/caption/ltcaption.dtx | 907 ++++ macros/latex/contrib/caption/ltcaption.pdf | Bin 0 -> 89996 bytes macros/latex/contrib/caption/newfloat.dtx | 2074 +++++++++ macros/latex/contrib/caption/newfloat.pdf | Bin 0 -> 111038 bytes macros/latex/contrib/caption/subcaption.dtx | 1269 ++++++ macros/latex/contrib/caption/subcaption.pdf | Bin 0 -> 154500 bytes macros/latex/contrib/caption/totalcount.dtx | 384 ++ macros/latex/contrib/caption/totalcount.pdf | Bin 0 -> 82006 bytes 25 files changed, 32867 insertions(+) create mode 100644 macros/latex/contrib/caption/CHANGELOG create mode 100644 macros/latex/contrib/caption/README create mode 100644 macros/latex/contrib/caption/SUMMARY create mode 100644 macros/latex/contrib/caption/bicaption.dtx create mode 100644 macros/latex/contrib/caption/bicaption.pdf create mode 100644 macros/latex/contrib/caption/caption-deu.pdf create mode 100644 macros/latex/contrib/caption/caption-deu.tex create mode 100644 macros/latex/contrib/caption/caption-eng.pdf create mode 100644 macros/latex/contrib/caption/caption-eng.tex create mode 100644 macros/latex/contrib/caption/caption-rus.pdf create mode 100644 macros/latex/contrib/caption/caption-rus.tex create mode 100644 macros/latex/contrib/caption/caption.dtx create mode 100644 macros/latex/contrib/caption/caption.ins create mode 100644 macros/latex/contrib/caption/caption2.dtx create mode 100644 macros/latex/contrib/caption/caption3.dtx create mode 100644 macros/latex/contrib/caption/cat.eps create mode 100644 macros/latex/contrib/caption/elephant.eps create mode 100644 macros/latex/contrib/caption/ltcaption.dtx create mode 100644 macros/latex/contrib/caption/ltcaption.pdf create mode 100644 macros/latex/contrib/caption/newfloat.dtx create mode 100644 macros/latex/contrib/caption/newfloat.pdf create mode 100644 macros/latex/contrib/caption/subcaption.dtx create mode 100644 macros/latex/contrib/caption/subcaption.pdf create mode 100644 macros/latex/contrib/caption/totalcount.dtx create mode 100644 macros/latex/contrib/caption/totalcount.pdf (limited to 'macros/latex/contrib/caption') diff --git a/macros/latex/contrib/caption/CHANGELOG b/macros/latex/contrib/caption/CHANGELOG new file mode 100644 index 0000000000..68fb6c4a8c --- /dev/null +++ b/macros/latex/contrib/caption/CHANGELOG @@ -0,0 +1,186 @@ +Changes made in the caption package bundle +========================================== + +Please note that this document does not reflect bugfix-releases, and that the dates given are the dates of the release w/o bugfixes. + +If you are interested in a complete changelog -- including bugfixes -- process the dtx files with \RecordChanges and \PrintChanges. + + +caption package +--------------- + +v1.0 (1994/10/27) +- 1st published version + +v1.1 (1994/11/03) +- New option `centerlast' + +v1.2 (1994/11/28) +- Support of the `float' package added + +v1.3 (1995/01/09) +- Support of \captionlabelfont in subcaptions added + +v1.4 (1995/01/30) +- New option `nooneline' + +v2.0 (caption2, 1995/10/09) +- New experimental version with many new commands and features +- Support of the `longtable' package added + +v2.1 (caption2, 2002/02/26) +- Adapted to version 2.1 of the subfigure package +- New options for interaction with other packages (float,...) +- New command \normalcaptionparams +- New commands \captionof and \captionof* +- New ifs \ifcaptionlabel and \ifignoreLTcapwidth +- \realcaptionwidth renamed to \captionlinewidth + +v2.2 (caption2, 2007/04/06) +- Internal change: Uses the caption3 kernel now + +v3.0 (2003/12/20) +- Completely rewritten in cooperation with Frank Mittelbach and Steven Cochran + +v3.1 (2007/09/01) +- Improved compatibility to supported document classes and packages, but decreased compatibility to non-supported document classes and packages +- Support of the AMS & SMF document classes added +- Support of the `beamer' document class added +- Support of the `KOMA-Script' document classes added +- Support of the `floatflt' package added +- Support of the `fltpage' package added +- Support of the `picinpar' package added +- Support of the `picins' package added +- Support of the `threeparttable' package added +- Support of the `wrapfig' package added +- Support of the `xtab' package added +- Check against incompatible `ftcap' package added +- Check against incompatible `nonfloat' package added +- Check against incompatible `topcapt' package added +- Does not process global options anymore to avoid conflicts with document class options +- New option compatibility= +- New options font+=, labelfont+= & textfont+= +- New options hypcap= & hypcapspace= +- New options list= and listformat= +- New option options= +- New options figurewithin= and tablewithin= +- Starred variant of option margin*= added +- Starred variant of option style*= added +- Starred variant of option type*= added +- Font options `normal', `normalcolor', `color', `normalfont' & `stretch' added +- Default position changed from `bottom' to `auto' +- New command \DeclareFloatingEnvironment resp. \DeclareCaptionType +- New command \DeclareCaptionListFormat +- New command \captionlistentry +- Starred variant of \clearcaptionsetup added +- Optional argument added to \clearcaptionsetup +- Starred variant of \ContinuedFloat added +- \captionsetup{...} inside longtables added +- \captionsetup[singleline]{...} added +- A \label before \caption will result in warning "\label before \caption ignored" +- The counters lofdepth & lotdepth are supported now +- Label formats have three arguments now +- Optional argument added to \DeclareCaptionFormat; "format=plain" removed from single-line options of default format +- Caption label format `brace' added + +v3.2 (2011/07/30) +- Support of `beamer' document class improved +- Support of `magyar' babel option added +- Support of `sansmath' package added +- Support of `titletoc' package added to \DeclareCaptionType & \DeclareCaptionSubType +- Support of `tocbasic' package added to \DeclareCaptionType +- New options calcmargin=, calcmargin*=, calcwidth=, and calcwidth*= +- New option listtype= added +- New option parboxrestore=partial/full +- New options within= & without +- Option slc= as abbreviation of singlelinecheck= added +- Pre-defined text format `empty' added +- New command \captionbox +- New command \phantomcaption +- New command \setcaptiontype as replacement for \captionsetup{type=...} +- New command \setcaptionsubtype as replacement for \captionsetup{subtype} +- "Hyperref support is turned off because hyperref has stopped early" is not a warning anymore but an information instead + +v3.3 (2013/01/06) +- Revised handling of continued floats and sub-captions +- New option box= and appropriate command \DeclareCaptionBox +- New option list-entry= (see also endfloat package documentation) +- Support of multiple optional arguments added to \captionsetup (see bicaption package documentation) +- Adapted to the elsarticle document class +- Adapted to the current version of memhfixc package, provided by the memoir document class +- Fixed compatibility problem with breqn and nag packages +- Corrects incorrect load order hyperref-float now (needs hyperref v6.82q or newer) +- New switch \ifsinglelinecaption for usage inside own commands added + + +bicaption package +----------------- + +v0.9 (2010/09/19) +- 1st published version (see also http://www.mrunix.de/forums/showthread.php?t=68312) + +v1.0 (2011/09/03) +- Support for list entries added + +v1.1 (2012/12/26) +- \captionmainlanguage and \selectcaptionlanguage added + +v1.2 (2016/03/27) +- \DeclareLangDependantCaptionOption added + + +ltcaption package +----------------- + +v1.0 (2007/04/15) +- 1st version + +v1.1 (2007/09/01) +- Adapted to the NTG document classes (Support of \CaptionLabelFont & \CaptionTextFont added) +- Adapted to the `floatrow' package by Olga Lapko +- New macro \LTcaptype +- New environment longtable* + +v1.2 (2008/03/28) +- New skip \LTcapskip + +v1.3 (2011/09/12) +- New macro \CaptionLabelSeparator + +v1.4 (2013/06/01) +- Adapted to the memoir document class (v3.7b) + + +subcaption package +------------------ + +v1.0 (2008/03/16) +- 1st published version + +v1.1 (2011/08/17) +- New caption option subrefformat= +- New command \phantomsubcaption + +v1.2 (2018/05/13) +- Optional argument values `B' and `T' added to the environments `subfigure' and `subtable' + +v1.3 (2019/08/31) +- New command \subfloat for easy transition from the `subfig' package + + +newfloat package +---------------- + +v1.0 (2011/10/30) +- 1st published version + +v1.1 (2013/04/27) +- New command \PrepareListOf + + +totalcount package +------------------ + +v1.0 (2008/03/09) +- 1st published version + diff --git a/macros/latex/contrib/caption/README b/macros/latex/contrib/caption/README new file mode 100644 index 0000000000..baf9a932e9 --- /dev/null +++ b/macros/latex/contrib/caption/README @@ -0,0 +1,84 @@ +========================================================================== + +The `caption' package bundle +Release 2019-09-01 +Copyright (C) 1994-2019 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) + +License: LPPL = LaTeX Project Public Licence +Maintenance Status: maintained (by Axel Sommerfeldt) + +Home page: + https://gitlab.com/axelsommerfeldt/caption + +If you need help for installation please visit: + https://texfaq.org/FAQ-inst-miktexstar + https://texfaq.org/FAQ-installthings + https://texfaq.org/FAQ-privinst + +If you need help using these packages please visit: + https://latex.org/forum/ + https://tex.stackexchange.com/ + https://golatex.de/ (German) + https://texwelt.de/ (German) + +If you think you may have found a bug in these packages, +or want to report a suggestion for improvement, please either visit + https://gitlab.com/axelsommerfeldt/caption/issues (preferred) +or send an e-mail to + axel.sommerfeldt@f-m.fm + +-------------------------------------------------------------------------- + +The `caption' package v3.3 offers customization of captions of floating +environments such `figure' and `table' and cooperates with the packages + + float, floatflt, fltpage, hyperref, hypcap, listings, longtable, + picinpar, picins, rotating, sidecap, subfigure, supertabular, + threeparttable, wrapfig, and xtab. + +Furthermore the `floatrow', the `subcaption', and the `subfig' package +supports the `caption' package and uses its \captionsetup interface. + +User Manual: caption-eng.pdf (English) + caption-rus.pdf (Russian, outdated) + caption-deu.pdf (German) + +-------------------------------------------------------------------------- + +The `bicaption' package v1.2 is a tiny package supporting the typesetting +of bilingual captions. + +User Manual: bicaption.pdf (English) + +-------------------------------------------------------------------------- + +The `ltcaption' package v1.4 fixes caption problems with +other-than-center aligned longtables. (solving LaTeX PR `tools/3387') + +A bonus feature is the addition of the environment longtable* which does +not increment the table counter. + +This package will be loaded automatically by the `caption' package, +but can be used without the caption package, too. + +User Manual: ltcaption.pdf (English) + +-------------------------------------------------------------------------- + +The `subcaption' package v1.3 is a small package supporting typesetting +of sub-captions (by using the the sub-caption feature of the `caption' +package). + +User Manual: subcaption.pdf (English) + +-------------------------------------------------------------------------- + +The `newfloat' package v1.1 offers the command \DeclareFloatingEnvironment +for defining new floating environments which behave like the existing +floating environments "figure" and "table". + +User Manual: newfloat.pdf (English) + +========================================================================== +(The pictures cat.eps & elephant.eps were taken with permission from the + LaTeX Companion examples.) diff --git a/macros/latex/contrib/caption/SUMMARY b/macros/latex/contrib/caption/SUMMARY new file mode 100644 index 0000000000..3c3dbafcbd --- /dev/null +++ b/macros/latex/contrib/caption/SUMMARY @@ -0,0 +1 @@ +This LaTeX package provides many ways to customise the captions in floating environments like figure and table. diff --git a/macros/latex/contrib/caption/bicaption.dtx b/macros/latex/contrib/caption/bicaption.dtx new file mode 100644 index 0000000000..49c9d1f508 --- /dev/null +++ b/macros/latex/contrib/caption/bicaption.dtx @@ -0,0 +1,1384 @@ +% \iffalse meta-comment +% +% This is file `bicaption.dtx'. +% +% Copyright (C) 2010-2018 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +% +% -------------------------------------------------------------------------- +% +% 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, +% caption3.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, and newfloat.dtx, +% the derived files caption.sty, caption2.sty, caption3.sty, +% bicaption.sty, ltcaption.sty, subcaption.sty, and newfloat.sty, +% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. +% +% \fi +% \CheckSum{427} +% +% \iffalse +%<*driver> +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesFile{bicaption.drv}[2016/03/27 v1.2 Adds a bilingual caption feature to the caption package] +\hbadness=9999 \newcount\hbadness \hfuzz=74pt % Make TeX shut up. +%\errorcontextlines=3 +% +\documentclass[german,english]{ltxdoc} +\setlength\parindent{0pt} +\setlength\parskip{\smallskipamount} +% +\newcommand\LineBreak{\linebreak[3]} +\newcommand\PageBreak{\pagebreak[3]} +\usepackage{ifpdf} +\ifpdf + \usepackage{mathptmx,courier} + \usepackage[scaled=0.90]{helvet} + \addtolength\marginparwidth{15pt} + \ifdim\paperheight=297mm % a4paper + \renewcommand\LineBreak{\\} + \renewcommand\PageBreak{\clearpage} + \fi +\fi +% +\usepackage[T1]{fontenc} +\usepackage[german,english]{babel} +\usepackage{selinput}\SelectInputMappings{adieresis={ä},germandbls={ß}} +% +\usepackage[bottom]{footmisc} +% +\usepackage{hypdoc} +\ifpdf\usepackage{hypdestopt}\fi +\hypersetup{pdfkeywords={LaTeX, package, bicaption},pdfstartpage={},pdfstartview={}} +% +\usepackage{bicaption}[2016/03/27] +\usepackage{subcaption}[2016/02/21] +% +\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 +% +\newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}} +\newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}} +\newcommand*\version[2][]{$v#2$} +% +\usepackage{marvosym} +\makeatletter +\newcommand*\INFO{\@ifstar{\@INFO{}}{\@INFO{\vbox to \ht\strutbox}}} +\newcommand*\@INFO[1]{\MARGINSYM{#1{\LARGE\Info}}} +\makeatother +% +\usepackage[alpine]{ifsym} +\newenvironment{background}{\par\bigskip\csname background*\endcsname}{\csname endbackground*\endcsname} +\newenvironment{background*}{\small\MARGINSYM{\Mountain}\ignorespaces}{\par} +% +\newcommand*\MARGINSYM[1]{\hskip 1sp \marginpar{\raggedleft\textcolor{blue}{{#1}}}} +\newcommand*\NEW[2]{\MARGINSYM{\vskip2pt\footnotesize#1\\#2}} +% +\newenvironment{Options}[1]% + {\list{}{\renewcommand\makelabel[1]{\texttt{##1}\hfil}% + \settowidth\labelwidth{\texttt{#1\space}}% + \setlength\leftmargin{10pt}% + \addtolength\leftmargin{\labelwidth}% + \addtolength\leftmargin{\labelsep}}}% + {\endlist} +% +\begin{document} + \DocInput{bicaption.dtx} +\end{document} +% +% \fi +% +% \let\subsectionautorefname\sectionautorefname +% \let\subsubsectionautorefname\sectionautorefname +% +% \def\thispackage{the \package{bicaption} package} +% \def\Thispackage{The \package{bicaption} package} +% +% \newcommand\NEWfeature{\NEW{New feature}} +% \newcommand\NEWdescription{\NEW{New description}} +% +% \makeatletter +% \newcommand*\Ref{\@ifstar{\@Ref\ref}{\@Ref\autoref}} +% \newcommand*\@Ref[2]{#1{#2}: \textit{\nameref{#2}}} +% \makeatother +% \newcommand*\See[1]{\nopagebreak{\small (See #1)}} +% +% \GetFileInfo{bicaption.drv} +% \let\docdate\filedate +% \let\docversion\fileversion +% \GetFileInfo{bicaption.sty} +% +% \title{\texorpdfstring{\Thispackage\thanks{%^^A +% This package has version number \docversion.}}%^^A +% {The bicaption package}} +% \author{Axel Sommerfeldt\\ +% \url{https://gitlab.com/axelsommerfeldt/caption}} +% \date{\docdate} +% \maketitle +% +% \begin{abstract} +% This package supports the typesetting of bilangual captions. +% \end{abstract} +% +% \setcounter{tocdepth}{2} +% \tableofcontents +% +% \clearpage +% \section{Loading the package} +% \label{sec:loading} +% +% \DescribeMacro{\usepackage} +% This package will be loaded by +% \begin{quote} +% |\usepackage|\oarg{options}|{bicaption}|\quad. +% \end{quote} +% The options for \thispackage\ are the same ones as for the \package{caption} +% package and specify settings which are used for the second language +% \emph{additionally}. +% In fact +% \begin{quote} +% |\usepackage|\oarg{options}|{bicaption}| +% \end{quote} +% is identical to +% \begin{quote} +% |\usepackage{bicaption}|\\ +% |\captionsetup[bi-second]|\marg{options}\quad. +% \end{quote} +% +% When used with the \package{babel} or \package{polyglossia} package, the +% \package{bicaption} package should be loaded \emph{after} it, so the main +% language will be set automatically. See \autoref{sec:babel} for details. +% +% \section{Setting options} +% \label{sec:options} +% +% \DescribeMacro{\captionsetup} +% \begin{quote} +% |\captionsetup[bi]|\marg{options} +% \end{quote} +% do setup options which will be used for bilanguage captions \emph{additionally} +% to the ones which are setup for the specific floating environment. +% +% \begin{quote} +% |\captionsetup[bi-first]|\marg{options} +% \end{quote} +% do setup options which will be used for the \emph{first} heading +% of the bilanguage captions \emph{additionally} +% to the ones which are setup for the specific floating environment +% and the ones which are setup by |\captionsetup[bi]{|\ldots|}|. +% +% \begin{quote} +% |\captionsetup[bi-second]|\marg{options} +% \end{quote} +% do setup options which will be used for the \emph{second} heading +% of the bilanguage captions \emph{additionally} +% to the ones which are setup for the specific floating environment +% and the ones which are setup by |\captionsetup[bi]{|\ldots|}|. +% +% \bigskip +% +% Options specified with |\use|\-|package[|\ldots|]{bi|\-|caption}| and +% |\caption|\-|setup[bi|\ldots|]{|\ldots|}| will override the ones specified by +% |\caption|\-|setup{|\ldots|}| and |\caption|\-|setup[fig|\-|ure]{|\ldots|}| +% (same for `table'). So finally we have the following order how +% settings for bilingual captions are applied: +% \begin{enumerate} +% \item Global settings +% {\small(|\usepackage[|\ldots|]{caption}| and |\captionsetup{|\ldots|}|)} +% \item Environmental settings +% {\small(|\captionsetup[figure|\emph{ -or- }|table]{|\ldots|}|)} +% \item Local settings +% {\small(|\captionsetup{|\ldots|}| inside |figure| or |table| environment)} +% \item Custom `bi' settings +% {\small(|\captionsetup[bi]{|\ldots|}|)} +% \item Custom `bi-first' resp.~`bi-second' settings +% {\small(|\usepackage[|\ldots|]{bicaption}| and +% |\caption|\-|setup[bi-first]{|\ldots|}| +% resp.~|\caption|\-|setup[bi-second]{|\ldots|}|)} +% \end{enumerate} +% An example: +% \begin{quote} +% |\usepackage[labelsep=quad,indention=10pt]{caption}|\\ +% |\usepackage[labelfont=bf]{bicaption}|\\ +% |\captionsetup[table]{labelfont=it,position=top}| +% \end{quote} +% causes the second heading of the bilingual caption inside |table| environments +% to be typeset with the settings +% \begin{quote} +% |labelsep=quad,indention=10pt,position=top,labelfont=bf|~. +% \end{quote} +% +% \bigskip +% +% To limit |bi|, |bi-first|, or |bi-second| options to specific environments one can use +% multiple optional arguments for |\caption|\-|setup|, e.g.: +% \begin{quote} +% |\captionsetup[figure][bi-first]|\oarg{options} +% \end{quote} +% will limit the settings to the first heading of |figure| environments only. +% Please note that the environment name (|figure|, |table|, \ldots) has to be specified +% as first optional argument while the bilingual selection (|bi|, |bi-first|, or |bi-second|) +% as second one. +% +% \section{Additional options} +% \label{sec:additional-options} +% +% These options are available additional to the ones offered by the +% \package{caption} package: +% +% \begin{Options}{language=} +% \item[lang=] +% \DescribeMacro{language=} +% Sets the language of the caption, e.g. +% \begin{quote}|\use|\-|package|\-|[lang=eng|\-|lish]{bi|\-|caption}|\end{quote} +% will typeset the second caption of bilingual captions in English. +% (The language will be set with |\select|\-|caption|\-|language| internally, +% see \autoref{sec:babel} for details.) +% +% \item[bi-lang=] +% \DescribeMacro{bi-lang=} +% Causes a selection of the headings of bilingual captions. +% \begin{quote}|\captionsetup{bi-lang=both}|\end{quote} +% will cause that both caption headings are being typeset.\\ +% (This is the default.) +% \begin{quote}|\captionsetup{bi-lang=first}|\end{quote} +% will cause that only the \emph{first} heading is being typeset, and +% \begin{quote}|\captionsetup{bi-lang=second}|\end{quote} +% will cause that only the \emph{second} heading is being typeset. +% +% \item[bi-slc=] +% \DescribeMacro{bi-singlelinecheck=} +% Switches the common single-line-check |on| or |off|, i.e.~when switched on +% only a single check will be done for both captions, and the result will affect +% both captions afterwards. So if only one caption is longer than a single line, +% both captions will be treated as if they are longer than a single line, even if +% the second one isn't. (The default is |on|.) +% +% \item[bi-swap=] +% \DescribeMacro{bi-swap=} +% \begin{quote}|\captionsetup{bi-swap}|\end{quote} +% will swap the primary and secondary language, +% making the first language the second one and vice versa. (The default is |false|.) +% \end{Options} +% +% \section{The \cs{bicaption} commands} +% \label{sec:bicaption} +% +% \DescribeMacro\bicaption +% Bilingual captions will be typeset by +% \begin{quote} +% |\bicaption|\oarg{list entry \#1}\marg{heading \#1}\\ +% | |\oarg{list entry \#2}\marg{heading \#2}\\ +% |\bicaption*|\marg{heading \#1}\marg{heading \#2} +% \end{quote} +% The |\label| should be placed either after this command, or inside the first heading. +% +% \DescribeMacro\bicaptionbox +% Bilingual caption boxes will be typeset by +% \begin{quote} +% |\bicaptionbox|\oarg{list entry \#1}\marg{heading \#1}\\ +% | |\oarg{list entry \#2}\marg{heading \#2}\\ +% | |\oarg{width}\oarg{inner-pos}\marg{contents}\\ +% |\bicaptionbox*|\marg{heading \#1}\marg{heading \#2}\\ +% | |\oarg{width}\oarg{inner-pos}\marg{contents} +% \end{quote} +% The |\label| should be placed inside the first heading. +% +% \begingroup\small +% (For a description of the optional parameters \meta{width} and \meta{inner-pos} +% please take a look at the \package{caption} package documentation, +% \cs{captionbox}.) +% \endgroup +% +% \bigskip +% +% If the \package{subcaption} package is loaded, these commands are available +% additionally: +% +% \smallskip +% +% \DescribeMacro\bisubcaption +% Bilingual sub-captions will be typeset by +% \begin{quote} +% |\bisubcaption|\oarg{list entry \#1}\marg{heading \#1}\\ +% | |\oarg{list entry \#2}\marg{heading \#2}\\ +% |\bisubcaption*|\marg{heading \#1}\marg{heading \#2} +% \end{quote} +% The |\label| should be placed either after this command, or inside the first heading. +% +% \DescribeMacro\bisubcaptionbox +% Bilingual sub-caption boxes will be typeset by +% \begin{quote} +% |\bisubcaptionbox|\oarg{list entry \#1}\marg{heading \#1}\\ +% | |\oarg{list entry \#2}\marg{heading \#2}\\ +% | |\oarg{width}\oarg{inner-pos}\marg{contents}\\ +% |\bisubcaptionbox*|\marg{heading \#1}\marg{heading \#2}\\ +% | |\oarg{width}\oarg{inner-pos}\marg{contents} +% \end{quote} +% The |\label| should be placed inside the first heading. +% +% \begingroup\small +% (For a description of the optional parameters \meta{width} and \meta{inner-pos} +% please take a look at the \package{subcaption} package documentation, +% \cs{subcaptionbox}.) +% \endgroup +% +% \PageBreak +% \section{A sample document} +% \label{sec:example} +% +% \begin{quote} +% |\documentclass[english,ngerman]{article}|\\ +% |\usepackage{selinput}|\\ +% |\SelectInputMappings{adieresis={ä},germandbls={ß}}|\\ +% ||\\ +% |\usepackage{babel}|\\ +% |\usepackage[lang=english,font=it]{bicaption}|\\ +% \iffalse +% |\usepackage[format=hang,list=on]{subcaption}|\\ +% \else +% |\usepackage[format=hang]{subcaption}|\\ +% \fi +% ||\\ +% |\begin{document}|\\ +% ||\\ +% \iffalse +% |\listoffigures|\\ +% ||\\ +% \fi +% |\begin{figure}[!htb]|\\ +% | \centering|\\ +% | \bisubcaptionbox|\\ +% | {Teilabbildung A\label{fig:test:A}}|\\ +% | {Subfigure A}[0.4\textwidth]{IMAGE}%|\\ +% | \qquad|\\ +% | \bisubcaptionbox|\\ +% | {Teilabbildung langer Titel B\label{fig:test:B}}|\\ +% | {Subfigure long title B}[0.4\textwidth]{IMAGE}%|\\ +% | \bicaption{Deutscher Titel}{English Title}|\\ +% | \label{fig:test}|\\ +% |\end{figure}|\\ +% ||\\ +% \iffalse +% |\captionsetup{bi-lang=2nd}|\\ +% ||\\ +% |\begin{figure}[!htb]|\\ +% | \centering|\\ +% | \bisubcaptionbox|\\ +% | {Teilabbildung A\label{fig:test2:A}}|\\ +% | {Subfigure A}[0.4\textwidth]{IMAGE}%|\\ +% | \qquad|\\ +% | \bisubcaptionbox|\\ +% | {Teilabbildung langer Titel B\label{fig:test2:B}}|\\ +% | {Subfigure long title B}[0.4\textwidth]{IMAGE}%|\\ +% | \bicaption{Deutscher Titel}{English Title}|\\ +% | \label{fig:test2}|\\ +% |\end{figure}|\\ +% ||\\ +% \fi +% |\captionsetup{bi-lang=both}|\\ +% ||\\ +% |\begin{figure}[!htb]|\\ +% | \centering|\\ +% | \bisubcaptionbox[A]|\\ +% | {Und eine gaaaanz lange Caption: Teilabbildung A}|\\ +% | {Subfigure A}[0.4\textwidth]{IMAGE}%|\\ +% | \qquad|\\ +% | \bisubcaptionbox[B]|\\ +% | {Teilabbildung B}|\\ +% | {Subfigure B}[0.4\textwidth]{IMAGE}%|\\ +% | \bicaption[Abbildungsverzeichnistitel]|\\ +% | {Und eine noch viel viel viel|\\ +% | längere deutsche Beschriftung: Deutscher Titel}|\\ +% | {Short English heading}|\\ +% |\end{figure}|\\ +% ||\\ +% |\captionsetup{bi-slc=0}|\\ +% ||\\ +% |\begin{figure}[!htb]|\\ +% | \centering|\\ +% | \bisubcaptionbox[A]|\\ +% | {Und eine gaaaanz lange Caption: Teilabbildung A}|\\ +% | {Subfigure A}[0.4\textwidth]{IMAGE}%|\\ +% | \qquad|\\ +% | \bisubcaptionbox[B]|\\ +% | {Teilabbildung B}|\\ +% | {Subfigure B}[0.4\textwidth]{IMAGE}%|\\ +% | \bicaption[Abbildungsverzeichnistitel]|\\ +% | {Und eine noch viel viel viel|\\ +% | längere deutsche Beschriftung: Deutscher Titel}|\\ +% | {Short English heading}|\\ +% |\end{figure}|\\ +% ||\\ +% |\captionsetup{slc=0}|\\ +% ||\\ +% |\begin{figure}[!htb]|\\ +% | \centering|\\ +% | \bisubcaptionbox[A]|\\ +% | {Und eine gaaaanz lange Caption: Teilabbildung A}|\\ +% | {Subfigure A}[0.4\textwidth]{IMAGE}%|\\ +% | \qquad|\\ +% | \bisubcaptionbox[B]|\\ +% | {Teilabbildung B}|\\ +% | {Subfigure B}[0.4\textwidth]{IMAGE}%|\\ +% | \bicaption[Abbildungsverzeichnistitel]|\\ +% | {Und eine noch viel viel viel|\\ +% | längere deutsche Beschriftung: Deutscher Titel}|\\ +% | {Short English heading}|\\ +% |\end{figure}|\\ +% ||\\ +% |\end{document}| +% \end{quote} +% +% \PageBreak +% \captionsetup[bi-first]{lang=german} +% \captionsetup[bi-second]{lang=english,font=it} +% \captionsetup[sub]{format=hang,list=on} +% +% \iffalse +% \listoffigures +% \bigskip +% \fi +% +% \begin{figure}[!htb] +% \centering +% \bisubcaptionbox +% {Teilabbildung A\label{fig:test:A}} +% {Subfigure A}[0.4\textwidth]{IMAGE}% +% \qquad +% \bisubcaptionbox +% {Teilabbildung langer Titel B\label{fig:test:B}} +% {Subfigure long title B}[0.4\textwidth]{IMAGE}% +% \bicaption{Deutscher Titel}{English Title} +% \label{fig:test} +% \end{figure} +% +% \iffalse +% \captionsetup{bi-lang=2nd} +% +% \begin{figure}[!htb] +% \centering +% \bisubcaptionbox +% {Teilabbildung A\label{fig:test2:A}} +% {Subfigure A}[0.4\textwidth]{IMAGE}% +% \qquad +% \bisubcaptionbox +% {Teilabbildung langer Titel B\label{fig:test2:B}} +% {Subfigure long title B}[0.4\textwidth]{IMAGE}% +% \bicaption{Deutscher Titel}{English Title} +% \label{fig:test2} +% \end{figure} +% \fi +% +% \captionsetup{bi-lang=both} +% +% \begin{figure}[!htb] +% \centering +% \bisubcaptionbox[A] +% {Und eine gaaaanz lange Caption: Teilabbildung A} +% {Subfigure A}[0.4\textwidth]{IMAGE}% +% \qquad +% \bisubcaptionbox[B] +% {Teilabbildung B} +% {Subfigure B}[0.4\textwidth]{IMAGE}% +% \bicaption[Abbildungsverzeichnistitel] +% {Und eine noch viel viel viel +% längere deutsche Beschriftung: Deutscher Titel} +% {Short English heading} +% \end{figure} +% +% \captionsetup{bi-slc=0} +% +% \begin{figure}[!htb] +% \centering +% \bisubcaptionbox[A] +% {Und eine gaaaanz lange Caption: Teilabbildung A} +% {Subfigure A}[0.4\textwidth]{IMAGE}% +% \qquad +% \bisubcaptionbox[B] +% {Teilabbildung B} +% {Subfigure B}[0.4\textwidth]{IMAGE}% +% \bicaption[Abbildungsverzeichnistitel] +% {Und eine noch viel viel viel +% längere deutsche Beschriftung: Deutscher Titel} +% {Short English heading} +% \end{figure} +% +% \captionsetup{slc=0} +% +% \begin{figure}[!htb] +% \centering +% \bisubcaptionbox[A] +% {Und eine gaaaanz lange Caption: Teilabbildung A} +% {Subfigure A}[0.4\textwidth]{IMAGE}% +% \qquad +% \bisubcaptionbox[B] +% {Teilabbildung B} +% {Subfigure B}[0.4\textwidth]{IMAGE}% +% \bicaption[Abbildungsverzeichnistitel] +% {Und eine noch viel viel viel +% längere deutsche Beschriftung: Deutscher Titel} +% {Short English heading} +% \end{figure} +% +% \PageBreak +% \section{Customising lists} +% \label{sec:lists} +% +% \DescribeMacro{list=} +% As default both caption texts will be insert into the List of Figures resp. List of Tables. +% To suppress the second entry just pass the option |list=off| to the \package{bicaption} +% package, e.g.: +% \begin{quote} +% |\usepackage[lang=english,|\ldots|,list=off]{bicaption}| +% \end{quote} +% +% \pagebreak[3] +% \DescribeMacro{listtype+=} +% Another option is separating the lists. For that purpose the option +% \begin{quote} +% |listtype+=|\meta{list type extension} +% \end{quote} +% can be used to tell the \package{bicaption} package to use a different list +% for the second caption text. +% The given value will be appended to the current environment type; +% for example with |listtype+=X| the list entries will be put into the list +% responsible for the types +% |figureX| ($=$ |figure| $+$ |X|), |tableX| ($=$ |table| $+$ |X|) etc. +% +% Such a \meta{list type} can be defined using |\Declare|\-|Floating|\-|Environment| +% offered by the \package{newfloat} package, but some document classes +% or other packages offer macros for defining new floating environment types +% (and their corresponding lists) as well. +% +% A sample document: +% \begin{quote} +% |\documentclass[a4paper]{article}|\\ +% ||\\ +% |% Use "ngerman" as 1st language, "english" as 2nd one|\\ +% |\usepackage[english,ngerman]{babel}|\\ +% ||\\ +% |% Load the bicaption package with 2nd language set to|\\ +% |% "english", and list type "figureEng" resp. "tableEng"|\\ +% |\usepackage[lang=english,listtype+=Eng]{bicaption}|\\ +% ||\\ +% |\usepackage{newfloat}|\\ +% |% Define the new floating environment type "figureEng"|\\ +% |\DeclareFloatingEnvironment[fileext=lof2]{figureEng}|\\ +% | [Figure][List of Figures]|\\ +% |% Define the new floating environment type "tableEng"|\\ +% |\DeclareFloatingEnvironment[fileext=lot2]{tableEng}|\\ +% | [Table][List of Tables]|\\ +% ||\\ +% |\begin{document}|\\ +% |\listoffigures % typeset "Abbildungsverzeichnis"|\\ +% |\listoffigureEnges % typeset "List of Figures"|\\ +% ||\\ +% |\begin{figure}|\\ +% | \centering|\\ +% | A placeholder for an image or whatever|\\ +% | \bicaption{Deutscher Text}{English text}|\\ +% |\end{figure}|\\ +% ||\\ +% |\end{document}| +% \end{quote} +% +% \pagebreak[3] +% A different approach is using one list for both languages, but with different formatting. +% Since the \package{caption} package does not offer options and commands for +% customising the format of the lists, one need an additional package for this purpose, +% for example the \package{titletoc} package: +% +% \begin{quote} +% |\documentclass[a4paper]{article}|\\ +% ||\\ +% |% Use "ngerman" as 1st language, "english" as 2nd one|\\ +% |\usepackage[english,ngerman]{babel}|\\ +% ||\\ +% |% Load the bicaption package with 2nd language set to|\\ +% |% "english", and list type "figure2" resp. "table2"|\\ +% |\usepackage[lang=english,listtype+=2]{bicaption}|\\ +% ||\\ +% |% We load the titletoc package for customizing lists|\\ +% |% Note: Loading titletoc should be done prior|\\ +% |% defining additional floating environments with|\\ +% |% \DeclareFloatingEnvironment|\\ +% |\usepackage{titletoc}|\\ +% ||\\ +% |\usepackage{newfloat}|\\ +% |% Define the new floating environment type "figure2"|\\ +% |% Use the same file extension as for "figure" (.lof) here|\\ +% |\DeclareFloatingEnvironment[fileext=lof]{figure2}|\\ +% |% Define the new floating environment type "table2"|\\ +% |% Use the same file extension as for "table" (.lot) here|\\ +% |\DeclareFloatingEnvironment[fileext=lot]{table2}|\\ +% ||\\ +% |% We use the titletoc package for customizing "figure2"|\\ +% |% which is appropriate for the second language captions|\\ +% \iffalse +% |\contentsuse{figure2}{lof}|\\ +% \fi +% |\titlecontents{figure2}[3.8em]|\\ +% | {} % no above code|\\ +% | {} % empty numbered entry format|\\ +% | {} % empty numberless entry format|\\ +% | {} % empty filler page format|\\ +% ||\\ +% |\begin{document}|\\ +% |\renewcommand\listfigurename|\\ +% | {Abbildungsverzeichnis / List of Figures}|\\ +% |\listoffigures|\\ +% ||\\ +% |\begin{figure}|\\ +% | \centering|\\ +% | A placeholder for an image or whatever|\\ +% | \bicaption{Deutscher Text}{English text}|\\ +% |\end{figure}|\\ +% ||\\ +% |\end{document}| +% \end{quote} +% +% \section{Language Selection} +% \label{sec:babel} +% +% For language selection \thispackage\ uses two macros internally: +% +% \medskip +% +% \DescribeMacro\captionmainlanguage +% |\caption|\-|main|\-|lan|\-|guage| contains the main language, e.g. |english| or |german|. +% If not set prior to loading \thispackage, \thispackage\ will try to obtain this setting from +% the \package{babel} or \package{polyglossia} package. +% +% So if you are using either \package{babel} or \package{polyglossia}, and want to adopt +% the main language setting from it, then just load \thispackage\ \emph{after} it, +% and simply forget about the |\caption|\-|main|\-|lan|\-|guage| stuff. +% +% Otherwise one can either define |\caption|\-|main|\-|lan|\-|guage| prior to +% loading \thispackage, e.g.: +% \begin{quote} +% |\newcommand\captionmainlanguage{french}|\\ +% |\usepackage|\oarg{options}|{bicaption}| +% \end{quote} +% Or one can specify the main language via |\caption|\-|setup| after loading \thispackage, e.g.: +% \begin{quote} +% |\usepackage|\oarg{options}|{bicaption}|\\ +% |\captionsetup[bi-first]{lang=french}| +% \end{quote} +% When not using the \package{babel} or \package{polyglossia} package both approaches +% will have exactly the same effect. +% But when using the \package{babel} or \package{polyglossia} package, and one want to +% specify the main caption language manually, the first approach is preferable since +% defining |\caption|\-|main|\-|lan|\-|guage| will suppress the automatic detection mechanism. +% +% \medskip +% +% \DescribeMacro\selectcaptionlanguage +% \NEWfeature{v1.1} +% |\select|\-|caption|\-|lan|\-|guage| will be used internally to select the language: +% \begin{quote} +% |\selectcaptionlanguage|\marg{font-or-list-entry}\marg{language} +% \end{quote} +% For setting the language of the caption \meta{font-or-list-entry} will be |\@first|\-|of|\-|two|, +% for setting the language of the list entry \meta{font-or-list-entry} will be +% |\@second|\-|of|\-|two|.~\footnote{\cs{@firstoftwo} and \cs{@secondoftwo} are defined +% in the \LaTeX\ kernel and simply pick either the 1st or 2nd argument.} +% It defaults to |\select@lan|\-|guage| (caption) resp.~|\select|\-|lan|\-|guage| (list entry) +% offered by the \package{babel} and \package{polyglossia} package: +% \begin{quote} +% |\providecommand*\selectcaptionlanguage[2]{%|\\ +% | #1{\select@language}{\selectlanguage}{#2}}| +% \end{quote} +% If you need to alter this, just either define |\select|\-|caption|\-|lan|\-|guage| prior +% loading \thispackage, or redefine it afterwards. +% +% \medskip +% +% \DescribeMacro\DeclareCaptionLangOption +% \NEWfeature{v1.2} +% For internal implementation reasons the selection of language will be done delayed, +% i.e.~not done immediately at |lang=|\meta{language}. So if you do +% \begin{quote} +% |\captionsetup[bi-second]{lang=ngerman,labelsep=quad}| +% \end{quote} +% the language |ngerman| will only be stored internally, and the label separator will +% be set to |quad| afterwards. Some time later, right before the caption is actually +% typeset, the language will be set to |ngerman|. +% +% Usually this is no problem, but think of options which will be overwritten by the +% language selection, or options which act on the language currently set, for example +% \begin{quote} +% |\captionsetup[bi-second]{lang=ngerman,name=Bild}|\quad. +% \end{quote} +% |lang=ngerman| changes the environment name to ``Abbildung'', and |name=Bild| +% changes the environment name to ``Bild''. One would expect that the name is +% finally ``Bild'', but because of the delayed nature of |lang=ngerman| it will +% be ``Abbildung'' instead, at least if we don't take action about this. +% +% For that reason the command +% \begin{quote} +% |\DeclareCaptionLangOption|\marg{caption option name} +% \end{quote} +% is offered. Options handled this way will be applied twice if used after the |lang=| +% option, when the option is actually used, and right after the language is selected. +% +% \begin{quote} +% |\DeclareCaptionLangOption{name}| +% \end{quote} +% will be done by \thispackage\ automatically, since the environment name will usually +% be overwritten by a language selection. So actually +% \begin{quote} +% |\captionsetup[bi-second]{lang=ngerman,name=Bild}| +% \end{quote} +% will give the expected result, i.e. the environment name is typeset as ``Bild''. +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \StopEventually{%^^A +% } +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \DoNotIndex{\\,\_,\ ,\@@par} +% \DoNotIndex{\@bsphack} +% \DoNotIndex{\@car,\@cdr,\@classoptionslist,\@cons,\@currext,\@currname} +% \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@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{v0.1}{2010/07/13}{Initial version} +% \changes{v0.2}{2010/07/13}{Check for caption package added} +% \changes{v0.3}{2010/07/13}{Usage of \cs{caption@applyfont} added} +% \changes{v0.4}{2010/07/13}{``Singlelinecheck'' fixed} +% \changes{v0.5}{2010/07/13}{Options \opt{bi-first} and \opt{bi-second} added} +% \changes{v0.6}{2010/07/13}{Option \opt{bi-slc} added} +% \changes{v0.7}{2010/07/13}{Option \opt{bi-lang} added} +% \changes{v0.8}{2010/09/04}{Adapted to current version of the caption kernel} +% \changes{v0.9}{2010/09/17}{Option \opt{bi-swap} added} +% \changes{v0.9a}{2011/07/13}{Warning regarding \package{babel} package added} +% +% \newcommand*\Note[2][Note]{\par{\small\emph{#1:} #2}} +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \clearpage +% \section{The implementation} +% \iffalse +%<*package> +% \fi +% +% \subsection{Identification} +% +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{bicaption}[2016/03/27 v1.2 Bilingual Captions (AR)] +% \end{macrocode} +% \begin{macrocode} +\RequirePackage{caption}[2018/05/11] % needs v3.4 or newer +% \end{macrocode} +% \changes{v1.0}{2011/09/01}{Compatibility error added} +% \begin{macrocode} +\caption@AtBeginDocument{\caption@ifcompatibility{% + \caption@Error{% + The `bicaption' package does not work correctly\MessageBreak + in compatibility mode}}{}} +% \end{macrocode} +% +% \bigskip +% +% \pagebreak[3] +% \subsection{Initial code} +% +% \begin{macro}{\bicaption@Info} +% |\bicaption@Info|\marg{message} +% \begin{macrocode} +\newcommand*\bicaption@Info[1]{% + \PackageInfo{bicaption}{#1}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\bicaption@InfoNoLine} +% |\bicaption@InfoNoLine|\marg{message}\par +% \Note{The \cs{@gobble} at the end of the 2nd argument of +% \cs{PackageInfo} suppresses the line number info. +% See TLC2\cite{TLC2}, A.4.7, p885 for details.} +% \begin{macrocode} +\newcommand*\bicaption@InfoNoLine[1]{% + \PackageInfo{bicaption}{#1\@gobble}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bicaption@Warning} +% |\bicaption@Warning|\marg{message} +% \begin{macrocode} +\newcommand*\bicaption@Warning[1]{% + \bicaption@WarningNoLine{#1\on@line}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\bicaption@WarningNoLine} +% |\bicaption@WarningNoLine|\marg{message} +% \begin{macrocode} +\newcommand*\bicaption@WarningNoLine[1]{% + \PackageWarning{bicaption}{#1.^^J\bicaption@wh\@gobbletwo}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\bicaption@wh{% + See the bicaption package documentation for explanation.} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bicaption@Error} +% |\bicaption@Error|\marg{message} +% \begin{macrocode} +\newcommand*\bicaption@Error[1]{% + \PackageError{bicaption}{#1}\bicaption@eh} +%\let\bicaption@KV@err\bicaption@Error +% \end{macrocode} +% \begin{macrocode} +\newcommand*\bicaption@eh{% + If you do not understand this error, please take a closer look\MessageBreak + at the documentation of the `bicaption' package.\MessageBreak\@ehc} +% \end{macrocode} +% \end{macro} +% +% \pagebreak[3] +% \subsection{Declaration of options} +% +% The option |bi-lang| will setup which language(s) will actually be typeset, +% the first one, the second one, or both of them. +% \begin{macrocode} +\newcount\bicaption@lang +\DeclareCaptionOption{bi-lang}{% + \caption@ifinlist{#1}{0,all,both}{% + \bicaption@lang=0\relax + }{\caption@ifinlist{#1}{1,1st,first}{% + \bicaption@lang=1\relax + }{\caption@ifinlist{#1}{2,2nd,second}{% + \bicaption@lang=2\relax + }{% + \bicaption@Error{Undefined bi-lang value `#1'}% + }}}} +% \end{macrocode} +% +% The option |bi-singlelinecheck| will setup if a single check will be used +% for both languages (|=on|), +% or if both languages will be checked individually (|=off|). +% \begin{macrocode} +\DeclareCaptionOption{bi-singlelinecheck}[1]{% + \caption@set@bool\bicaption@ifslc{#1}} +\DeclareCaptionOption{bi-slc}[1]{% + \caption@set@bool\bicaption@ifslc{#1}} +% \end{macrocode} +% +% The option |bi-swap| will swap the primary and secondary language, +% making the first language the second one and vice versa. +% \begin{macrocode} +\DeclareCaptionOption{bi-swap}[1]{% + \caption@set@bool\bicaption@ifswap{#1}} +% \end{macrocode} +% +% The option |lang=|\meta{language} will setup the language of the caption. +% We can't set the language immediately because otherwise we will get in trouble, e.g. when +% using the \package{microtype} package via |\usepackage[babel]{microtype}|. +% So we store the selected language to |\bicaption@language| instead and will set it later on. +% But this has a drawback, option settings which will be overwritten by the selection of +% the language do not work correctly anymore. Therefore we will save specific options +% and set them (again) after setting the language. +% \begin{macrocode} +\DeclareCaptionOption{lang}{% + \caption@ifundefined\bicaption@language + \bicaption@language@setupkeys + \relax + \def\bicaption@language{#1}% + \let\bicaption@language@setoptions\@empty} +% \end{macrocode} +% Map |language=| to |lang=|. +% \begin{macrocode} +\let\KV@caption@language\KV@caption@lang +% \end{macrocode} +% +% \begin{macro}{\DeclareCaptionLangOption} +% \changes{v1.2}{2016/03/27}{This macro added} +% |\DeclareCaptionLangOption|\marg{option key}\par +% Saves the gives \meta{option key} to the list |\bicaption@language@keylist|. +% These options will be stored and set (again) after setting the language. +% \begin{macrocode} +\newcommand*\bicaption@language@keylist{} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\DeclareCaptionLangOption[1]{% + \@ifundefined{KV@caption@#1}% + {\bicaption@Error{Undefined caption option `#1'}}% + {\@cons\bicaption@language@keylist{{#1}}}} +% \end{macrocode} +% \begin{macrocode} +\let\DeclareCaptionLanguageOption\DeclareCaptionLangOption +% \end{macrocode} +% \begin{macrocode} +\newcommand*\bicaption@language@setupkeys{% + \def\@elt##1{% + \expandafter\let\csname KV@bicaption@##1\expandafter\endcsname + \csname KV@caption@##1\endcsname + \@namedef{KV@caption@##1}{\bicaption@KV{##1}}}% + \bicaption@language@keylist + \let\@elt\relax} +% \end{macrocode} +% \begin{macrocode} +\newcommand\bicaption@KV[2]{% + \@bicaption@KV{#1}{#2}% + \l@addto@macro\bicaption@language@setoptions{% + \@bicaption@KV{#1}{#2}}} +% \end{macrocode} +% \begin{macrocode} +\newcommand\@bicaption@KV[1]{% + \@nameuse{KV@bicaption@#1}} +% \end{macrocode} +% \end{macro} +% +% The only option affected I'm aware off is the |name=| option, so this will be saved +% and set later on. +% \begin{macrocode} +\DeclareCaptionLangOption{name} +% \end{macrocode} +% +% \begin{macro}{\bicaption@selectlanguage} +% \changes{v1.0}{2011/08/31}{Starred variant added} +% \changes{v1.1}{2012/04/09}{Support of \cs{selectcaptionlanguage} added} +% \changes{v1.1}{2016/03/25}{Patching of \cs{caption@applyfont} replaced by \cs{caption@beginhook}} +% \changes{v1.1}{2016/03/27}{Usage of \cs{bicaption@language@setoptions} added} +% |\bicaption@selectlanguage|\marg{font-or-list-entry}\par +% Set the language (stored in |\bi|\-|caption@lan|\-|guage|) +% via |\select|\-|bi|\-|caption|\-|lan|\-|guage|. +% \begin{macrocode} +\newcommand*\bicaption@selectlanguage[1]{% + \caption@ifundefined\bicaption@language{}{% + \expandafter\selectcaptionlanguage\expandafter#1\expandafter + {\bicaption@language}% + \bicaption@language@setoptions}} +% \end{macrocode} +% |\caption@beginhook| (of the \package{caption} package kernel) will be extended here +% so the language setting will actually take effect. +% \begin{macrocode} +\g@addto@macro\caption@beginhook{% + \bicaption@selectlanguage\@firstoftwo} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\selectcaptionlanguage} +% |\selectcaptionlanguage|\marg{font-or-list-entry}\marg{language} +% will finally be used to set up the language. +% \begin{macrocode} +\providecommand*\selectcaptionlanguage[1]{% + #1\select@language\selectlanguage} +% \end{macrocode} +% \end{macro} +% +% \pagebreak[3] +% \subsection{Execution of options} +% +% Setup default values for |bi-lang| and |bi-singlelinecheck|. +% \begin{macrocode} +\caption@ExecuteOptions{caption}{bi-lang=0,bi-slc=1,bi-swap=0} +% \end{macrocode} +% +% Set the language for the first caption. +% \begin{macrocode} +\ifcsname captionmainlanguage\endcsname + \bicaption@InfoNoLine{% + main language is set to \captionmainlanguage} +\else\ifcsname bbl@main@language\endcsname + \bicaption@InfoNoLine{% + babel found, main language is \bbl@main@language} + \let\captionmainlanguage\bbl@main@language +\else\ifcsname xpg@main@language\endcsname + \bicaption@InfoNoLine{% + polyglossia found, main language is \xpg@main@language} + \let\captionmainlanguage\xpg@main@language +\else + \bicaption@InfoNoLine{main language is not set} +\fi\fi\fi +% \end{macrocode} +% \begin{macrocode} +\ifcsname captionmainlanguage\endcsname + \edef\@tempa{% + \noexpand\captionsetup[bi-first]{lang=\captionmainlanguage}} + \@tempa +\fi +% \end{macrocode} +% We use |\caption@Process|\-|Options| here to add the options to the `|bi-second|' option +% list instead of executing them immediately. +% \begin{macrocode} +\caption@SetupOptions{bicaption}{\captionsetup[bi-second]{#2}}% +\caption@ProcessOptions*{bicaption} +% \end{macrocode} +% +% \pagebreak[3] +% \subsection{Main code} +% +% \begin{macro}{\caption@addcontentsline} +% \changes{v1.0}{2011/08/31}{Redefinition of \cs{caption@kernel@addcontentsline} added} +% \changes{v1.0b}{2012/01/15}{\cs{caption@kernel@addcontentsline} changed to \cs{caption@addcontentsline}} +% \changes{v1.1}{2016/02/01}{Adaption to \package{longtable} package added} +% We patch |\caption@add|\-|contents|\-|line| (of the \package{caption} package kernel) +% so |bi|\-|caption@add|\-|contents|\-|line| will be used for bilingual captions instead. +% \begin{macrocode} +\let\bicaption@addcontentsline@ORI\caption@addcontentsline +\renewcommand*\caption@addcontentsline[2]{% +% \end{macrocode} +% \begin{macrocode} + \bicaption@LT@setup + \global\let\bicaption@LT@setup\relax +% \end{macrocode} +% \begin{macrocode} + \caption@ifundefined\bicaption@lentry + {\bicaption@addcontentsline@ORI{#1}{#2}}% + {\expandafter\bicaption@addcontentsline\expandafter + {\bicaption@lentry}{#1}{#2}% + \global\let\bicaption@lentry\@undefined}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bicaption@addcontentsline} +% \changes{v1.0}{2011/08/31}{This macro added} +% \changes{v1.1}{2013/03/10}{Bugfix: Delayed usage of \cs{caption@addsubcontentslines} added} +% |\bicaption@addcontentsline|\marg{list entry \#2}\marg{type}\marg{list entry \#1}\par +% Typeset both captions using the original version of |\caption@add|\-|contents|\-|line|. +% \begin{macrocode} +\newcommand\bicaption@addcontentsline[3]{% + \begingroup + \let\caption@addsubcontentslines\@gobble +% \end{macrocode} +% Execute the options setup with |\captionsetup[bi]{|\ldots|}|. +% \begin{macrocode} + \caption@setoptions{bi}% +% \end{macrocode} +% Do the first list entry, if requested. +% \begin{macrocode} + \ifnum\bicaption@lang=2\relax \else + \begingroup + \caption@setoptions{bi-first}% + \bicaption@@addcontentsline{#2}{#3}% + \endgroup + \fi +% \end{macrocode} +% Do the second list entry, if requested. +% \begin{macrocode} + \ifnum\bicaption@lang=1\relax \else + \begingroup + \caption@setoptions{bi-second}% + \bicaption@@addcontentsline{#2}{#1}% + \endgroup + \fi +% \end{macrocode} +% \begin{macrocode} + \endgroup + \caption@addsubcontentslines{#2}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\bicaption@@addcontentsline[2]{% + \caption@ifcontentsline{#2}{% + \bicaption@selectlanguage\@secondoftwo + \bicaption@addcontentsline@ORI{#1}{#2}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@@make} +% We redefine |\caption@@make| (of the \package{caption} package kernel) +% so |\bi|\-|caption@@make| will be used for bilingual captions instead. +% \begin{macrocode} +\renewcommand\caption@@make[2]{% + \caption@ifundefined\bicaption@text + {\begingroup + \caption@@make@{#1}{#2}% + \endgroup}% + {\expandafter\bicaption@@make\expandafter + {\bicaption@text}{#1}{#2}% + \global\let\bicaption@text\@undefined}% +% \end{macrocode} +% \begin{macrocode} + \caption@@make@epilogue} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bicaption@@make} +% \changes{v1.1}{2015/09/16}{\cs{bicaption@label} replaced by \cs{caption@thelabel}} +% |\bicaption@@make|\marg{text \#2}\marg{label}\marg{text \#1}\par +% Typeset both captions using the original version of \cs{caption@@make}. +% \begin{macrocode} +\newcommand\bicaption@@make[3]{% +% \end{macrocode} +% Execute the options setup with |\captionsetup[bi]{|\ldots|}|. +% \begin{macrocode} + \caption@setoptions{bi}% +% \end{macrocode} +% Perform the common single-line-check for both captions, if requested. +% \begin{macrocode} + \ifnum\bicaption@lang=0\relax + \bicaption@ifslc + {\caption@slc{#2}{#3}{}{\KV@caption@singlelinecheck0}% + \caption@slc{#2}{#1}{}{\KV@caption@singlelinecheck0}}% + {}% + \fi +% \end{macrocode} +% Typeset the first caption, if requested. +% (Otherwise we only apply the label of it.) +% \begin{macrocode} + \ifnum\bicaption@lang=2\relax + \caption@thelabel + \global\let\caption@thelabel\relax + \else + \begingroup + \caption@setoptions{bi-first}% + \caption@@make@{#2}{#3}% + \endgroup + \fi +% \end{macrocode} +% Typeset the second caption, if requested. +% \begin{macrocode} + \ifnum\bicaption@lang=1\relax + \else + \begingroup + \caption@setoptions{bi-second}% + \caption@@make@{#2}{#1}% + \endgroup + \fi +} +% \end{macrocode} +% \end{macro} +% +% \pagebreak[3] +% \subsubsection{The \cs{bicaption} commands} +% +% \begin{macro}{\bicaption} +% |\bicaption*|\oarg{list entry \#1}\marg{text \#1}\oarg{list entry \#2}\marg{text \#2} +% \begin{macrocode} +\newcommand\bicaption{\@bicaption\caption} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bicaptionbox} +% \changes{v1.0}{2011/08/31}{This macro added} +% |\bicaptionbox*|\oarg{entry \#1}\marg{text \#1}\oarg{entry \#2}\marg{text \#2}% +% \oarg{\ldots}\marg{\ldots} +% \begin{macrocode} +\newcommand\bicaptionbox{\@bicaption\captionbox} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bisubcaption} +% |\bisubcaption*|\oarg{list entry \#1}\marg{text \#1}\oarg{list entry \#2}\marg{text \#2} +% \begin{macrocode} +\newcommand\bisubcaption{\@bicaption\subcaption} +\let\subbicaption\bisubcaption +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bisubcaptionbox} +% |\bisubcaptionbox*|\oarg{entry \#1}\marg{text \#1}\oarg{entry \#2}\marg{text \#2}% +% \oarg{\ldots}\marg{\ldots} +% \begin{macrocode} +\newcommand\bisubcaptionbox{\@bicaption\subcaptionbox} +\let\subbicaptionbox\bisubcaptionbox +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@bicaption} +% \changes{v1.0}{2011/08/31}{Optional parameter \meta{list entry \#2} added} +% \changes{v1.1}{2015/09/16}{\cs{bicaption@getlabel} replaced by \cs{caption@getlabel}} +% |\@bicaption|\marg{cmd}*\oarg{entry \#1}\marg{text \#1}\oarg{entry \#2}\marg{text \#2}\ldots +% \begin{macrocode} +\newcommand*\@bicaption[1]{% + \@ifstar + {\def\bicaption@cmd{\bicaption@star{#1}}% + \@@bicaption}% + {\def\bicaption@cmd{#1}% + \caption@dblarg\@@@bicaption}} +% \end{macrocode} +% \begin{macrocode} +\newcommand\@@bicaption[1]{% + \@@@@bicaption{}{#1}[]} +% \end{macrocode} +% \begin{macrocode} +\long\def\@@@bicaption[#1]#2{% + \caption@dblarg{\@@@@bicaption{#1}{#2}}} +% \end{macrocode} +% \begin{macrocode} +\long\def\@@@@bicaption#1#2[#3]#4{% + \caption@getlabel#2\label{}\@nil + \bicaption@ifswap + {\bicaption@setup{#1}{#2}% + \bicaption@cmd[{#3}]{#4}}% + {\bicaption@setup{#3}{#4}% + \bicaption@cmd[{#1}]{#2}}} +% \end{macrocode} +% \begin{macrocode} +\long\def\bicaption@star#1[#2]{#1*} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\LT@bicaption} +% \changes{v1.1}{2016/01/31}{Adaption to \package{longtable} package added} +% Same as |\@bicaption| but for |longtable| (offered by the \package{longtable} package). +% |\bicaption@LTsetup| will be executed later on, inside |\LT@makecaption| offered by the \package{caption} package. +% \begin{macrocode} +\newcommand\LT@bicaption{% + \noalign\bgroup + \@ifstar + {\gdef\bicaption@cmd{\LT@c@ption\@gobble}% + \LT@@bicaption}% + {\gdef\bicaption@cmd{\LT@c@ption\@firstofone}% + \caption@dblarg\LT@@@bicaption}} +\newcommand\LT@@bicaption[1]{% + \LT@@@@bicaption{}{#1}[]} +% \end{macrocode} +% \begin{macrocode} +\long\def\LT@@@bicaption[#1]#2{% + \caption@dblarg{\LT@@@@bicaption{#1}{#2}}} +% \end{macrocode} +% \begin{macrocode} +\long\def\LT@@@@bicaption#1#2[#3]#4{% + \gdef\bicaption@LTsetup{% + \caption@getlabel#2\label{}\@nil + \bicaption@LT@setup}% + \gdef\bicaption@LT@setup{% + \bicaption@ifswap + {\bicaption@setup{#1}{#2}}% + {\bicaption@setup{#3}{#4}}}% + \bicaption@ifswap + {\egroup\bicaption@cmd[{#3}]{#4}}% + {\egroup\bicaption@cmd[{#1}]{#2}}} +% \end{macrocode} +% \begin{macrocode} +\let\bicaption@LTsetup\relax +\let\bicaption@LT@setup\relax +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@LT@setup} +% \changes{v1.1}{2016/01/31}{Adaption to \package{longtable} package added} +% Execute the stuff defined by \cs{LT@bicaption} to prepare the typesetting +% of the \package{longtable} bilingual caption. +% \begin{macrocode} +\g@addto@macro\caption@LT@setup{% + \bicaption@LTsetup + \global\let\bicaption@LTsetup\relax} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bicaption@setup} +% |\bicaption@setup|\marg{list-entry}\marg{text}\par +% Initiates the bilingual caption typesetting by storing the extra texts into +% |\bi|\-|caption@l|\-|entry| and |\bi|\-|caption@text|. +% \begin{macrocode} +\newcommand\bicaption@setup[2]{% + \def\bicaption@lentry{#1}% + \def\bicaption@text{\ignorespaces#2}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@freeze} +% \changes{v1.0}{2011/08/31}{Redefinition of \cs{caption@freeze} added} +% To make |\bicaption| work inside |SCfigure| and |FPfigure| environments we need to add +% |\bi|\-|caption| to |\caption@freeze|. +% \begin{macrocode} +\AtBeginDocument{% + \ifx\caption@freeze\@undefined \else + \g@addto@macro\caption@freeze{% + \let\caption@frozen@bicaption\bicaption + \def\bicaption{% + \caption@withoptargs\caption@SC@bicaption}% + \long\def\caption@SC@bicaption#1#2{% + \@ifnextchar[%] + {\caption@SC@bi@caption{#1}{#2}}% + {\caption@SC@bi@caption@{#1}{#2}}}% + \long\def\caption@SC@bi@caption#1#2[#3]#4{% + \caption@@freeze{\bicaption#1{#2}[{#3}]{#4}}% + \ignorespaces}% + \long\def\caption@SC@bi@caption@#1#2#3{% + \caption@@freeze{\bicaption#1{#2}{#3}}% + \ignorespaces}% + \l@addto@macro\caption@warmup{% + \let\bicaption\caption@frozen@bicaption}}% + \fi} +% \end{macrocode} +% \end{macro} +% +% \changes{v1.1}{2013/05/02}{Definition of \cs{bicaption@listof} removed} +% +% \begin{thebibliography}{9} +% \bibitem{TLC2} +% Frank Mittelbach and Michel Goossens:\\ +% \newblock {\em The {\LaTeX} Companion (2nd.~Ed.)}, +% \newblock Addison-Wesley, 2004. +% \end{thebibliography} +% +% \iffalse +% +% \fi +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \Finale +% +\endinput + diff --git a/macros/latex/contrib/caption/bicaption.pdf b/macros/latex/contrib/caption/bicaption.pdf new file mode 100644 index 0000000000..577c124eac Binary files /dev/null and b/macros/latex/contrib/caption/bicaption.pdf differ diff --git a/macros/latex/contrib/caption/caption-deu.pdf b/macros/latex/contrib/caption/caption-deu.pdf new file mode 100644 index 0000000000..7697a2f35c Binary files /dev/null and b/macros/latex/contrib/caption/caption-deu.pdf differ diff --git a/macros/latex/contrib/caption/caption-deu.tex b/macros/latex/contrib/caption/caption-deu.tex new file mode 100644 index 0000000000..420b823878 --- /dev/null +++ b/macros/latex/contrib/caption/caption-deu.tex @@ -0,0 +1,4579 @@ +% +% This is file `caption-deu.tex'. +% +% $Id$ +% $HeadURL$ +% +% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +% +% -------------------------------------------------------------------------- +% +% 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, +% caption3.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, and newfloat.dtx, +% the derived files caption.sty, caption2.sty, caption3.sty, +% bicaption.sty, ltcaption.sty, subcaption.sty, and newfloat.sty, +% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. +% +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesFile{caption-deu.tex}[2011/11/02 v3.2 Das caption-Paket] +\hbadness=9999 \newcount\hbadness \hfuzz=20pt % Make TeX shut up. +%\errorcontextlines=3 + +\RequirePackage{fix-cm} +\documentclass[german]{ltxdoc} +\setlength\parindent{0pt} +\setlength\parskip{\smallskipamount} +\setlength\leftmargini{2em}% default = 2.5em +\makeatletter\g@addto@macro\MacroFont{\normalcolor}\makeatother + +\newcommand\LineBreak{\linebreak[3]} +\newcommand\PageBreak{\pagebreak[3]} +\usepackage{ifpdf} +\ifpdf + \usepackage{mathptmx,courier} + \usepackage[scaled=0.90]{helvet} + \addtolength\marginparwidth{15pt} + \ifdim\paperheight=297mm % a4paper + \renewcommand\LineBreak{\\} + \renewcommand\PageBreak{\clearpage} + \fi +\fi + +\usepackage[T1]{fontenc} +\usepackage[german]{babel} +%\selectlanguage{german} +%\input dehyphtex.tex +\usepackage{selinput}\SelectInputMappings{adieresis={ä},germandbls={ß}} + +\usepackage[bottom]{footmisc} +\usepackage{graphicx,longtable,setspace} + +\usepackage{hypdoc} +\ifpdf\usepackage{hypdestopt}\fi +\hypersetup{pdfkeywords={LaTeX, package, caption},pdfstartpage={},pdfstartview={}} +\hypersetup{breaklinks=true} + +\usepackage[listof=0,hypcap=false]{caption}[2008/04/01] + +\DeclareRobustCommand*\eTeX{\texorpdfstring + {\leavevmode\hbox{$\varepsilon$}-\TeX}% + {e-TeX}} +\DeclareRobustCommand*\AmS{\texorpdfstring + {{\protect\usefont{OMS}{cmsy}{m}{n}A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}% + {AMS}} +\DeclareRobustCommand*\KOMAScript{\texorpdfstring + {\textsf{K\kern.05em O\kern.05em M\kern.05em A\kern.1em-\kern.1em Script}}% + {KOMA-Script}} +\DeclareRobustCommand*\NTG{NTG} +\DeclareRobustCommand*\SmF{SMF} + +\usepackage{marvosym} +\makeatletter +\newcommand*\INFO{\@ifstar{\@INFO{}}{\@INFO{\vbox to \ht\strutbox}}} +\newcommand*\@INFO[1]{\MARGINSYM{#1{\LARGE\Info}}} +\makeatother + +\newcommand*\MARGINSYM[1]{\hskip 1sp \marginpar{\raggedleft\textcolor{blue}{{#1}}}} +\newcommand*\NEW[2]{}%\hskip 1sp \marginpar{\footnotesize\sffamily\raggedleft#1\\#2}} + +% \ContinuedFloat +\DeclareCaptionLabelFormat{continued1}{#1~#2 (Fortsetzung)} +\DeclareCaptionLabelFormat{continued2}{#1~#2\alph{ContinuedFloat}} +% \DeclareCaptionLabelFormat +\DeclareCaptionLabelFormat{bf-parens}{(\textbf{#2})} +% \DeclareCaptionStyle +\DeclareCaptionStyle{mystyle}[margin=5mm,justification=centering]% + {font=footnotesize,labelfont=sc,margin={10mm,0mm}} +% Example 1 +\DeclareCaptionFormat{myformat1}{#1#2\\#3} +\newlength\myindention +\DeclareCaptionFormat{myformat2}{#1#2\\\hspace*\myindention#3} +\DeclareCaptionOption{myindention}{\setlength\myindention{#1}} +% Example 2 +\DeclareCaptionFormat{reverse}{#3#2#1} +\DeclareCaptionLabelFormat{fullparens}{(\bothIfFirst{#1}{~}#2)} +\DeclareCaptionLabelSeparator{fill}{\hfill} +% Example 3 +\DeclareCaptionFormat{llap}{\llap{#1#2}#3\par} +\DeclareCaptionFormat{llapx}{\llap{\makebox[2.5cm][l]{#1}}#3\par} +% Example 4 +\DeclareCaptionLabelFormat{andtable}{#1~#2 \& \tablename~\thetable} + +\newcommand*\purerm[1]{{\upshape\mdseries\rmfamily #1}} +\newcommand*\puresf[1]{{\upshape\mdseries\sffamily #1}} +\newcommand*\purett[1]{{\upshape\mdseries\ttfamily #1}} +\let\class\puresf \let\package\puresf + +\newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}} +\newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}} +\newcommand*\version[2][]{$v#2$} +\newcommand*\x{\discretionary{}{}{}} + +\newenvironment{Annotation}% + {\ifvmode\else\unskip\par\fi\pagebreak[2]% + \smallskip + \small(\ignorespaces}{\unskip)\par} +\newenvironment{Annotation*}% + {\ifvmode\else\unskip\par\fi\pagebreak[2]% + \small(\ignorespaces}{\unskip)\par} + +\newenvironment{Example}% + {\ifvmode\else\unskip\par\fi\pagebreak[2]% + \minipage{\linewidth}\smallskip}% + {\smallskip\endminipage\par} + +\makeatletter +\newcommand\example{\@ifstar + {\@example{belowskip=\abovecaptionskip}}% + {\@example{}}} +\def\@example#1{% + \@testopt{\@@example{#1}}{figure}} +\long\def\@@example#1[#2]#3#4{% + \begingroup + \captionsetup{#1,size=small,margin={\leftmargini,10pt},#3}% + \captionof{#2}[]{#4}% + \endgroup} +\makeatother + +\newenvironment{Expert}% + {\ifvmode\else\unskip\par\fi\pagebreak[3]% + \smallskip + \footnotesize\ignorespaces}{\par} +\newenvironment{Expert*}% + {\ifvmode\else\unskip\par\fi\pagebreak[3]% + \footnotesize\ignorespaces}{\par} + +\newenvironment{Note}[1][\DefaultNoteText]% + {\ifvmode\else\unskip\par\fi + \smallskip + \small\emph{#1:}~\ignorespaces}{\par} +\newenvironment{Note*}[1][\DefaultNoteText]% + {\ifvmode\else\unskip\par\fi + \small\emph{#1:}~\ignorespaces}{\par} + +\newenvironment{Options}[1]% + {\list{}{\renewcommand\makelabel[1]{\texttt{##1}\hfil}% + \settowidth\labelwidth{\texttt{#1\space}}% + \setlength\leftmargin{10pt}% + \addtolength\leftmargin{\labelwidth}% + \addtolength\leftmargin{\labelsep}}}% + {\endlist} + +\makeatletter +\newcommand*\Ref{\@ifstar{\@Ref\ref}{\@Ref\autoref}} +\newcommand*\@Ref[2]{#1{#2}: \textit{\nameref{#2}}} +\newcommand*\SEE[3][]{\nopagebreak{#1(#2 #3)}} +\newcommand*\SeeUserDefined[1][]{\See{\Ref{declare}#1}} +\makeatother + +\begin{document} +\let\subsectionautorefname\sectionautorefname +\let\subsubsectionautorefname\sectionautorefname + +\def\thispackage{das \package{caption}"=Paket} +\def\Thispackage{Das \package{caption}"=Paket} + +\newcommand*\DefaultNoteText{Hinweis} +\newcommand*\NEWfeature{\NEW{Neues Feature}} +\newcommand*\NEWdescription{\NEW{Neue Beschreibung}} +\makeatletter +\newcommand*\See{\@ifstar{\SEE{Siehe}}{\SEE[\small]{Siehe}}} +\newcommand*\see{\@ifstar{\SEE{siehe}}{\SEE[\small]{siehe}}} +\makeatother + +% --------------------------------------------------------------------------- % + +\GetFileInfo{caption-deu.tex} +\let\docdate\filedate +\GetFileInfo{caption.sty} + +\title{Anpassen der Abbildungs- und Tabellenbeschriftungen} +\author{Axel Sommerfeldt\\ + \url{https://gitlab.com/axelsommerfeldt/caption}} +\date{\docdate} +\maketitle + +% --------------------------------------------------------------------------- % + +\begin{abstract} +\Thispackage\ bietet einem Mittel und Wege, das Erscheinungsbild der Bild- +und Tabellenbeschriftungen den eigenen Wünschen bzw.\ Vorgaben anzupassen. +Hierbei wurde Wert auf die reibungslose Zusammenarbeit mit zahlreichen +Dokumentenklassen und Paketen gelegt. +\iffalse +\par\smallskip +\textit{Bitte beachten Sie:} Viele Dokumentenklassen bieten bereits +Optionen und Befehle, um das Erscheinungsbild der Abbildungs- und +Tabellenbeschriftungen individuell anzupassen. +Wenn diese Möglichkeiten für Sie ausreichend sind, gibt es in der Regel +keinen Grund, \thispackage\ zu benutzen. Und falls Sie lediglich an dem +Befehl |\caption|\-|of| interessiert sind, ist in der Regel das Laden des +kleinen aber feinen \package{capt-of}"=Paketes hierzu völlig ausreichend. +\fi +\end{abstract} + +\newcommand\exampletext{% + Die auf die Rotationsfrequenz des Innenzylinders normierten Eigenfrequenzen + der gefundenen Grundmoden der Taylor"=Str"omung f"ur \mbox{$\eta = 0.5$}. %\\ + (Die azimutale Wellenzahl ist mit $m$ bezeichnet.)} + +% --------------------------------------------------------------------------- % + +\section*{Einleitung} + +Mit |\caption| gesetzte Bildunterschriften und Tabellenüberschriften werden +von den Standard"=Dokumentenklassen eher stiefmütterlich behandelt. +In der Regel schlicht als ganz normaler Absatz gesetzt, ergibt sich keine +signifikante optische Abgrenzung vom eigentlichen Text, wie z.B. hier: + +\example*{size=normalsize,margin=0pt}{\exampletext} + +Es sollte aber eine Möglichkeit geben, diesem Umstand abzuhelfen. Es wäre +zum Beispiel nett, wenn man den Text der Unterschrift etwas kleiner gestalten, +extra Ränder festlegen oder den Zeichensatz des Bezeichners dem der +Kapitelüberschriften anpassen könnte. So in etwa: + +\example*{size=small,margin=10pt,labelfont=bf,labelsep=endash}{\exampletext} + +Mit Hilfe dieses Paketes können Sie dies leicht bewerkstelligen; es sind viele +vorgegebene Parameter einstellbar, Sie können aber auch eigene +Gestaltungsmerkmale einfließen lassen. + +\bigskip + +\INFO\begin{minipage}[t]{\textwidth} +\small +Bitte beachten Sie, daß \thispackage\ nur das Aussehen der Beschriftungen +kontrolliert. Es kontrolliert \emph{nicht} den Ort der Beschriftung; +dieser kann aber mit anderen Paketen wie etwa dem +\package{floatrow}"=Paket\cite{floatrow} variiert werden. +\end{minipage} + +% --------------------------------------------------------------------------- % + +\clearpage +\tableofcontents + +% --------------------------------------------------------------------------- % + +\clearpage +\section{Verwendung des Paketes} +\label{usage} + +\DescribeMacro{\usepackage} +Durch +\begin{quote} + |\usepackage|\oarg{Optionen}|{caption}[|\texttt{\filedate}|]| +\end{quote} +in dem Vorspann des Dokumentes wird das \thispackage\ Paket eingebunden, die +Optionen legen hierbei das Aussehen der Ãœber- und Unterschriften fest. So +würde z.B. +\begin{quote} + |\usepackage[margin=10pt,font=small,labelfont=bf,|\\ + | labelsep=endash]{caption}|% + %|[|\texttt{\filedate}|]| +\end{quote} +zu dem obrigen Ergebnis mit Rand, kleinerem Zeichensatz und fetter Bezeichnung +führen. + +\DescribeMacro{\captionsetup} +Eine Änderung der Parameter ist auch zu einem späteren Zeitpunkt jederzeit +mit dem Befehl +\begin{quote} + |\captionsetup|\oarg{Typ}\marg{Optionen} +\end{quote} +möglich. So sind z.B. die Befehlssequenzen +\begin{quote} + |\usepackage[margin=10pt,font=small,labelfont=bf]{caption}| +\end{quote} +und +\begin{quote} + |\usepackage{caption}|\\ + |\captionsetup{margin=10pt,font=small,labelfont=bf}| +\end{quote} +in ihrer Wirkung identisch. + +Es ist zu beachten, daß sich die Verwendung von |\caption|\-|setup| +innerhalb von Umgebungen nur auf die Umgebung selber auswirkt, nicht aber auf +den Rest des Dokumentes. +Möchte man also z.B. die automatische Zentrierung der Abbildungsunterschrift +nur in einem konkreten Falle ausschalten, so kann dies mit +\begin{quote} + |\begin{figure}|\\ + | |\ldots\\ + | \captionsetup{singlelinecheck=off}|\\ + | \caption{|\ldots|}|\\ + |\end{figure}| +\end{quote} +geschehen, ohne daß die restlichen Abbildungsunterschriften hiervon +beeinträchtigt werden. + +\begin{Annotation} +Der optionale Parameter \meta{Typ} von |\caption|\-|setup| wird in +\Ref{captionsetup} behandelt. +\end{Annotation} + +% --------------------------------------------------------------------------- % + +\clearpage +\section{Optionen} +\label{options} + +\def\OptionLabel{RaggedRight} +\def\UserDefined{\ldots} + +% --------------------------------------------------------------------------- % + +\subsection{Formatierung} +\label{formats} + +\DescribeMacro{format=} +Eine Abbildungs- oder Tabellenbeschriftung besteht im wesentlichen aus drei +Teilen: Dem Bezeichner (etwa "`Abbildung 3"'), dem Trenner +(etwa "`:\textvisiblespace"') und dem eigentlichen Text. + +Mit der Option +\begin{quote} + |format=|\meta{Name} +\end{quote} +wird festgelegt, wie diese drei Teile zusammengesetzt werden. + +Für \meta{Name} sind folgende Möglichkeiten verfügbar:%~\footnote{Es gibt +%hier wie auch bei vielen anderen Optionen die Möglichkeit, auch eigene +%Formate, Zeichensätze etc.\ zu definieren. Wie dies geht wird in Abschnitt +%\Ref{declare} dargelegt.} + +\begin{Options}{\OptionLabel} + \item[plain]%\NEWdescription{v3.0h} + Die Beschriftung wird als gewöhnlicher Absatz gesetzt. + + \item[hang] + Der Text wird so gesetzt, daß er an dem Bezeichner "`hängt"', d.h.~der + Platz unter dem Bezeichner und dem Trenner bleibt leer. + + \item[\UserDefined] + Eigene Formate können mit |\Declare|\-|Caption|\-|Format| definiert werden. + \SeeUserDefined +\end{Options} + +\begin{Example} + Ein Beispiel: Die Angabe der Option + \begin{quote} + |format=hang| + \end{quote} + führt zu Abbildungsunterschriften der Art + \example{format=hang}{\exampletext} +\end{Example} + +\pagebreak[3] +\DescribeMacro{indention=} +Bei beiden Formaten (\texttt{plain} und \texttt{hang}) kann der Einzug der +Beschriftung ab der zweiten Textzeile angepasst werden, dies geschieht mit +\begin{quote} + |indention=|\meta{Einzug}\quad, +\end{quote} +wobei anstelle von \meta{Einzug} jedes beliebige feste Maß angegeben werden +kann. + +Zwei Beispiele: + +\begin{Example} + \begin{quote} + |format=plain,indention=.5cm| + \end{quote} + \captionsetup{skip=0pt} + \example{format=plain,indention=.5cm}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |format=hang,indention=-0.5cm| + \end{quote} + \captionsetup{skip=0pt} + \example{format=hang,indention=-0.5cm}{\exampletext} +\end{Example} + +\bigskip + +\pagebreak[3] +\DescribeMacro{labelformat=} +Mit der Option +\nopagebreak[3] +\begin{quote} + |labelformat=|\meta{Name} +\end{quote} +\nopagebreak[3] +%\NEWdescription{v3.0e} +wird die Zusammensetzung des Bezeichners festgelegt. +Für \meta{Name} sind folgende Möglichkeiten verfügbar: + +\begin{Options}{\OptionLabel} + \item[default] + Der Bezeichner wird wie von der verwendeten Dokumentenklasse vorgegeben gesetzt, + üblicherweise ist dies der Name und die Nummer, getrennt durch ein Leerzeichen + (wie \texttt{simple}). + (Dies ist das Standardverhalten.) + + \item[empty] + Der Bezeichner ist leer. +\iffalse + (Diese Option macht in der Regel nur in Verbindung mit + anderen Optionen -- wie etwa \texttt{labelsep=none} -- Sinn.) +\fi + + \item[simple] + Der Bezeichner ist aus dem Namen und der Nummer zusammengesetzt. + + \item[brace]\NEWfeature{v3.1f} + Der Bezeichner wird mit einer einzelnen (rechten) Klammer abgeschlossen. + + \item[parens] + Die Nummer des Bezeichners wird in runde Klammern gesetzt. + + \item[\UserDefined] + Eigene Formate können mit |\Declare|\-|Caption|\-|Label|\-|Format| + definiert werden. + \SeeUserDefined +\end{Options} + +\begin{Example} + Ein Beispiel: Die Optionen + \begin{quote} + |format=plain,labelformat=parens,labelsep=quad| + \end{quote} + führen zu Abbildungsunterschriften der Art + \example{format=plain,labelformat=parens,labelsep=quad}{\exampletext} +\end{Example} + +\medskip + +\begin{Note*} +Manche Umgebungen, wie z.B.~die vom \package{algorithm2e}"=Paket angebotende +|al|\-|go|\-|rithm|"=Umgebung, reagieren allergisch auf eine Änderung des +Bezeichnerformats. +\end{Note*} + +\bigskip + +\pagebreak[3] +\DescribeMacro{labelsep=} +Mit der Option +\begin{quote} + |labelsep=|\meta{Name} +\end{quote} +wird die Zusammensetzung des Trenners festgelegt.\footnote{% + Wenn der Bezeichner oder der Text der Beschriftung leer ist, + wird kein Trenner verwendet.} +Für \meta{Name} sind folgende Möglichkeiten verfügbar: + +\begin{Options}{\OptionLabel} + \item[none] + Der Trenner ist leer. +\iffalse + (Diese Option macht in der Regel nur in Verbindung + mit anderen Optionen -- wie etwa \texttt{labelformat=empty} -- Sinn.) +\fi + + \item[colon] + Der Trenner besteht aus einem Doppelpunkt und einem Leerzeichen. + + \item[period] + Der Trenner besteht aus einem Punkt und einem Leerzeichen. + + \item[space] + Der Trenner besteht lediglich aus einem einzelnen Leerzeichen. + + \item[quad] + Der Trenner besteht aus einem |\quad|. + + \item[newline] + Als Trenner wird ein Zeilenumbruch (|\\|) verwendet. + Bitte beachten Sie, daß dieser Trenner nicht mit allen Formaten + (z.B.~|format=|\x|hang|) zusammenarbeitet; ggf. erhalten Sie + deswegen eine Fehlermeldung. + + \item[endash]\NEWfeature{v3.0h} + Als Trenner wird ein Gedankenstrich (\verb*| -- |) verwendet. + + \item[\UserDefined] + Eigene Trenner können mit |\Declare|\-|Caption|\-|Label|\-|Sep|\-|a|\-|ra|\-|tor| + definiert werden. + \SeeUserDefined +\end{Options} + +Drei Beispiele: +\begin{Example} + \begin{quote} + |format=plain,labelsep=period| + \end{quote} + \captionsetup{skip=0pt} + \example{format=plain,labelsep=period}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |format=plain,labelsep=newline,singlelinecheck=false| + \end{quote} + \captionsetup{skip=0pt} + \example{format=plain,labelsep=newline,singlelinecheck=false}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |format=plain,labelsep=endash| + \end{quote} + \captionsetup{skip=0pt} + \example{format=plain,labelsep=endash}{\exampletext} +\end{Example} + +\bigskip + +\pagebreak[3] +\DescribeMacro{textformat=}\NEWfeature{v3.0l} +Mit der Option +\nopagebreak[3] +\begin{quote} + |textformat=|\meta{Name} +\end{quote} +\nopagebreak[3] +wird das Format des eigentlichen Textes festgelegt. +Für \meta{Name} sind folgende Möglichkeiten verfügbar: + +\begin{Options}{\OptionLabel} + \item[empty] + Es wird kein Text ausgegeben. + + \item[simple] + Der Text wird nicht verändert. + + \item[period] + Dem Text wird ein Punkt angehängt. + + \item[\UserDefined] + Eigene Textformate können mit |\Declare|\-|Caption|\-|Text|\-|Format| + definiert werden. + \SeeUserDefined +\end{Options} + +% --------------------------------------------------------------------------- % + +\PageBreak +\subsection{Textausrichtung} +\label{justification} + +\DescribeMacro{justification=} +Mit der Option +\begin{quote} + |justification=|\meta{Name} +\end{quote} +wird die Ausrichtung des Textes festgelegt. +Für \meta{Name} sind folgende Möglichkeiten verfügbar: + +\begin{Options}{\OptionLabel} + \item[justified] + Der Text wird als Blocksatz gesetzt. + + \item[centering] + Der Text wird zentriert gesetzt. + +% \item[Centering] +% Der Text wird zentriert gesetzt. Hierfür wird jedoch im Gegensatz +% zu \texttt{centering} der Befehl |\Centering| des \package{ragged2e}-Paketes +% verwendet, der \LaTeX\ das Trennen der Worte erlaubt. + + \item[centerlast] + Lediglich die letzte Zeile des Absatzes wird zentriert gesetzt. + + \item[centerfirst] + Lediglich die erste Zeile des Textes wird zentriert gesetzt. + + \item[raggedright] + Der Text wird linksbündig gesetzt. + +\iffalse + \item[RaggedRight] + Der Text wird linksbündig mit Hilfe des \package{ragged2e}-Paketes gesetzt. +\else + \item[RaggedRight] + Der Text wird ebenfalls linksbündig gesetzt. + Hierfür wird jedoch im Gegensatz zur Option |raggedright| der Befehl + |\RaggedRight| des \package{ragged2e}-Paketes verwendet, + der \LaTeX\ das Trennen der Worte erlaubt.\footnote{% + Ob das \package{ragged2e}"=Paket benötigt wird oder nicht, + wird zur Laufzeit ermittelt, d.h.~ggf.~ist ein weiterer \LaTeX"=Lauf + erforderlich, wenn diese Option erstmalig eingesetzt wird.} +\fi + + \item[raggedleft] + Der Text wird rechtsbündig gesetzt. + +% \item[RaggedLeft] +% Der Text wird rechtsbündig mit Hilfe des \package{ragged2e}-Paketes gesetzt. + +%\showhyphens{justification} + \item[\UserDefined] + Eigene Ausrichtungen können mit |\Declare|\-|Caption|\-|Jus|\-|ti|\-|fi|\-|ca|\-|tion| + definiert werden. + \SeeUserDefined +\end{Options} + +Drei Beispiele: +\begin{Example} + \begin{quote} + |format=plain,justification=centerlast| + \end{quote} + \captionsetup{skip=0pt} + \example{format=plain,justification=centerlast}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |format=hang,justification=raggedright| + \end{quote} + \captionsetup{skip=0pt} + \example{format=hang,justification=raggedright}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |format=plain,labelsep=newline,justification=centering| + \end{quote} + \captionsetup{skip=0pt} + \example*{format=plain,labelsep=newline,justification=centering}{\exampletext} +\end{Example} + +\smallskip + +\PageBreak +\DescribeMacro{singlelinecheck=} +In den Standard"=Dokumentenklassen von \LaTeX\ (\class{article}, +\class{report} und \class{book}) sind die Ab\-bildungs- und +Tabellenbeschriftungen so realisiert, daß sie automatisch zentriert werden, +wenn sie lediglich aus einer einzigen Textzeile bestehen: + +\example*{}{Eine kurze Beschriftung.} + +\INFO +Diesen Mechanismus übernimmt \thispackage\ und ignoriert damit +in der Regel bei solch kurzen Beschriftungen die mit den Optionen +|justification=| und |indention=| eingestellte Textausrichtung. +Dieses Verhalten kann jedoch mit der Option +\begin{quote} + |singlelinecheck=|\meta{bool} +\end{quote} +reguliert werden. +Setzt man für \meta{bool} entweder |false|, |no|, |off| oder |0| ein, +so wird der automatische Zentrierungsmechnismus außer Kraft gesetzt. +Die obrige, kurze Abbildungsunterschrift würde z.B.~nach Angabe der Option +\begin{quote} + |singlelinecheck=false| +\end{quote} +so aussehen: + +\begingroup + \captionsetup{type=figure} + \ContinuedFloat + \example*{singlelinecheck=false}{Eine kurze Beschriftung.} +\endgroup + +Setzt man für \meta{bool} hingegen |true|, |yes|, |on| oder |1| ein, so +wird die automatische Zentrierung wieder eingeschaltet. (Standardmäßig +ist sie eingeschaltet.) + +% --------------------------------------------------------------------------- % + +\subsection{Zeichensätze} +\label{fonts} + +\DescribeMacro{font=} +\DescribeMacro{labelfont=} +\DescribeMacro{textfont=} +\Thispackage\ kennt drei Zeichensätze: Denjenigen für die gesammte +Beschriftung (|font|), denjenigen, der lediglich auf den Bezeichner und den +Trenner angewandt wird (|label|\-|font|), sowie denjenigen, der lediglich auf +den Text wirkt (|text|\-|font|). +So lassen sich die unterschiedlichen Teile der Beschriftung individuell mit +\begin{quote}\begin{tabular}{@{}r@{}ll} + |font=| & \marg{Zeichensatzoptionen} & ,\\ + |labelfont=| & \marg{Zeichensatzoptionen} & und\\ + |textfont=| & \marg{Zeichensatzoptionen} & \\ +\end{tabular}\end{quote} +\nopagebreak[3] +anpassen. +\pagebreak[3] + +Als \meta{Zeichensatzoptionen} sind Kombinationen aus folgenden (durch Komma +getrennte) Optionen möglich: + +\begin{Options}{stretch=\meta{amount}} + \item[scriptsize] {\scriptsize Sehr kleine Schrift} + \item[footnotesize] {\footnotesize Fußnotengröße} + \item[small] {\small Kleine Schrift} + \item[normalsize] {\normalsize Normalgroße Schrift} + \item[large] {\large Große Schrift} + \item[Large] {\Large Größere Schrift} +\end{Options} +\vspace{0pt}\pagebreak[3] +\begin{Options}{stretch=\meta{amount}} + \item[normalfont] {\normalfont Normale Schriftart \& -serie \& -familie} + + \item[up] {\upshape Upright Schriftart} + \item[it] {\itshape Italic Schriftart} + \item[sl] {\slshape Slanted Schriftart} + \item[sc] {\scshape Small Caps Schriftart} + + \item[md] {\mdseries Medium Schriftserie} + \item[bf] {\bfseries Bold Schriftserie} + + \item[rm] {\rmfamily Roman Schriftfamilie} + \item[sf] {\sffamily Sans Serif Schriftfamilie} + \item[tt] {\ttfamily Typewriter Schriftfamilie} +\end{Options} +\vspace{0pt}\pagebreak[3] +\begin{Options}{stretch=\meta{amount}} + \item[singlespacing] Einfacher Zeilenabstand \See{\Ref{setspace}} + \item[onehalfspacing] Eineinhalbfacher Zeilenabstand \See{\Ref{setspace}} + \item[doublespacing] Doppelter Zeilenabstand \See{\Ref{setspace}} + \item[stretch=\meta{amount}] |\setstretch|\marg{amount} \See{\Ref{setspace}} +\end{Options} +\vspace{0pt}\pagebreak[3] +\begin{Options}{stretch=\meta{amount}} + \item[normalcolor] |\normalcolor| + \item[color=\meta{colour}] |\color|\marg{colour} + {\small(Sofern das \package{color}- oder das \package{xcolor}"=Paket + geladen ist; für ein Beispiel siehe \Ref{declare})} +\end{Options} +\vspace{0pt}\pagebreak[3] +\begin{Options}{stretch=\meta{amount}} + \item[normal] Die Kombination aus den Optionen |normal|\-|color|, + |normal|\-|font|, |normal|\-|size| und |single|\-|spacing| + + \item[\UserDefined] + Eigene Zeichensatzoptionen können mit |\Declare|\-|Caption|\-|Font| + definiert werden. + \SeeUserDefined +\end{Options} + +Wird lediglich eine einzelne Zeichensatzoption ausgewählt, können die +geschweiften Klammern entfallen, d.h.~die Optionen +%\begin{quote} + |font={small}| +%\end{quote} +und +%\begin{quote} + |font=small| +%\end{quote} +sind identisch. + +Drei Beispiele: +\begin{Example} + \begin{quote} + |font=it,labelfont=bf| + \end{quote} + \captionsetup{skip=0pt} + \example{font=it,labelfont=bf}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |labelfont=bf,textfont=it| + \end{quote} + \captionsetup{skip=0pt} + \example{labelfont=bf,textfont=it}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |font={small,stretch=0.80}| + \end{quote} + \captionsetup{skip=0pt} + \example{font={small,stretch=0.80}}{\exampletext} +\end{Example} + +\medskip + +\pagebreak[3] +\DescribeMacro{font+=} +\DescribeMacro{labelfont+=} +\DescribeMacro{textfont+=} +\NEWfeature{v3.1f} +Es ist auch möglich, Zeichensatzoptionen zu den bisher ausgewählten +hinzuzufügen, so ist zum Beispiel +\begin{quote} + |\captionsetup{font=small}|\\ + |\captionsetup{font+=it}| +\end{quote} +mit +\begin{quote} + |\captionsetup{font={small,it}}| +\end{quote} +\nopagebreak[3] +identisch. +\pagebreak[3] + +% --------------------------------------------------------------------------- % + +\subsection{Ränder und Absätze} +\label{margins} + +\DescribeMacro{margin=} +\DescribeMacro{width=} +Für die Abbildungs- und Tabellenbeschriftungen kann \emph{entweder} ein extra +Rand \emph{oder} eine feste Breite festgelegt werden:~\footnote{Nur feste Maße +sind hier gestattet. Suchen Sie nach einem Weg, die Breite automatisch auf die +Breite der Abbildung oder Tabelle zu begrenzen, schauen Sie sich bitte das +\package{floatrow}\cite{floatrow} oder +\package{threeparttable}"=Paket\cite{threeparttable} an.} +\begin{quote}\begin{tabular}{@{}r@{}ll} + |margin=| & \meta{Rand} & \emph{-- oder --}\\ + |margin=| & |{|\meta{Linker Rand}|,|\meta{Rechter Rand}|}| & \emph{-- oder --}\\ + |width=| & \meta{Breite} & \\ +\end{tabular}\end{quote} +\NEWfeature{v3.1} +Wird nur ein Wert für den Rand angegeben, so wird er für beide Ränder +(links und rechts) verwendet, so ist z.B.~|margin=|\x|10pt| identisch mit +|margin=|\x|{10pt,10pt}|. +In zweiseitigen Dokumenten wird der linke und rechte Rand auf geraden Seiten +vertauscht. +\DescribeMacro{oneside} +\DescribeMacro{twoside} +Dies kann jedoch mit der zusätzlichen Option |oneside| abgeschaltet werden, +z.B.~|\caption|\-|setup{margin=|\x|{0pt,10pt},|\x|oneside}|.\par +Wird hingegen eine \meta{Breite} angegeben, wird die Beschriftung zentriert, +d.h.~der linke und rechte Rand sind in diesem Falle immer gleich groß. + +Drei Beispiele illustrieren dies: +\begin{Example} + \begin{quote} + |margin=10pt| + \end{quote} + \captionsetup{skip=0pt} + \example{margin=10pt}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |margin={1cm,0cm}| + \end{quote} + \captionsetup{skip=0pt} + \example{margin={1cm,0cm}}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |width=.75\textwidth| + \end{quote} + \captionsetup{skip=0pt} + \example{width=.75\textwidth}{\exampletext} +\end{Example} + +\begin{Note} +Wird die Beschriftung neben der Abbildung bzw.~Tabelle angebracht (z.B.~mit +Hilfe der |SC|\-|figure|"=Umgebung des \package{sidecap}"=Paketes\cite{sidecap}), +oder wird die Abbildung bzw.~Tabelle innerhalb eines Absatzes gesetzt (z.B.~mit +Hilfe der |wrap|\-|figure|"=Umgebung des \package{wrapfig}"=Paketes\cite{wrapfig}), +dann wird der Rand am Anfang der Umgebung automatisch auf |0pt| zurückgesetzt. +Soll hier ebenfalls ein extra Rand gesetzt werden, so kann dieser Rand entweder +innerhalb der Umgebung neu gesetzt werden, oder aber global für bestimmte +Umgebungen, z.B.~mit |\caption|\-|setup[SC|\-|figure]{margin=|\x|10pt}|. +\end{Note} + +\begin{Expert} +\DescribeMacro{margin*=}\NEWfeature{v3.1} +Neben der Option |margin=| gibt es auch die Option |margin*=|, die nur dann +einen Rand neu setzt, wenn keine Breite mit |width=| gesetzt wurde. +\end{Expert} + +\begin{Expert} +\DescribeMacro{minmargin=} +\DescribeMacro{maxmargin=}\NEWfeature{v3.1} +Weiterhin kann auch ein minimaler bzw.~maximaler Rand gesetzt werden. +Dies kann z.B.~sinnvoll sein, um in schmaleren Umgebungen wie |minipage|s +den Rand prozentual zu begrenzen. +So begrenzen z.B.~die \SmF"=Dokumentenklassen den Rand auf +|maxmargin=|\x|0.1\linewidth|. (Siehe \Ref{SMF}) +\end{Expert} + +\medskip + +\pagebreak[3] +\DescribeMacro{parskip=} +Diese Option wirkt auf Abbildungs- oder Tabellenbeschriftungen, die +aus mehr als einem Absatz bestehen; sie legt den Abstand zwischen den +Absätzen fest: +\begin{quote} + |parskip=|\meta{Abstand zwischen Absätzen} +\end{quote} +Ein Beispiel hierzu: +\begin{Example} + \begin{quote} + |margin=10pt,parskip=5pt| + \end{quote} + \captionsetup{skip=0pt} + \example{margin=10pt,parskip=5pt}{% + Erster Absatz der Beschriftung; dieser enthält einigen Text, so daß die + Auswirkungen der Optionen deutlich werden.\par + Zweiter Absatz der Beschriftung; dieser enthält ebenfalls einigen Text, + so daß die Auswirkungen der Optionen deutlich werden.} +\end{Example} + +\pagebreak[3] +\DescribeMacro{hangindent=} +Die Option +\begin{quote} + |hangindent=|\meta{Einzug} +\end{quote} +legt einen Einzug für alle Zeilen außer der jeweils ersten des Absatzes fest. +Besteht die Beschriftung lediglich aus einem einzelnen Absatz, so ist die +Wirkung mit der Option |indention=|\meta{Einzug} identisch, bei mehreren +Absätzen zeigt sich jedoch der Unterschied: + +\begin{Example} + \begin{quote} + |format=hang,indention=-.5cm| + \end{quote} + \captionsetup{skip=0pt} + \example{format=hang,indention=-.5cm}{% + Erster Absatz der Beschriftung; dieser enthält einigen Text, so daß die + Auswirkungen der Optionen deutlich werden.\par + Zweiter Absatz der Beschriftung; dieser enthält ebenfalls einigen Text, + so daß die Auswirkungen der Optionen deutlich werden.} +\end{Example} + +\begin{Example} + \begin{quote} + |format=hang,hangindent=-.5cm| + \end{quote} + \captionsetup{skip=0pt} + \example{format=hang,hangindent=-.5cm}{% + Erster Absatz der Beschriftung; dieser enthält einigen Text, so daß die + Auswirkungen der Optionen deutlich werden.\par + Zweiter Absatz der Beschriftung; dieser enthält ebenfalls einigen Text, + so daß die Auswirkungen der Optionen deutlich werden.} +\end{Example} + +\begin{Note} +Enthält die Beschriftung mehr als einen Absatz, muß über das optionale +Argument von |\caption| bzw.~|\caption|\-|of| eine alternative Beschriftung +für das Abbildungs- bzw.~Tabellenverzeichnis angegeben werden; +ansonsten kommt es zu einer Fehlermeldung. +\end{Note} + +% --------------------------------------------------------------------------- % + +\pagebreak[3] +\subsection{Stile} +\label{style} + +\DescribeMacro{style=} +Eine geeignete Kombination aus den bisher vorgestellten Optionen wird +\textit{Stil} genannt; dies ist in etwa mit dem Seitenstil vergleichbar, +den man mit |\page|\-|style| einstellen kann. + +Einen vordefinierten Abbildungs- bzw.~Tabellenbeschriftungsstil kann man mit der +Option +\begin{quote} + |style=|\meta{Stil} +\end{quote} +auswählen. \Thispackage\ vordefiniert zwei Stile: |base| und |default|. + +\NEWfeature{v3.1} +Der Stil |base| setzt alle bisher vorgestellten Optionen auf die Belegung +zurück, die das Aussehen der Beschriftungen der Standard"=\LaTeX"=Dokumentenklassen +|article|, |report| und |book| repräsentiert. D.h.~die Angabe der Option +\begin{quote} + |style=base| +\end{quote} +entspricht den Optionen +\begin{quote} + |format=plain,labelformat=default,labelsep=colon,|\\ + |justification=justified,font={},labelfont={},|\\ + |textfont={},margin=0pt,indention=0pt|\\ + |parindent=0pt,hangindent=0pt,singlelinecheck=true|\quad. +\end{quote} +\begin{Annotation*} +Aber |justification=centering,indention=0pt| wird automatisch +gewählt werden, wenn die Beschriftung in eine einzelne Zeile passt. +\end{Annotation*} + +Der Stil |default| hingegen folgt den Standardwerten der verwendeten +Dokumentenklasse. Dieser Stil wird vorausgewählt und entspricht den +Optionen +\begin{quote} + |format=default,labelformat=default,labelsep=default,|\\ + |justification=default,font=default,labelfont=default,|\\ + |textfont=default,margin=0pt,indention=0pt|\\ + |parindent=0pt,hangindent=0pt,singlelinecheck=true|\quad. +\end{quote} +\begin{Annotation*} +Auch hier wird |justification=centering,indention=0pt| automatisch +gewählt werden, wenn die Beschriftung in eine einzelne Zeile passt. +\end{Annotation*} + +Wenn also eine der drei Standard"=\LaTeX"=Dokumentenklassen verwendet wird, +repräsentieren die Stile |base| und |default| (fast) die gleichen Einstellungen. + +\begin{Note} +Eigene Stile können mit |\Declare|\-|Caption|\-|Style| definiert werden. +\SeeUserDefined +\end{Note} + +% --------------------------------------------------------------------------- % + +\subsection{Abstände} +\label{skips} + +\DescribeMacro{skip=}\NEWfeature{v3.0d} +Der vertikale Abstand zwischen der Beschriftung und der Abbildung +bzw.~Tabelle wird über die Option +\begin{quote} + |skip=|\meta{Abstand} +\end{quote} +gesteuert. +Die Standard"=\LaTeX"=Dokumentenklassen \class{article}, \class{report} +und \class{book} belegen diesen Abstand auf |skip=|\x|10pt| vor, +andere Dokumentenklassen ggf.~auf einen anderen Wert. + +\bigskip + +\pagebreak[3] +\DescribeMacro{position=} +Die von \LaTeX\ vorgegebene Implementierung von |\caption| birgt eine +Design\-schwäche: +Der |\caption| Befehl weiß dort nicht, ob er über oder unter der Abbildung +bzw.~Tabelle steht, folglich weiß er auch nicht, wo er den Abstand zur +Abbildung bzw.~Tabelle setzen soll. +Während die Standard"=Implementierung den Abstand immer über die +Beschriftung setzt (und inkonsequenterweise in |long|\-|table|"=Umgebungen +unter die Beschriftung), handhabt es dieses Paket etwas flexibler: +Nach Angabe der Option +\begin{quote} + |position=top|\quad oder\quad |position=above| +\end{quote} +wird angenommen, daß die Beschrifung am \emph{Anfang} der Umgebung +steht, der mit |skip=|\x\meta{Abstand} gesetzte Abstand also unter die +Beschriftung gesetzt wird. +(Bitte beachten Sie, daß |position=|\x|top| keineswegs bedeutet, daß +die Beschriftung an den Anfang der Gleitumgebung gesetzt wird. +Stattdessen wird die Beschriftung gewöhnlich dort gesetzt, wo der +|\caption|"=Befehl platziert wird.) +Hingegen nach +\begin{quote} + |position=bottom|\quad oder\quad |position=below| +\end{quote} +wird angenommen, daß die Beschriftung am \emph{Ende} der Umgebung +steht, der Abstand also über die Beschriftung gesetzt wird. +Und letztendlich nach +\begin{quote} + |position=auto|\quad {\small(welches die Vorbelegung ist)} +\end{quote} +versucht \thispackage\ sein bestes, um die tatsächliche Position der +Beschrifung selbst zu bestimmen. Bitte beachten Sie, daß dies zwar in +der Regel gelingt, unter seltenen Umständen aber falsche Resultate +liefern könnte. + +\medskip + +\pagebreak[3] +\DescribeMacro{figureposition=}%\NEWfeature{v3.0a} +\DescribeMacro{tableposition=}%\NEWfeature{v3.0a} +Die Option |position| ist insbesondere in Verbindung mit dem optionalen +Argument von |\caption|\-|setup| nützlich. +\See{auch \Ref{captionsetup}}\par +So führt zum Beispiel +\begin{quote} + |\captionsetup[table]{position=above}| +\end{quote} +dazu, daß alle Tabellenbeschriftungen als \emph{Ãœberschriften} angesehen +werden (zumindest was den Abstand zur Tabelle angeht). +Weil dies eine übliche Einstellung ist, bietet einem \thispackage\ auch +die Optionen |figure|\-|position=|\x\meta{Position} und +|table|\-|position=|\x\meta{Position} als abkürzende Schreibweise. +So ist z.B. +\begin{quote} + |\usepackage[|\ldots|,tableposition=top]{caption}| +\end{quote} +identisch mit +\begin{quote} + |\usepackage[|\ldots|]{caption}|\\ + |\captionsetup[table]{position=top}|\quad. +\end{quote} + +\medskip + +\INFO +Bitte beachten Sie, daß die Optionen |skip=|, |position=|, +|figure|\-|position=| und |table|\-|position=| nicht immer einen Effekt haben. +Da die Gleitumgebungen üblicherweise von den Dokumentenklassen bereitgestellt +werden, kann es durchaus sein, daß diese ihre eigenen Abstandsregeln +mitbringen. +So befolgen z.B.~die \KOMAScript"=Dokumentenklassen die |skip=| Einstellung; +Abbildungsbeschriftungen werden aber immer als Unterschriften behandelt, +während die Tabellenbeschriftungen von dem Gebrauch der globalen +Optionen |table|\-|captions|\-|above| bzw.\ |table|\-|captions|\-|below| +abhängen. +\See{\Ref{KOMA}} + +Weiterhin kontrollieren manche Pakete, wie etwa das \package{float}-, das +\package{floatrow}- und das \package{supertabular}"=Paket, die Position +ihrer Abstände selber. + +\bigskip + +\begin{Expert*} +Intern wird der Abstand zwischen Beschriftung und Inhalt durch die Länge +|\above|\-|caption|\-|skip| repräsentiert (welche die Implementation von +\LaTeX\ immer über die Beschriftung setzt). +Weiterhin gibt es eine zweite Länge, |\below|\-|caption|\-|skip|, die +üblicherweise auf |0pt| vorbelegt ist und den Abstand auf der anderen +Seite der Beschriftung regelt. +Technisch gesprochen vertauscht also \thispackage\ die Bedeutungen dieser +beiden Längen wenn |position=|\x|top| gesetzt ist. +Bitte beachten Sie, daß diverse andere Pakete (wie etwa das \package{ftcap}-, +das \package{nonfloat}- und das \package{topcap}"=Paket) den gleichen +Kniff anwenden, so daß die Benutzung solcher Pakete zusammen mit der +\package{caption}"=Option |position=| nicht unterstützt wird. +\end{Expert*} + +% --------------------------------------------------------------------------- % + +\subsection{Listen} +\label{lists} + +\DescribeMacro{list=}\NEWfeature{v3.1} +Der Befehl |\caption| erzeugt normalerweise auch einen Eintrag in das +Abbildungs- bzw.~Tabellenverzeichnis. Dies kann durch Angabe eines leeren +optionalen Argumentes unterdrückt werden {\small(siehe \Ref{caption})}, +aber auch durch Angabe der Option +\begin{quote} + |list=no|\quad(oder |list=false| oder |list=off|)\quad.~\footnote{% + Bitte beachten Sie, daß das \package{subfig}"=Paket\cite{subfig} diese + Option nicht unterstützt, stattdessen sind dort ggf.~die Zähler + \texttt{lofdepth} \& \texttt{lotdepth} anzupassen.} +\end{quote} + +\pagebreak[3] +\DescribeMacro{listformat=}\NEWfeature{v3.1} +Mit der Option +\nopagebreak[3] +\begin{quote} + |listformat=|\meta{Listformat} +\end{quote} +\nopagebreak[3] +kann beeinflußt werden, wie die Abbildungs- bzw.~Tabellennummer im +Abbildungs- bzw.~Tabellenverzeichnis erscheint. +Es gibt fünf vordefinierte Listenformate: + +\begin{Options}{\OptionLabel} + \item[empty] + Es wird keine Nummer angegeben. + + \item[simple] + Die Nummer wird (mit Zähler"=Prefix) angegeben. + + \item[parens] + Die Nummer wird (mit Prefix) in Klammern angegeben. + + \item[subsimple] + Wie |simple|, aber ohne Prefix. (Standard) + + \item[subparens] + Wie |parens|, aber ohne Prefix. + + \item[\UserDefined] + Eigene Listenformate können mit |\Declare|\-|Caption|\-|List|\-|Format| + definiert werden. + \SeeUserDefined +\end{Options} + +Das Präfix ($=$|\p@figure| bzw.~|\p@table|), welches in Verzeichnissen (wie +dem Abbildungs- und Tabellenverzeichnis) und bei Referenzen der Nummer +($=$|\the|\-|figure| bzw.~|\the|\-|table|) vorangestellt wird, +ist normalerweise leer, so daß die Listenformate |simple| und |subsimple| +indentische Ergebnisse abliefern; ebenso |parens| und |subparens|. +Aber dies kann z.B. bei Unterabbildungen anders sein.\footnote{% + Unterabbildungen können z.B.~mit dem \package{subcaption}- oder + \package{subfig}"=Paket gestaltet werden.} + +% --------------------------------------------------------------------------- % + +\subsection{Namen} +\label{names} + +\DescribeMacro{name=}\NEWfeature{v3.1f} +Die Option +\begin{quote} + |name=|\meta{name} +\end{quote} +ändert den Namen der \emph{aktuellen} Umgebung. +Hiermit könnte man z.B.~den Bezeichner "`Abbildung"' in allen +|wrap|\-|figure|"=Umgebungen nach "`Abb."' ändern (während woanders +nach-wie-vor "`Abbildung"' stehen würde): +\begin{quote} + |\captionsetup[wrapfigure]{name=Abb.}| +\end{quote} + +% --------------------------------------------------------------------------- % + +\subsection{Typen} +\label{types} + +\DescribeMacro{type=}\NEWfeature{v3.0d} +Der |\caption| Befehl kann verschiedene Gleitumgebungstypen beschriften, +Abbildungen (|figure|) ebenso wie Tabellen (|table|). +Außerhalb dieser Umgebungen führt die Verwendung von |\caption| jedoch zu +einer Fehlermeldung, weil nicht klar ist, zu welchem Typ die Beschriftung +gehören soll. +In diesen Situationen kann man den Typ manuell mit +\begin{quote} + |type=|\meta{Typ} +\end{quote} +festlegen, so daß |\caption| (und andere Befehle wie |\Continued|\-|Float| +oder |\sub|\-|caption|\-|box| des \package{subcaption}"=Paketes, +oder |\sub|\-|float| des \package{subfig}"=Paketes\cite{subfig}) +das gewünschte Ergebnis liefern können; +z.B.~innerhalb einer nicht-gleitenden Umgebung wie |minipage|: +\begin{quote} + |\noindent\begin{minipage}{\textwidth}|\\ + | \captionsetup{type=figure}|\\ + | \subfloat{|\ldots|}|\\ + | |\ldots\\ + | \caption{|\ldots|}|\\ + |\end{minipage}| +\end{quote} + +\begin{Expert} +Es existiert auch eine Stern"=Variante dieser Option, |type*=|\meta{Typ}, +die sich unterschiedlich verhält, wenn das +\package{hyperref}"=Paket\cite{hyperref} geladen ist: +Während |type=| einen Hyperlink"=Anker setzt (sofern |hypcap=|\x|true| +gesetzt ist), tut dies |type*=| nicht. +(Siehe auch \Ref{hyperref}\,) +\end{Expert} +\begin{Expert} +\emph{\DefaultNoteText:} Bitte definieren Sie das interne Makro |\@captype| +nicht, wie in manchen Dokumentationen vorgeschlagen wird, selber um, +sondern verwenden Sie stattdessen immer |\caption|\-|setup{type=|\x\ldots|}|. +\end{Expert} + +\medskip + +Eigene Typen können mit + |\Declare|\-|Floating|\-|Environment| (angeboten vom \package{newfloat}"=Paket), + |\new|\-|float| (angeboten vom \package{float}"=Paket\cite{float}) oder + |\Declare|\-|New|\-|Float|\-|Type| (angeboten vom \package{floatrow}"=Paket\cite{floatrow}) definiert werden. + +\medskip + +\INFO % \NEWdescription{v3.1} +Bitte verwenden Sie die Option |type=| nur \emph{innerhalb} von Boxen oder +Umgebungen (wie |\par|\-|box| oder |mini|\-|page|), am besten solcher, wo +kein Seitenumbruch innerhalb möglich ist, damit die Abbildung bzw.~Tabelle +und die Beschriftung nicht durch einen solchen getrennt werden kann. +Weiterhin können einige unschöne Nebeneffekte auftreten, wenn |type=| +außerhalb einer Box oder Umgebung verwendet wird; daher wird in solchen +Fällen eine Warnung ausgegeben.\footnote{% +Sie erhalten diese Warnung nur dann, wenn Sie \eTeX\ verwenden.} + +% --------------------------------------------------------------------------- % + +\clearpage +\section{Befehle} + +\subsection{Setzen von Beschriftungen} +\label{caption} +\label{captionlistentry} + +\DescribeMacro{\caption} +Der Befehl +\begin{quote} + |\caption|\oarg{Kurzform f"ur das Verzeichnis}\marg{Beschriftung} +\end{quote} +erzeugt eine Ãœber- bzw.~Unterschrift innerhalb einer gleitenden Umgebung +wie |figure| oder |table|. Dies ist an sich nichts neues, +hinzugekommen ist allerdings, daß kein Eintrag ins Abbildungs- oder +Tabellenverzeichnis vorgenommen wird, +wenn eine leere Kurzform angegeben wird, wie etwa hier: +\begin{quote} + |\caption[]{Dies ist eine Abbildung, die nicht ins|\\ + | Abbildungsverzeichnis aufgenommen wird}| +\end{quote} + +\begin{Expert} +Beachten Sie, daß die \meta{Beschriftung} ein \emph{wanderndes} Argument +ist, solange keine \meta{Kurzform} angegeben ist. Ist hingegen eine +\meta{Kurzform} angegeben, ist stattdessen diese wandernd. +"`\emph{Wanderndes} Argument"' bedeutet, daß dieses Argument auch in die +Datei geschrieben wird, die beim nächsten \LaTeX"=Lauf das Abbildungs- +bzw. Tabellenverzeichnis bereitstellt. +\emph{Wandernde} Argumente dürfen keine \emph{zerbrechliche} Befehle enthalten, +alles muß hier \emph{robust} sein, ansonsten kann das Argument \emph{zerbrechen} +und beim nächsten \LaTeX"=Lauf seltsame Fehlermeldungen hervorrufen. +Einige \emph{zerbrechliche} Befehle können mit |\protect| vor dem +\emph{Zerbrechen} geschützt werden; eigene Definitionen können mit +|\Declare|\-|Robust|\-|Command| anstelle von |\new|\-|command| definiert werden, +um sie \emph{robust} zu machen. + +Ein Beispiel: |\caption{${}^{137}_{\phantom{1}55}$Cs}| wird Fehlermeldungen +zur Folge haben, da |\phantom| \emph{zerbrechlich} ist. +Daher muß in so einem Fall entweder die \meta{Kurzform} bemüht werden +(z.B.~|\caption[${}^|\x|{137}_|\x|{55}$|\x|Cs]|\x|{${}^|\x|{137}_|\x|{\phantom{1}55}$|\x|Cs}|) +oder aber ein |\protect| ergänzt werden, um |\phantom| vor dem \emph{zerbrechen} zu schützen: +|\caption{${}^|\x|{137}_|\x|{|\textcolor{blue}{\cs{protect}}|\phantom{1}55}$|\x|Cs}|. + +Manchmal ist dies allerdings nicht ausreichend. Der Grund ist darin zu finden, +daß der Ein-Zeilen-Test die \meta{Beschriftung} in eine horizontale Box setzt, +um die Breite zu bestimmen. +Manche Umgebungen mögen dies nicht besonders und quittieren es mit einer +Fehlermeldung. +Ein Beispiel: +|\caption{Ein| |Schema.| |\[V_{C}| |\sim| |\left| |\{| |\begin{array}{cc}| +|E_{g}| |&| |\textrm{p-n}| |\\| |e\phi_{B}| |&| |\textrm{M-S}| |\end{array}| +|\right.| |\]}|. +Der Gebrauch des optionalen Argumentes \meta{Kurzform} mittels +|\caption[Ein| |Schema]{|\ldots|}| ist hier nicht ausreichend, es kommt immer +noch zu eine Fehlermeldung. (``\texttt{Missing \$ inserted.}'') +Hier schafft es daher Abhilfe, den Ein-Zeilen-Test mittels +|\caption|\-|setup{single|\-|line|\-|check=|\x|off}| direkt vor dem +Betroffenen |\caption| Befehl auszuschalten. + +Mehr Informationen über \emph{wanderende} Argumente und \emph{zerbrechliche} +\& \emph{robuste} Befehle finden sich in der gängigen \LaTeX"=Literatur, aber +auch hier: +\url{http://mirror.ctan.org/info/lshort/german/} +und (in englischer Sprache) hier: +\url{http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/teTeX/latex/latex2e-html/fragile.html} +\end{Expert} + +\medskip + +\pagebreak[3] +\DescribeMacro{\caption*} +Das \package{longtable}"=Paket definiert zusätzlich zum Befehl |\caption| auch +die Stern-Variante |\caption*|, die eine Beschriftung ohne Bezeichner und ohne +Eintrag ins Tabellenverzeichnis erzeugt. So erzeugt z.B. der Code +\begin{quote} + |\begin{longtable}{|\ldots|}|\\ + | \caption*{Eine Tabelle}\\|\\ + | |\ldots\\ + |\end{longtable}| +\end{quote} +diese Tabelle:\par +\DeleteShortVerb{\|} +\vskip\intextsep +\begin{minipage}{\linewidth} + \captionsetup{type=table,position=t} + \caption*{Eine Tabelle} + \centering + \begin{tabular}{r|rr} + & x & y \\\hline + a & 1 & 2 \\ + b & 3 & 4 \\ + \end{tabular} +\end{minipage} +\vskip\intextsep +\MakeShortVerb{\|} +\Thispackage\ bietet diesen Mechanismus auch für Abbildungs- und +Tabellenbeschriftungen in Gleitumgebungen wie z.B. |table| an: +\begin{quote} + |\begin{table}|\\ + | \caption*{Eine Tabelle}|\\ +% | \begin{tabular}{|\ldots|}|\\ +% | |\ldots\\ +% | \end{tabular}|\\ + | |\ldots\\ + |\end{table}| +\end{quote} + +\pagebreak[3] +\DescribeMacro{\captionof} +\DescribeMacro{\captionof*} +Der Befehl |\caption| funktioniert in der Regel nur innerhalb von gleitenden +Umgebungen, manchmal möchte man ihn jedoch auch außerhalb anwenden, +etwa um eine Abbildung in eine nicht-gleitende Umgebung wie |mini|\-|page| zu +setzen.\par +Hierfür stellt \thispackage\ den Befehl +\begin{quote} + |\captionof|\marg{Umgebungstyp}\oarg{Kurzform}\marg{Langform} +\end{quote} +zur Verfügung. Die Angabe des Umgebungstypen ist hierbei notwendig, damit der +gewünschte Bezeichner (wie z.B. "`Abbildung"' oder "`Tabelle"') gewählt wird +und der Eintrag in das richtige Verzeichnis vorgenommen wird. Ein Beispiel: +\begin{quote} +% |\captionof{figure}{Eine Abbildung}|\\ + |\captionof{table}{Eine Tabelle}| +\end{quote} +führt zu folgendem Ergebnis: +\begin{Example} +% \begingroup +% \captionof{figure}{Eine Abbildung} +% \endgroup + \captionsetup{position=top} +% \begingroup + \captionof{table}{Eine Tabelle} +% \endgroup +\end{Example} + +Analog zu |\caption*| gibt es auch den Befehl |\captionof*| für Beschriftungen +ohne Bezeichner und ohne Verzeichniseintrag. + +\INFO % \NEWdescription{v3.1} +Da |\caption|\-|of| intern die Option |type| verwendet, gelten hier die +gleichen Einschränkungen wie für die Option |type|, d.h.~sowohl +|\caption|\-|of| als auch |\caption|\-|of*| sollten nur \emph{innerhalb} von +Boxen oder Umgebungen verwendet werden. +\See{\Ref{types}} + +\bigskip + +\pagebreak[3] +\DescribeMacro{\captionlistentry}\NEWfeature{v3.1} +Unter gewissen Umständen kann es nützlich sein, lediglich einen Eintrag +ins Abbildungs- bzw.~Tabellenverzeichnis vorzunehmen. +Dies kann mit +\begin{quote} + |\captionlistentry|\oarg{Umgebungstyp}\marg{Verzeichniseintrag} +\end{quote} +bewerkstelligt werden. + +Ein Beispiel: Es ist recht einfach, eine |long|\-|table| anzulegen, die die +Beschriftungen \emph{über} dem Tabelleninhalt hat, und wo der Listeneintrag +auf die erste Seite der Tabelle verweist: +\begin{quote} + |\begin{longtable}{|\ldots|}|\\ + | \caption{|\ldots|}\\|\\ + |\endfirsthead|\\ + | \caption[]{|\ldots|}\\|\\ + |\endhead|\\ + | |\ldots +\end{quote} +Aber da das \package{longtable}"=Paket keinen |\end|\-|first|\-|foot| Befehl +anbietet, kann dies nicht so einfach auf Beschritungen \emph{unter} dem +Tabelleninhalt übertragen werden. +Stattdessen kann man aber |\caption|\-|list|\-|entry| zum Einsatz bringen: +\begin{quote} + |\begin{longtable}{|\ldots|}|\\ + | \caption[]{|\ldots|}\\|\\ + |\endfoot|\\ + | \captionlistentry{|\ldots|}|\\ + | |\ldots +\end{quote} + +\begin{Annotation*} +Ein weiteres Anwendungsbeispiel findet sich in \Ref{examples}. +\end{Annotation*} + +\begin{Expert} +Es existiert auch eine Stern"=Variante, |\caption|\-|list|\-|entry*|, die +den Umgebungszähler nicht erhöht. +(Innerhalb von |long|\-|table| Umgebungen erhöht allerdings +|\caption|\-|list|\-|entry| niemals den Tabellenzähler. Siehe auch +\Ref{longtable}.) +\end{Expert} + +\begin{Expert} +Bitte beachten Sie, daß \meta{Verzeichniseintrag} ein \emph{wanderndes} +Argument ist, hier also alles \emph{robust} sein muß. +(Siehe auch Erklärung zu |\caption|) +\end{Expert} + +\subsection{Anwenden von Optionen} +\label{captionsetup} + +\DescribeMacro{\captionsetup} +Den Befehl |\caption|\-|setup| haben wir ja schon im \Ref{usage} kennengelernt, +uns dort allerdings die Bedeutung des optionalen Parameters +\meta{Typ} aufgespart. +Wir erinnern uns, die Syntax des Befehls lautet +\begin{quote} + |\captionsetup|\oarg{Typ}\marg{Optionen}\quad. +\end{quote} +Wird hier ein \meta{Typ} angegeben, so werden die Optionen nicht +unmittelbar umgesetzt, sondern werden lediglich vermerkt und kommen erst dann +zum Einsatz, wenn eine Ãœber- bzw.\ Unterschrift innerhalb der passenden +(gleitenden) Umgebung gesetzt wird. So wirkt sich z.B. die Angabe +\begin{quote} + |\captionsetup[figure]|\marg{Optionen} +\end{quote} +lediglich auf die Unterschriften aus, die innerhalb der Umgebung |figure| +gesetzt werden. + +Ein Beispiel: +\begin{quote} + |\captionsetup{font=small}|\\ + |\captionsetup[figure]{labelfont=bf,textfont=it}| +\end{quote} +liefert Abbildungs- und Tabellenunterschriften der Art: +\begin{Example} + \captionsetup{font=small} + \captionsetup[figure]{labelfont=bf,textfont=it} + \begingroup + \captionof{figure}{Eine Abbildung} + \endgroup + \captionsetup{position=top} + \begingroup + \captionof{table}{Eine Tabelle} + \endgroup +\end{Example} +Wie man sieht, führt das |\caption|\-|setup[figure]{|\ldots|}| dazu, +daß lediglich die Abbildungsunterschriften mit fettem Bezeichner und kursivem +Text gesetzt werden; alle anderen Unter- bzw.\ Ãœberschriften werden jedoch +hiervon nicht beeinflusst. + +Als Umgebungstypen mit Unter- bzw.\ Ãœberschriften gibt es in der Regel nur +zwei: |figure| und |table|. Wie wir jedoch später sehen werden, kommen durch die +Verwendung spezieller \LaTeX-Pakete (wie etwa das \package{floatrow}, +\package{longtable} oder \package{sidecap}"=Paket) ggf.~weitere Typen hinzu, +deren Beschriftungen ebenfalls derart individuell angepasst werden können. +\See{\Ref{declare} und \Ref{packages}} + +\begin{Expert} +\NEWfeature{v3.1} +Es existiert auch eine Stern"=Variante von |\caption|\-|setup|: +\begin{quote} + |\captionsetup*|\oarg{Typ}\marg{Optionen} +\end{quote} +Während die Variante ohne Stern ggf.~zu Warnungen führt -- zum Beispiel wenn +die \meta{Optionen} im Verlauf des Dokumentes nicht zum Einsatz kommen +(wie z.B. |\caption|\-|setup[table]{font=|\x|sf}| ohne folgende |table|) -- +ist dies bei der Stern"=Variante nicht der Fall. +\iffalse +Dies kann sich z.B. bei der Entwicklung von generischen Designvorlagen als +hilfreich erweisen. +\fi +\end{Expert} + +\medskip + +\pagebreak[3] +\DescribeMacro{\clearcaptionsetup} +Um vermerkte, typbezogene Parameter aus dem Gedächnis von \LaTeX\ zu löschen, +gibt es den Befehl +\begin{quote} + |\clearcaptionsetup|\oarg{Option}\marg{Typ}\quad. +\end{quote} + +|\clearcaptionsetup{figure}| würde z.B. die in dem obrigen Beispiel deklarierte +Sonderbehandlung der Abbildungsunterschriften wieder aufheben: +\begin{quote} + |\captionsetup{font=small}|\\ + |\captionsetup[figure]{labelfont=bf,textfont=it}|\\ + \ldots\\ + | \caption{Eine Abbildung}|\\ + \ldots\\ + |\clearcaptionsetup{figure}|\\ + \ldots\\ + | \caption{Eine Abbildung}|\\ + \ldots +\end{quote} +\begin{Example} + \captionsetup{font=small} + \captionsetup[figure]{labelfont=bf,textfont=it} + \begingroup + \captionof{figure}{Eine Abbildung} + \endgroup + \captionsetup{position=top} + \clearcaptionsetup{figure} + \begingroup + \captionof{figure}{Eine Abbildung} + \endgroup +\end{Example} + +\pagebreak[3] +\NEWfeature{v3.1} +Wird das optionale Argument \meta{Option} verwendet, werden nur die +Einstellungen entfernt, die diese \meta{Option} betreffen.\footnote{% +Es kann hier nur \emph{eine} Option angegeben werden; sollen mehrere +Einstellungen entfernt werden, muß hierzu +\cs{clear}\-\texttt{caption}\-\texttt{setup} +mehrmals angewandt werden.} +Während in dem obrigen Beispiel nicht nur die Optionen +|labelfont=bf,|\x|textfont=it| +für Abbildungen aufgehoben werden (sondern alle Einstellungen, die +die Abbildungsbeschriftungen betreffen), würde der folgende Code +nur die Einstellung |labelfont=bf| entfernen und alle anderen +Einstellungen für Abbildungen intakt lassen: +\begin{quote} + |\captionsetup{font=small}|\\ + |\captionsetup[figure]{labelfont=bf,textfont=it}|\\ + \ldots\\ + | \caption{Eine Abbildung}|\\ + \ldots\\ + |\clearcaptionsetup[labelfont]{figure}|\\ + \ldots\\ + | \caption{Eine Abbildung}|\\ + \ldots +\end{quote} +\begin{Example} + \captionsetup{font=small} + \captionsetup[figure]{labelfont=bf,textfont=it} + \begingroup + \captionof{figure}{Eine Abbildung} + \endgroup + \captionsetup{position=top} + \clearcaptionsetup[labelfont]{figure} + \begingroup + \captionof{figure}{Eine Abbildung} + \endgroup +\end{Example} +\begin{Expert} +Analog zu |\caption|\-|setup*| gibt es hier ebenfalls eine Stern"=Variante +|\clear|\-|caption|\-|setup*|, die eventuell auftretende Warnungen unterdrückt, +etwa wenn die angegebene \meta{Option} gar nicht für den angegebenen \meta{Typ} +eingestellt war. +\end{Expert} + +\medskip + +\pagebreak[3] +\DescribeMacro{\showcaptionsetup} +Für Debug"=Zwecke wird der Befehl +\nopagebreak[3] +\begin{quote} + |\showcaptionsetup|\marg{Typ} +\end{quote} +\nopagebreak[3] +bereitgestellt. Er erzeugt einen Eintrag in der Log"=Datei und zeigt dort +die für den angegebenen \meta{Typ} eingestellten Optionen an. +So gibt einem zum Beispiel +\begin{quote} + |\captionsetup[figure]{labelfont=bf,textfont=it}|\\ + |\showcaptionsetup{figure}| +\end{quote} +die Info: +\begin{quote}\small + |Caption Info: Option list on `figure'|\\ + |Caption Data: {labelfont=bf,textfont=it} on input line 5.| +\end{quote} + +\pagebreak[3] +\subsection{Fortlaufende Gleitumgebungen} +\label{ContinuedFloat} + +\DescribeMacro{\ContinuedFloat} +Manchmal möchte man Abbildungen oder Tabellen aufteilen, jedoch ohne den einzelnen +Teilen eine eigene Abbildungs- oder Tabellennummer zu geben. Hierfür stellt +\thispackage\ den Befehl +\begin{quote} + |\ContinuedFloat| +\end{quote} +zur Verfügung, der gleich als erstes innerhalb der nächsten (Gleit-)Umgebung(en) +angewandt werden sollte. +Er verhindert, daß die Zählung fortgeführt wird; eine Abbildung oder Tabelle, +die ein |\Continued|\-|Float| enthält, bekommt also die gleiche Nummer +wie die vorherige Abbildung oder Tabelle. Ein Beispiel: +\begin{quote} + |\begin{table}|\\ + | \caption{Eine Tabelle}|\\ + | |\ldots\\ + |\end{table}|\\ + \ldots\\ + |\begin{table}\ContinuedFloat|\\ + | \caption{Eine Tabelle (Fortsetzung)}|\\ + | |\ldots\\ + |\end{table}| +\end{quote} +ergibt als Ergebnis: +\begin{Example} + \captionsetup{type=table,position=b,skip=0pt} + \caption{Eine Tabelle} + \centerline{\ldots} +\end{Example} +\begin{Example} + \captionsetup{type=table,position=b,skip=0pt} + \ContinuedFloat + \caption{Eine Tabelle (Fortsetzung)} + \centerline{\ldots} +\end{Example} + +\bigskip + +\NEWfeature{v3.1} +Zusätzlich führt der |\Continued|\-|Float| Befehl auch Einstellungen aus, die +mit dem Typ "`|Continued|\-|Float|"' verknüpft sind. Dies kann zum Beispiel +verwendet werden, um automatisch für fortgesetzte Abbildungen oder Tabellen +auf ein anderes Bezeichner- oder Textformat umzuschalten, wie etwa hier: +\begin{quote} + |\DeclareCaptionLabelFormat{continued}{#1~#2 (Fortsetzung)}|\\ + |\captionsetup[ContinuedFloat]{labelformat=continued}|\\ + \ldots\\ + |\begin{table}\ContinuedFloat|\\ + | \caption{Eine Tabelle}|\\ + | |\ldots\\ + |\end{table}| +\end{quote} +\begin{Example} + \captionsetup{type=table,position=b,skip=0pt} + \captionsetup[ContinuedFloat]{labelformat=continued1} + \ContinuedFloat + \caption{Eine Tabelle}\label{continued1} + \centerline{\ldots} +\end{Example} +\smallskip +\See{\Ref{declare} für die Erläuterung des Befehls + \cs{Declare}\-\texttt{Caption}\-\texttt{Label}\-\texttt{Format}.} + +\medskip + +Weiterhin existiert auch ein \LaTeX"=Zähler namens |Continued|\-|Float|, +der auch für eigene Zwecke eingesetzt werden kann. +Für gewöhnliche (gleitende) Umgebungen ist er auf Null gesetzt, auf Eins +in der ersten fortgeführten Umgebung, Zwei in der nächsten und so weiter. +Jedes |\Continued|\-|Float| erhöht also diesen Zähler um Eins, während +eine Gleitumgebung ohne |\Continued|\-|Float| den Zähler auf Null zurücksetzt. +Ein Beispiel: +\begin{quote} + |\DeclareCaptionLabelFormat{cont}{#1~#2\alph{ContinuedFloat}}|\\ + |\captionsetup[ContinuedFloat]{labelformat=cont}|\\ + \ldots\\ + |\begin{table}\ContinuedFloat|\\ + | \caption{Eine Tabelle}|\\ + | |\ldots\\ + |\end{table}| +\end{quote} +\begin{Example} + \captionsetup{type=table,position=b,skip=0pt} + \captionsetup[ContinuedFloat]{labelformat=continued2} + \ContinuedFloat + \caption{Eine Tabelle}\label{continued2} + \centerline{\ldots} +\end{Example} +\medskip +Eine Referenz auf diese Tabelle würde "`\autoref{continued2}"' ergeben, +da lediglich das Format der Tabellenbeschriftung geändert wurde. +Sollen Referenzen ebenfalls diesen Zähler enthalten, so kann stattdessen der +Befehl |\the|\-|Continued|\-|Float| passend umdefiniert werden. +Dieser Befehl wird automatisch bei der Anwendung von |\Continued|\-|Float| +dem Abbildungs- bzw.~Tabellenzähler angehängt und hat normalerweise einen +leeren Inhalt. +\begin{quote} + |\renewcommand\theContinuedFloat{\alph{ContinuedFloat}}|\\ + \ldots\\ + |\begin{table}\ContinuedFloat|\\ + | \caption{Eine Tabelle}|\\ + | |\ldots\\ + |\end{table}| +\end{quote} +\begin{Example} + \captionsetup{type=table,position=b,skip=0pt} + \renewcommand\theContinuedFloat{\alph{ContinuedFloat}} + \ContinuedFloat + \caption{Eine Tabelle}\label{continued3} + \centerline{\ldots} +\end{Example} +\medskip +Eine Referenz auf diese Tabelle würde nun "`\autoref{continued3}"' ergeben. + +\pagebreak[3] +\DescribeMacro{\ContinuedFloat*} +Angenommen man möchte gerne die erste Abbildung oder Tabelle einer +fortlaufenden Serie mit einer Beschriftung der Art "`Abbildung 7a"' und +nicht mit "`Abbildung 7"' beschriften. (Und die zweite entsprechend mit +"`Abbildung 7b"' statt "`Abbildung 7a"'.) +Dies ist auch möglich, indem man die Stern"=Variante |\Continued|\-|Float*| +anwendet. +Diese führt genau wie |\ContinuedFloat| auch die mit "`|Continued|\-|Float|"' +verknüpften Optionen aus und erhöht den \LaTeX"=Zähler |Continued|\-|Float|, +markiert aber die erste Abbildung bzw.~Tabelle einer fortlaufenden Serie: +\begin{quote} + |\renewcommand\theContinuedFloat{\alph{ContinuedFloat}}|\\ + \ldots\\ + |\begin{figure}\ContinuedFloat*|\\ + | |\ldots\\ + | \caption{Erste Abbildung einer Serie}|\\ + |\end{figure}|\\ + \ldots\\ + |\begin{figure}\ContinuedFloat|\\ + | |\ldots\\ + | \caption{Zweite Abbildung einer Serie}|\\ + |\end{figure}|\\ + \ldots\\ + |\begin{figure}\ContinuedFloat|\\ + | |\ldots\\ + | \caption{Dritte Abbildung einer Serie}|\\ + |\end{figure}| +\end{quote} +\begin{Example} + \captionsetup{type=figure,position=b,skip=0pt} + \renewcommand\theContinuedFloat{\alph{ContinuedFloat}} + \begingroup + \ContinuedFloat* + \centerline{\ldots} + \caption{Erste Abbildung einer Serie} + \endgroup + \begingroup + \ContinuedFloat + \centerline{\ldots} + \caption{Zweite Abbildung einer Serie} + \endgroup + \begingroup + \ContinuedFloat + \centerline{\ldots} + \caption{Dritte Abbildung einer Serie} + \endgroup +\end{Example} +\smallskip +\Note{Leider ist \cs{ContinuedFloat*} nicht verfügbar, wenn das + \package{subfig}"=Paket\cite{subfig} geladen ist.} + +\pagebreak[3] +\subsubsection*{Eine Anmerkung zur longtable-Umgebung} +Möchten Sie hingegen bei fortgeführten |long|\-|table|"=Umgebungen einen +anderen Bezeichner (nach einem Seitenumbruch), so kann dies \emph{nicht} +mit |\Continued|\-|Float| bewerkstelligt werden, aber mit Hilfe der vom +\package{longtable}"=Paket\cite{longtable} bereitgestellten Befehle +|\end|\-|first|\-|head| und |\end|\-|head|; in etwa so: +\begin{quote} + |\DeclareCaptionLabelFormat{continued}{#1~#2 (Fortsetzung)}|\\ + \ldots\\ + |\begin{longtable}{|\ldots|}|\\ + | \caption{Eine mehrseitige Tabelle}\\|\\ + |\endfirsthead|\\ + | \captionsetup{labelformat=continued}|\\ + | \caption[]{Eine mehrseitige Tabelle}\\|\\ + |\endhead|\\ + | |\ldots\\ + |\end{longtable}| +\end{quote} + +% --------------------------------------------------------------------------- % + +\clearpage +\section{Eigene Erweiterungen} +\label{declare} + +Wem die vorhandenen Formate, Trenner, Textausrichtungen, Zeichensätze und Stile +nicht ausreichen, der hat die Möglichkeit, sich eigene zu definieren. Hierzu +gibt es eine Reihe von Befehlen, die in der Prämbel des Dokumentes (das ist der +Teil zwischen |\document|\-|class| und |\begin{document}|) zum Einsatz kommen. + +\pagebreak[3] +\DescribeMacro{\DeclareCaption-\\Format} +Eigene Formate können mit dem Befehl +\begin{quote} + |\DeclareCaptionFormat|\marg{Name}\marg{Code mit \#1, \#2 und \#3} +\end{quote} +definiert werden. +Für \#1 wird später der Bezeichner, für \#2 der Trenner +und für \#3 der Text eingesetzt. So ist z.B. das Standardformat |plain|, +welches die Beschriftung als gewöhnlichen Absatz formatiert, +in diesem Paket so vordefiniert: +\begin{quote} + |\DeclareCaptionFormat{plain}{#1#2#3\par}| +\end{quote} +\begin{Expert} +Es gibt auch eine Stern"=Variante, |\Declare|\-|Caption|\-|Format*|, die den +Code nicht in \TeX s horizontalem Modus, sondern im vertikalen Modus setzt, +aber die |indention=| Option nicht unterstützt. +\end{Expert} + +\pagebreak[3] +\DescribeMacro{\DeclareCaption-\\LabelFormat} +Ähnlich können auch eigene Bezeichnerformate definiert werden: +\begin{quote} + |\DeclareCaptionLabelFormat|\marg{Name}\marg{Code mit \#1 und \#2} +\end{quote} +Bei den Bezeichnerformaten wird hierbei für \#1 der Name (also z.B. +"`Abbildung"'), für \#2 die Nummer (also z.B. "`12"') eingesetzt. +Ein Beispiel: +\begin{quote} + |\DeclareCaptionLabelFormat{bf-parens}{(\textbf{#2})}|\\ + |\captionsetup{labelformat=bf-parens,labelsep=quad}| +\end{quote} +\example*{labelformat=bf-parens,labelsep=quad}{\exampletext} + +\pagebreak[3] +\DescribeMacro{\bothIfFirst} +\DescribeMacro{\bothIfSecond} +Bei der Definition von eigenen Bezeichnerformaten gibt es eine Besonderheit zu +beachten: Wird das Bezeichnerformat auch in Verbindung mit dem +\package{subcaption} oder \package{subfig}"=Paket\cite{subfig} verwendet, +so kann der Bezeichnername (also \#1) auch leer sein. +Um dies flexibel handhaben zu können, stellt \thispackage\ die Befehle +\begin{quote} + |\bothIfFirst|\marg{Erstes Argument}\marg{Zweites Argument}\quad und\\ + |\bothIfSecond|\marg{Erstes Argument}\marg{Zweites Argument} +\end{quote} +zur Verfügung. +|\bothIfFirst| testet, ob das erste Argument nicht leer ist, +|\bothIfSecond|, ob das zweite Argument nicht leer ist. +Nur wenn dies der Fall ist, werden beide Argumente ausgegeben, +ansonsten werden beide unterdrückt. + +\smallskip + +\pagebreak[3] +So ist z.B. das Standard"=Bezeichnerformat |simple| nicht, wie man +naiverweise annehmen könnte, als +\begin{quote} + |\DeclareCaptionLabelFormat{simple}{#1~#2}| +\end{quote} +definiert, weil dies zu einem störendem führenden Leerzeichen führen würde, +sollte \#1 leer sein. Stattdessen kommt folgende Definition zum Einsatz, +die sowohl mit |\caption| als auch mit |\sub|\-|caption| bzw.~|\sub|\-|float| +harmoniert: +\begin{quote} + |\DeclareCaptionLabelFormat{simple}%|\\ + | {\bothIfFirst{#1}{~}#2}|\mbox{\quad,} +\end{quote} +d.h.~das Leerzeichen kommt nur dann zum Einsatz, wenn \#1 nicht leer ist. + +\smallskip + +\pagebreak[3] +\DescribeMacro{\DeclareCaption-\\TextFormat}\NEWfeature{v3.0l} +Ebenso können eigene Textformate definitiert werden: +\begin{quote} + |\DeclareCaptionTextFormat|\marg{Name}\marg{Code mit \#1} +\end{quote} +An die Stelle von \#1 wird später der Beschriftungstext eingesetzt. + +\bigskip + +\pagebreak[3] +\DescribeMacro{\DeclareCaption-\\LabelSeparator} +Eigene Trenner werden mit +\begin{quote} + |\DeclareCaptionLabelSeparator|\marg{Name}\marg{Code} +\end{quote} +definiert. Auch hier wieder als einfaches Beispiel eine Definition innerhalb +des \package{caption}"=Paketes selber: +\begin{quote} + |\DeclareCaptionLabelSeparator{colon}{: }| +\end{quote} +\begin{Expert} +Es gibt auch eine Stern"=Variante, |\Declare|\-|Caption|\-|Label|\-|Separator*|, +die den Code ohne den mit |label|\-|font=| eingestellten Zeichensatz setzt. +Auf diese Art sind z.B. die Trenner |quad|, |new|\-|line| und |en|\-|dash| +vordefiniert. +\end{Expert} + +\bigskip + +\pagebreak[3] +\DescribeMacro{\DeclareCaption-\\Justification} +Eigene Textausrichtungen können mit +\begin{quote} + |\DeclareCaptionJustification|\marg{Name}\marg{Code} +\end{quote} +definiert werden. +Der \meta{Code} wird dann der Beschriftung vorangestellt, +so führt z.B. die Verwendung der bereits vordefinierten Ausrichtung +\begin{quote} + |\DeclareCaptionJustification{raggedright}{\raggedright}| +\end{quote} +dazu, daß alle Zeilen der Beschriftung linksbündig ausgegeben werden. + +\bigskip + +\pagebreak[3] +\DescribeMacro{\DeclareCaption-\\Font} +Eigene Zeichensatzoptionen können mit +\begin{quote} + |\DeclareCaptionFont|\marg{Name}\marg{Code} +\end{quote} +definiert werden. +So sind z.B. die Optionen |small| und |bf| folgendermaßen vordefiniert: +\begin{quote} + |\DeclareCaptionFont{small}{\small}|\quad und\\ + |\DeclareCaptionFont{bf}{\bfseries}|\quad. +\end{quote} +\iffalse +Die Zeilenabstände ließen sich z.B.~über das \package{setspace}"=Paket +regeln:%\NEWdescription{v3.0h} +\begin{quote} + |\usepackage{setspace}|\\ + |\DeclareCaptionFont{singlespacing}{\setstretch{1}}|~\footnote{% + \emph{\DefaultNoteText:} \cs{singlespacing} kann hier nicht benutzt werden, + da es ein \cs{vskip} Kommando enthält.}\\ + |\DeclareCaptionFont{onehalfspacing}{\onehalfspacing}|\\ + |\DeclareCaptionFont{doublespacing}{\doublespacing}|\\ + |\captionsetup{font={onehalfspacing,small},labelfont=bf}| +\end{quote} +\example{font={onehalfspacing,small},labelfont=bf,singlelinecheck=off}{\exampletext} +\fi +Ein Beispiel, welches Farbe ins Spiel bringt: +\begin{quote} + |\usepackage{color}|\\ + |\DeclareCaptionFont{red}{\color{red}}|\\ + |\DeclareCaptionFont{green}{\color{green}}|\\ + |\DeclareCaptionFont{blue}{\color{blue}}|\\ + |\captionsetup{labelfont={blue,bf},textfont=green}| +\end{quote} +\example*{labelfont={color=blue,bf},textfont={color=green},singlelinecheck=off}{\exampletext} +Aber da \thispackage\ schon die pfiffige Definition +\begin{quote} + |\DeclareCaptionFont{color}{\color{#1}}| +\end{quote} +beinhaltet, kann man das selbe Resultat auch einfach mit +\begin{quote} + |\usepackage{color}|\\ + |\captionsetup{labelfont={color=blue,bf},|\\ + | textfont={color=green}}| +\end{quote} +erreichen. + +\medskip + +\pagebreak[3] +\DescribeMacro{\DeclareCaption-\\Style} +Eigene Stile werden folgendermaßen definiert: +\begin{quote} + |\DeclareCaptionStyle|\marg{Name}\oarg{zusätzliche Optionen}\marg{Optionen} +\end{quote} +Stile sind einfach eine Ansammlung von geeigneten Einstellungen, die unter +einem eigenen Namen zusammengefasst werden und mit der Paketoption +|style=|\meta{Name} zum Leben erweckt werden können. + +Hierbei ist zu beachten, daß die so definierten Stile immer auf dem Stil |base| +basieren (siehe auch \Ref{style}), es brauchen also nur davon abweichende +Optionen angegeben werden. + +Sind \meta{zusätzliche Optionen} angegeben, so kommen diese automatisch +zusätzlich zum Einsatz, sofern die Beschreibung in eine einzelne Zeile passt +und diese Abfrage nicht mit |single|\-|line|\-|check=off| ausgeschaltet wurde. + +Als Beispiel muß mal wieder eine einfache Definition innerhalb dieses Paketes +herhalten: Der Stil |base| ist vordefiniert als +\begin{quote} + |\DeclareCaptionStyle{base}%|\\ + | [justification=centering,indention=0pt]{}|\quad. +\end{quote} + +Etwas spannenderes: +\begin{quote} + |\DeclareCaptionStyle{mystyle}%|\\ + | [margin=5mm,justification=centering]%|\\ + | {font=footnotesize,labelfont=sc,margin={10mm,0mm}}|\\ + |\captionsetup{style=mystyle}| +\end{quote} +liefert einem Beschriftungen wie diese hier: +\begin{Example} + \captionsetup{type=figure,style=mystyle,position=b} + \caption{Eine kurze Beschriftung.} + \caption{Eine sehr sehr sehr sehr sehr sehr sehr sehr sehr + sehr sehr sehr sehr sehr sehr sehr sehr sehr + sehr sehr sehr sehr sehr sehr sehr sehr lange Beschriftung.} +\end{Example} + +\bigskip + +\pagebreak[3] +\DescribeMacro{\DeclareCaption-\\ListFormat}\NEWfeature{v3.1} +Eigene Listenformate können mit +\begin{quote} + |\DeclareCaptionListFormat|\marg{Name}\marg{Code mit \#1 und \#2} +\end{quote} +definiert werden. +Im Laufe des Dokumentes wird \#1 dann mit dem Bezeichner"=Präfix +(z.B.~|\p@figure|), und \#2 mit der Referenznummer (z.B.~|\the|\-|figure|) ersetzt. + +% --------------------------------------------------------------------------- % + +\pagebreak[3] +\subsection{Weiterführende Beispiele} +\label{examples} + +\subsubsection*{Beispiel 1} + +%\NEWdescription{v3.1} +Möchte man die Bezeichnung (inkl. Trenner wie Doppelpunkt) vom Text mit einem +Zeilenumbruch getrennt haben, so ließe sich das (auch) so bewerkstelligen: +\begin{quote} + |\DeclareCaptionFormat{myformat}{#1#2\\#3}| +\end{quote} +Wählt man anschließend dieses Format mit |\caption|\-|setup{format=|\x|myformat}| aus, +so erhält man Beschriftungen der Art: +%\begin{Example} +% \captionsetup{skip=0pt} + \example{format=myformat1,labelfont=bf}{\exampletext} +%\end{Example} +Auch einen Einzug könnte man diesem Format mit auf den Weg geben: +\begin{quote} + |\captionsetup{format=myformat,indention=1cm}| +\end{quote} +führt zu Beschriftungen wie: +%\begin{Example} +% \captionsetup{skip=0pt} + \example{format=myformat1,indention=1cm,labelfont=bf}{\exampletext} +%\end{Example} +Aber Sie möchten den Einzug nur auf die erste Zeile des Texts anwenden? +Kein Problem, so würde z.B.~die Definition +\begin{quote} + |\newlength\myindention|\\ + |\DeclareCaptionFormat{myformat}%|\\ + | {#1#2\\\hspace*{\myindention}#3}|\\ + \ldots\\ + |\setlength\myindention{1cm}|\\ + |\captionsetup{format=myformat}| +\end{quote} +zu Beschriftungen dieser Art führen: +%\begin{Example} +% \captionsetup{skip=0pt} + \example{format=myformat2,myindention=1cm,labelfont=bf}{\exampletext} +%\end{Example} +Zu der Länge |\myindention| hätten Sie gerne eine Option, so daß man diesen +Einzug auch z.B.~mit |\caption|\-|setup|\x|[figure]|\x|{myindention=|\ldots|}| setzen kann? +Auch dies läßt sich bewerkstelligen, z.B.~folgendermaßen: +\begin{quote} + |\newlength\myindention|\\ + |\DeclareCaptionOption{myindention}%|\\ + | {\setlength\myindention{#1}}|\\ + |\DeclareCaptionFormat{myformat}%|\\ + | {#1#2\\\hspace*{\myindention} #3}|\\ + \ldots\\ + |\captionsetup{format=myformat,myindention=1cm}| +\end{quote} + +\subsubsection*{Beispiel 2} + +Die Beschriftungen sollen wie folgt aussehen: +%\begin{Example} +% \captionsetup{skip=0pt} + \example{format=reverse,labelformat=fullparens,labelsep=fill,labelfont=it}{\exampletext} +%\end{Example} +\pagebreak[2] +Dies ließe sich beispielsweise wie folgt realisieren: +\nopagebreak[3] +\begin{quote} + |\DeclareCaptionFormat{reverse}{#3#2#1}|\\ + |\DeclareCaptionLabelFormat{fullparens}%|\\ + | {(\bothIfFirst{#1}{~}#2)}|\\ + |\DeclareCaptionLabelSeparator{fill}{\hfill}|\\ + |\captionsetup{format=reverse,labelformat=fullparens,|\\ + | labelsep=fill,font=small,labelfont=it}| +\end{quote} + +\subsubsection*{Beispiel 3} + +Der Bezeichner soll in den linken Rand verlagert werden, +so daß die komplette Absatzbreite der Beschriftung selber zugute kommt: +\begin{quote} + |\DeclareCaptionFormat{llap}{\llap{#1#2}#3\par}|\\ + |\captionsetup{format=llap,labelsep=quad,singlelinecheck=no}| +\end{quote} +Das Ergebnis wären Beschriftungen wie diese: +\example{format=llap,labelsep=quad,singlelinecheck=no,margin=0pt}{\exampletext} + +\medskip + +Soll der Einzug in den Rand eine feste Größe sein (z.B.~$2.5$\,cm), +so könnte hierfür eine Kombination aus |\llap| und |\makebox| angewandt werden, +zum Beispiel: +\begin{quote} + |\DeclareCaptionFormat{llapx}%|\\ + | {\llap{\makebox[2.5cm][l]{#1}}#3\par}|\\ + |\captionsetup{format=llapx,singlelinecheck=off}| +\end{quote} +\example{format=llapx,singlelinecheck=off,skip=0pt,margin=0pt}{\exampletext} + +\subsubsection*{Beispiel 4} + +Dieses Beispiel setzt eine Abbildung neben eine Tabelle, aber verwendet eine +einzige, kombinierte Beschriftung für beide. Dies wird durch eine Kombination +aus |\Declare|\-|Caption|\-|Label|\-|Format| und |\caption|\-|list|\-|entry| +realisiert: +\begin{quote} + |\DeclareCaptionLabelFormat{andtable}%|\\ + | {#1~#2 \& \tablename~\thetable}|\\ + \ldots\\ + |\begin{figure}|\\ + | \centering|\\ + | \includegraphics{|\ldots|}%|\\ + | \qquad|\\ + | \begin{tabular}[b]{\ldots}|\\ + | |\ldots\\ + | \end{tabular}|\\ + | \captionlistentry[table]{|\ldots|}|\\ + | \captionsetup{labelformat=andtable}|\\ + | \caption{|\ldots|}|\\ + |\end{figure}| +\end{quote} +\DeleteShortVerb{\|}% +\noindent\begin{minipage}{\linewidth} + \captionsetup{type=figure} + \centering + \includegraphics[width=30pt]{cat}% + \qquad + \begin{tabular}[b]{r|rr} + & x & y \\\hline + a & 1 & 2 \\ + b & 3 & 4 \\ + \end{tabular} + \captionlistentry[table]{Eine Abbildung und Tabelle mit gemeinsamer Beschriftung} + \captionsetup{labelformat=andtable} + \caption{Eine Abbildung und Tabelle mit gemeinsamer Beschriftung~\footnotemark} +\end{minipage} +\footnotetext{Das Katzenbild wurde den Beispielen zum \LaTeX"=Begleiter\cite{TLC2} + entnommen, die Erlaubnis hierzu wurde eingeholt.} +\MakeShortVerb{\|} + +(Beachten Sie, daß |\caption|\-|list|\-|entry| den Abbildungs- bzw.~Tabellenzähler + erhöht.) + + +% --------------------------------------------------------------------------- % + +\clearpage +\section{Dokumentenklassen \& Babel-Unterstützung} +\label{classes} + +%\NEWdescription{v3.1} +Dieser Teil der Dokumentation wird Ihnen einen Ãœberblick über diejenigen +Dokumentenklassen geben, an welche \thispackage\ angepasst ist: +Welche Möglichkeiten zur Beschriftungsgestaltung sie bereits verfügen, +mit welchen Seiteneffekten Sie rechnen müssen, wenn Sie dieses Paket verwenden, +und mit welchen Standardwerten die Optionen belegt werden. + +\NEWfeature{v3.1} +Die Standardwerte namens "`default"' hängen von der verwendeten +Dokumentenklasse ab; sie repräsentieren quasi das Aussehen, wie es vom Autor +der Klasse vorgesehen war. +So kann z.B.~die Einstellung |format=|\x|default| je nach verwendeter Klasse +unterschiedliche Aussehen der Beschriftungen hervorbringen. + +\begingroup\setlength\leftmargini{0.3em}% default = 2.5em +\INFO +Sollten Sie Ihre Dokumentenklasse nicht in diesem Abschnitt finden, so haben Sie +trotzdem oftmals keinen Grund zur Sorge: Viele Dokumentenklassen (wie z.B.~die +\class{octavo} Klasse) sind von einer der Standardklassen \class{article}, +\class{report} oder \class{book} abgeleitet und verhalten sich bezüglich der +Abbildungs- und Tabellenbeschriftungen gleich. +\Thispackage\ überprüft automatisch die Kompatibilität zur Dokumentenklasse und +gibt Ihnen die Warnung +\begin{quote}\footnotesize + |Package caption Warning: Unsupported document class (or package) detected,|\\ + |(caption) usage of the caption package is not recommended.|\\ + |See the caption package documentation for explanation.| +\end{quote} +aus, wenn es eine Unverträglichkeit entdeckt. +Wenn Sie keine solche Warnung erhalten, ist alles bestens, falls aber doch, +wird der Einsatz des \package{caption}"=Paketes nicht empfohlen und +insbesondere nicht unterstützt. +\endgroup + +\begin{Expert} +Sollten Sie trotz der angemahnten Inkompatibilität \thispackage{} +nutzen wollen, sollten Sie gründlich auf Seiteneffekte achten; gewöhnlich +ändert sich alleine durch das Einbinden des \package{caption}"=Paketes +ohne Optionen bereits das von der Dokumentenklasse vorgegebene Aussehen der +Beschriftungen. +Wenn dies für Sie in Ordnung ist, sollten Sie als erstes die Option +|style=|\x|base| mittels |\use|\-|package[style=|\x|base]{caption}| oder +|\caption|\-|setup{style=|\x|base}| angeben, um \thispackage\ in einen +wohldefinierten Grundstatus zu versetzen. +Anschließend können Sie anfangen, mit zusätzlichen Optionen erste +Anpassungen vorzunehmen und dabei die Daumen gedrückt zu halten. +\end{Expert} + +\newcommand*\Option{Option} +\newcommand*\defaultvalue{Standard-Belegung (\texttt{default})} +\newcommand*\uses{\textit{verwendet}} +\newcommand*\settings{\textit{Einstellungen}} +\newcommand*\nofont{\textit{keiner}} + +\subsection{Standard \LaTeX: article, report und book} + +\begin{tabular}{ll} +\Option & \defaultvalue \\\hline +|format=| & |plain| \\ +|labelformat=| & |simple| \\ +|labelsep=| & |colon| \\ +|justification=| & |justified| \\ +|font=| & \nofont \\ +|labelfont=| & \nofont \\ +|textfont=| & \nofont \\ +\end{tabular} + +\begin{Annotation} +Dies gilt auch für von \class{article}, \class{report} und \class{book} +abgeleitete Dokumentenklassen. +\end{Annotation} + +\subsection{\AmS: amsart, amsproc und amsbook} +\label{AMS} + +\begin{tabular}{ll} +\Option & \defaultvalue \\\hline +|format=| & |plain| \\ +|labelformat=| & |simple| \\ +|labelsep=| & |.\enspace| \\ +|justification=| & |justified| \\ +|font=| & |\@captionfont| \\ +|labelfont=| & |\@captionheadfont| \\ +|textfont=| & |\@captionfont\upshape| \\ +\end{tabular} + +\begin{Annotation*} +|\@caption|\-|font| wird von den \AmS\ Dokumentenklassen auf |\normal|\-|font| +vorbelegt, und |\@caption|\-|head|\-|font| auf |\sc|\-|shape|. +\end{Annotation*} + +Weiterhin wird der Rand für mehrzeilige Abbildungs- bzw.~Tabellenbeschriftungen +auf |\caption|\-|indent| gesetzt, bei einzeiligen Beschriftungen wird lediglich +die Hälfte davon verwendet. (|\caption|\-|indent| wird von den \AmS\ Klassen +auf |3pc| vorbelegt.) +Möchten Sie einen einheitlichen Rand, so fügen Sie bitte +|\clear|\-|caption|\-|setup[margin*]{single|\-|line}| +in Ihren Dokumentenvorspann ein, nachdem Sie \thispackage\ geladen haben. + +Zusätzlich werden automatisch die Optionen |figure|\-|position=b,|\x|table|\-|position=t| +gesetzt. Dies können Sie überschreiben, indem Sie beim Laden des +\package{caption}"=Paketes einfach andere Werte für +|figure|\-|position=| und |table|\-|position=| angeben. + +\subsection{beamer} +\label{beamer} + +\begin{tabular}{ll} +\Option & \defaultvalue \\\hline +|format=| & |plain| \\ +|labelformat=| & \textit{nicht nummeriert} \\ +|labelsep=| & |colon| \\ +|justification=| & |raggedright| \\ +|font=| & \class{beamer} "`|caption|"' \settings \\ +|labelfont=| & \class{beamer} "`|caption name|"' \settings \\ +|textfont=| & \nofont \\ +\end{tabular} + +\subsubsection*{Von der Klasse angebotene Befehle und deren Seiteneffekte} +Die Zeichensatz- und Farbeinstellungen können mit +|\set|\-|beamer|\-|font{caption}|\marg{Optionen} und +|\set|\-|beamer|\-|font{caption name}|\marg{Optionen} vorgenommen werden. +Dies wird auch mit dem \package{caption}"=Paket noch funktionieren, +zumindest solange Sie keinen anderen Zeichensatz mit +|\caption|\-|setup{font=|\x\meta{Optionen}|}| oder +|\caption|\-|setup{label|\-|font=|\x\meta{Optionen}|}| einstellen.\par +Weiterhin bietet die \package{beamer}"=Klasse verschiedene "`Templates"' für +die Beschriftungen an, diese können mit +|\set|\-|beamer|\-|template|\x|{caption}|\x|[|\meta{Template}|]| +ausgewählt werden. +Da \thispackage\ diesen Mechanismus ersetzt, haben +|\def|\-|beamer|\-|template*|\x|{caption}|\x\marg{Template Code} +und +|\set|\-|beamer|\-|template|\x|{caption}|\x|[|\meta{Template}|]| +keine Funktion mehr, wenn \thispackage\ verwendet wird. +(Au"snahme: Die Auswahl des Templates |default|, |num|\-|bered| oder +|caption| |name| |own| |line| wird automatisch erkannt und auf dem \package{caption}"=Paket +entsprechende Optionen umgesetzt, sofern diese nicht explizit durch den Anwender +mit anderen Einstellungen "uberschrieben worden sind.) + +\subsection{\KOMAScript: scrartcl, scrreprt und scrbook} +\label{KOMA} + +\begin{tabular}{ll} +\Option & \defaultvalue \\\hline +|format=| & \uses\ |\setcapindent| \textit{\&} |\setcaphanging| \settings \\ +|labelformat=| & \textit{wie \purett{simple}, aber mit ``autodot'' Feature}\\ +|labelsep=| & |\captionformat| \\ +|justification=| & |justified| \\ +|font=| & |\setkomafont{caption}| \settings \\ +|labelfont=| & |\setkomafont{captionlabel}| \settings \\ +|textfont=| & \nofont \\ +\end{tabular} + +\subsubsection*{Von der Klasse angebotene Befehle} +Die \KOMAScript"=Dokumentenklassen bietet sehr viele Möglichkeiten, das Design +der Abbildungs- und Tabellenbeschriftungen anzupassen. Für eine Ãœbersicht schauen +Sie bitte in die sehr gute \KOMAScript"=Dokumentation, Abschnitt "`Tabellen +und Abbildungen"'. + +\subsubsection*{Seiteneffekte} +Das optionale Argument von |\set|\-|cap|\-|width| wird nicht vom +\package{caption}"=Paket unterstützt und daher ignoriert. +Weiterhin überschreiben die \KOMAScript"=Optionen |table|\-|caption|\-|above| +\& |table|\-|caption|\-|below| sowie die dazugehörigen Befehle +|\caption|\-|above| \& |\caption|\-|below| die mit |position=| getätigten +Einstellungen. + +\subsection{\NTG: artikel, rapport und boek} +\label{NTG} + +\begin{tabular}{ll} +\Option & \defaultvalue \\\hline +|format=| & |plain| \\ +|labelformat=| & |simple| \\ +|labelsep=| & |colon| \\ +|justification=| & |justified| \\ +|font=| & \nofont \\ +|labelfont=| & |\CaptionLabelFont| \\ +|textfont=| & |\CaptionTextFont| \\ +\end{tabular} + +\subsubsection*{Von der Klasse angebotene Befehle und deren Seiteneffekte} +|\Caption|\-|Label|\-|Font| und |\Caption|\-|Text|\-|Font| können entweder +direkt oder indirekt über |\Caption|\-|Fonts| definiert werden. +Beides funktioniert auch weiterhin, zumindest solange kein anderer +Zeichensatz mit den \package{caption}"=Paketoptionen +|label|\-|font=| und |text|\-|font=| festgelegt wird. + +\subsection{\SmF: smfart und smfbook} +\label{SMF} + +Da die \SmF\ Dokumentenklassen von den \AmS\ Klassen abgeleitet wurden, +gelten hier dieselben Standardbelegungen wie dort. + +Zusätzlich ist der Rand auf den zehnten Teil von |\line|\-|width| limiert. +Mögen Sie diese Limitierung nicht, kann sie mit der Option +|max|\-|margin=|\x|off| oder |max|\-|margin=|\x|false| ausgeschaltet werden. + +\subsection{thesis} +\label{thesis} + +\begin{tabular}{ll} +\Option & \defaultvalue \\\hline +|format=| & |hang| \\ +|labelformat=| & \textit{wie \purett{simple}, aber mit kurzem Namen}\\ +|labelsep=| & |colon| \\ +|justification=| & |justified| \\ +|font=| & \nofont \\ +|labelfont=| & |\captionheaderfont| \\ +|textfont=| & |\captionbodyfont| \\ +\end{tabular} + +\subsubsection*{Von der Klasse angebotene Befehle und deren Seiteneffekte} +Der Zeichensatz des Bezeichners kann hier mit |\caption|\-|header|\-|font|, +derjenige des Textes mit |\caption|\-|body|\-|font| gesetzt werden. +Beides funktioniert auch weiterhin, zumindest solange kein anderer +Zeichensatz mit den \package{caption}"=Paketoptionen +|label|\-|font=| und |text|\-|font=| gesetzt wird. + +\subsection{Babel-Option frenchb} +\label{frenchb} + +Wird die Option \package{frenchb} des \package{babel}"=Paketes mit einer +der drei Standardklassen (oder einer davon abgeleiteten) verwendet, +dann wird |label|\-|sep=| auf |\Caption|\-|Sep|\-|a|\-|ra|\-|tor| vorbelegt +und damit die Vorbelegung der Dokumentenklasse überschrieben. +In diesem Falle wird eine Umdefinition von |\Caption|\-|Sep|\-|a|\-|ra|\-|tor| +auch weiterhin funktionieren, zumindest solange kein anderer Trenner mit +der Option |label|\-|sep=| gesetzt wird. + +\INFO* +Bitte laden Sie \thispackage\ \emph{nach} dem \package{babel}"=Paket. + +\subsection{Pakete frenchle und frenchpro} +\label{frenchpro} + +Wird das \package{frenchle}- oder \package{frenchpro}"=Paket verwendet, +dann wird |label|\-|sep=| auf |\caption|\-|sep|\-|a|\-|ra|\-|tor| plus +\cs{space} vorbelegt und damit die Vorbelegung der Dokumentenklasse +überschrieben. +Eine Umdefinition von |\caption|\-|sep|\-|a|\-|ra|\-|tor| wird auch weiterhin +funktionieren, zumindest solange kein anderer Trenner mit der Option +|label|\-|sep=| gesetzt wird. + +Weiterhin wird |text|\-|font=| auf |text|\-|font=|\x|it| vorbelegt, +um das Standardverhalten des \package{frenchle}- bzw.~\package{frenchpro}"=Paketes +bzgl.~des Beschriftungstext"=Zeichensatzes zu emulieren. +Bitte beachten Sie, daß der Befehl |\caption|\-|font| auch intern vom +\package{caption}"=Paket verwendet wird, und zwar auf eine andere Art und Weise +als das \package{frenchle}- bzw.~\package{frenchpro}"=Paket ihn verwendet; +daher sollten Sie ihn nicht (mehr) verwenden. + +Der Befehl |\un|\-|numbered|\-|captions|\marg{figure \emph{oder} table} wird +weiterhin seinen Dienst tun, aber nur solange Sie kein anderes Bezeichnerformat +mit |label|\-|format=| auswählen. + +\INFO* +Bitte laden Sie \thispackage\ \emph{nach} dem \package{frenchle} +oder \package{frenchpro}"=Paket. + +% --------------------------------------------------------------------------- % + +\clearpage +\section{Unterstützung anderer Pakete} +\label{packages} +\label{compatibility} + +%\NEWdescription{v3.1} +\Thispackage\ ist an folgende Pakete, die ebenfalls Abbildungs- oder +Tabellenbeschriftungen anbieten, angepasst: +\begin{quote} + \package{float}, \package{floatflt}, \package{fltpage}, + \package{hyperref}, \package{hypcap}, \package{listings}, + \package{longtable}, \package{picinpar}, \package{picins}, + \package{rotating}, \package{setspace}, \package{sidecap}, + \package{subfigure}, \package{supertabular}, \package{threeparttable}, + \package{wrapfig} und \package{xtab} +\end{quote} + +Weiterhin arbeitet das \package{floatrow}"=Paket\cite{floatrow}, +das \package{subcaption}"=Paket (welches Bestandteil der +\package{caption}"=Paketfamilie ist), sowie das \package{subfig}"=Paket\cite{subfig} +aktiv mit diesem Paket zusammen und verwenden dessen |\caption|\-|setup|"=Schnittstelle. + +\bigskip + +\begingroup\setlength\leftmargini{0.3em}% default = 2.5em +\INFO +Definiert ein anderes Paket (oder eine Dokumentenklasse), welches \thispackage{} +nicht kennt, ebenfalls den Befehl |\caption| um, so wird diese Umdefinition +bevorzugt, um maximale Kompatibilität zu gewährleisten und Konflikte +zu vermeiden. +Wird solch eine potentielle Inkompatiblität erkannt, wird diese Warnung +ausgegeben:~\footnote{% + Diese Warnung kann durch Angabe der Option \texttt{compatibility=true} + beim Laden des \package{caption}"=Paketes abgeschaltet werden.} +\begin{quote}\footnotesize + |Package caption Warning: \caption will not be redefined since it's already|\\ + |(caption) redefined by a document class or package which is|\\ + |(caption) unknown to the caption package.|\\ + |See the caption package documentation for explanation.| +\end{quote} +\endgroup + +Als Folge stehen diese Ausstattungsmerkmale des \package{caption}"=Paketes nicht +zur Verfügung: +\begin{itemize} + \item die Optionen |labelformat=|, |position=auto|, |list=| und |listformat=| + \item |\caption*| (um eine Beschrifung ohne Bezeichner zu setzen) + \item |\caption[]{|\ldots|}| (um den Eintrag ins Verzeichnis zu unterbinden) + \item |\caption{}| (um eine leere Beschriftung ohne Trenner zu setzen) + \item |\ContinuedFloat| + \item korrekt ausgerichtete Beschriftungen in Umgebungen wie \texttt{wide} und + \texttt{addmargin}, die die Seitenränder verändern + \item das sog.~\textsf{hypcap}"=Feature \See{\Ref{hyperref}\,} + \item Setzen von Unter-Beschriftungen \See{\package{subcaption}"=Paketdokumentation} +\end{itemize} + +\DescribeMacro{compatibility=} +Dieser Kompatibilitäts"=Modus kann durch die Angabe der Option +\begin{quote} + |compatibility=false| +\end{quote} +beim Laden des \package{caption}"=Paketes ausgeschaltet werden. +Aber bitte beachten Sie, daß die Anwendung dieser Option weder empfohlen noch +unterstützt wird, da hierdurch unerwünschte Nebeneffekte oder Fehler auftreten +können. (Aus diesem Grunde wird hier ebenfalls eine Warnung ausgegeben.) + +\newcommand\packagedescription[1]{% + \ifvmode\else\par\fi + \nopagebreak + \parbox[b]{\linewidth}{\footnotesize\leftskip=10pt\rightskip=10pt\relax#1}\par + \nopagebreak\smallskip\nopagebreak} + +\PageBreak +\subsection{algorithms} +\label{algorithms} +\packagedescription{% +Die \package{algorithms}"=Paketfamilie\cite{algorithms} bietet zwei Umgebungen +an: Die Umgebung \texttt{algorithmic} bietet eine Möglichkeit, Algorithmen +zu beschreiben, und die Umgebung \texttt{algorithm} bietet eine passende +Gleitumgebung an.} + +Da die \texttt{algorithm}"=Umgebung intern mittels |\new|\-|float| realisiert +ist, welches vom \package{float}"=Paket\cite{float} bereitgestellt wird, +schauen Sie bitte in \Ref{float} nach. + +\iffalse +\pagebreak[3] +\subsection{algorithm2e} +\label{algorithm2e} +\packagedescription{% +The \package{algorithm2e} package\cite{algorithm2e} offers an environment for +writing algorithms in LaTeX2e.} + +Since the \package{algorithm2e} package does not use some kind of standard +interface for defining its floating environment (e.g.~|\newfloat| of the +\package{float} package) and typesetting its caption, +the \package{algorithm2e} package is \emph{not} supported by \thispackage. + +So if you want to customize the captions using \thispackage, +you have to build a new environment which uses a supported interface regarding +floats (e.g. using the \package{float} or \package{floatrow} package), +and combine this environment with the internal \package{algorithm2e} code. + +As first step you could define a non-floating environment \texttt{algorithmic}, +for example: +\begin{quote} + |\usepackage{algorithm2e}|\\ + |% save the "algorithm" environment from the algorithm2e package|\\ + |\let\ORIGalgorithm\algorithm|\\ + |\let\ORIGendalgorithm\endalgorithm|\\ + |% define the algorithmic environment|\\ % , based on the saved environment + |\newenvironment{algorithmic}%|\\ + | {\renewenvironment{algocf}[1][h]{}{}% pass over floating stuff|\\ + | \ORIGalgorithm}%|\\ + | {\ORIGendalgorithm}|\\ + \ldots +\end{quote} +Having defined this non-floating environment, you could define your own new +floating environment with |\newfloat| of the \package{float} package +(or |\DeclareNewFloatType| of the \package{floatrow} package), +and use the combination of this floating environment and \texttt{algorithmic} +in its body, just like you would do when you use the +\package{algorithm}/\package{algorithmic} package tandem. + +You could even use the \package{algorithm} package for this purpose, for example: +\begin{quote} + \ldots\\ + |% load the algorithm package to re-define the|\\ + |% floating environment "algorithm" and \listofalgorithms|\\ + |\let\listofalgorithms\undefined|\\ + |\usepackage{algorithm}|\\ + \ldots\\ + |% Example usage:|\\ + |\begin{algorithm}|\\ + |\caption{An algorithm}|\\ + |\begin{algorithmic}|\\ + | \SetVline|\\ + | \eIf{cond1}{|\\ + | a line\;|\\ + | }{|\\ + | another line\;|\\ + | }|\\ + |\end{algorithmic}| +\end{quote} +Now you are finally able to customize the float and caption layout like every +other floating environment defined with the \package{float} package\cite{float}, +please see \Ref{float}. + +\begin{Annotation} +An alternative would be using the \package{algorithmicx} package. +\end{Annotation} +\fi + +\pagebreak[3] +\subsection{float} +\label{float} +\packagedescription{% +Das \package{float}"=Paket\cite{float} bietet den Befehl \cs{restylefloat} an, +der bestehende Gleitumgebungen zu einem neuen Design verhilft, ferner +\cs{newfloat} um neue Gleitumgebungen zu definieren. +Weiterhin wird die Platzierungs-Option "`\texttt{H}"' angeboten, die bei +Gleitumgebungen das Gleiten unterbindet.} + +Bei Gleitumgebungen, die mit \cs{newfloat} oder \cs{restylefloat} definiert +wurden, hat die Option |po|\-|si|\-|tion=| keinen Effekt auf die Beschriftung, +da die Platzierung und die Abstände von dem gewählten Gleitumgebungs"=Stil +festgelegt werden. + +Ein Beschriftungs"=Stil und Beschriftungs"=Optionen mit demselben Namen +wie der Gleitumgebungs"=Stil werden zusätzlich zu den normalen Optionen +ausgewählt. +Mit diesem Mechanismus emuliert \thispackage\ das Aussehen der Beschriftungen +vom Stil "`|ruled|"': Es definiert den Beschriftungs"=Stil +\begin{quote} + |\DeclareCaptionStyle{ruled}%|\\ + | {labelfont=bf,labelsep=space,strut=off}|\mbox{\quad.} +\end{quote} +Um dies zu ändern, müssen Sie entweder einen eigenen Stil namens "`|ruled|"' +definieren, oder aber mit |\caption|\-|setup[ruled]|\marg{Optionen} zusätzliche +Optionen angeben.%, +%z.B.~|\caption|\-|setup[ruled]{labelsep=|\x|colon}|. + +Dieser Mechanismus wird ebenso benutzt, um den Abstand zwischen einer +Gleitumgebung vom Stil "`|boxed|"' und seiner Beschriftung individuell +festzulegen: +\begin{quote} + |\captionsetup[boxed]{skip=2pt}| +\end{quote} +Um dies zu ändern, geben Sie einfach mit +|\caption|\-|setup[boxed]{skip=|\x\meta{Wert}|}| +einen anderen Wert an. +Oder wenn Sie stattdessen die globale Einstellung der Option |skip=| verwenden +wollen, können Sie die individuelle Abstandseinstellung mit +|\clear|\-|caption|\-|setup[skip]{boxed}| entfernen. + +\begin{Note} +Es kann immer nur \emph{eine} Beschriftung innerhalb der Gleitumgebungen +gesetzt werden, die mit |\new|\-|float| oder |\re|\-|style|\-|float| +definiert werden; außerdem verhalten sich diese Gleitumgebungen auch in +anderen Belangen nicht exakt wie die Umgebungen |figure| und |table|. +Als Konsequenz arbeiten viele Pakete nicht sehr gut mit diesen zusammen. +Weiterhin hat das \package{float}"=Paket einige Fallstricke und Schwächen, +weswegen ich als Alternative das \package{newfloat}"=Paket +anbiete, um neue Gleitumgebungen zu definieren, die sich wie |figure| +und |table| verhalten sollen. +Und für die Definition von mächtigeren Gleitumgebungen bzw.~der +stilistischen Umgestaltung von vorhandenen Gleitumgebungen empfehle ich als +Alternative den Befehl |\Declare|\-|New|\-|Float|\-|Type| des +moderneren \package{floatrow}"=Paketes\cite{floatrow}. +\end{Note} + +\iffalse +Please also note that you \emph{don't} need a |\restyle|\-|float| for using +the ``|H|'' float placement specifier. Some docs say so, but they are +wrong. +And |\restyle|\-|float{table}| is a very good method to shoot yourself +in the foot, since many packages using |table| internally are not working +correctly afterwards. +\fi + +\pagebreak[3] +\subsection{floatflt} +\label{floatflt} +\packagedescription{% +Das \package{floatflt}"=Paket\cite{floatflt} bietet Umgebungen zum Setzen von +Abbildungen und Tabellen an, die nicht die Gesamtbreite der Seite einnehmen, +sondern stattdessen vom Text umflossen werden.} + +\NEWfeature{v3.1} +Spezielle Optionen für die Umgebungen |float|\-|ing|\-|figure| und +|float|\-|ing|\-|table| können mit +\begin{quote} + |\captionsetup[floatingfigure]|\marg{Optionen}\quad\emph{und}\\ + |\captionsetup[floatingtable]|\marg{Optionen} +\end{quote} +festgelegt werden. +Diese Einstellungen werden dann zusätzlich zu denjenigen für |figure| +bzw.~|table| berücksichtigt. + +\begin{Note} +Die Einstellungen |margin=| bzw.~|width=| werden nicht auf diese Abbildungen +bzw.~Tabellen angewandt, solange sie nicht explizit mit +|\caption|\-|setup[floating|\-|figure]{|\ldots|}| +bzw.~|\caption|\-|setup[floating|\-|table]{|\ldots|}| gesetzt werden. +\end{Note} + +\pagebreak[3] +\subsection{fltpage} +\label{fltpage} +\packagedescription{% +Das \package{fltpage}"=Paket\cite{fltpage} bietet die Ausgliederung der +Beschriftung für Abbildungen und Tabellen, die die gesamte Seitenhöhe +einnehmen, an. Hierbei wird die Beschriftung ans Ende der vorherigen +oder nächsten Seite verschoben.} + +\iffalse +\NEWfeature{v3.1} +Zwei Optionen regeln die Verweise auf die Umgebungen |FPfigure| und |FPtable|: +\begin{description} +\item{\texttt{FPlist=caption} oder \texttt{FPlist=figure}}\\[\smallskipamount] +Auf "`|caption|"' gesetzt, wird der Verzeichniseintrag auf die Beschriftung +der Abbildung bzw.~Tabelle verweisen, auf "`|figure|"' gesetzt auf den Inhalt +der Abbildung. +(Die Vorbelegung ist |FP|\-|list=|\x|caption|.) +\item{\texttt{FPref=caption} oder \texttt{FPref=figure}}\\[\smallskipamount] +Auf "`|caption|"' gesetzt, werden die mit \cs{ref}, \cs{pageref}, \cs{autoref} +oder \cs{nameref} plazierten Referenzen auf die Beschriftung der Abbildung +bzw.~Tabelle verweisen, auf "`|figure|"' gesetzt auf den Inhalt der Abbildung. +(Die Vorbelegung ist |FP|\-|ref=|\x|figure|.) +\end{description} +\fi + +Spezielle Einstellungen für die Umgebungen |FPfigure| und |FPtable| können mit +\begin{quote} + |\captionsetup[FPfigure]|\marg{Optionen}\quad\emph{und}\\ + |\captionsetup[FPtable]|\marg{Optionen} +\end{quote} +getätigt werden. +Diese Einstellungen werden dann zusätzlich zu denjenigen für |figure| +bzw.~|table| berücksichtigt. + +\pagebreak[3] +\subsection{hyperref} +\label{hyperref} +\packagedescription{% +Das \package{hyperref}"=Paket\cite{hyperref} behandelt \LaTeX"=Querverweise +derart, daß sie zusätzlich Hyperlinks im Dokument erzeugen.} + +\NEWfeature{v3.1} +Zwei Optionen regeln das Setzen von Hyperlinks:~\footnote{Diese Optionen sind +nach dem \package{hypcap}"=Paket benannt, welches sie ersetzen.} +\begin{description} +\item{\texttt{hypcap=true} oder \texttt{hypcap=false}}\\[\smallskipamount] +Auf |true| gesetzt, werden alle Hyperlink"=Anker -- wohin Einträge im +Abbildungs- und Tabellenverzeichnis, sowie |\ref| und |\auto|\-|ref| +verweisen -- an den Anfang der (gleitenden) Umgebungen wie Abbildung +oder Tabelle plaziert.\par +Auf |false| gesetzt zeigen hingegen alle Hyperlink"=Anker auf die +Beschriftung.\par +(Die Voreinstellung ist |hypcap=true|.) +\item{\texttt{hypcapspace=}\meta{Abstand}}\\[\smallskipamount] +Da es nicht sehr ästhetisch wirkt, wenn der Hyperlink exakt auf den Beginn der +Abbildung bzw.~Tabelle springt, kann ein vertikaler Abstand zwischen dem +Hyperlink"=Anker und der (gleitenden) Umgebung gesetzt werden, z.B.~entfernt +|hyp|\-|cap|\-|space=|\x|0pt| diesen Abstand.\par +(Die Voreinstellung ist |hyp|\-|cap|\-|space=|\x|0.5\base|\-|line|\-|skip|.) +\end{description} + +Beide Optionen haben keine Auswirkung in den Umgebungen |lst|\-|listing| +(vom \package{listings}"=Paket bereitgestellt), |long|\-|table| (vom +\package{longtable}"=Paket bereitgestellt, |super|\-|tabular| (vom +\package{supertabular}"=Paket bereitgestellt), und |x|\-|tabular| (vom +\package{xtab}"=Paket bereitgestellt); +innerhalb dieser Umgebungen werden Hyperlink"=Anker immer so gesetzt, als sei +|hyp|\-|cap=|\x|true| und |hyp|\-|cap|\-|space=|\x|0pt| eingestellt. + +\pagebreak[3]Bitte beachten Sie:\nopagebreak +\begin{description} +\item{\cs{captionof}\marg{Typ}\csmarg{\purerm\ldots} + vs.~\cs{captionsetup}\csmarg{type=\textrm{\meta{Typ}}}$+$\cs{caption}\csmarg{\purerm\ldots}}% +\\[\smallskipamount] +Ohne geladenes \package{hyperref}"=Paket bekommen Sie hier identische Resultate. +Aber mit \package{hyperref} geladen und mit der Einstellung |hyp|\-|cap=|\x|true| +versehen wird der Hyperlink"=Anker unterschiedlich gesetzt. +So plaziert zum Beispiel +\begin{quote} +|\begin{minipage}{\linewidth}|\\ +| |\ldots\\ +| \captionof{figure}{Eine Abbildung}|\\ +|\end{minipage}| +\end{quote} +den Anker bei der Beschriftung. +(Und wenn |hyp|\-|cap=|\x|true| gesetzt ist, wird deswegen eine Warnung ausgegeben.) +\begin{quote} +|\begin{minipage}{\linewidth}|\\ +| \captionsetup{type=figure}|\\ +| |\ldots\\ +| \caption{Eine Abbildung}|\\ +|\end{minipage}| +\end{quote} +hingegen plaziert den Anker an den Anfang der |mini|\-|page|, +da die Anweisung |\caption|\-|setup{type=|\x|figure}| nicht nur den Typ der +Beschriftung auf "`figure"' festlegt, sondern auch einen Hyperlink"=Anker setzt. + +\item{\cs{caption}\csoarg{}\csmarg{\purerm\ldots} + vs.~\cs{captionsetup}\csmarg{list=false}$+$\cs{caption}\csmarg{\purerm\ldots}}\\[\smallskipamount] +Wiederum bekommen Sie ohne geladenes \package{hyperref}"=Paket identische Resultate. +Aber mit \package{hyperref} geladen liegen die Unterschiede in den Feinheiten: +So wird z.B.~das optionale Argument von |\caption| auch in die |aux|-Datei +geschrieben und vom |\name|\-|ref| Befehl verwendet. +Wenn Sie also |\caption| mit leerem Argument angeben, wird ein auf diese +Abbildung oder Tabelle angewandtes |\name|\-|ref| nicht das erwünschte, +sondern stattdessen ein leeres Resultat zur Folge haben. +Daher ist es besser, |\caption|\-|setup{list=|\x|false}| zu verwenden, +wenn Sie keinen Eintrag in dem Abbildungs- oder Tabellenverzeichnis wünschen. +\end{description} + +\pagebreak[3] +\subsection{hypcap} +\label{hypcap} +\packagedescription{% +Das \package{hyp\-cap}"=Paket\cite{hypcap} bietet eine Lösung zu dem Problem +an, daß Hyperlinks auf Gleitumgebungen nicht auf die Abbildung bzw.~Tabelle +verweisen, sondern stattdessen auf die Beschriftung. +Die Version $3.1$ des \package{caption}"=Paketes löst dieses Problem bereits +auf seine eigene Art und Weise, so daß das \package{hypcap}"=Paket in der +Regel nicht mehr zusätzlich benötigt wird.} + +Wird das \package{hypcap}"=Paket zusätzlich zum \package{hyperref}"=Paket +geladen, so übernimmt es die Kontrolle über die Platzierung der +Hyperlink"=Anker, und die Optionen |hyp|\-|cap=| und |hyp|\-|cap|\-|space=| +verlieren ihre Wirkung. + +Außerdem ist zu beachten, daß dann |\caption|\-|setup{type=|\x\meta{Typ}|}| +keinen Hyperlink"=Anker mehr setzt; dies muß dann ggf.~mit dem Befehl +|\cap|\-|start|, welcher vom \package{hypcap}"=Paket angeboten wird, +geschehen. + +Weiterhin hat das Laden des \package{hypcap}"=Paketes den Nebeneffekt, daß +die Hyperlink"=Anker innerhalb der Umgebungen +|floating|\-|figure| (vom \package{float\-flt}"=Paket bereitgestellt), +|FP|\-|figure| \& |FPtable| (vom \package{flt\-page}"=Paket bereitgestellt), +|fig|\-|window| (vom \package{pic\-in\-par}"=Paket bereitgestellt), +|par|\-|pic| (vom \package{pic\-ins}"=Paket bereitgestellt), +|SC|\-|figure| (vom \package{side\-cap}"=Paket bereitgestellt), +|three|\-|part|\-|table| (vom \package{three\-part\-table}"=Paket +bereitgestellt) und |wrap|\-|figure| (vom \package{wrap\-fig}"=Paket +bereitgestellt) nicht mehr optimal platziert werden. + +\pagebreak[3] +\subsection{listings} +\label{listings} +\packagedescription{% +Das \package{listings}"=Paket\cite{listings} bietet Möglichkeiten, +Programmcode zu setzen.} + +Spezielle Einstellungen für die Umgebung |lst|\-|listing| können mit +\begin{quote} + |\captionsetup[lstlisting]|\marg{Optionen} +\end{quote} +getätigt werden. + +Bitte beachten Sie, daß das \package{listings}"=Paket seine eigenen +Optionen für die Kontrolle der Position und Abstände der Beschriftungen +mitbringt: +|caption|\-|pos=|, |above|\-|caption|\-|skip=| und |below|\-|caption|\-|skip=|. +\See{Dokumentation des \package{listings}"=Paketes.} +Diese Optionen überschreiben diejenigen des \package{caption}"=Paketes, +können aber wiederum mit |\caption|\-|setup[lst|\-|listing]{|\ldots|}| +überschrieben werden, z.B.~mit +\begin{quote}|\caption|\-|setup[lst|\-|listing]{skip=|\x|10pt}|\quad.\end{quote} + +\pagebreak[3] +\subsection{longtable} +\label{longtable} +\packagedescription{% +Das \package{longtable}"=Paket\cite{longtable} bietet eine Umgebung an, +die sich ähnlich wie die Umgebung \texttt{tabular} verhält, aber Seitenumbrüche +innerhalb der Tabelle erlaubt.} + +Spezielle Einstellungen für die Umgebung |long|\-|table| können mit +\begin{quote} + |\captionsetup[longtable]|\marg{Optionen} +\end{quote} +getätigt werden. +Diese Einstellungen werden dann zusätzlich zu denjenigen für |table| +berücksichtigt. + +Die Optionen |margin=| und |width=| überschreiben gewöhnlich die Länge +|\LT|\-|cap|\-|width|, so daß ein einheitliches Aussehen der +Tabellenüberschriften gewährleistet wird. +Wird aber |\LT|\-|cap|\-|width| auf einen anderen Wert als den Standardwert +|4in| gesetzt, wird \thispackage\ dies berücksichtigen. +(Aber |\LT|\-|cap|\-|width| wird wiederum von +|\caption|\-|setup[long|\-|table]{width=|\x\meta{Breite}|}| überschrieben, +auch wenn |\LT|\-|cap|\-|width| auf einen anderen Wert als |4in| gesetzt ist.) + +\begin{Note} +Die Befehle |\caption|\-|of| und |\Continued|\-|Float| funktionieren +\emph{nicht} innerhalb der Umgebung |long|\-|table|. +Weiterhin erhöhen weder |\caption| noch |\caption|\-|list|\-|entry| den +Tabellenzähler, er wird stattdessen von der Umgebung |long|\-|table| selbst +erhöht. +\NEWfeature{v3.1} +Benötigen Sie eine Umgebung |long|\-|table|, die den Tabellenzähler +nicht erhöht, so verwenden Sie bitte die Umgebung |long|\-|table*| +(die das \package{ltcaption}"=Paket bereitstellt und als Bestandteil der +\package{caption}"=Paketfamilie automatisch geladen wird). +\end{Note} + +\pagebreak[3] +\subsection{picinpar} +\label{picinpar} +\packagedescription{% +Ähnlich wie das \package{floatflt}"=Paket stellt auch das +\package{picinpar}"=Paket Umgebungen zum Setzen von Abbildungen und Tabellen +zur Verfügung, die nicht die gesamte Seitenbreite ausfüllen und vom Text +umflossen werden. +Für eine detailierte Beschreibung der Unterschiede zwischen diesen Paketen +schauen Sie bitte in den "`LaTeX Begleiter"'\cite{TLC2}.} + +\NEWfeature{v3.1} +Spezielle Einstellungen für die Umgebungen |fig|\-|window| und |tab|\-|window| +können mit +\begin{quote} + |\captionsetup[figwindow]|\marg{Optionen}\quad\emph{und}\\ + |\captionsetup[tabwindow]|\marg{Optionen} +\end{quote} +getätigt werden. +Diese Einstellungen werden dann zusätzlich zu denjenigen für |figure| +bzw.~|table| berücksichtigt. + +\begin{Note} +Die Einstellungen |margin=| bzw.~|width=| werden nicht auf diese Abbildungen +bzw.~Tabellen angewandt, solange sie nicht explizit mit +|\caption|\-|setup[fig|\-|window]{|\ldots|}| +bzw.~|\caption|\-|setup[tab|\-|window]{|\ldots|}| gesetzt werden. +\end{Note} + +\pagebreak[3] +\subsection{picins} +\label{picins} +\packagedescription{% +Ähnlich wie das \package{floatflt}- und \package{picinpar}"=Paket stellt auch +das \package{picins}"=Paket Umgebungen zum Setzen von Abbildungen und +Tabellen zur Verfügung, die nicht die gesamte Seitenbreite ausfüllen und vom +Text umflossen werden. +Für eine detailierte Beschreibung der Unterschiede zwischen diesen Paketen +schauen Sie bitte in den "`LaTeX Begleiter"'\cite{TLC2}.} + +\NEWfeature{v3.1} +Spezielle Einstellungen für die Umgebung |par|\-|pic| können mit +\begin{quote} + |\captionsetup[parpic]|\marg{Optionen} +\end{quote} +getätigt werden. +Diese Einstellungen werden dann zusätzlich zu denjenigen für |figure| +bzw.~|table| berücksichtigt. + +Weiterhin erzeugt |\pic|\-|caption[]{|\ldots|}| keinen Verzeichniseintrag, +und |\pic|\-|caption*{|\ldots|}| ergibt eine Beschriftung ohne Bezeichner und +Nummerierung. + +\begin{Note} +Die Einstellungen |margin=| bzw.~|width=| werden nicht auf diese Abbildungen +bzw.~Tabellen angewandt, solange sie nicht explizit mit +|\caption|\-|setup[par|\-|pic]{|\ldots|}| gesetzt werden. +\end{Note} + +Wird ein |\pic|\-|caption| gewünscht, das keine Abbildungs-, sondern eine +Tabellenbeschrifung erzeugt, so definieren Sie bitte \emph{nicht} +|\@cap|\-|type| um, wie es von der Dokumentation zum \package{picins}"=Paket +vorgeschlagen wird. Stattdessen benutzen Sie bitte den Befehl +|\pic|\-|caption|\-|type|\marg{Typ}, der Ihnen vom \package{caption}"=Paket +zu diesem Zweck bereitgestellt wird. Zum Beispiel: +\begin{quote} + |\piccaptiontype{table}|\\ + |\piccaption{Eine Beispieltabelle}|\\ + |\parpic(50mm,10mm)[s]{|\ldots|}| +\end{quote} + +\pagebreak[3] +\subsection{rotating} +\label{rotating} +\packagedescription{% +Das \package{rotating}"=Paket\cite{rotating} bietet die Gleitumgebungen +\texttt{side\-ways\-figure} und \texttt{side\-ways\-table}, +die sich wie \texttt{figure} und \texttt{table} verhalten, den Inhalt aber +um 90 bzw. 270 Grad drehen. +Weiterhin wird ein Befehl \cs{rot\-caption} bereitgestellt, der lediglich +die Beschriftung dreht.} + +\iffalse % No, we don't do that +If you want to setup special options for the |side|\-|ways|\-|figure| \& +|side|\-|ways|\-|table| environments you can use +\begin{quote} + |\captionsetup[sidewaysfigure]|\marg{options}\\ + |\captionsetup[sidewaystable]|\marg{options}\quad. +\end{quote} +These options will be executed additionally to the regular ones for +|figure| or |table|. +\fi + +Der Befehl |\rot|\-|caption| wird vom \package{caption}"=Paket derart +erweitert, daß |\rot|\-|caption*| und |\rot|\-|caption|\-|of| analog zu +|\caption*| und |\caption|\-|of| verwendet werden können. + +\pagebreak[3] +\subsection{setspace} +\label{setspace} +\packagedescription{% +Das \package{setspace}"=Paket\cite{setspace} bietet Optionen und Befehle, +um den Zeilenabstand festzulegen, so führt +z.B.\ \cs{usepackage}\x\csoarg{one\-half\-spacing}\x\csmarg{set\-space} +zu einem Dokument, welches einanhalbzeilig gesetzt wird.} + +Wird das \package{setspace}"=Paket zusammen mit dem \package{caption}"=Paket +verwendet, sind alle Abbildungs- und Tabellenbeschriftungen auf "`einzeilig"' +voreingestellt. Dies kann durch |font=|\x|one|\-|half|\-|spacing| (welches +auf "`einanhalbzeilig"' umstellt), |font=|\x|double|\-|spacing| (welches +auf "`zweizeilig"' umstellt) oder |font={stretch=|\x\meta{Wert}|}| geändert +werden. +\See{auch \Ref{fonts}} + +\pagebreak[3] +\subsection{sidecap} +\label{sidecap} +\packagedescription{% +Das \package{sidecap}"=Paket\cite{sidecap} bietet die Gleitumgebungen +\texttt{SC\-figure} und \texttt{SC\-table}, die anders als \texttt{figure} +und \texttt{table} die Beschriftung \emph{neben} den Inhalt setzen.} + +Spezielle Einstellungen für die Umgebungen |SC|\-|figure| und |SC|\-|table| +können mit +\begin{quote} + |\captionsetup[SCfigure]|\marg{Optionen}\quad\emph{und}\\ + |\captionsetup[SCtable]|\marg{Optionen} +\end{quote} +getätigt werden. +Diese Einstellungen werden dann zusätzlich zu denjenigen für |figure| +bzw.~|table| berücksichtigt. + +\pagebreak[3] +\begin{Note} +Das \package{sidecap}"=Paket bietet eigene Optionen für die Ausrichtung der +Beschriftung. Werden diese verwendet, so überschreiben sie die Einstellungen, +die mit der Option |jus|\-|ti|\-|fi|\-|ca|\-|tion=| getätigt worden sind. +\end{Note} + +\begin{Note} +Die Einstellungen |margin=| bzw.~|width=| werden nicht auf diese Abbildungen +bzw.~Tabellen angewandt, solange sie nicht explizit mit +|\caption|\-|setup[SC|\-|figure]{|\ldots|}| +bzw.~|\caption|\-|setup[SC|\-|table]{|\ldots|}| gesetzt werden. +\end{Note} + +\medskip + +\begin{Annotation*} +Anstelle des \package{sidecap}"=Paketes können Sie für Beschrifungen neben der +Abbildung bzw.~Tabelle auch das leistungsfähigere und vielseitigere +\package{floatrow}"=Paket\cite{floatrow} benutzen. +\end{Annotation*} + +\pagebreak[3] +\subsubsection*{Undokumentierte Eigenschaften} +Das \package{sidecap}"=Paket \version{1.6} hat einige undokumentierte +Paketoptionen und Befehle, die eine weitere Anpassung der Beschrifungen erlauben: + +\pagebreak[3] +\DescribeMacro{margincaption} +Die Paketoption +\begin{quote} + |margincaption|\qquad{\small(z.B.~|\usepackage[margincaption]{sidecap}|)} +\end{quote} +führt dazu, daß alle Beschriftungen in den Umgebungen |SC|\-|figure| und +|SC|\-|table| in den Rand gesetzt werden. + +\pagebreak[3] +\DescribeMacro{\sidecaptionvpos} +Der Befehl +\begin{quote} + |\sidecaptionvpos|\marg{Typ}\marg{Position} +\end{quote} +legt die vertikale Ausrichtung der Beschriftung fest. \meta{Position} kann +entweder `|t|' (für eine Ausrichtung am oberen Rand), `|b|' (für eine +Ausrichtung am unteren Rand), oder `|c|' (für eine zentrierte Ausrichtung) +sein. +Die Vorbelegung für die Umgebung |table| ist `|t|', für |figure| und alle +anderen, die mit |\Declare|\-|Floating|\-|Environment| definiert werden, `|b|'. + +\pagebreak[3] +\subsection{subfigure} +\label{subfigure} +\packagedescription{% +Das \package{subfigure}"=Paket\cite{subfigure} bietet Unterstützung für +Unter"=Abbildungen und -Tabellen. +Es ist veraltet und wurde vom Autor durch das modernere +\package{subfig}"=Paket ersetzt.} + +Da das \package{subfigure}"=Paket veraltet ist, wird es vom +\package{caption}"=Paket nur derart unterstützt, daß alte Dokumente (welche +mit dem \package{caption}"=Paket \version{1.x} gesetzt wurden) noch +übersetzbar sind und das erwartete Ergebnis liefern. + +Bitte verwenden Sie daher stattdessen das \package{subfig}- oder das +\package{subcaption}"=Paket, welches +\thispackage\ \version{3.x} aktiv unterstützt. + +\See{auch Dokumentation des \package{subfig}"=Paketes\cite{subfig}} + +\pagebreak[3] +\subsection{supertabular und xtab} +\label{supertabular} +\packagedescription{% +Die Pakete \package{supertabular}\cite{supertabular} und \package{xtab}\cite{xtab} +bieten eine Umgebung, die ähnlich wie die Umgebung \texttt{long\-table} des +\package{longtable}"=Paketes\cite{longtable} einen Seitenumbruch inmitten der +Tabelle erlaubt. +Für eine detailierte Beschreibung der Unterschiede zwischen diesen Paketen +schauen Sie bitte in den "`LaTeX Begleiter"'\cite{TLC2}.} + +Spezielle Einstellungen für die Umgebung |super|\-|tabular| bzw.~|x|\-|tabular| +können mit +\begin{quote} + |\captionsetup[supertabular]|\marg{Optionen}\quad\emph{bzw.}\\ + |\captionsetup[xtabular]|\marg{Optionen} +\end{quote} +getätigt werden. +Diese Einstellungen werden dann zusätzlich zu denjenigen für |table| +berücksichtigt. + +\begin{Note} +Der Befehl |\Continued|\-|Float| funktioniert \emph{nicht} innerhalb der +Umgebungen |super|\-|tabular| und |x|\-|tabular|. +\end{Note} + +\pagebreak[3] +\subsection{threeparttable} +\label{threeparttable} +\packagedescription{% +Das \package{threeparttable}"=Paket\cite{threeparttable} bietet ein Schema +für Tabellen, welches strukturierte Anmerkungen nach dem Tabelleninhalt +erlaubt. +Dieses Schema bietet eine Lösungsmöglichkeit für das alte Problem "`Fußnoten +in Tabellen"'.} + +\NEWfeature{v3.1} +Spezielle Einstellungen für die Umgebungen |three|\-|part|\-|table| und +|measured|\-|figure| können mit +\begin{quote} + |\captionsetup[threeparttable]|\marg{Optionen}\quad\emph{und}\\ + |\captionsetup[measuredfigure]|\marg{Optionen} +\end{quote} +getätigt werden. +Diese Einstellungen werden dann zusätzlich zu denjenigen für |figure| +bzw.~|table| berücksichtigt. + +\begin{Note} +Da die Breite der Beschriftung hier die gleiche Breite wie die Abbildung +bzw.~Tabelle hat, werden die Einstellungen |margin=| bzw.~|width=| hier nicht +angewandt, solange sie nicht explizit mit +|\caption|\-|setup[three|\-|part|\-|table]{|\ldots|}| oder +|\caption|\-|setup[measured|\-|figure]{|\ldots|}| gesetzt werden. +\end{Note} + +\medskip + +\begin{Annotation*} +Das \package{floatrow}"=Paket\cite{floatrow} bietet eine vergleichbare +Funktionalität an. +\end{Annotation*} + +\pagebreak[3] +\subsection{wrapfig} +\label{wrapfig} +\packagedescription{% +Ähnlich wie das \package{floatflt}-, \package{picinpar}- und +\package{picins}"=Paket stellt auch das \package{wrapfig}"=Paket Umgebungen +zum Setzen von Abbildungen und Tabellen zur Verfügung, die nicht die gesamte +Seitenbreite ausfüllen und vom Text umflossen werden. +Für eine detailierte Beschreibung der Unterschiede zwischen diesen Paketen +schauen Sie bitte in den "`LaTeX Begleiter"'\cite{TLC2}.} + +\NEWfeature{v3.1} +Spezielle Einstellungen für die Umgebungen |wrap|\-|figure| und +|wrap|\-|table| können mit +\begin{quote} + |\captionsetup[wrapfigure]|\marg{Optionen}\quad\emph{und}\\ + |\captionsetup[wraptable]|\marg{Optionen} +\end{quote} +getätigt werden. +Diese Einstellungen werden dann zusätzlich zu denjenigen für |figure| +bzw.~|table| berücksichtigt. + +\begin{Note} +Die Einstellungen |margin=| bzw.~|width=| werden nicht auf diese Abbildungen +bzw.~Tabellen angewandt, solange sie nicht explizit mit +|\caption|\-|setup[wrap|\-|figure]{|\ldots|}| +bzw.~|\caption|\-|setup[wrap|\-|table]{|\ldots|}| gesetzt werden. +\end{Note} + +% --------------------------------------------------------------------------- % + +\clearpage +\section{Weiterführende Dokumente} + +Folgende, im Internet verfügbare Dokumente möchte ich an dieser Stelle +jedem ans Herz legen: + +\begin{itemize} +\item + Die \TeX\ FAQ -- "`Frequently Asked Questions"' über \TeX\ und \LaTeX: + \begin{quote}\url{http://faq.tug.org/}\end{quote} + +\iffalse % Völlig veraltet, daher leider keine Empfehlung mehr wert +\item + Die DANTE-FAQ -- Oft gestellte Fragen \& deren Antworten: + \begin{quote}\url{http://www.dante.de/faq/de-tex-faq/}\end{quote} +\fi + +\item + \emph{"`Hilfe für LaTeX-Einsteiger"'} von Christian Faulhammer: + \begin{quote}\url{http://www.minimalbeispiel.de/}\end{quote} + +\item + \emph{"`Bilder einfügen in \LaTeX: Ein How-To"'} von Dominik Bischoff + beinhaltet die häufigsten Fragen und Antworten, die im Zusammenhang + mit \LaTeX\ und Abbildungen auftreten: + \begin{quote} + \url{http://mirror.ctan.org/info/l2picfaq/german/l2picfaq.pdf} + \end{quote} + +\item + \emph{"`Gleitobjekte -- die richtige Schmierung"'} von Axel Reichert + erl"autert den Umgang mit gleitenden Umgebungen und ist hier im Netz + zu finden: + \begin{quote} + \url{http://mirror.ctan.org/info/german/gleitobjekte/} + \end{quote} + +\item + \textsf{epslatex} von Keith Reckdahl enth"alt viele n"utzliche Tips im + Zusammenhang mit der Einbindung von Graphiken in \LaTeXe. + Das Dokument ist in Englisch und unter + \begin{quote}\url{http://mirror.ctan.org/info/epslatex/}\end{quote} + zu finden. +\end{itemize} + +% --------------------------------------------------------------------------- % + +\pagebreak[3] +\section{Danksagungen} + +Von ganzem Herzen danke ich Katja Melzner, +Steven D. Cochran, Frank Mittelbach, Olga Lapko, +David Carlisle, Carsten Heinz, Keith Reckdahl, Markus Kohm, +Heiko Oberdiek und Herbert Voß. + +Weiterhin möchte ich mich herzlich bei +Harald Harders, +Peter Löffler, +Peng Yu, +Alexander Zimmermann, +Matthias Pospiech, +Jürgen Wieferink, +Christoph Bartoschek, +Uwe Stöhr, +Ralf Stubner, +Geoff Vallis, +Florian Keiler, +Jürgen Göbel, +Uwe Siart, +Sang-Heon Shim, +Henrik Lundell, +David Byers, +William Asquith, +Prof.~Dr.~Dirk Hoffmann, +Frank Martini, +Danie Els, +Philipp Woock, +Fadi Semmo, +Matthias Stevens und +Leo Liu +für ihre Hilfe beim stetigen Verbessern dieses Paketes bedanken. + +% --------------------------------------------------------------------------- % + +\clearpage\appendix +\section{Alphabetische Referenz} + +%\newenvironment{Warnings}% +% {\begin{trivlist}% +% \def\Message{\pagebreak[3]\leftskip=0pt\relax\item[]\color{blue}}% +% \def\Description{\nopagebreak\par\nopagebreak\color{black}\leftskip=1.5em\nopagebreak}% +% }% +% {\color{black}\end{trivlist}} +\makeatletter +\newenvironment{Warnings}{% + \newif\ifMessage + \def\Message{% + \ifMessage\end{minipage}\par\vspace\itemsep\pagebreak[3]\fi + \begin{minipage}{\linewidth}% + \setlength\parindent{0pt}% + \setlength\parskip{\smallskipamount}% + \setlength\leftskip{0pt}% + \color{blue}% + \Messagetrue}% + \def\Description{% + \par\color{black}\leftskip=1.5em}% + \def\Or{\@testopt\@Or{oder}}% + \def\@Or[##1]{% + \\{\small\color{black}\hspace{1.5em}\textit{-- ##1 --}}\\}% +}{% + \ifMessage\end{minipage}\par\fi +} +\makeatother + +\subsection{Optionen} +\newcommand\preambleoption{~% + \begingroup\def\thefootnote{\fnsymbol{footnote}}% + \footnotemark[2]% + \endgroup} +\newcommand\preambleoptiontext{% + \begingroup\def\thefootnote{\fnsymbol{footnote}}% + \footnotetext[2]{Diese Optionen stehen nur in dem Dokumentenvorspann + (Präambel) zur Verfügung.}% + \endgroup} + +\begin{longtable*}{lll} +Option & Kurzbeschreibung & Abschnitt \\ +\hline +\endhead +|aboveskip| & setzt den Abstand über der Beschriftung & \ref{skips} \\ +|belowskip| & setzt den Abstand unter der Beschriftung & \ref{skips} \\ +|compatibility|\preambleoption & erzwingt (Nicht-)Kompatibilität & \ref{compatibility} \\ +%|config| & & \ref{x} \\ +|figureposition|\preambleoption & gibt einen Hinweis auf die Position & \ref{skips} \\ +|font|(|+|) & wählt den Zeichensatz & \ref{fonts} \\ +|format| & wählt das Format & \ref{formats} \\ +\iffalse +|FPlist| & Wohin soll der Listeneintrag einer FPfigure zeigen? & \ref{fltpage} \\ +|FPref| & Wohin soll ein |\ref| einer FPfigure zeigen? & \ref{fltpage} \\ +\fi +|hangindent| & setzt den "`hängenden"' Einzug & \ref{margins} \\ +|hypcap| & wählt das "`hypcap"' Feature aus & \ref{hyperref} \\ +|hypcapspace| & setzt den Abstand über einem Hyperlink & \ref{hyperref} \\ +|indention| & setzt den Einzug & \ref{margins} \\ +|justification| & wählt die Ausrichtung & \ref{justification} \\ +|labelfont|(|+|) & wählt den Zeichensatz des Bezeichners & \ref{fonts} \\ +|labelformat| & wählt das Format des Bezeichners & \ref{formats} \\ +|labelsep| & wählt den Trenner zw. Bezeichner$+$Text & \ref{formats} \\ +|labelseparator| & -- identisch mit |labelsep| -- & \ref{formats} \\ +|list| & schaltet die Listeneinträge an bzw. aus & \ref{lists} \\ +|listformat| & wählt das Listenformat & \ref{lists} \\ +|margin| & setzt den Rand bzw. die Ränder & \ref{margins} \\ +|margin*| & setzt den Rand, sofern keine Breite gesetzt ist & \ref{margins} \\ +|maxmargin| & setzt den max. zu verwendenen Rand & \ref{margins} \\ +|minmargin| & setzt den min. zu verwendenen Rand & \ref{margins} \\ +|name| & setzt den Namen der aktuellen Umgebung & \ref{names} \\ +|oneside| & wählt den einseitigen Modus & \ref{margins} \\ +|options| & führt die angegebene Optionsliste aus & \\ +|parindent| & setzt den Absatzeinzug & \ref{margins} \\ +|parskip| & setzt den Absatzabstand & \ref{margins} \\ +|position| & gibt einen Hinweis auf die Position & \ref{skips} \\ +|singlelinecheck| & schaltet die "`Ein-Zeilen-Prüfung"' ein bzw. aus & \ref{justification} \\ +%|size| & wählt die Größe des Zeichensatzes & \ref{x} \\ +|skip| & setzt den Abstand zwischen Inhalt \& Beschriftung & \ref{skips} \\ +|strut| & schaltet die Verwendung von |\strut| ein bzw. aus & \ref{formats} \\ +|style| & wählt einen Stil aus & \ref{style} \\ +%|style*| & wählt einen Stil aus & \ref{style} \\ +|subtype| & setzt den Typ der Unterbeschriftungen & \phantom{t}--~\footnotemark \\ +|tableposition|\preambleoption & gibt einen Hinweis auf die Position & \ref{skips} \\ +|textfont|(|+|) & wählt den Zeichensatz des Textes & \ref{fonts} \\ +|textformat| & wählt das Format des Textes & \ref{formats} \\ +|twoside| & wählt den zweiseitigen Modus & \ref{margins} \\ +|type| & setzt den Typ \& setzt ggf.~einen Hyperlink-Anker & \ref{types} \\ +|type*| & setzt (nur) den Typ & \ref{types} \\ +|width| & setzt eine feste Breite & \ref{margins} \\ +\end{longtable*} +\preambleoptiontext +\footnotetext{Die Option \texttt{subtype} ist in der Dokumentation + des \package{subcaption}"=Paketes beschrieben.} + +\nopagebreak\parbox[t]{\linewidth}{% prevent from page break +\begin{Note*} + Veraltete Optionen sind hier nicht gelistet; diese sind in + \Ref{caption1} und + \Ref{caption2} zu finden. +\end{Note*}} + +\pagebreak[3] +\subsection{Befehle} + +\begin{longtable*}{lll} +Befehl & & Abschnitt \\ +\hline +\endhead +|\abovecaptionskip| & & \ref{skips} \\ +%|\AtBeginCaption| & & \ref{hooks} \\ +%|\AtEndCaption| & & \ref{hooks} \\ +|\belowcaptionskip| & & \ref{skips} \\ +|\caption| & & \ref{caption} \\ +|\caption*| & & \ref{caption} \\ +|\captionlistentry| & & \ref{captionlistentry} \\ +|\captionof| & & \ref{caption} \\ +|\captionof*| & & \ref{caption} \\ +|\captionsetup| & & \ref{captionsetup} \\ +|\captionsetup*| & & \ref{captionsetup} \\ +|\centerfirst| & & \ref{justification} \\ +|\centerlast| & & \ref{justification} \\ +|\clearcaptionsetup| & & \ref{captionsetup} \\ +|\clearcaptionsetup*| & & \ref{captionsetup} \\ +|\ContinuedFloat| & & \ref{ContinuedFloat} \\ +|\DeclareCaptionFont| & & \ref{declare} \\ +|\DeclareCaptionFormat| & & \ref{declare} \\ +|\DeclareCaptionFormat*| & & \ref{declare} \\ +|\DeclareCaptionJustification| & & \ref{declare} \\ +|\DeclareCaptionLabelFormat| & & \ref{declare} \\ +|\DeclareCaptionLabelSeparator| & & \ref{declare} \\ +|\DeclareCaptionLabelSeparator*| & & \ref{declare} \\ +|\DeclareCaptionListFormat| & & \ref{declare} \\ +|\DeclareCaptionOption| & & \ref{declare} \\ +|\DeclareCaptionStyle| & & \ref{declare} \\ +|\DeclareCaptionSubType| & & --~\footnotemark \\ +|\DeclareCaptionTextFormat| & & \ref{declare} \\ +|\showcaptionsetup| & & \ref{captionsetup} \\ +\end{longtable*} +\footnotetext{\cs{DeclareCaptionSubType} ist in der Dokumentation + des \package{subcaption}"=Paketes beschrieben.} + +\clearpage +\subsection{Warnungen} + +\begin{Warnings} + +\Message + |\caption outside box or environment.| +\Or + |\captionsetup{type=...} outside box or environment.| +\Or + |\captionsetup{type*=...} or \captionof outside box|\\ + | or environment.| +\Description + |\caption|, |\caption|\-|of| sowie |\caption|\-|setup{type=|\x\meta{type}|}| + sind nur für die Anwendung \emph{innerhalb} einer Box, Gruppe oder Umgebung + konzipiert. Außerhalb können unerwünschte Seiteneffekte auftreten. + \par\See{\Ref{types} und \Ref{caption}} + +\Message + |\caption will not be redefined since it's already|\\ + |redefined by a document class or package which is|\\ + |unknown to the caption package.| +\Description + Wenn \thispackage\ eine vorhandene (und unbekannte) Erweiterung des Befehls + |\caption| erkannt hat, definiert es |\caption| nicht erneut um, da dies + unweigerlich den Verlust der ursprünglichen Erweiterung zur Folge hätte. + Daher funktionieren manche Features, wie |\caption*|, + |\Continued|\-|Float|, das optionale Argument von |\caption|\-|setup|, + sowie die Optionen |list=| und |hypcap=| nicht mehr; sie werden + entweder ignoriert oder arbeiten nicht erwartungsgemäß.\par + Wenn Sie an der ursprünglichen Erweiterung nicht interessiert sind + und stattdessen den vollen Umfang des \package{caption}"=Paketes + verwenden wollen, können Sie es mit der nicht supporteten(!) + Option |compatibility=|\x|false| probieren und die Daumen drücken. + (Aber Sie werden die nächste Warnung stattdessen bekommen.) + \par\See{\Ref{classes} und \Ref{compatibility}} + +\Message + |Forced redefinition of \caption since the|\\ + |unsupported(!) package option `compatibility=false'|\\ + |was given.| +\Description + Da Sie so mutig waren, die Option |compatibility=|\x|false| zu probieren, + wird \thispackage\ sein bestes geben, um diesen Wunsch zu erfüllen. + Aber je nach verwendeter Dokumentenklasse bzw.~Pakete sollten Sie sich + auf Fehlfunktionen oder Fehlermeldungen einstellen. + Also bitte die Daumen gedrückt halten! + \par\See{\Ref{compatibility}} + +\Message + |Hyperref support is turned off because hyperref has|\\ + |stopped early.| +\Description + Wenn das \package{hyperref}"=Paket vorzeitig seinen Dienst einstellt + (den Grund hierfür teilt es Ihnen mit), ist auch die + \package{hyperref}"=Unterstützung des \package{caption}"=Paketes nicht + verfügbar. Als Folge werden Sie einige Warnungen des + \package{hyperref}"=Paketes bekommen, ferner werden Hyperlinks + auf Abbildungen und Tabellen nicht funktionsfähig sein. + \par\See{\Ref{hyperref}\,} + +\Message + |Ignoring optional argument [|\meta{pos}|] of \setcapwidth.| +\Description + \Thispackage\ bemüht sich, so gut es kann, die \KOMAScript"=Befehle + bzgl.~Tabellen und Abbildungen zu emulieren. Aber das optionale Argument + von |\setcapwidth| funktioniert (noch) nicht; wenn Sie es dennoch angeben, + wird daher diese Warnung ausgegeben. + \par\See{\Ref{KOMA}} + +\Message + |Internal Warning: |\meta{warning message}|.| +\Description + Diese Warnung sollten Sie niemals sehen; entweder verwenden Sie ein Paket, + welches |figure| und/oder |table| in einer dem \package{caption}"=Paket + unbekannten Art \& Weise verändert, oder aber es ist ein Fehler im + \package{caption}"=Paket. + Bitte senden Sie mir einen Fehlerbericht diesbezüglich per E-Mail. Danke! + +\Message + |\label without proper \caption| +\Description + Anders als bei den meisten nicht gleitenden Umgebungen wird bei den + gleitenden Umgebungen die interne Referenz erst bei Anwendung des Befehls + |\caption| erzeugt. Ein |\label| Befehl, der auf diese Abbildung + bzw.~Tabelle verweisen soll, muß daher entweder direkt \emph{nach} oder innerhalb + des Argumentes von |\caption| platziert werden. + +\Message + |Option `|\meta{option}|' was not in list `|\meta{option list}|'.| +\Description + Wenn Sie versuchen, eine bestimmte Option aus einer Optionsliste zu + entfernen, zum Beispiel mit |\clear|\-|caption|\-|setup[po|\-|si|\-|tion]{table}|, + und die angegebene Option kann nicht in der Liste gefunden werden, so + erhalten Sie die obenstehende Warnung. + Liegt dies nicht an einem Schreibfehler Ihrerseits und möchten Sie ferner + diese Warnung unterdrücken, so können Sie hierzu + |\clear|\-|caption|\-|setup*| anstelle von |\clear|\-|caption|\-|setup| + verwenden. + \par\See{\Ref{captionsetup}} + +\Message + |Option list `|\meta{option list}|' undefined.| +\Description + Wenn Sie versuchen, eine bestimmte Option aus einer Optionsliste zu + entfernen, zum Beispiel mit |\clear|\-|caption|\-|setup[for|\-|mat]{figure}|, + und die angegebene Optionsliste ist (noch) nicht definiert, so + erhalten Sie die obenstehende Warnung. + Liegt dies nicht an einem Schreibfehler Ihrerseits und möchten Sie ferner + diese Warnung unterdrücken, so können Sie hierzu |\clear|\-|caption|\-|setup*| + anstelle von |\clear|\-|caption|\-|setup| verwenden. + \par\See{\Ref{captionsetup}} + +\Message + |Obsolete option `ignoreLTcapwidth' ignored.| +\Description + Die Option |ignoreLTcapwidth| des \package{caption2}"=Paketes wird nicht von + diesem Paket emuliert. In der Regel können Sie aber diese Option einfach + ersatzlos entfernen. + \par\See{\Ref{caption2} und \Ref{longtable}} + +\Message + |`ragged2e' support has been changed. Rerun to get|\\ + |captions right.| +\Description + Das \package{ragged2e} wird nur dann vom \package{caption}"=Paket geladen, + wenn es tatsächlich benötigt wird. + Um dies zu gewährleisten, sind zwei \LaTeX"=Läufe notwendig, daher können Sie + beim ersten Durchlauf diese Warnung bekommen. + Mit dem nächsten \LaTeX"=Lauf sollte also diese Warnung verschwunden sein. + \par\See{\Ref{justification}} + +\Message + |Reference on page |\meta{page no.}| undefined.| +\Description + Ist ein zweiseitiges Dokumentenlayout gewählt, benötigt \thispackage\ zwei + \LaTeX"=Läufe, um die Ränder korrekt zuordnen zu können; + daher können Sie beim ersten Durchlauf diese Warnung bekommen. + Mit dem nächsten \LaTeX"=Lauf sollte also diese Warnung verschwunden sein. + \par\See{\Ref{margins}} + +\Message + |The caption type was already set to `|\meta{type}|'.| +\Description + Diese Warnung informiert Sie über vermische \package{caption}"=Optionen. + Wenn Sie z.B.~|\caption|\-|setup{type=|\x|table}| oder + |\caption|\-|of{table}{|\ldots|}| in einer |figure| Umgebung verwenden, + werden beide Optionssätze, sowohl derjenige für |figure| + (mit |\caption|\-|setup[figure]{|\ldots|}| angegeben) als auch + derjenige für |table| (mit |\caption|\-|setup[table]{|\ldots|}| angegeben), + angewandt. + {\small(Diese Warnung kann bei Bedarf durch Verwendung der Stern-Form + |\caption|\-|setup*{type=|\x\ldots|}| unterdrückt werden.)\par} + \par\See{\Ref{captionsetup}} + +\Message + |The option `hypcap=true' will be ignored for this|\\ + |particular \caption.| +\Description + \Thispackage\ hat keinen geeigneten Hyperlink"=Anker für diese Beschriftung + gefunden, daher hat es entschlossen, die Einstellung |hypcap=|\x|true| (die per + Standard gesetzt ist) zu ignorieren. + Als Folge werden Hyperlinks zu dieser Abbildung oder Tabelle (etwa über das + Abbildungsverzeichnis, oder selber mit |\ref| oder |\auto|\-|ref| angelegt) + nicht auf den Beginn der Abbildung oder Tabelle verweisen, sondern stattdessen + auf deren Beschriftung.\par + Dies kann zum Beispiel passieren, wenn eine Beschriftung mit |\caption|\-|of| + innerhalb einer nicht-gleitenden Umgebung gesetzt wird, aber auch, wenn ein + Sie ein Paket in Ihrem Dokument verwenden, welches die Umgebungen |figure| + oder |table| umdefiniert hat, dieses Paket aber dem \package{caption}"=Paket + unbekannt ist.\par + Ist dies für Sie ok, aber die Warnung stört Sie, können Sie sie + |\caption|\-|setup{hyp|\-|cap=|\x|false}| direkt vor dem betroffenen |\caption| + oder |\caption|\-|of| Befehl platzieren. + Ist dies hingegen nicht für Sie ok, können Sie selber an geeigneter Stelle mit + |\caption|\-|setup{type=|\x\meta{float type}|}| einen Hyperlink"=Anker setzen. + \par\See{\Ref{hyperref}\,} + +\Message + |Unsupported document class (or package) detected,|\\ + |usage of the caption package is not recommended.| +\Description + Entweder ist die verwendete Dokumentenklasse dem \package{caption}"=Paket + unbekannt, oder aber Sie haben ein Paket in Ihrem Dokument eingebunden, + welches ebenfalls das interne Makro |\@make|\-|caption| (welches intern für + das Setzen der Abbildungs- und Tabellenbeschriftungen zuständig ist) + umdefiniert. + Wie-auch-immer, \thispackage\ wird entweder das Design der Beschriftungen + in einer ungewollten Art \& Weise verändern, oder aber es wird zu keinem + geordneten Verhalten und/oder Fehlermeldungen kommen. Deswegen wird in + diesem Falle die Verwendung des \package{caption}"=Paketes nicht empfohlen. + \par\See{\Ref{classes} und \Ref{compatibility}} + +\Message + |Unused \captionsetup[|\meta{type}|].| +\Description + Es wurden Optionen mit |\caption|\-|setup[|\meta{Typ}|]| definiert, die im + weiteren Verlauf des Dokumentes aber nicht zur Anwendung gekommen sind. + Dies kann zum einen an einem Schreibfehler im Argument \meta{Typ} liegen, + aber auch daran, daß ein dem \package{caption}"=Paket unbekanntes Paket + die Umgebungen |figure| und/oder |table| umdefiniert hat, oder auch einfach + daran, daß Sie die angegebene Umgebung gar nicht im späteren Verlauf Ihres + Dokumentes verwenden. + (Möchten Sie diese Warnung unterdrücken, so verwenden Sie + |\caption|\-|setup*| anstelle von |\caption|\-|setup|.) + \par\See{\Ref{captionsetup}} + +\Message + |Usage of the |\meta{package}| package together with the|\\ + |caption package is strongly not recommended.|\\ + |Instead of loading the |\meta{package}| package you should|\\ + |use the caption package option `tableposition=top'.| +\Description + Das angegebene Paket mischt sich ebenfalls in die Verwendung der Abstände + über- und unterhalb der Beschriftungen ein. Viele Köche verderben den Brei, + also ist es ratsam, sich für eines der Pakete -- das angegebene oder + \thispackage\ -- zu entscheiden, um falsche Abstände zu vermeiden. + \par\See{\Ref{skips}} + +\end{Warnings} + +\pagebreak[3] +\subsection{Fehlermeldungen} + +\begin{Warnings} + +\Message + + |Argument of \@caption has an extra }.| +\Or + |Paragraph ended before \@caption was complete.| +\Description + Beim Setzen von Beschriftungen, die etwas spezielles wie z.B.~eine Tabelle + enthalten, ist zu beachten, daß immer ein alternativer Listeneintrag als + optionales Argument bei |\caption| bzw. |\caption|\-|of| mit angegeben + werden muß, auch wenn Ihr Dokument gar kein Abbildungs- oder + Tabellenverzeichnis beeinhaltet. + \par\See{\Ref{caption}, \Ref{lists} und \Ref{hyperref}\,} + +\Message + |\caption outside float.| +\Description + |\caption| ist (in der Regel) nur für die Anwendung in gleitenden + Umgebungen wie |figure| oder |table|, oder für die Anwendung innerhalb + |long|\-|table| oder |wrap|\-|figure| konzipiert, ansonsten bekommen Sie + obenstehende Fehlermeldung. + Um eine Beschriftung innerhalb einer anderen Umgebung zu setzen, verwenden + Sie bitte entweder die Kombination |\caption|\-|setup{type=|\x\meta{type}|}| + $+$ |\caption|, oder aber |\caption|\-|of|. + \par\See{\Ref{caption}} + +\Message + |\ContinuedFloat outside float.| +\Description + |\Continued|\-|Float| ist nur für die Anwendung innerhalb einer gleitenden + Umgebung wie |figure| oder |table| konzipiert. %oder auch |long|\-|table| + Für die Anwendung in einer Box, Gruppe oder nicht-gleitenden Umgebung + bietet sich die Kombination + |\caption|\-|setup{type=|\x\meta{type}|}| $+$ |\Continued|\-|Float| an.\par + |\Continued|\-|Float| innerhalb einer |long|\-|table| ist nicht möglich, + aber vielleicht ist die |longtable*| Umgebung, die eine longtable + ohne Erhöhung des Tabellenzählers setzt, für Sie hilfreich. + \par\See{\Ref{ContinuedFloat} und \Ref{longtable}} + +\Message + |Continued `|\meta{type}|' after `|\meta{type}|'.| +\Description + Fortlaufende Abbildungen oder Tabellen dürfen nicht von anderen + gleitenden Umgebungen (oder einer |long|\-|table|) unterbrochen werden, + so ist z.B.~ eine Tabelle zwischen einer Abbildung und einer + (mit |\Continued|\-|Float|) fortgesetzten Abbildung nicht möglich. + \par\See{\Ref{ContinuedFloat}} + +\Message + |For a successful cooperation we need at least version|\\ + |`|\meta{date}|' of package |\meta{package}|, but only version|\\ + |`|\meta{old-date}|' is available.| +\Description + Das aktuelle \package{caption}"=Paket kann nicht mit einem solch + veralteten Paket zusammen betrieben werden. + Bitte aktualisieren Sie das betroffene Paket, zumindest auf die + angegebene Version. + +\Message + |Internal Error: |\meta{error message}|.| +\Description + Diesen Fehler sollten Sie niemals sehen. Wenn doch, senden Sie mir bitte + einen Fehlerbericht per E-Mail. + +\Message + |No float type '|\meta{type}|' defined.| +\Description + Der in |\caption|\-|setup{type=|\x\meta{type}|}|, + |\caption|\-|of|\marg{type}, oder |\Declare|\-|Caption|\-|Sub|\-|Type| + angegebene \meta{type} ist unbekannt. + \meta{type} sollte entweder `\texttt{figure}' oder `\texttt{table}', oder + aber eine mit mit + |\Declare|\-|Floating|\-|Environment| + (vom \package{newfloat}"=Paket bereitgestellt), + |\new|\-|float| + (vom \package{float}"=Paket\cite{float} bereitgestellt) oder + |\Declare|\-|NewFloat|\-|Type| + (vom \package{floatrow}"=Paket\cite{floatrow} bereitgestellt) + definierte Gleitumgebung sein. + +\Message + |Not allowed in longtable* environment.| +\Description + Der Befehl |\caption| ist innerhalb einer |long|\-|table*| Umgebung + nicht erlaubt. Verwenden Sie entweder |\caption*| für eine Beschriftung + ohne Bezeichner oder benutzen Sie die reguläre |long|\-|table| Umgebung. + +\Message + |Not available in compatibility mode.| +\Description + Das angeforderte Feature steht im sog.~Kompatibilitätsmodus nicht zur + Verfügung, d.h.~\thispackage\ hat eine inkompatible Dokumentenklasse oder + ein inkompatibles Paket entdeckt, welches ebenfalls |\caption| erweitert + und damit die Anwendung dieses Features bzw.~Befehls verhindert. + \par\See{\Ref{compatibility}} + +\Message + |Only one \caption can be placed in this environment.| +\Description + Innerhalb der Umgebungen, die das \package{fltpage} oder \package{sidecap} + Paket zur Verfügung stellt, kann nur eine einzige Bildbeschriftung gesetzt + werden. + +\Message + |Option clash for package caption.| +\Or[aber manchmal auch] + |Missing \begin{document}.| +\Description + Ein anderes \LaTeX-Paket hat \thispackage\ bereits geladen, Sie können es + daher nicht noch einmal mit anderen Optionen laden. + Als Verdächtiger kommt z.B.~das \package{ctable} oder das + \package{subfig}"=Paket in Frage; sollte dies zutreffen, + laden Sie bitte \thispackage\ \emph{vor} dem betreffenen Paket. + Im Falle des \package{subfig}"=Paketes können Sie auch alternativ beim + Laden des \package{subfig}"=Paketes die Option |caption=|\x|false| angeben. + \par\See{Dokumentation des \package{subfig}"=Paketes\cite{subfig}} + +\Message + |Paragraph ended before \caption@makecurrent was complete.| +\Or + |Paragraph ended before \caption@prepareanchor was complete.| +\Description + Beim Setzen von Beschriftungen, die mehr als aus einem Absatz bestehen, + ist zu beachten, daß immer ein alternativer Listeneintrag als optionales + Argument bei |\caption| bzw. |\caption|\-|of| mit angegeben werden muß, + auch wenn Ihr Dokument gar kein Abbildungs- oder Tabellenverzeichnis + beeinhaltet. + \par\See{\Ref{caption}, \Ref{lists} und \Ref{hyperref}\,} + +\Message + |Something's wrong--perhaps a missing \caption|\\ + |in the last figure or table.| +\Description + Sie scheinen den Befehl |\sub|\-|caption| (oder einen anderen, + der eine Unter"=Beschriftung setzt) ohne eine zugehörige, + mit |\caption| gesetzte, Beschriftung anzuwenden. + Dies wird nicht unterstützt. + +\Message + |The option `labelsep=|\meta{name}|' does not work|\\ + |with `format=hang'.| +\Or + |The option `labelsep=|\meta{name}|' does not work|\\ + |with \setcaphanging (which is set by default).| +\Description + Ein Bezeichnungstrenner, der ein |\\| Kommando enthält (wie etwa + |labelsep=|\x|newline|), kann nicht mit einem Format kombiniert werden, + welches "`hängende"' Beschriftungen liefert (wie etwa |format=|\x|hang|). + Bitte wählen Sie entweder einen anderen Trenner (wie + z.B.~|labelsep=|\x|colon|), oder aber ein anderes Beschriftungsformat + (wie z.B.~|format=|\x|plain|) aus. + \par\See{\Ref{formats} bzw.~\Ref{KOMA}} + +\Message + |The package option `caption=false' is obsolete.|\\ + |Please pass this option to the subfig package instead|\\ + |and do *not* load the caption package anymore.| +\Description + Sie haben die Option |caption=|\x|false| angegeben. Diese war früher mal eine + Krücke, um nicht das komplette \package{caption}"=Paket zu laden, sondern + nur den für das \package{subfig}"=Paket zwingend benötigten Teil. + Dieser Mechanismus ist veraltet und wird nicht mehr angeboten; stattdessen + sollten Sie diese Option dem \package{subfig}"=Paket übergeben und + \thispackage\ nicht mehr explizit laden. + \par\See{Dokumentation des \package{subfig}"=Paketes\cite{subfig}} + +\Message + |Undefined boolean value `|\meta{value}|'.| +\Description + Es wurde versucht, eine boolische Option (wie z.B.~|singlelinecheck=| oder + |hypcap=|) auf einen unbekannten Wert zu setzen. Nur die Werte |false|, |no|, + |off|, |0| bzw.~|true|, |yes|, |on| und |1| sind hier möglich. + +\Message + |Undefined format `|\meta{name}|'.| +\Description + Es wurde versucht, ein Beschriftungsformat auszuwählen, welches nicht + definiert ist. Vielleicht ein Schreibfehler!? + \par\See{\Ref{formats}} + +\Message + |Undefined label format `|\meta{name}|'.| +\Description + Es wurde versucht, ein Bezeichnungsformat auszuwählen, welches nicht + definiert ist. Vielleicht ein Schreibfehler!? + \par\See{\Ref{formats}} + +\Message + |Undefined label separator `|\meta{name}|'.| +\Description + Es wurde versucht, ein Beschriftungstrenner auszuwählen, welcher nicht + definiert ist. Vielleicht ein Schreibfehler!? + \par\See{\Ref{formats}} + +\Message + |Undefined list format `|\meta{name}|'.| +\Description + Es wurde versucht, ein Listenformat auszuwählen, welches nicht + definiert ist. Vielleicht ein Schreibfehler!? + \par\See{\Ref{lists}} + +\Message + |Undefined position `|\meta{name}|'.| +\Description + Es wurde versucht, den Positionshinweis auf einen unbekannten Wert zu + setzen. Vielleicht ein Schreibfehler!? + \par\See{\Ref{skips}} + +\Message + |Undefined style `|\meta{name}|'.| +\Description + Es wurde versucht, ein Beschriftungsstil auszuwählen, welcher nicht + definiert ist. Vielleicht ein Schreibfehler!? + \par\See{\Ref{style}} + +\Message + |Undefined text format `|\meta{name}|'.| +\Description + Es wurde versucht, ein Textformat auszuwählen, welches nicht + definiert ist. Vielleicht ein Schreibfehler!? + \par\See{\Ref{formats}} + +\Message + |Usage of the `position' option is incompatible|\\ + |to the `|\meta{package}|' package.| +\Description +% (ftcap,nonfloat,topcapt) + Das angegebene Paket mischt sich ebenfalls in die Verwendung der + Abstände über- und unterhalb der Beschriftungen ein. + Sie müssen sich daher für \emph{einen} der Mechanismen entscheiden: + Entweder Sie verwenden das angegebene Paket für die Anpassung + der Abstände, oder aber die |position|"=Option des + \package{caption}"=Paketes, beides geht nicht. + \par\See{\Ref{skips}} + +\Message + |You can't use both, the (obsolete) caption2 *and*|\\ + |the (current) caption package.| +\Description + Die Pakete \package{caption} und \package{caption2} können nicht + innerhalb eines Dokumentes gleichzeitig verwendet werden. + Verwenden Sie bitte nur das aktuelle \package{caption}"=Paket. + \par\See{\Ref{caption2}} + +\end{Warnings} + +% --------------------------------------------------------------------------- % + +\clearpage +\section{Versionshistorie} +\label{history} + +Die Version $1.0$ dieses Paketes wurde im Jahr 1994 veröffentlicht und bot +eine Handvoll Optionen, um das Design der Abbildungs- +bzw.~Tabellenbeschriftungen anzupassen. +Ferner unterstützte diese Version bereits das \package{rotating} und +\package{subfigure}"=Paket. +Version $1.1$ führte die |center|\-|last| Option ein; +in Version $1.2$ kam die Unterstützung des \package{float}"=Paketes hinzu. +Die Version $1.3$ verfeinerte die Koorperation mit dem +\package{subfigure}"=Paket; die Version $1.4$ bot die Option |nooneline| +als Neuheit an. + +Die Version $2.0$ des sog.~\package{caption2}"=Paketes war ein +experimenteller Seitenzweig der regulären Version des +\package{caption}"=Paketes. Er wurde im Jahre 1995 als Beta"=Testversion +öffentlich gemacht, um die Nachfrage nach neuen Features und der +Anpassung an das \package{longtable}"=Paket kurzfristig zu befriedigen. +(Eine Version $2.1$ wurde 2002 als Fehlerbereinigung nachgereicht.) + +Im Jahr 2003 hatte ich dann endlich wieder etwas Zeit gefunden, und so +wurde im Dezember die neue reguläre Version $3.0$ in Zusammenarbeit mit +Frank Mittelbach und Steven Cochran aus der Taufe gehoben, die endlich +den arg vernachlässigten Seitenzweig namens \package{caption2} +überflüssig machte. +Weite Teile des Paketes wurden hierfür neu geschrieben, und auch das +Benutzerinterface wurde gründlich renoviert. +Außerdem kam die Unterstützung der Pakete \package{hyperref}, +\package{hypcap}, \package{listings}, \package{sidecap} und +\package{supertabular} hinzu. + +Während all die vorangegangenen Versionen dafür ausgelegt waren, mit +den \LaTeX"=Standarddokumentenklassen \class{article}, \class{report} und +\class{book} benutzt zu werden, unterstützt die im Jahre 2007 +veröffentlichte Version $3.1$ auch die \AmS, die \KOMAScript, \NTG{} und +\SmF{} Dokumentenklassen, ferner auch die \class{beamer}"=Klasse. +Weiterhin kamen die Unterstützung der französischen Babel"=Option +\package{frenchb} und des französischen Sprachpaketes \package{frenchle} +bzw.~\package{frenchpro} hinzu; +außerdem wurde die Anzahl der unterstützten Pakete um die Pakete +\package{floatflt}, \package{fltpage}, \package{picinpar}, +\package{picins}, \package{setspace}, \package{threeparttable} +und \package{wrapfig} erhöht. +Neue Optionen und Befehle wurden ebenfalls eingeführt, unter anderem +|font+|, |figure|\-|within| \& |table|\-|within|, +|list| \& |list|\-|format|, |max|\-|margin| \& |min|\-|margin|, +|\caption|\-|list|\-|entry|, |\Declare|\-|Caption|\-|List|\-|Format|. +Einen weiteren Gewinn stellt der neu integrierte Kompatibilitätscheck +\see*{\Ref{compatibility}}, das neue "`hypcap"' Feature +\see*{\Ref{hyperref}\,}, und die Unterstützung von Teil"=Beschriftungen +\see*{\package{subcaption}"=Paketdokumentation} dar. + +% --------------------------------------------------------------------------- % + +\clearpage +\section{Kompatibilität zu älteren Versionen} + +\subsection{caption v\texorpdfstring{$1.x$}{1.x}} +\label{caption1} + +Diese Version des \package{caption}"=Paketes ist weitgehend kompatibel zu den +älteren Versionen $1.0$ bis $1.4$ des Paketes; alte, vorhandene Dokumente +sollten sich also in der Regel ohne Probleme weiterhin übersetzen lassen. +Jedoch ist zu beachten, daß eine Mischung aus alten Befehlen und neueren +Optionen bzw.~Befehlen zu unerwünschten Nebeneffekten führen kann. + +Hier eine kurze Ãœbersicht über die alten, überholten Optionen und ihre +aktuellen Entsprechungen: + +\begin{center}\small +\begin{tabular}{ll} +\package{caption} \version{1.x} & \package{caption} \version{3.x}\\ +\hline +%\endhead +|normal| & |format=plain|\\ +|hang| & |format=hang|\\ +|isu| & |format=hang|\\ +|center| & |justification=centering|\\ +|centerlast| & |justification=centerlast|\\ +|nooneline| & |singlelinecheck=off|\\ +|scriptsize| & |font=scriptsize|\\ +|footnotesize| & |font=footnotesize|\\ +|small| & |font=small|\\ +|normalsize| & |font=normalsize|\\ +|large| & |font=large|\\ +|Large| & |font=Large|\\ +|up| & |labelfont=up|\\ +|it| & |labelfont=it|\\ +|sl| & |labelfont=sl|\\ +|sc| & |labelfont=sc|\\ +|md| & |labelfont=md|\\ +|bf| & |labelfont=bf|\\ +|rm| & |labelfont=rm|\\ +|sf| & |labelfont=sf|\\ +|tt| & |labelfont=tt|\\ +\end{tabular} +\end{center} + +Neben den Optionen zum Einstellen des Zeichensatzes gab es auch die Befehle +|\caption|\-|size| bzw.~|\caption|\-|font| und |\caption|\-|label|\-|font|, +die direkt mit |\re|\-|new|\-|command| umdefiniert werden konnten. +Dieser Mechanismus wurde durch die Anweisungen +\begin{quote} + |\DeclareCaptionFont{|\ldots|}{|\ldots|}|\qquad und\\ + |\captionsetup{font=|\ldots|,labelfont=|\ldots|}| +\end{quote} +ersetzt. \SeeUserDefined + +Das Setzen eines Randes geschah in \version{1.x} mit +\begin{quote} + |\setlength{\captionmargin}{|\ldots|}|\quad. +\end{quote} +Dies wurde durch +\begin{quote} + |\captionsetup{margin=|\ldots|}| +\end{quote} +ersetzt. +\See{\Ref{margins}} + +Zum Beispiel wäre +\begin{quote} + |\usepackage[hang,bf]{caption}|\\ + |\renewcommand\captionfont{\small\sffamily}|\\ + |\setlength\captionmargin{10pt}| +\end{quote} +in aktueller Notation +\begin{quote} + |\usepackage[format=hang,labelfont=bf,font={small,sf},|\\ + | margin=10pt]{caption}| +\end{quote} +bzw. +\begin{quote} + |\usepackage{caption}|\\ + |\captionsetup{format=hang,labelfont=bf,font={small,sf},|\\ + | margin=10pt}|\quad. +\end{quote} + +Die etwas exotische Option |ruled|, die eine partielle Anwendung der +eingestellten Parameter bei Umgebungen des Typs |ruled| aktivierte, +wird ebenfalls emuliert, hat aber keine direkte Entsprechung in +dieser Version des \package{caption}"=Paketes. +Möchte man das Aussehen der Abbildungen des Stils |ruled|, +der durch das \package{float}"=Paket zur Verfügung gestellt wird, +verändern, so ist dies nun durch +\begin{quote} + |\DeclareCaptionStyle{ruled}{|\ldots|}| +\end{quote} +bzw. +\begin{quote} + |\captionsetup[ruled]{|\ldots|}| +\end{quote} +möglich. +\SeeUserDefined[, \Ref{captionsetup} und \Ref{float}] + +\subsection{caption2 v\texorpdfstring{$2.x$}{2.x}} +\label{caption2} + +Das Paket \package{caption} und seine experimentelle, nun veraltete +Variante \package{caption2} sind vom internen Konzept +her zu unterschiedlich, um hier eine vollständige Kompatibilität +gewährleisten zu können. +Daher liegt diesem Paket weiterhin die Datei |caption2.sty| bei, so daß +ältere Dokumente, die das \package{caption2}"=Paket verwenden, weiterhin +übersetzt werden können. + +Neue Dokumente sollten jedoch auf dem aktuellen \package{caption}"=Paket +aufgesetzt werden. In den meisten Fällen ist es hierfür ausreichend, +einfach die Anweisung +\begin{quote} + |\usepackage[...]{caption2}| +\end{quote} +durch +\begin{quote} + |\usepackage[...]{caption}| +\end{quote} +zu ersetzen. Einige Optionen und Befehle werden jedoch nicht emuliert, +so daß Sie anschließend Fehlermeldungen erhalten können. +Die folgenden Absätze werden Ihnen jedoch bei der Umsetzung dieser +Optionen und Befehle helfen. Sollten darüberhinaus noch Fragen offen sein +oder Probleme auftreten, dann zögern Sie bitte nicht, mich diesbezüglich +per E-Mail zu kontaktieren. + +Zusätzlich zu den bereits im letzten Abschnitt vorgestellten Optionen +werden ebenfalls emuliert: + +\begin{center}\small +\begin{tabular}{ll} +\package{caption2} \version{2.x} & \package{caption} \version{3.x}\\ +\hline +%\endhead +|flushleft| & |justification=raggedright|\\ +|flushright| & |justification=raggedleft|\\ +|oneline| & |singlelinecheck=on|\\ +\end{tabular} +\end{center} + +Das Setzen eines Randes geschah in \version{2.x} mit +\begin{quote}\leavevmode\hbox{% + |\setcaptionmargin{|\ldots|}| bzw. + |\setcaptionwidth{|\ldots|}|\quad. +}\end{quote} +Dies wurde durch +\begin{quote}\leavevmode\hbox{% + |\captionsetup{margin=|\ldots|}| bzw. + |\captionsetup{width=|\ldots|}| +}\end{quote} +ersetzt. \See{\Ref{margins}} + +Das Setzen des Einzuges wurde in \version{2.x} mit +\begin{quote} + |\captionstyle{indent}|\\ + |\setlength\captionindent{|\ldots|}| +\end{quote} +\pagebreak[3] +erledigt, dies geschieht nun stattdessen mit +\nopagebreak[3] +\begin{quote} + |\captionsetup{format=plain,indention=|\ldots|}|\quad. +\end{quote} + +Die Sonderbehandlung von einzeiligen Beschriftungen ließ sich in +\version{2.x} mit |\oneline|\-|captions|\-|false| aus- +bzw.~|\oneline|\-|captions|\-|true| wieder einschalten. +Dies wurde durch +|\caption|\-|setup{|\x|single|\-|line|\-|check=|\x|off}| +bzw. +|\caption|\-|setup{|\x|single|\-|line|\-|check=|\x|on}| +ersetzt. \See{\Ref{justification}} + +Die Befehle +\begin{quote} + |\captionlabeldelim|, |\captionlabelsep|, |\captionstyle|,\\ + |\defcaptionstyle|, |\newcaptionstyle| und |\renewcaptionstyle| +\end{quote} +haben keine direkte Entsprechnung und werden daher durch diese +Version des \package{caption}"=Paketes auch nicht emuliert. +Sie führen also bei der Verwendung zu Fehlermeldungen und müssen daher +zwingend umgesetzt werden. Die Umsetzung ist von Fall zu Fall verschieden, +lesen Sie sich daher bitte diese Anleitung gründlich durch und suchen Sie +sich die Optionen bzw.~Befehle als Ersatz heraus, die Ihren Bedürfnissen +entsprechen. + +\iffalse +Als kleine Hilfestellung hier die Beispiele aus der alten Anleitung zum +\package{caption2}"=Paket und deren Umsetzung: + +\newenvironment{OldNew}% + {\begin{minipage}\linewidth + \def\Old{Alt:\begin{quote}}% + \def\New{\end{quote}Neu:\begin{quote}}% + \def\Or{\end{quote}\centerline{-- oder --}\begin{quote}}% + }% + {\end{quote}\end{minipage}} + +\begin{OldNew} +\Old + |\captionstyle{center}| +\New + |\captionsetup{justification=centering}| +\end{OldNew} + +\hrule + +\begin{OldNew} +\Old + |\captionstyle{indent}|\\ + |\setlength{\captionindent}{1cm}| +\New + |\captionsetup{format=plain,indention=1cm}| +\end{OldNew} + +\hrule + +\begin{OldNew} +\Old + |\renewcommand\captionfont{\small}|\\ + |\renewcommand\captionlabelfont{\itshape}| +\New + |\captionsetup{font=small,labelfont=it}| +\end{OldNew} + +\hrule + +\begin{OldNew} +\Old + |\renewcommand\captionfont{\small\itshape}|\\ + |\renewcommand\captionlabelfont{\upshape}| +\New + |\captionsetup{font=small,textfont=it}| +\end{OldNew} + +\hrule + +\begin{OldNew} +\Old + |\setcaptionwidth{.5\textwidth}| +\New + |\captionsetup{width=.5\textwidth}| +\end{OldNew} + +\hrule + +\begin{OldNew} +\Old + |\setcaptionmargin{.25\textwidth}| +\New + |\captionsetup{margin=.25\textwidth}| +\end{OldNew} + +\hrule + +\begin{OldNew} +\Old + |\newcaptionstyle{absatz}{\captionlabel: \exampletext\par}|\\ + |\captionstyle{absatz}| +\New + |\DeclareCaptionFormat{absatz}{#1: #3\par}|\\ + |\captionsetup{format=absatz,singlelinecheck=off}| +\Or + |\captionsetup{format=plain,singlelinecheck=off}| +\end{OldNew} + +\hrule + +\begin{OldNew} +\Old + |\newcaptionstyle{fancy}{\textsf{\captionlabel}\\\exampletext\par}|\\ + |\captionstyle{fancy}| +\New + |\DeclareCaptionFormat{fancy}{\textsf{#1}\\#3\par}|\\ + |\captionsetup{format=fancy,singlelinecheck=off}| +\Or + |\captionsetup{format=plain,labelfont=sf,labelsep=newline}| +\end{OldNew} + +\hrule + +\begin{OldNew} +\Old + |\newcaptionstyle{fancy2}{\exampletext\hfill\textit{(\captionlabel)}}|\\ + |\captionstyle{fancy2}| +\New + |\DeclareCaptionFormat{fancy2}{#3\hfill\textit{(#1)}}|\\ + |\captionsetup{format=fancy2,singlelinecheck=off}| +\end{OldNew} + +\hrule + +\begin{OldNew} +\Old + |\newcaptionstyle{mystyle}{%|\\ + | \normalcaptionparams|\\ + | \renewcommand\captionlabelfont{\bfseries}%|\\ + | \renewcommand\captionlabeldelim{.}%|\\ + | \onelinecaptionsfalse|\\ + | \usecaptionstyle{centerlast}}|\\ + |\captionstyle{mystyle}| +\New + |\DeclareCaptionStyle{mystyle}{labelfont=bf,labelsep=period,justification=centerlast}|\\ + |\captionsetup{style=mystyle}| +\end{OldNew} + +\hrule + +\begin{OldNew} +\Old + |\newcaptionstyle{hangandleft}{%|\\ + | \let\oldcaptiontext\exampletext|\\ + | \def\exampletext{\raggedright\oldcaptiontext}%|\\ + | \usecaptionstyle{hang}}|\\ + |\captionstyle{hangandleft}| +\New + |\captionsetup{format=hang,justification=raggedright}| +\end{OldNew} + +\hrule + +\begin{OldNew} +\Old + |\newcaptionstyle{fancy}{%|\\ + | \usecaptionmargin\captionfont|\\ + | \onelinecaption|\\ + | {{\captionlabelfont\captionlabel\captionlabeldelim}%|\\ + | \captionlabelsep\exampletext}%|\\ + | {{\centering\captionlabelfont\captionlabel\par}%|\\ + | \centerlast\exampletext\par}}|\\ + |\captionstyle{fancy}| +\New + |\DeclareCaptionFormat{fancy}{\centering#1\par\centerlast#3\par}|\\ + |\DeclareCaptionStyle{fancy}|\\ + | [format=plain,justification=centering]|\\ + | {format=fancy}|\\ + |\captionsetup{style=fancy}| +\Or + |\DeclareCaptionFormat{fancy}{#1\par#3\par}|\\ + |\DeclareCaptionStyle{fancy}|\\ + | [format=plain,justification=centering]|\\ + | {format=fancy,justification=centerlast}|\\ + |\captionsetup{style=fancy}| +\end{OldNew} + +\hrule + +\begin{OldNew} +\Old + |\renewcaptionstyle{longtable}{\usecaptionstyle{normal}}| +\New + |\captionsetup[longtable]{format=plain}| +\end{OldNew} +\fi + +Ebenfalls keine Entsprechung hat die Option |ignore|\-|LT|\-|cap|\-|width| +der \version{2.x}. +Deren Verwendung kann in der Regel einfach entfallen, da \thispackage\ den +Wert von |\LT|\-|cap|\-|width| sowieso nicht beachtet, solange er nicht +explizit auf einen anderen Wert als den Standardwert ($=$|4in|) gesetzt wird. +\See{\Ref{longtable}} + +\subsection{caption v\texorpdfstring{$3.0$}{3.0}} +\label{caption3} + +%\NEWdescription{v3.1} +\Thispackage\ \version{3.0} hatte keine weiteren Dokumentenklassen +unterstützt als die drei Standard"=Klassen, die \LaTeX\ selber mitbringt: +\class{article}, \class{report} und \class{book}. +Daher waren die Vorbelegungen der Einstellungsmöglichkeiten fest durch +dieses Paket vorgegeben, sie repräsentierten das Aussehen bei Verwendung +einer dieser Klassen. +Nun aber unterstützt \thispackage\ mehr Dokumentenklassen aktiv, folglich +kann die Vorbelegung nun von der verwendeten Dokumentenklasse abhängen. + +Ein Beispiel: Während in \version{3.0} die Vorbelegung der Ausrichtung +immer |jus|\-|ti|\-|fi|\-|ca|\-|tion=|\x|jus|\-|ti|\-|fied| war, +ist sie nun immer noch |jus|\-|ti|\-|fied| wenn eine der drei Standardklassen +verwendet wird, aber |jus|\-|ti|\-|fi|\-|ca|\-|tion=|\x|ragged|\-|right|, +wenn die \package{beamer}"=Klasse verwendet wird. + +Möchten Sie weiterhin die "`alten"' Vorbelegungen, so können Sie die Option +|style=base| beim Laden des \package{caption}"=Paketes angeben oder später +mit |\caption|\-|setup{style=|\x|base}| den alten Grundzustand wieder +herstellen. + +\medskip + +Weiterhin prüft das \package{caption}"=Paket nun automatisch auf +Inkompatibilitäten und gibt ggf.~eine Warnung aus. +Sollte eine ernsthafte Inkompatibilität festgestellt werden, werden außerdem +einige Features des \package{caption}"=Paketes abgeschaltet. +Lediglich diese Prüfung ist neu, wenn Sie also neuerdings eine +Kompatibilitätswarnung erhalten, so waren auch bereits vorangegangene Versionen +des \package{caption}"=Paketes inkompatibel, dies hatte sich aber früher "`nur"' +durch Seiteneffekte bzw.~nicht korrekt funktionierende Optionen oder Befehle +geäußert. +Die Kompatibilitätswarnungen sagen auch nicht aus, daß etwas schief gegangen ist, +sondern lediglich, daß etwas schief gehen könnte. Sie sollten aber auf jeden Fall, +wenn Sie \thispackage\ trotz einer solchen Warnung einsetzen, die Abbildungs- +und Tabellenbeschriftungen bzgl.~ihres Aussehens genau im Auge behalten. + +\bigskip + +\begin{Note*} +\Thispackage\ \version{3.0} hatte als Interimslösung die Option +|caption=|\x|false| bereitgestellt, um nicht das ganze \package{caption}"=Paket +zu laden, sondern nur denjenigen Teil, der für den Betrieb des +\package{subfig}"=Paketes\cite{subfig} notwendig war. +Dieser Mechanismus ist veraltet und wird nicht mehr angeboten; bitte +übergeben Sie stattdessen bei Bedarf diese Option an das \package{subfig}"=Paket +und laden Sie nicht mehr \thispackage. +%\par\See{\package{subfig}"=Paketdokumentation} +\end{Note*} + +% --------------------------------------------------------------------------- % + +\iffalse +\TODO: subcaption-Anleitung +\fi + +% --------------------------------------------------------------------------- % + +\clearpage +\begin{thebibliography}{99} + + \bibitem{TLC2} + Frank Mittelbach und Michel Goossens:\\ + \newblock {\em Der {\LaTeX} Begleiter (2.\,Auflage)},\\ + \newblock Addison-Wesley, 2004. + + \bibitem{beamer} + Till Tantau:\\ + \href{http://www.ctan.org/pkg/beamer}% + {\emph{User Guide to the Beamer Class, Version 3.07}},\\ + March 11, 2007 + + \bibitem{KOMAScript} + Markus Kohm \& Jens-Uwe-Morawski:\\ + \href{http://www.ctan.org/pkg/koma-script}% + {\emph{KOMA-Script -- ein wandelbares \LaTeXe-Paket}},\\ + 2007-03-02 + + \bibitem{NTG} + Victor Eijkhout:\\ + \href{http://www.ctan.org/pkg/ntgclass}% + {\emph{An introduction to the Dutch \LaTeX\ document classes}},\\ + 3 September 1989 + + \bibitem{algorithms} + Rog\'erio Brito:\\ + \href{http://www.ctan.org/pkg/algorithms}% + {\emph{Algorithms}},\\ + June 2, 2006 + +\iffalse + \bibitem{algorithm2e} + Christophe Fiorio:\\ + \href{http://www.ctan.org/pkg/algorithm2e}% + {\emph{algorithm2e.sty -- package for algorithms}},\\ + March 11, 2007 +\fi + + \bibitem{float} + Anselm Lingnau:\\ + \href{http://www.ctan.org/pkg/float}% + {\emph{An Improved Environment for Floats}},\\ + 2001/11/08 + + \bibitem{floatflt} + Mats Dahlgren:\\ + \href{http://www.ctan.org/pkg/floatflt}% + {\emph{Welcome to the floatflt package}},\\ + 1998/06/05 + + \bibitem{floatrow} + Olga Lapko:\\ + \href{http://www.ctan.org/pkg/floatrow}% + {\emph{The floatrow package documentation}},\\ + 2007/12/24 + + \bibitem{fltpage} + Sebastian Gross:\\ + \href{http://www.ctan.org/pkg/fltpage}% + {\emph{Welcome to the beta test of fltpage package!}},\\ + 1998/11/13 + + \bibitem{hyperref} + Sebastian Rahtz \& Heiko Oberdiek:\\ + \href{http://www.ctan.org/pkg/hyperref}% + {\emph{Hypertext marks in \LaTeX}},\\ + November 12, 2007 + + \bibitem{hypcap} + Heiko Oberdiek:\\ + \href{http://www.ctan.org/pkg/hypcap}% + {\emph{The hypcap package -- Adjusting anchors of captions}},\\ + 2007/04/09 + + \bibitem{listings} + Carsten Heinz \& Brooks Moses:\\ + \href{http://www.ctan.org/pkg/listings}% + {\emph{The Listings Package}},\\ + 2007/02/22 + + \bibitem{longtable} + David Carlisle:\\ + \href{http://www.ctan.org/pkg/longtable}% + {\emph{The longtable package}},\\ + 2004/02/01 + + \bibitem{picinpar} + Friedhelm Sowa:\\ + \href{http://www.ctan.org/pkg/picinpar}% + {\emph{Pictures in Paragraphs}},\\ + July 13, 1993 + + \bibitem{picins} + Joachim Bleser und Edmund Lang:\\ + \href{http://www.ctan.org/pkg/picins}% + {\emph{PicIns-Benutzerhandbuch Version 3.0}},\\ + September~1992 + + \bibitem{rotating} + Sebastian Rahtz und Leonor Barroca:\\ + \href{http://www.ctan.org/pkg/rotating}% + {\emph{A style option for rotated objects in \LaTeX}},\\ + 1997/09/26 + + \bibitem{setspace} + Erica M. S. Harris \& Geoffrey Tobin:\\ + \href{http://www.ctan.org/pkg/setspace}% + {\emph{LaTeX Document Package ``setspace''}},\\ + 1 December 2000 + + \bibitem{sidecap} + Rolf Niepraschk \& Hubert G\"a\ss lein:\\ + \href{http://www.ctan.org/pkg/sidecap}% + {\emph{The sidecap package}},\\ + 2003/06/06 + + \bibitem{subfigure} + Steven D. Cochran:\\ + \href{http://www.ctan.org/pkg/subfigure}% + {\emph{The subfigure package}},\\ + 2002/07/02 + + \bibitem{subfig} + Steven D. Cochran:\\ + \href{http://www.ctan.org/pkg/subfig}% + {\emph{The subfig package}},\\ + 2005/07/05 + + \bibitem{supertabular} + Johannes Braams und Theo Jurriens:\\ + \href{http://www.ctan.org/pkg/supertabular}% + {\emph{The supertabular environment}},\\ + 2002/07/19 + + \bibitem{threeparttable} + Donald Arseneau:\\ + \href{http://www.ctan.org/pkg/threeparttable}% + {\emph{Three part tables: title, tabular environment, notes}},\\ + 2003/06/13 + + \bibitem{wrapfig} + Donald Arseneau:\\ + \href{http://www.ctan.org/pkg/wrapfig}% + {\emph{WRAPFIG.STY ver 3.6}},\\ + 2003/01/31 + + \bibitem{xtab} + Peter Wilson:\\ + \href{http://www.ctan.org/pkg/xtab}% + {\emph{The xtab package}},\\ + 2004/05/24 + +\end{thebibliography} + +% --------------------------------------------------------------------------- % + +\end{document} diff --git a/macros/latex/contrib/caption/caption-eng.pdf b/macros/latex/contrib/caption/caption-eng.pdf new file mode 100644 index 0000000000..d0e771e0c4 Binary files /dev/null and b/macros/latex/contrib/caption/caption-eng.pdf differ diff --git a/macros/latex/contrib/caption/caption-eng.tex b/macros/latex/contrib/caption/caption-eng.tex new file mode 100644 index 0000000000..8aa5e47331 --- /dev/null +++ b/macros/latex/contrib/caption/caption-eng.tex @@ -0,0 +1,4235 @@ +% +% This is file `caption-eng.tex'. +% +% $Id$ +% $HeadURL$ +% +% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +% +% -------------------------------------------------------------------------- +% +% 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, +% caption3.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, and newfloat.dtx, +% the derived files caption.sty, caption2.sty, caption3.sty, +% bicaption.sty, ltcaption.sty, subcaption.sty, and newfloat.sty, +% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. +% +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesFile{caption-eng.tex}[2011/11/02 v3.2 The caption package] +\hbadness=9999 \newcount\hbadness \hfuzz=20pt % Make TeX shut up. +%\errorcontextlines=3 + +\documentclass[USenglish]{ltxdoc} +\setlength\parindent{0pt} +\setlength\parskip{\smallskipamount} +\setlength\leftmargini{2em}% default = 2.5em +\makeatletter\g@addto@macro\MacroFont{\normalcolor}\makeatother + +\newcommand\LineBreak{\linebreak[3]} +\newcommand\PageBreak{\pagebreak[3]} +\usepackage{ifpdf} +\ifpdf + \usepackage{mathptmx,courier} + \usepackage[scaled=0.90]{helvet} + \addtolength\marginparwidth{15pt} + \ifdim\paperheight=297mm % a4paper + \renewcommand\LineBreak{\\} + \renewcommand\PageBreak{\clearpage} + \fi +\fi + +\usepackage[bottom]{footmisc} +\usepackage{graphicx,longtable,setspace} + +\usepackage{hypdoc} +\ifpdf\usepackage{hypdestopt}\fi +\hypersetup{pdfkeywords={LaTeX, package, caption},pdfstartpage={},pdfstartview={}} +\hypersetup{breaklinks=true} + +\usepackage[listof=0,hypcap=false]{caption}[2008/04/01] + +\DeclareRobustCommand*\eTeX{\texorpdfstring + {\leavevmode\hbox{$\varepsilon$}-\TeX}% + {e-TeX}} +\DeclareRobustCommand*\AmS{\texorpdfstring + {{\protect\usefont{OMS}{cmsy}{m}{n}A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}% + {AMS}} +\DeclareRobustCommand*\KOMAScript{\texorpdfstring + {\textsf{K\kern.05em O\kern.05em M\kern.05em A\kern.1em-\kern.1em Script}}% + {KOMA-Script}} +\DeclareRobustCommand*\NTG{NTG} +\DeclareRobustCommand*\SmF{SMF} + +\usepackage{marvosym} +\makeatletter +\newcommand*\INFO{\@ifstar{\@INFO{}}{\@INFO{\vbox to \ht\strutbox}}} +\newcommand*\@INFO[1]{\MARGINSYM{#1{\LARGE\Info}}} +\makeatother + +\newcommand*\MARGINSYM[1]{\hskip 1sp \marginpar{\raggedleft\textcolor{blue}{{#1}}}} +\newcommand*\NEW[2]{}%\hskip 1sp \marginpar{\footnotesize\sffamily\raggedleft#1\\#2}} + +% \ContinuedFloat +\DeclareCaptionLabelFormat{continued1}{Continued #1~#2} +\DeclareCaptionLabelFormat{continued2}{#1~#2\alph{ContinuedFloat}} +% \DeclareCaptionLabelFormat +\DeclareCaptionLabelFormat{bf-parens}{(\textbf{#2})} +% \DeclareCaptionStyle +\DeclareCaptionStyle{mystyle}[margin=5mm,justification=centering]% + {font=footnotesize,labelfont=sc,margin={10mm,0mm}} +% Example 1 +\DeclareCaptionFormat{myformat1}{#1#2\\#3} +\newlength\myindention +\DeclareCaptionFormat{myformat2}{#1#2\\\hspace*\myindention#3} +\DeclareCaptionOption{myindention}{\setlength\myindention{#1}} +% Example 2 +\DeclareCaptionFormat{reverse}{#3#2#1} +\DeclareCaptionLabelFormat{fullparens}{(\bothIfFirst{#1}{~}#2)} +\DeclareCaptionLabelSeparator{fill}{\hfill} +% Example 3 +\DeclareCaptionFormat{llap}{\llap{#1#2}#3\par} +\DeclareCaptionFormat{llapx}{\llap{\makebox[5em][l]{#1}}#3\par} +% Example 4 +\DeclareCaptionLabelFormat{andtable}{#1~#2 \& \tablename~\thetable} + +\newcommand*\purerm[1]{{\upshape\mdseries\rmfamily #1}} +\newcommand*\puresf[1]{{\upshape\mdseries\sffamily #1}} +\newcommand*\purett[1]{{\upshape\mdseries\ttfamily #1}} +\let\class\puresf \let\package\puresf + +\newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}} +\newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}} +\newcommand*\version[2][]{$v#2$} +\newcommand*\x{\discretionary{}{}{}} + +\newenvironment{Annotation}% + {\ifvmode\else\unskip\par\fi\pagebreak[2]% + \smallskip + \small(\ignorespaces}{\unskip)\par} +\newenvironment{Annotation*}% + {\ifvmode\else\unskip\par\fi\pagebreak[2]% + \small(\ignorespaces}{\unskip)\par} + +\newenvironment{Example}% + {\ifvmode\else\unskip\par\fi\pagebreak[2]% + \minipage{\linewidth}\smallskip}% + {\smallskip\endminipage\par} + +\makeatletter +\newcommand\example{\@ifstar + {\@example{belowskip=\abovecaptionskip}}% + {\@example{}}} +\def\@example#1{% + \@testopt{\@@example{#1}}{figure}} +\long\def\@@example#1[#2]#3#4{% + \begingroup + \captionsetup{#1,size=small,margin={\leftmargini,10pt},#3}% + \captionof{#2}[]{#4}% + \endgroup} +\makeatother + +\newenvironment{Expert}% + {\ifvmode\else\unskip\par\fi\pagebreak[3]% + \smallskip + \footnotesize\ignorespaces}{\par} +\newenvironment{Expert*}% + {\ifvmode\else\unskip\par\fi\pagebreak[3]% + \footnotesize\ignorespaces}{\par} + +\newenvironment{Note}[1][\DefaultNoteText]% + {\ifvmode\else\unskip\par\fi + \smallskip + \small\emph{#1:}~\ignorespaces}{\par} +\newenvironment{Note*}[1][\DefaultNoteText]% + {\ifvmode\else\unskip\par\fi + \small\emph{#1:}~\ignorespaces}{\par} + +\newenvironment{Options}[1]% + {\list{}{\renewcommand\makelabel[1]{\texttt{##1}\hfil}% + \settowidth\labelwidth{\texttt{#1\space}}% + \setlength\leftmargin{10pt}% + \addtolength\leftmargin{\labelwidth}% + \addtolength\leftmargin{\labelsep}}}% + {\endlist} + +\makeatletter +\newcommand*\Ref{\@ifstar{\@Ref\ref}{\@Ref\autoref}} +\newcommand*\@Ref[2]{#1{#2}: \textit{\nameref{#2}}} +\newcommand*\SEE[3][]{\nopagebreak{#1(#2 #3)}} +\newcommand*\SeeUserDefined[1][]{\See{\Ref{declare}#1}} +\makeatother + +\begin{document} +\let\subsectionautorefname\sectionautorefname +\let\subsubsectionautorefname\sectionautorefname + +\def\thispackage{the \package{caption} package} +\def\Thispackage{The \package{caption} package} + +\newcommand*\DefaultNoteText{Note} +\newcommand*\NEWfeature{\NEW{New feature}} +\newcommand*\NEWdescription{\NEW{New description}} +\makeatletter +\newcommand*\See{\@ifstar{\SEE{See}}{\SEE[\small]{See}}} +\newcommand*\see{\@ifstar{\SEE{see}}{\SEE[\small]{see}}} +\makeatother + +% --------------------------------------------------------------------------- % + +\GetFileInfo{caption-eng.tex} +\let\docdate\filedate +\GetFileInfo{caption.sty} + +\title{Customizing captions of floating environments} +\author{Axel Sommerfeldt\\ + \url{https://gitlab.com/axelsommerfeldt/caption}} +\date{\docdate} +\maketitle + +% --------------------------------------------------------------------------- % + +\begin{abstract} +\Thispackage\ offers customization of captions +in floating environments such |figure| and |table| and cooperates with +many other packages. +\par\smallskip +\textit{Please note:} Many document classes already have build-in options and +commands for customizing captions. +If these possibilities are sufficient for you, there is usually no need for +you to use the \package{caption} package at all. +And if you are just interested in using the command \cs{captionof}, loading of +the very small \package{capt-of} package is usually sufficient. +\end{abstract} + +\newcommand\exampletext{% + White sand beaches. The pink smoothness of the conch shell. A sea abundant + with possibilities. Duty-free shops filled with Europe's finest gifts and + perfumes. Play your favorite game of golf amidst the tropical greens on one + of the many championship courses.} + +% --------------------------------------------------------------------------- % + +\section*{Introduction} + +Within the standard \LaTeX\ document classes captions haven't received the +attention they deserve. Simply typeset as an ordinary paragraph there is no +remarkable visual difference from the rest of the text, like here: + +\example*{size=normalsize,margin=0pt}{\exampletext} + +There should be possibilities to change this; for example, it would be nice +to make the text of the caption a little bit smaller as the normal +text, add an extra margin, typeset the caption label with the same font +family and shape as your headings etc. Just like this one: + +\example*{size=small,margin=10pt,labelfont=bf,labelsep=endash}{\exampletext} + +You can do this easily with this package as there are many ready-to-use +caption formatting options, but you are free to define your very own stuff, too. + +\bigskip + +\INFO\begin{minipage}[t]{\textwidth} +\small +Please note that \thispackage\ is only controlling the look \& feel of the +captions. It does \emph{not} control the placement of the captions. +(But you could do so by using other packages like the \package{floatrow} + package\cite{floatrow}.) +\end{minipage} + +% --------------------------------------------------------------------------- % + +\clearpage +\tableofcontents + +% --------------------------------------------------------------------------- % + +\clearpage +\section{Using this package} +\label{usage} + +\DescribeMacro{\usepackage} +Insert +\begin{quote} + |\usepackage|\oarg{options}|{caption}[|\texttt{\filedate}|]| +\end{quote} +into the preamble of your document, i.e.~the part of your document +between |\document|\-|class| and |\begin{doc|\-|u|\-|ment}|. +The options control how your captions will look like; e.g., +\begin{quote} + |\usepackage[margin=10pt,font=small,labelfont=bf,|\\ + | labelsep=endash]{caption}|% + %|[|\texttt{\filedate}|]| +\end{quote} +would result in captions looking like the second one in the introduction. + +\DescribeMacro{\captionsetup} +For a later change of options \thispackage\ provides the command +\begin{quote} + |\captionsetup|\oarg{float type}\marg{options}\quad. +\end{quote} +So +\begin{quote} + |\usepackage[margin=10pt,font=small,labelfont=bf]{caption}| +\end{quote} +and +\begin{quote} + |\usepackage{caption}|\\ + |\captionsetup{margin=10pt,font=small,labelfont=bf}| +\end{quote} +are equal in their results. + +It's good to know that |\caption|\-|setup| has an effect on the current +environment only. So if you want to change settings for the +current |figure| or |table| only, just place the |\caption|\-|setup| command +inside the |figure| or |table| right before the |\caption| command. +For example +\begin{quote} + |\begin{figure}|\\ + | |\ldots\\ + | \captionsetup{singlelinecheck=off}|\\ + | \caption{|\ldots|}|\\ + |\end{figure}| +\end{quote} +switches the single-line-check off, but only for this |figure|, +so all the other captions remain untouched. + +\begin{Annotation} +For a detailed description of |\caption|\-|setup| see \Ref{captionsetup}. +\end{Annotation} + +% --------------------------------------------------------------------------- % + +\clearpage +\section{Options} +\label{options} + +\def\OptionLabel{RaggedRight} +\def\UserDefined{\ldots} + +% --------------------------------------------------------------------------- % + +\subsection{Formatting} +\label{formats} + +\DescribeMacro{format=} +A figure or table caption mainly consists of three parts: the caption label, +which says if this object is a `Figure' or `Table' and what number is +associated with it, the caption text itself, which is normally a short +description of contents, and the caption separator which separates the text +from the label. + +The \textit{caption format} determines how this information will be presented; +it is specified with the option +\begin{quote} + |format=|\meta{format name}\quad, +\end{quote} +having the name of the caption format as its argument. + +There are two standard caption formats: +%\footnote{You have the option to +%define your own ones, too. See section \ref{declare}: +%\textit{``Do it yourself!''} for details.} + +\begin{Options}{\OptionLabel} + \item[plain]%\NEWdescription{v3.0h} + Typesets the captions as a normal paragraph. + + \item[hang] + Indents the caption text, so it will `hang' under the first line of the text. + + \item[\UserDefined] + Own formats can be defined using |\Declare|\-|Caption|\-|Format|.\LineBreak + \SeeUserDefined +\end{Options} + +\begin{Example} + An example: Specifying the option + \begin{quote} + |format=hang| + \end{quote} + yields captions like this: + \example{format=hang}{\exampletext} +\end{Example} + +\pagebreak[3] +\DescribeMacro{indention=} +For both formats (\texttt{plain} and \texttt{hang}) you can setup an extra +indention starting at the second line of the caption. You do this with the +option +\begin{quote} + |indention=|\meta{amount}\quad. +\end{quote} + +Two examples: + +\begin{Example} + \begin{quote} + |format=plain,indention=.5cm| + \end{quote} + \captionsetup{skip=0pt} + \example{format=plain,indention=.5cm}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |format=hang,indention=-0.5cm| + \end{quote} + \captionsetup{skip=0pt} + \example{format=hang,indention=-0.5cm}{\exampletext} +\end{Example} + +\bigskip + +\pagebreak[3] +\DescribeMacro{labelformat=} +With the option +\nopagebreak[3] +\begin{quote} + |labelformat=|\meta{label format name} +\end{quote} +\nopagebreak[3] +%\NEWdescription{v3.0e} +you specify how the caption label will be typeset. +There are five standard caption label formats: + +\begin{Options}{\OptionLabel} + \item[default] + The caption label will be typeset as specified by the document class, + usually this means the name and the number (like \texttt{simple}). + (This is the default behaviour.) + + \item[empty] + The caption label will be empty. +\iffalse + (This option makes sense when used together with other options like + \texttt{labelsep=none}.) +\fi + + \item[simple] + The caption label will be typeset as a name and a number. + + \item[brace]\NEWfeature{v3.1f} + The caption label will be closed with a single (right) brace. + + \item[parens] + The number of the caption label will be typeset in parentheses. + + \item[\UserDefined] + Own label formats can be defined using |\Declare|\-|Caption|\-|Label|\-|Format|. + \SeeUserDefined +\end{Options} + +\begin{Example} + An example: Using the options + \begin{quote} + |format=plain,labelformat=parens,labelsep=quad| + \end{quote} + gives captions like this one: + \example{format=plain,labelformat=parens,labelsep=quad}{\exampletext} +\end{Example} + +\medskip + +\begin{Note*} +Some environments, e.g.~the |algorithm| environment offered by the +\package{algorithm2e} package, might react allergic to a change of the +caption label format. +\end{Note*} + +\bigskip + +\pagebreak[3] +\DescribeMacro{labelsep=} +With the option +\begin{quote} + |labelsep=|\meta{label separator name} +\end{quote} +you specify what caption separator will be used.\footnote{% + If the caption label or the caption text is empty, + no separator will be used.} +You can choose one of the following: + +\begin{Options}{\OptionLabel} + \item[none] + There is no caption separator. +\iffalse + (This option makes sense when used together with other options like + \texttt{labelformat=empty}.) +\fi + + \item[colon] + The caption label and text will be separated by a colon and a space. + + \item[period] + The caption label and text will be separated by a period and a space. + + \item[space] + The caption label and text will be separated by a single space. + + \item[quad] + The caption label and text will be separated by a |\quad|. + + \item[newline] + The caption label and text will be separated by a line break (|\\|). + Please note that this separator does not work with all caption + formats (e.g.~|format=|\x|hang|), and you'll get an error message + trying such combination of options. + + \item[endash]\NEWfeature{v3.0h} + The caption label and text will be separated by an en-dash, + surrounded by spaces (\verb*| -- |). + +%\showhyphens{separator} + \item[\UserDefined] + Own separators can be defined using |\Declare|\-|Caption|\-|Label|\-|Sep|\-|a|\-|ra|\-|tor|. + \SeeUserDefined +\end{Options} + +Three examples: +\begin{Example} + \begin{quote} + |format=plain,labelsep=period| + \end{quote} + \captionsetup{skip=0pt} + \example{format=plain,labelsep=period}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |format=plain,labelsep=newline,singlelinecheck=false| + \end{quote} + \captionsetup{skip=0pt} + \example{format=plain,labelsep=newline,singlelinecheck=false}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |format=plain,labelsep=endash| + \end{quote} + \captionsetup{skip=0pt} + \example{format=plain,labelsep=endash}{\exampletext} +\end{Example} + +\bigskip + +\pagebreak[3] +\DescribeMacro{textformat=}\NEWfeature{v3.0l} +With the option +\nopagebreak[3] +\begin{quote} + |textformat=|\meta{text format name} +\end{quote} +\nopagebreak[3] +you specify how the caption text will be typeset. +There are two standard caption text formats: + +\begin{Options}{\OptionLabel} + \item[empty] + The caption text will be suppressed. + + \item[simple] + The caption text will be typeset as it is. + + \item[period] + The caption text will be followed by a period. + + \item[\UserDefined] + Own text formats can be defined using |\Declare|\-|Caption|\-|Text|\-|Format|. + \SeeUserDefined +\end{Options} + +% --------------------------------------------------------------------------- % + +\PageBreak +\subsection{Justification} +\label{justification} + +\DescribeMacro{justification=} +As addition to the caption format you could also specify a +\emph{caption justification}; it is specified with the option +\begin{quote} + |justification=|\meta{justification name}\quad. +\end{quote} + +You can choose one of the following: + +\begin{Options}{\OptionLabel} + \item[justified] + Typesets the caption as a normal paragraph. + + \item[centering] + Each line of the caption will be centered. + +% \item[Centering] + + \item[centerlast] + The last line of each paragraph of the caption text will be centered. + + \item[centerfirst] + Only the first line of the caption will be centered. + + \item[raggedright] + Each line of the caption will be moved to the left margin. + +\iffalse + \item[RaggedRight] + Each line of the caption will be moved to the left margin using + the command |\RaggedRight| from the \package{ragged2e} package. +\else + \item[RaggedRight] + Each line of the caption will be moved to the left margin, too. + But this time the command |\RaggedRight| of the \package{ragged2e} + package will be used to achieve this. + The main difference to |raggedright| is that the word breaking + algorithm of \TeX\ will work inside captions.\footnote{% + The need for the \package{ragged2e} package will be detected at + run-time, therefore you maybe need a second \LaTeX\ run if this + option is used for the first time.} +\fi + + \item[raggedleft] + Each line of the caption will be moved to the right margin. + +% \item[RaggedLeft] +% Each line of the caption will be moved to the right margin using +% the command |\RaggedLeft| from the \package{ragged2e} package. + +%\showhyphens{justification} + \item[\UserDefined] + Own justifications can be defined using |\Declare|\-|Caption|\-|Jus|\-|ti|\-|fi|\-|ca|\-|tion|. + \SeeUserDefined +\end{Options} + +Three examples: +\begin{Example} + \begin{quote} + |format=plain,justification=centerlast| + \end{quote} + \captionsetup{skip=0pt} + \example{format=plain,justification=centerlast}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |format=hang,justification=raggedright| + \end{quote} + \captionsetup{skip=0pt} + \example{format=hang,justification=raggedright}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |format=plain,labelsep=newline,justification=centering| + \end{quote} + \captionsetup{skip=0pt} + \example*{format=plain,labelsep=newline,justification=centering}{\exampletext} +\end{Example} + +\smallskip + +\PageBreak +\DescribeMacro{singlelinecheck=} +The standard \LaTeX\ document classes (\class{article}, \class{report}, and +\class{book}) automatically center a caption if it fits in one single line: + +\example*{}{A short caption.} + +\INFO +\Thispackage\ adapts this behavior and therefore usually ignores the +justification \& indention you have set with |justification=| \& +|indention=| in such case. +But you can switch this special treatment of such short captions off +with the option +\begin{quote} + |singlelinecheck=|\meta{bool}\quad. +\end{quote} +Using |false|, |no|, |off| or |0| for \meta{bool} switches the +extra centering off: +\begin{quote} + |singlelinecheck=false| +\end{quote} +Doing so the above short caption would look like + +\begingroup + \captionsetup{type=figure} + \ContinuedFloat + \example*{singlelinecheck=false}{A short caption.} +\endgroup + +You switch the extra centering on again by using |true|, |yes|, |on| or |1| +for \meta{bool}. (The default is on.) + +% --------------------------------------------------------------------------- % + +\subsection{Fonts} +\label{fonts} + +\DescribeMacro{font=} +\DescribeMacro{labelfont=} +\DescribeMacro{textfont=} +There are three font options which affects different parts of the caption: +One affecting the whole caption (|font|), one which only affects the caption +label and separator (|label|\-|font|) and at least one which only affects the +caption text (|text|\-|font|). +You set them up using the options +\begin{quote}\begin{tabular}{@{}r@{}ll} + |font=| & \marg{font options} & ,\\ + |labelfont=| & \marg{font options} & , and\\ + |textfont=| & \marg{font options} & ,\\ +\end{tabular}\end{quote} +where \meta{font options} is a list of comma separated font options. + +And these are the available font options: + +\begin{Options}{stretch=\meta{amount}} + \item[scriptsize] {\scriptsize Very small size} + \item[footnotesize] {\footnotesize The size usually used for footnotes} + \item[small] {\small Small size} + \item[normalsize] {\normalsize Normal size} + \item[large] {\large Large size} + \item[Large] {\Large Even larger size} +\end{Options} +\vspace{0pt}\pagebreak[3] +\begin{Options}{stretch=\meta{amount}} + \item[normalfont] {\normalfont Normal shape \& series \& family} + + \item[up] {\upshape Upright shape} + \item[it] {\itshape Italic shape} + \item[sl] {\slshape Slanted shape} + \item[sc] {\scshape Small Caps shape} + + \item[md] {\mdseries Medium series} + \item[bf] {\bfseries Bold series} + + \item[rm] {\rmfamily Roman family} + \item[sf] {\sffamily Sans Serif family} + \item[tt] {\ttfamily Typewriter family} +\end{Options} +\vspace{0pt}\pagebreak[3] +\begin{Options}{stretch=\meta{amount}} + \item[singlespacing] Single spacing \See{\Ref{setspace}} + \item[onehalfspacing] One-and-a-half spacing \See{\Ref{setspace}} + \item[doublespacing] Double spacing \See{\Ref{setspace}} + \item[stretch=\meta{amount}] |\setstretch|\marg{amount} \See{\Ref{setspace}} +\end{Options} +\vspace{0pt}\pagebreak[3] +\begin{Options}{stretch=\meta{amount}} + \item[normalcolor] |\normalcolor| + \item[color=\meta{colour}] |\color|\marg{colour} + {\small(If the \package{color} or \package{xcolor} package is loaded, + see \Ref{declare} for an example)} +\end{Options} +\vspace{0pt}\pagebreak[3] +\begin{Options}{stretch=\meta{amount}} + \item[normal] The combination of the options |normal|\-|color|, + |normal|\-|font|, |normal|\-|size|, and |single|\-|spacing| + + \item[\UserDefined] + Own font options can be defined using |\Declare|\-|Caption|\-|Font|. + \SeeUserDefined +\end{Options} + +If you use only one of these options you can omit the braces; +e.g., the options +%\begin{quote} + |font={small}| +%\end{quote} +and +%\begin{quote} + |font=small| +%\end{quote} +will give the same result. + +Three examples: +\begin{Example} + \begin{quote} + |font=it,labelfont=bf| + \end{quote} + \captionsetup{skip=0pt} + \example{font=it,labelfont=bf}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |labelfont=bf,textfont=it| + \end{quote} + \captionsetup{skip=0pt} + \example{labelfont=bf,textfont=it}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |font={small,stretch=0.80}| + \end{quote} + \captionsetup{skip=0pt} + \example{font={small,stretch=0.80}}{\exampletext} +\end{Example} + +\medskip + +\pagebreak[3] +\DescribeMacro{font+=} +\DescribeMacro{labelfont+=} +\DescribeMacro{textfont+=} +\NEWfeature{v3.1f} +You can also add font options to the current ones, so for example +\begin{quote} + |\captionsetup{font=small}|\\ + |\captionsetup{font+=it}| +\end{quote} +is identical to +\begin{quote} + |\captionsetup{font={small,it}}| +\end{quote} + +% --------------------------------------------------------------------------- % + +\subsection{Margins and further paragraph options} +\label{margins} + +\DescribeMacro{margin=} +\DescribeMacro{width=} +For all captions you can specify \emph{either} an extra margin \emph{or} +a fixed width:~\footnote{Only fixed widths are supported here; if you are +looking for a way to limit the width of the caption to the width of the +figure or table, please take a look at the \package{floatrow}\cite{floatrow} +or \package{threeparttable}\cite{threeparttable} package.} +\begin{quote}\begin{tabular}{@{}r@{}ll} + |margin=| & \meta{amount} & \emph{--or--}\\ + |margin=| & |{|\meta{left amount}|,|\meta{right amount}|}| & \emph{--or--}\\ + |width=| & \meta{amount} & \\ +\end{tabular}\end{quote} +\NEWfeature{v3.1} +If you specify just one \meta{amount} for the margin, it will be used for +both, the left and right margin, e.g.~|margin=|\x|10pt| is equivalent to +|margin=|\x|{10pt,10pt}|. +In two-side documents the left and right margin will be swapped on even pages. +\DescribeMacro{oneside} +\DescribeMacro{twoside} +To prevent this you can specify the option |oneside| additionally, +e.g.~|\caption|\-|setup{margin=|\x|{0pt,10pt},|\x|oneside}|.\par +But if you are specifying a width, then both, the left and the right margin, +will have the same amount. + +Three examples will illustrating this: +\begin{Example} + \begin{quote} + |margin=10pt| + \end{quote} + \captionsetup{skip=0pt} + \example{margin=10pt}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |margin={1cm,0cm}| + \end{quote} + \captionsetup{skip=0pt} + \example{margin={1cm,0cm}}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |width=.75\textwidth| + \end{quote} + \captionsetup{skip=0pt} + \example{width=.75\textwidth}{\exampletext} +\end{Example} + +\begin{Note} +When the caption is placed beside the contents (for example in a |SC|\-|figure| +environment offered by the \package{sidecap} package\cite{sidecap}) or the +figure is an in-text figure (for example in a |wrap|\-|figure| environment +offered by the \package{wrapfig} package\cite{wrapfig}), the margin setting +will be automatically reset to |0pt| at the very beginning of the environment. +But if you really want to setup an extra margin for these environments, you can +do so by setting this margin either inside the environment itself, of by +specifying a margin for this particular environment, +e.g.~|\caption|\-|setup[SC|\-|figure]{margin=|\x|10pt}|. +\end{Note} + +\begin{Expert} +\DescribeMacro{margin*=}\NEWfeature{v3.1} +There is also a starred variant of the |margin=| option, |margin*=|, which only +changes the margin if no width was set. +\end{Expert} + +\begin{Expert} +\DescribeMacro{minmargin=} +\DescribeMacro{maxmargin=}\NEWfeature{v3.1} +You can also set a minimum or maximum margin amount. This can be useful for +limiting the margin amount in smaller environments, e.g.~|minipage|s. +For example the \SmF\ document classes limit the margin amount to +|maxmargin=|\x|0.1\linewidth|. (See \Ref{SMF}) +\end{Expert} + +\medskip + +\pagebreak[3] +\DescribeMacro{parskip=} +This option is useful for captions containing more than one paragraph. +It specifies the extra vertical space inserted between them: +\begin{quote} + |parskip=|\meta{amount} +\end{quote} +One example: +\begin{Example} + \begin{quote} + |margin=10pt,parskip=5pt| + \end{quote} + \captionsetup{skip=0pt} + \example{margin=10pt,parskip=5pt}{% + First paragraph of the caption. This one contains some test, just to + show how these options affect the layout of the caption.\par + Second paragraph of the caption. This one contains some text, too, to + show how these options affect the layout of the caption.} +\end{Example} + +\pagebreak[3] +\DescribeMacro{hangindent=} +The option +\begin{quote} + |hangindent=|\meta{amount} +\end{quote} +is for setting up a hanging indention starting from the second line of each +paragraph. If the caption contains just a single paragraph, using this option +leads to the same result as the option |indention=|\meta{amount} you already +know about. +But if the caption contains multiple paragraphs you will notice the difference: + +\begin{Example} + \begin{quote} + |format=hang,indention=-.5cm| + \end{quote} + \captionsetup{skip=0pt} + \example{format=hang,indention=-.5cm}{% + First paragraph of the caption. This one contains some test, just to + show how these options affect the layout of the caption.\par + Second paragraph of the caption. This one contains some text, too, to + show how these options affect the layout of the caption.} +\end{Example} + +\begin{Example} + \begin{quote} + |format=hang,hangindent=-.5cm| + \end{quote} + \captionsetup{skip=0pt} + \example{format=hang,hangindent=-.5cm}{% + First paragraph of the caption. This one contains some test, just to + show how these options affect the layout of the caption.\par + Second paragraph of the caption. This one contains some text, too, to + show how these options affect the layout of the caption.} +\end{Example} + +\begin{Note} +If your caption contains more than one paragraph, you have +to specify an alternative caption for the list-of-figures using the +optional argument of |\caption| or |\caption|\-|of|, otherwise you will +get an error message. +\end{Note} + +% --------------------------------------------------------------------------- % + +\PageBreak +\subsection{Styles} +\label{style} + +\DescribeMacro{style=} +A suitable combination of caption options is called \emph{caption style}. +You can compare them more or less to page styles which you set up with +|\page|\-|style|; +the caption style provides all settings for a whole caption layout. + +You switch to an already defined caption style with the option +\begin{quote} + |style=|\meta{style name}\quad. +\end{quote} +\Thispackage\ pre-defines two styles: |base| and |default|. + +\NEWfeature{v3.1} +The |base| style puts all options you already know about to values reflecting +the look of the captions when using one of the base \LaTeX\ document classes +\class{article}, \class{report}, and \class{book}. +This means that specifying the option +\begin{quote} + |style=base| +\end{quote} +has the same effect as specifying all these options: +\begin{quote} + |format=plain,labelformat=default,labelsep=colon,|\\ + |justification=justified,font={},labelfont={},|\\ + |textfont={},margin=0pt,indention=0pt|\\ + |parindent=0pt,hangindent=0pt,singlelinecheck=true| +\end{quote} +\begin{Annotation*} +But |justification=centering,indention=0pt| will be set if +the caption fits into a single line. +\end{Annotation*} + +In contrast the |default| style follows the default values, reflecting +the look of the captions given by the document class you actually use. +This style is selected by default and represents these options: +\begin{quote} + |format=default,labelformat=default,labelsep=default,|\\ + |justification=default,font=default,labelfont=default,|\\ + |textfont=default,margin=0pt,indention=0pt|\\ + |parindent=0pt,hangindent=0pt,singlelinecheck=true| +\end{quote} +\begin{Annotation*} +But again |justification=centering,indention=0pt| will be set if +the caption fits into a single line. +\end{Annotation*} + +So if you use one of the base \LaTeX\ document classes \class{article}, +\class{report}, or \class{book}, both caption styles, |base| and |default|, +point to (nearly) the same settings. + +\begin{Note} +Own caption styles can be defined using |\Declare|\-|Caption|\-|Style|.\LineBreak +\SeeUserDefined +\end{Note} + +% --------------------------------------------------------------------------- % + +\subsection{Skips} +\label{skips} + +\DescribeMacro{skip=}\NEWfeature{v3.0d} +The vertical space between the caption and the figure or table contents is +controlled by the option +\begin{quote} + |skip=|\meta{amount}\quad. +\end{quote} +The standard \LaTeX\ document classes \class{article}, \class{report} and +\class{book} preset it to |skip=|\x|10pt|, but other document classes may +use a different amount. + +\bigskip + +\pagebreak[3] +\DescribeMacro{position=} +The |\caption| command offered by \LaTeX{} has a design flaw: +The command does not know if it stands on the beginning of the figure or +table, or at the end. Therefore it does not know where to put the space +separating the caption from the content of the figure or table. +While the standard implementation always puts the space above the caption +in floating environments (and inconsistently below the caption in +|long|\-|table|s), the implementation offered by this package is more +flexible: +By giving the option +\begin{quote} + |position=top|\quad or\quad |position=above| +\end{quote} +it's assumed that the caption is standing at the \emph{top} of the +environment and therefore the space setup with |skip=|\x\meta{amount} +is placed below the caption. +(Please note that |position=|\x|top| does \emph{NOT} mean that the +caption is actually placed at the top of the figure or table. +Instead the caption is usually placed where you place the |\caption| +command.) +But with +\begin{quote} + |position=bottom|\quad or\quad |position=below| +\end{quote} +it's assumed that the caption is standing at the \emph{bottom} of the +environment and therefore the space is placed above the caption. +And finally with +\begin{quote} + |position=auto|\quad {\small(which is the default setting)} +\end{quote} +\thispackage\ tries its best to determine the actual position of +the caption on its own. Please note that while this is successfully in +most cases, it could give wrong results under rare circumstances. + +\medskip + +\pagebreak[3] +\DescribeMacro{figureposition=}%\NEWfeature{v3.0a} +\DescribeMacro{tableposition=}%\NEWfeature{v3.0a} +The |position| option is especially useful when used together with the +optional argument of the |\caption|\-|setup| command. +\See{also \Ref{captionsetup}}\par +For example +\begin{quote} + |\captionsetup[table]{position=above}| +\end{quote} +causes all captions within tables to be treated as captions \emph{above} +the table (regarding spacing around it). +Because this is a very common setting, \thispackage\ offers +the abbreviating options |figure|\-|position=|\x\meta{pos} and +|table|\-|position=|\x\meta{pos}, e.g. +\begin{quote} + |\usepackage[|\ldots|,tableposition=top]{caption}| +\end{quote} +is equivalent to +\begin{quote} + |\usepackage[|\ldots|]{caption}|\\ + |\captionsetup[table]{position=top}| +\end{quote} + +\medskip + +\INFO +Please note that the options |skip=|, |position=|, |figure|\-|position=|, +and |table|\-|position=| do not always have an effect. +Since it's a matter of the document class to supply the environments +|figure| and |table|, it could use its very own spacing, and could +decide for itself if the caption will be typeset as ``top'' or ``bottom'' +caption. +For example the \KOMAScript\ document classes support the |skip=| +setting, but will always typeset |figure| captions as ``bottom'' captions, +and |table| captions are dependent on the global option +|table|\-|captions|\-|above| resp.\ |table|\-|captions|\-|below|. +\See{\Ref{KOMA}} + +Furthermore some packages control the behavior of the spacing above and +below the caption for themself, e.g.~the \package{float}, the +\package{floatrow}, and the \package{supertabular} package. + +\bigskip + +\begin{Expert*} +Internally the skip between caption and contents is represented by +|\above|\-|caption|\-|skip| (which is always set above the caption in +\LaTeX{}s implementation). +But there is a second value |\below|\-|caption|\-|skip| (usually set to +|0pt| by default) which is set below the caption in \LaTeX{}s implementation, +but on the other side than |\above|\-|caption|\-|skip| by this package. +So technically speaking, this package swaps the meaning of these two skips +when |position=|\x|top| is set. +Please note that there are several packages around which do the same trick +(like the \package{ftcap}, the \package{nonfloat}, and the \package{topcap} +package), so the usage of the \package{caption} option |position=| is not +supported if one of these packages will be used, too. +\end{Expert*} + +% --------------------------------------------------------------------------- % + +\subsection{Lists} +\label{lists} + +\DescribeMacro{list=}\NEWfeature{v3.1} +The |\caption| command usually places an entry in the List of Figures +resp.~List of Tables. You can either suppress that individually by giving an +empty optional argument to |\caption| {\small(see \Ref{caption})}, or +programmatically by saying +\begin{quote} + |list=no|\quad(or any other boolean value instead of |no|)\quad.~\footnote{% + Please note that the \package{subfig} package\cite{subfig} is not supporting + this option, it uses the counters \texttt{lofdepth} \& \texttt{lotdepth} for + this purpose instead.} +\end{quote} + +\pagebreak[3] +\DescribeMacro{listformat=}\NEWfeature{v3.1} +With the option +\nopagebreak[3] +\begin{quote} + |listformat=|\meta{list format name} +\end{quote} +\nopagebreak[3] +you can specify how the |figure| or |table| number will be typeset within +the List of Figures resp.~List of Tables. +There are five standard caption list formats: + +\begin{Options}{\OptionLabel} + \item[empty] + No number will be typeset. + + \item[simple] + The number will be typeset with label prefix. + + \item[parens] + The number will be typeset in parentheses, with label prefix. + + \item[subsimple] + Same as |simple|, but without label prefix. (default) + + \item[subparens] + Same as |parens|, but without label prefix. + + \item[\UserDefined] + Own list formats can be defined using |\Declare|\-|Caption|\-|List|\-|Format|. + \SeeUserDefined +\end{Options} + +The prefix ($=$|\p@figure| resp.~|\p@table|), which runs ahead of the +number ($=$|\the|\-|figure| resp.~|\the|\-|table|) in lists (e.g.~List of +Figure/Table) and references, is usually empty, +so the list formats |simple| and |subsimple| gives equal results; +same with |parens| and |subparens|. +But this can be different for sub-figures or sub-tables listed in the List of +Figures resp.~List of Tables, or when the label prefix is redefined for a +different purpose.\footnote{% + Sub-figures and sub-tables can be typeset using the \package{subcaption} + or \package{subfig} package.} + +% --------------------------------------------------------------------------- % + +\subsection{Names} +\label{names} + +\DescribeMacro{name=}\NEWfeature{v3.1f} +The option +\begin{quote} + |name=|\meta{name} +\end{quote} +changes the name of the \emph{current} environment. +This could be useful in conjunction with the optional argument of +|\caption|\-|setup|, e.g. +\begin{quote} + |\captionsetup[wrapfigure]{name=Fig.}| +\end{quote} +changes the name to ``Fig.'' for all |wrap|\-|figure|s (while all the other +figure captions will still have ``Figure'' as name). + +% --------------------------------------------------------------------------- % + +\subsection{Types} +\label{types} + +\DescribeMacro{type=}\NEWfeature{v3.0d} +The |\caption| command can typeset captions for different types, +e.g.~|figure| and |table|. If you try to use the |\caption| command outside +these environments you will get an error message, because it does not know what +kind of caption do you want to have here. But in such situations you can set +the caption type manually with +\begin{quote} + |type=|\meta{float type} +\end{quote} +prior to the usage of the |\caption| command (and other commands like +|\Continued|\-|Float|, or |\sub|\-|caption|\-|box| offered by the +\package{subcaption} package, or |\sub|\-|float| offered by the +\package{subfig} package\cite{subfig}), +for example within an non-floating environment like |minipage|: +\begin{quote} + |\noindent\begin{minipage}{\textwidth}|\\ + | \captionsetup{type=figure}|\\ + | \subfloat{|\ldots|}|\\ + | |\ldots\\ + | \caption{|\ldots|}|\\ + |\end{minipage}| +\end{quote} + +\begin{Expert} +There is also a starred variant of this option, |type*=|\meta{float type}, +which behaves different than |type=|\meta{float type} if the +\package{hyperref} package\cite{hyperref} is loaded: While |type=| sets an +hyperlink anchor (if |hypcap=|\x|true| is set), |type*=| does not. +(See also \Ref{hyperref}\,) +\end{Expert} +\begin{Expert} +\emph{\DefaultNoteText:} Please don't re-define the internal macro |\@captype| +for yourself, like suggested by some documentations, always use +|\caption|\-|setup{type=|\x\ldots|}| instead. +\end{Expert} + +\medskip + +Own float types can be defined with + |\Declare|\-|Floating|\-|Environment| offered by the \package{newfloat} package, + |\new|\-|float| offered by the \package{float} package\cite{float}, or + |\Declare|\-|New|\-|Float|\-|Type| offered by the \package{floatrow} package\cite{float}. + +\medskip + +\INFO % \NEWdescription{v3.1} +Please note that you should use the option |type=| only +\emph{inside} boxes or environments (like |\par|\-|box| or |mini|\-|page|), +at best one where no page break could happen between contents and caption. +Furthermore some visual side-effects (e.g.~mixed-up figure and table settings +regarding captions) could occur without using a box or environment, +therefore a warning message will be issued if you try to do so.\footnote{% +You only get this warning message if you use \eTeX\ as underlying \TeX\ engine.} + +% --------------------------------------------------------------------------- % + +\clearpage +\section{Commands} + +\subsection{Typesetting captions} +\label{caption} +\label{captionlistentry} + +\DescribeMacro{\caption} +The command +\begin{quote} + |\caption|\oarg{list entry}\marg{heading} +\end{quote} +typesets the caption inside a floating environment like |figure| or |table|. +Well, you already know this, but \thispackage\ offers an extension: +If you leave the argument \meta{list entry} empty, no entry in the list of +figures or tables will be made. For example: +\begin{quote} + |\caption[]{A figure without list entry.}| +\end{quote} + +\begin{Expert} +Please remember that the \meta{heading} is a so-called \emph{moving} argument, +if no \meta{list entry} has been given. But if a \meta{list entry} is given, +this argument is moving instead. +``\emph{Moving} argument'' means that the argument will be written to the +list-of file, make it appearing in the ``List of Figures'' resp. +``List of Tables'', too. +\emph{Moving} arguments are not allowed to contain \emph{fragile} commands, +everything must be \emph{robust}, otherwise the argument could get +\emph{broken}, resulting in strange errors at the next \LaTeX\ run. +Some \emph{fragile} commands could be \emph{protected} by a leading |\protect|, +own definitions could get defined with |\Declare|\-|Robust|\-|Command| instead of +|\new|\-|command| to make them \emph{robust}. + +An example: |\caption{${}^{137}_{\phantom{1}55}$Cs}| will cause errors since +|\phantom| is \emph{fragile}. +So we have either have to use the optional argument \meta{list entry} +(e.g.~|\caption[${}^|\x|{137}_|\x|{55}$|\x|Cs]|\x|{${}^|\x|{137}_|\x|{\phantom{1}55}$|\x|Cs}|) +or add |\protect| to prevent the |\phantom| command from getting \emph{broken}: +|\caption{${}^|\x|{137}_|\x|{|\textcolor{blue}{\cs{protect}}|\phantom{1}55}$|\x|Cs}|. + +But sometimes even this is not sufficient. The reason behind is the so-called +single-line-check: It puts the \meta{heading} into a horizontal box to determine +the width of the caption, and this could cause error messages, too. +An example: +|\caption{A| |scheme.| |\[V_{C}| |\sim| |\left| |\{| |\begin{array}{cc}| +|E_{g}| |&| |\textrm{p-n}| |\\| |e\phi_{B}| |&| |\textrm{M-S}| |\end{array}| +|\right.| |\]}|. +Using |\caption[A| |scheme]{|\ldots|}| is not sufficient here, it's still +leading to errors. (``\texttt{Missing \$ inserted.}'') +So we have to put a |\caption|\-|setup{single|\-|line|\-|check=|\x|off}| +just in front of the |\caption| command additionally. + +For more information about \emph{moving} arguments and \emph{fragile} \& +\emph{robust} commands, take a closer look at your \LaTeX\ manual or visit +\url{http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/teTeX/latex/latex2e-html/fragile.html}. +\end{Expert} + +\medskip + +\pagebreak[3] +\DescribeMacro{\caption*} +The \package{longtable} package defines the command |\caption*| which +typesets the caption without label and without entry in the list of tables. +An example: +\begin{quote} + |\begin{longtable}{|\ldots|}|\\ + | \caption*{A table}\\|\\ + | |\ldots\\ + |\end{longtable}| +\end{quote} +looks like +\DeleteShortVerb{\|} +\vskip\intextsep +\begin{minipage}{\linewidth} + \captionsetup{type=table,position=t} + \caption*{A table} + \centering + \begin{tabular}{r|rr} + & x & y \\\hline + a & 1 & 2 \\ + b & 3 & 4 \\ + \end{tabular} +\end{minipage} +\vskip\intextsep +\MakeShortVerb{\|} +\Thispackage\ offers this feature, too, so you can use this command now within +every floating environment like |figure| or |table|, like: +\begin{quote} + |\begin{table}|\\ + | \caption*{A table}|\\ +% | \begin{tabular}{|\ldots|}|\\ +% | |\ldots\\ +% | \end{tabular}|\\ + | |\ldots\\ + |\end{table}| +\end{quote} + +\pagebreak[3] +\DescribeMacro{\captionof} +\DescribeMacro{\captionof*} +Sometimes you want to typeset a caption \emph{outside} a floating environment, +putting a figure within a non-floating |mini|\-|page| for instance. +For this purpose \thispackage\ offers the command +\begin{quote} + |\captionof|\marg{float type}\oarg{list entry}\marg{heading}\quad. +\end{quote} +Note that the first argument, the \meta{float type}, is mandatory here, because +the |\captionof| command needs to know which name to put into the caption label +(e.g. ``Figure'' or ``Table'') and in which list to put the contents entry. +An example: +\begin{quote} +% |\captionof{figure}{A figure}|\\ + |\captionof{table}{A table}| +\end{quote} +typesets captions like this: +\begin{Example} +% \begingroup +% \captionof{figure}{A figure} +% \endgroup + \captionsetup{position=top} +% \begingroup + \captionof{table}{A table} +% \endgroup +\end{Example} + +The star variant |\caption|\-|of*| has the same behavior as the |\caption*| +command: +It typesets the caption without label and without entry to the list of figures +or tables. + +\INFO % \NEWdescription{v3.1} +Since |\caption|\-|of| uses the option |type| internally, the same +restrictions as for the |type| option apply here, so you should use both +|\caption|\-|of| and |\caption|\-|of*| only \emph{inside} boxes or +environments, too. +\See{\Ref{types}} + +\bigskip + +\pagebreak[3] +\DescribeMacro{\captionlistentry}\NEWfeature{v3.1} +Under certain circumstances it could be useful to make a list-of-figure +(or table) entry on its own. +This could be achieved with +\begin{quote} + |\captionlistentry|\oarg{float type}\marg{list entry}\quad. +\end{quote} + +One example: It's quite easy to have a |long|\-|table| with captions above the +contents and a single list entry which points to the first page of the table: +\begin{quote} + |\begin{longtable}{|\ldots|}|\\ + | \caption{|\ldots|}\\|\\ + |\endfirsthead|\\ + | \caption[]{|\ldots|}\\|\\ + |\endhead|\\ + | |\ldots +\end{quote} +But since the \package{longtable} package does not offer an +|\end|\-|first|\-|foot| command, you cannot easily have captions \emph{below} +the table contents and a single list entry which points to the first page of +the table. +Here is were the |\caption|\-|list|\-|entry| command could be used: +\begin{quote} + |\begin{longtable}{|\ldots|}|\\ + | \caption[]{|\ldots|}\\|\\ + |\endfoot|\\ + | \captionlistentry{|\ldots|}|\\ + | |\ldots +\end{quote} + +\begin{Annotation*} +Another example can be found in \Ref{examples}. +\end{Annotation*} + +\begin{Expert} +There is also a starred variant, |\caption|\-|list|\-|entry*|, which does not +increment the \meta{float type} counter. +(Note that inside |long|\-|table| environments |\caption|\-|list|\-|entry| +never increments the |table| counter. See also \Ref{longtable}.) +\end{Expert} + +\begin{Expert} +Please note that \meta{list entry} is a \emph{moving} argument, so everything +it contains must be \emph{robust}. (See also explanation of |\caption|) +\end{Expert} + +\subsection{Setting options} +\label{captionsetup} + +\DescribeMacro{\captionsetup} +We already know the |\caption|\-|setup| command (see \Ref{usage}), +but this time we get enlighten about its optional argument +\meta{float type}. + +Remember, the syntax of this command is +\begin{quote} + |\captionsetup|\oarg{float type}\marg{options}\quad. +\end{quote} +If a \meta{float type} gets specified, all the \meta{options} don't +change anything at this time. Instead they only get marked for a later use, +when a caption inside of a floating environment of the particular type +\meta{float type} gets typeset. +For example +\begin{quote} + |\captionsetup[figure]|\marg{options} +\end{quote} +forces captions within a |figure| environment to use the given \meta{options}. + +Here comes an example to illustrate this: +\begin{quote} + |\captionsetup{font=small}|\\ + |\captionsetup[figure]{labelfont=bf,textfont=it}| +\end{quote} +gives captions like this: +\begin{Example} + \captionsetup{font=small} + \captionsetup[figure]{labelfont=bf,textfont=it} + \begingroup + \captionof{figure}{A figure} + \endgroup + \captionsetup{position=top} + \begingroup + \captionof{table}{A table} + \endgroup +\end{Example} +As you see the command |\caption|\-|setup[figure]{|\ldots|}| only changes +the look of the |figure| caption labels, not touching the other ones. + +As \meta{float type} you can usually give one of these two only: +|figure| or |table|. +But as we will see later some \LaTeX\ packages (like the \package{floatrow}, +\package{longtable}, and \package{sidecap} package for example) and also +this package offer additional environments with captions and these two +commands can also be used with them. +\See{\Ref{declare} and \Ref{packages}} + +\begin{Expert} +\NEWfeature{v3.1} +There is also a starred variant of |\caption|\-|setup|: +\begin{quote} + |\captionsetup*|\oarg{float type}\marg{options} +\end{quote} +While the non-starred variant can give you warnings---for example if the +\meta{options} are actually not used throughout the document +(e.g.~a |\caption|\-|setup[table]{font=|\x|sf}| without a |table|)---the +starred variant will not. +\iffalse +This can get quite useful when setting generic options which are independent +of a specific document. +\fi +\end{Expert} + +\medskip + +\pagebreak[3] +\DescribeMacro{\clearcaptionsetup} +If you want to get rid of these parameters marked for an automatic use within +a particular environment you can use the command +\begin{quote} + |\clearcaptionsetup|\oarg{option}\marg{float type}\quad. +\end{quote} + +For example |\clearcaptionsetup{figure}| would clear all the extra handling +for figures in the example above: +\begin{quote} + |\captionsetup{font=small}|\\ + |\captionsetup[figure]{labelfont=bf,textfont=it}|\\ + \ldots\\ + | \caption{A figure}|\\ + \ldots\\ + |\clearcaptionsetup{figure}|\\ + \ldots\\ + | \caption{A figure}|\\ + \ldots +\end{quote} +\begin{Example} + \captionsetup{font=small} + \captionsetup[figure]{labelfont=bf,textfont=it} + \begingroup + \captionof{figure}{A figure} + \endgroup + \captionsetup{position=top} + \clearcaptionsetup{figure} + \begingroup + \captionof{figure}{A figure} + \endgroup +\end{Example} + +\pagebreak[3] +\NEWfeature{v3.1} +If an optional argument \meta{option} is given, only the settings regarding +this particular \meta{option} are cleared.\footnote{You can only specify +\emph{one} option here, not a list of options. +If you want to clean more than one option, you need to use more than one +\cs{clear}\-\texttt{caption}\-\texttt{setup}.} +While the example above not only clears the options +|labelfont=bf,|\x|textfont=it| +for figures (but all options for figures instead), +this one would only clear the |labelfont=bf| setting, leaving all other +settings for figures intact: +\begin{quote} + |\captionsetup{font=small}|\\ + |\captionsetup[figure]{labelfont=bf,textfont=it}|\\ + \ldots\\ + | \caption{A figure}|\\ + \ldots\\ + |\clearcaptionsetup[labelfont]{figure}|\\ + \ldots\\ + | \caption{A figure}|\\ + \ldots +\end{quote} +\begin{Example} + \captionsetup{font=small} + \captionsetup[figure]{labelfont=bf,textfont=it} + \begingroup + \captionof{figure}{A figure} + \endgroup + \captionsetup{position=top} + \clearcaptionsetup[labelfont]{figure} + \begingroup + \captionof{figure}{A figure} + \endgroup +\end{Example} +\begin{Expert} +Analogous to |\caption|\-|setup*| there is also a starred form +|\clear|\-|caption|\-|setup*| which suppresses warnings if the given +\meta{option} was not setup for the specified \meta{float type}. +\end{Expert} + +\medskip + +\pagebreak[3] +\DescribeMacro{\showcaptionsetup} +For debugging purposes the command +\nopagebreak[3] +\begin{quote} + |\showcaptionsetup|\marg{float type} +\end{quote} +\nopagebreak[3] +is offered. It generates a log file entry, showing the given options +for the specified \meta{float type}. For example +\begin{quote} + |\captionsetup[figure]{labelfont=bf,textfont=it}|\\ + |\showcaptionsetup{figure}| +\end{quote} +gives the info: +\begin{quote}\small + |Caption Info: Option list on `figure'|\\ + |Caption Data: {labelfont=bf,textfont=it} on input line 5.| +\end{quote} + +\pagebreak[3] +\subsection{Continued floats} +\label{ContinuedFloat} + +\DescribeMacro{\ContinuedFloat} +Sometimes you want to split figures or tables without giving them +their own reference number. This is what the command +\begin{quote} + |\ContinuedFloat| +\end{quote} +is for; it should be used as first command inside the floating environment. +It prevents the incrementation of the relevant counter (usually done by +|\caption|), so a figure or table containing a |\Continued|\-|Float| inside +gets the same reference number as the figure or table before. +An example: +\begin{quote} + |\begin{table}|\\ + | \caption{A table}|\\ + | |\ldots\\ + |\end{table}|\\ + \ldots\\ + |\begin{table}\ContinuedFloat|\\ + | \caption{A table (cont.)}|\\ + | |\ldots\\ + |\end{table}| +\end{quote} +gives the following result: +\begin{Example} + \captionsetup{type=table,position=b,skip=0pt} + \caption{A table} + \centerline{\ldots} +\end{Example} +\begin{Example} + \captionsetup{type=table,position=b,skip=0pt} + \ContinuedFloat + \caption{A table (cont.)} + \centerline{\ldots} +\end{Example} + +\bigskip + +\NEWfeature{v3.1} +Furthermore the |\Continued|\-|Float| command executes options associated with +the type name ``|Continued|\-|Float|''. For example this can be used to switch +to a different label format for continued figures or tables, as shown here: +\begin{quote} + |\DeclareCaptionLabelFormat{continued}{Continued #1~#2}|\\ + |\captionsetup[ContinuedFloat]{labelformat=continued}|\\ + \ldots\\ + |\begin{table}\ContinuedFloat|\\ + | \caption{A table}|\\ + | |\ldots\\ + |\end{table}| +\end{quote} +\begin{Example} + \captionsetup{type=table,position=b,skip=0pt} + \captionsetup[ContinuedFloat]{labelformat=continued1} + \ContinuedFloat + \caption{A table}\label{continued1} + \centerline{\ldots} +\end{Example} +\smallskip +\See{\Ref{declare} for an explanation of + \cs{Declare}\-\texttt{Caption}\-\texttt{Label}\-\texttt{Format}.} + +\medskip + +There is also a \LaTeX\ counter called |Continued|\-|Float| which could be +used for own purposes. +For ordinary (floating) environments it's set to zero, to one for the first +continued float, to two inside the second one, and so on. +So every |\Continued|\-|Float| increments this counter and a floating +environment without |\Continued|\-|Float| command resets this counter to zero. +An example: +\begin{quote} + |\DeclareCaptionLabelFormat{cont}{#1~#2\alph{ContinuedFloat}}|\\ + |\captionsetup[ContinuedFloat]{labelformat=cont}|\\ + \ldots\\ + |\begin{table}\ContinuedFloat|\\ + | \caption{A table}|\\ + | |\ldots\\ + |\end{table}| +\end{quote} +\begin{Example} + \captionsetup{type=table,position=b,skip=0pt} + \captionsetup[ContinuedFloat]{labelformat=continued2} + \ContinuedFloat + \caption{A table}\label{continued2} + \centerline{\ldots} +\end{Example} +\medskip +A reference to this table would still result in the output +``\autoref{continued2}'' since only the caption label format was changed. +If you would like to use the |Continued|\-|Float| counter for the references, +too, you could redefine the command |\the|\-|Continued|\-|Float| instead, +which will be appended to the figure or table counter automatically in +continued floats and is preset to be empty. +\begin{quote} + |\renewcommand\theContinuedFloat{\alph{ContinuedFloat}}|\\ + \ldots\\ + |\begin{table}\ContinuedFloat|\\ + | \caption{A table}|\\ + | |\ldots\\ + |\end{table}| +\end{quote} +\begin{Example} + \captionsetup{type=table,position=b,skip=0pt} + \renewcommand\theContinuedFloat{\alph{ContinuedFloat}} + \ContinuedFloat + \caption{A table}\label{continued3} + \centerline{\ldots} +\end{Example} +\medskip +A reference to that table would result in the output ``\autoref{continued3}''. + +\pagebreak[3] +\DescribeMacro{\ContinuedFloat*} +Suppose you want to start the first figure or table of such a series with a +kind of ``Figure 7a'' and not with ``Figure 7'' (and the second one with +``Figure 7b'' instead of ``Figure 7a''). +This is possible, too, by using the starred variant |\Continued|\-|Float*| +which---just like |\Continued|\-|Float|---executes options associated with the +type name ``|Continued|\-|Float|'' and increments the \LaTeX\ counter +|Continued|\-|Float|, \emph{but} marks the first figure or table of a series +instead: +\begin{quote} + |\renewcommand\theContinuedFloat{\alph{ContinuedFloat}}|\\ + \ldots\\ + |\begin{figure}\ContinuedFloat*|\\ + | |\ldots\\ + | \caption{First figure of a series}|\\ + |\end{figure}|\\ + \ldots\\ + |\begin{figure}\ContinuedFloat|\\ + | |\ldots\\ + | \caption{Second figure of a series}|\\ + |\end{figure}|\\ + \ldots\\ + |\begin{figure}\ContinuedFloat|\\ + | |\ldots\\ + | \caption{Third figure of a series}|\\ + |\end{figure}| +\end{quote} +\begin{Example} + \captionsetup{type=figure,position=b,skip=0pt} + \renewcommand\theContinuedFloat{\alph{ContinuedFloat}} + \begingroup + \ContinuedFloat* + \centerline{\ldots} + \caption{First figure of a series} + \endgroup + \begingroup + \ContinuedFloat + \centerline{\ldots} + \caption{Second figure of a series} + \endgroup + \begingroup + \ContinuedFloat + \centerline{\ldots} + \caption{Third figure of a series} + \endgroup +\end{Example} +\smallskip +\Note{Unfortunately \cs{ContinuedFloat*} is not available if the + \package{subfig} package\cite{subfig} is loaded.} + +\pagebreak[3] +\subsubsection*{A note about longtables} +If you want to have a different caption label in |long|\-|table|s (offered +by the \package{longtable} package\cite{longtable}) after a page break, +this can \emph{not} be archived by using |\Continued|\-|Float|, +but instead you could write something like: +\begin{quote} + |\DeclareCaptionLabelFormat{continued}{Continued #1~#2}|\\ + \ldots\\ + |\begin{longtable}{|\ldots|}|\\ + | \caption{A longtable}\\|\\ + |\endfirsthead|\\ + | \captionsetup{labelformat=continued}|\\ + | \caption[]{A longtable}\\|\\ + |\endhead|\\ + | |\ldots\\ + |\end{longtable}| +\end{quote} + +% --------------------------------------------------------------------------- % + +\clearpage +\section{Own enhancements} +\label{declare} + +A family of commands is provided to allow users to define their own formats +etc. +This enables information on separators, justification, fonts, and styles to +be associated with a name and kept in one place. +(These commands need to appear in the document preamble, +this is the part between |\document|\-|class| and |\begin{document}|.) + +\pagebreak[3] +\DescribeMacro{\DeclareCaption-\\Format} +You can define your own caption formats using the command +\begin{quote} + |\DeclareCaptionFormat|\marg{name}\marg{code using \#1, \#2 and \#3}\mbox{\quad.} +\end{quote} +At usage the system replaces \#1 with the caption label, \#2 with the +separator and \#3 with the text. So the standard format |plain| is +pre-defined by \thispackage\ as +\begin{quote} + |\DeclareCaptionFormat{plain}{#1#2#3\par}|\quad. +\end{quote} +\begin{Expert} +There is also a starred variant, |\Declare|\-|Caption|\-|Format*|, +which causes the code being typeset in \TeX s vertical (instead of +horizontal) mode, but does not support the |indention=| option. +\end{Expert} + +\pagebreak[3] +\DescribeMacro{\DeclareCaption-\\LabelFormat} +Likewise you can define your own caption label formats: +\begin{quote} + |\DeclareCaptionLabelFormat|\marg{name}\marg{code using \#1 and \#2} +\end{quote} +At usage \#1 gets replaced with the name (e.g. ``figure'') and \#2 +gets replaced with the reference number (e.g. ``12''). +An example: +\begin{quote} + |\DeclareCaptionLabelFormat{bf-parens}{(\textbf{#2})}|\\ + |\captionsetup{labelformat=bf-parens,labelsep=quad}| +\end{quote} +\example*{labelformat=bf-parens,labelsep=quad}{\exampletext} + +\pagebreak[3] +\DescribeMacro{\bothIfFirst} +\DescribeMacro{\bothIfSecond} +If you define your own caption label formats and use the +\package{subcaption} or \package{subfig}\cite{subfig} package, +you should take care of empty caption label names. +For this purpose the commands +\begin{quote} + |\bothIfFirst|\marg{first arg}\marg{second arg}\quad and\\ + |\bothIfSecond|\marg{first arg}\marg{second arg} +\end{quote} +are offered. |\bothIfFirst| tests if the first argument exists (means: is +not empty), |\bothIfSecond| tests if the second argument exists. If yes, +both arguments get typeset, otherwise none of them. + +\smallskip + +\pagebreak[3] +For example the standard label format |simple| is \emph{not} defined as +\begin{quote} + |\DeclareCaptionLabelFormat{simple}{#1~#2}|\mbox{\quad,} +\end{quote} +because this could cause an extra space if \#1 is empty. Instead |simple| +is defined as +\begin{quote} + |\DeclareCaptionLabelFormat{simple}%|\\ + | {\bothIfFirst{#1}{~}#2}|\mbox{\quad,} +\end{quote} +causing the space to appear only if the label name is present. + +\smallskip + +\pagebreak[3] +\DescribeMacro{\DeclareCaption-\\TextFormat}\NEWfeature{v3.0l} +Likewise you can define your own caption text formats: +\begin{quote} + |\DeclareCaptionTextFormat|\marg{name}\marg{code using \#1} +\end{quote} +At usage \#1 gets replaced with the caption text. + +\bigskip + +\pagebreak[3] +\DescribeMacro{\DeclareCaption-\\LabelSeparator} +You can define your own caption label separators with +\begin{quote} + |\DeclareCaptionLabelSeparator|\marg{name}\marg{code}\mbox{\quad.} +\end{quote} +Again an easy example taken from \thispackage\ itself: +\begin{quote} + |\DeclareCaptionLabelSeparator{colon}{: }| +\end{quote} +\begin{Expert} +There is also a starred variant, |\Declare|\-|Caption|\-|Label|\-|Separator*|, +which causes the code being typeset without using the |label|\-|font=| setting. +So for example the label separators |quad|, |new|\-|line|, and |en|\-|dash| +are defined in this way. +\end{Expert} + +\bigskip + +\pagebreak[3] +\DescribeMacro{\DeclareCaption-\\Justification} +You can define your own caption justifications with +\begin{quote} + |\DeclareCaptionJustification|\marg{name}\marg{code}\mbox{\quad.} +\end{quote} +The \meta{code} simply gets typeset just before the caption. +E.g.~using the justification |raggedright|, which is defined as +\begin{quote} + |\DeclareCaptionJustification{raggedright}{\raggedright}|\mbox{\quad,} +\end{quote} +typesets captions with all lines moved to the left margin. + +\bigskip + +\pagebreak[3] +\DescribeMacro{\DeclareCaption-\\Font} +You can define your own caption fonts with +\begin{quote} + |\DeclareCaptionFont|\marg{name}\marg{code}\quad. +\end{quote} +For example this package defines the options |small| and |bf| as +\begin{quote} + |\DeclareCaptionFont{small}{\small}|\quad and\\ + |\DeclareCaptionFont{bf}{\bfseries}|\quad. +\end{quote} +\iffalse +The line spacing could be customized using the \package{setspace} package, +for example:%\NEWdescription{v3.0h} +\begin{quote} + |\usepackage{setspace}|\\ + |\DeclareCaptionFont{singlespacing}{\setstretch{1}}|~\footnote{% + \emph{\DefaultNoteText:} Using \cs{singlespacing} does not work here since + it contains a \cs{vskip} command.}\\ + |\DeclareCaptionFont{onehalfspacing}{\onehalfspacing}|\\ + |\DeclareCaptionFont{doublespacing}{\doublespacing}|\\ + |\captionsetup{font={onehalfspacing,small},labelfont=bf}| +\end{quote} +\example{font={onehalfspacing,small},labelfont=bf,singlelinecheck=off}{\exampletext} +\fi +An example which brings color into life: +\begin{quote} + |\usepackage{color}|\\ + |\DeclareCaptionFont{red}{\color{red}}|\\ + |\DeclareCaptionFont{green}{\color{green}}|\\ + |\DeclareCaptionFont{blue}{\color{blue}}|\\ + |\captionsetup{labelfont={blue,bf},textfont=green}| +\end{quote} +\example*{labelfont={color=blue,bf},textfont={color=green},singlelinecheck=off}{\exampletext} +But since \thispackage\ already includes the tricky definition +\begin{quote} + |\DeclareCaptionFont{color}{\color{#1}}| +\end{quote} +you can get the same result simply with +\begin{quote} + |\usepackage{color}|\\ + |\captionsetup{labelfont={color=blue,bf},|\\ + | textfont={color=green}}|\quad. +\end{quote} + +\medskip + +\pagebreak[3] +\DescribeMacro{\DeclareCaption-\\Style} +You can define your own caption styles with +\begin{quote} + |\DeclareCaptionStyle|\marg{name}\oarg{additional options}\marg{options}\mbox{\quad.} +\end{quote} +Remember, caption styles are just a collection of suitable options, saved +under a given name. You can wake up these options at any time with the +option |style=|\meta{style name}. + +All caption styles are based on the |base| set of options. (See \Ref{style} +for a complete list.) So you only need to specify options which are different +to them. + +If you specify \meta{additional options} they get used in addition when +the caption fits into a single line and this check was not disabled with +the option |single|\-|line|\-|check=off|. + +Again a very easy example taken from the core of this package: The +caption style |base| is pre-defined as +\begin{quote} + |\DeclareCaptionStyle{base}%|\\ + | [justification=centering,indention=0pt]{}|\quad. +\end{quote} + +Something more exciting: +\begin{quote} + |\DeclareCaptionStyle{mystyle}%|\\ + | [margin=5mm,justification=centering]%|\\ + | {font=footnotesize,labelfont=sc,margin={10mm,0mm}}|\\ + |\captionsetup{style=mystyle}| +\end{quote} +gives you caption like these ones: +\begin{Example} + \captionsetup{type=figure,style=mystyle,position=b} + \caption{A short caption.} + \caption{A long long long long long long long long long + long long long long long long long long long + long long long long long long long long long caption.} +\end{Example} + +\bigskip + +\pagebreak[3] +\DescribeMacro{\DeclareCaption-\\ListFormat}\NEWfeature{v3.1} +You can define your own caption list formats with +\begin{quote} + |\DeclareCaptionListFormat|\marg{name}\marg{code using \#1 and \#2}\mbox{\quad.} +\end{quote} +At usage \#1 gets replaced with the label prefix (e.g.~|\p@figure|), +and \#2 gets replaced with the reference number (e.g.~|\thefigure|). + +% --------------------------------------------------------------------------- % + +\subsection{Further examples} +\label{examples} + +\subsubsection*{Example 1} + +%\NEWdescription{v3.1} +If you would like to have a line break between caption label and text +you could define it this way: +\begin{quote} + |\DeclareCaptionFormat{myformat}{#1#2\\#3}| +\end{quote} +If you select this format with |\caption|\-|setup{format=|\x|myformat}| +you get captions like this: +%\begin{Example} +% \captionsetup{skip=0pt} + \example{format=myformat1,labelfont=bf}{\exampletext} +%\end{Example} +You could even use an indention with this caption format: +\begin{quote} + |\captionsetup{format=myformat,indention=1cm}| +\end{quote} +This would look like this: +%\begin{Example} +% \captionsetup{skip=0pt} + \example{format=myformat1,indention=1cm,labelfont=bf}{\exampletext} +%\end{Example} +Instead, you would like to have an indention only of the first line of +the caption text? No problem, e.g. +\begin{quote} + |\newlength\myindention|\\ + |\DeclareCaptionFormat{myformat}%|\\ + | {#1#2\\\hspace*{\myindention}#3}|\\ + \ldots\\ + |\setlength\myindention{1cm}|\\ + |\captionsetup{format=myformat}| +\end{quote} +would give you captions like +%\begin{Example} +% \captionsetup{skip=0pt} + \example{format=myformat2,myindention=1cm,labelfont=bf}{\exampletext} +%\end{Example} +But you want to have an caption option for this indention, so you can use +it for example with +|\caption|\-|setup|\x|[figure]|\x|{my|\-|indention=|\x\ldots|}|? +This could be done, too: +\begin{quote} + |\newlength\myindention|\\ + |\DeclareCaptionOption{myindention}%|\\ + | {\setlength\myindention{#1}}|\\ + |\DeclareCaptionFormat{myformat}%|\\ + | {#1#2\\\hspace*{\myindention} #3}|\\ + \ldots\\ + |\captionsetup{format=myformat,myindention=1cm}| +\end{quote} +would give the same result as the example above. + +\subsubsection*{Example 2} + +You want captions to look like this: +%\begin{Example} +% \captionsetup{skip=0pt} + \example{format=reverse,labelformat=fullparens,labelsep=fill,labelfont=it}{\exampletext} +%\end{Example} +\pagebreak[2] +You could do it this way: +\nopagebreak[3] +\begin{quote} + |\DeclareCaptionFormat{reverse}{#3#2#1}|\\ + |\DeclareCaptionLabelFormat{fullparens}%|\\ + | {(\bothIfFirst{#1}{~}#2)}|\\ + |\DeclareCaptionLabelSeparator{fill}{\hfill}|\\ + |\captionsetup{format=reverse,labelformat=fullparens,|\\ + | labelsep=fill,font=small,labelfont=it}| +\end{quote} + +\subsubsection*{Example 3} + +The caption text should go into the left margin? A possible solution would be: +\begin{quote} + |\DeclareCaptionFormat{llap}{\llap{#1#2}#3\par}|\\ + |\captionsetup{format=llap,labelsep=quad,singlelinecheck=no}| +\end{quote} +As a result you would get captions like this: +\example{format=llap,labelsep=quad,singlelinecheck=no,margin=0pt}{\exampletext} + +\medskip + +If the indention into the margin shall be fixed, you could use a combination +of |\llap| and |\makebox|, for example: +\begin{quote} + |\DeclareCaptionFormat{llapx}%|\\ + | {\llap{\makebox[5em][l]{#1}}#3\par}|\\ + |\captionsetup{format=llapx,singlelinecheck=off}| +\end{quote} +\example{format=llapx,singlelinecheck=off,skip=0pt,margin=0pt}{\exampletext} + +\subsubsection*{Example 4} + +This example puts a figure aside a table, but uses only one common caption for both. +This will be achieved by a combination of +|\Declare|\-|Caption|\-|Label|\-|Format| and |\caption|\-|list|\-|entry|: +\begin{quote} + |\DeclareCaptionLabelFormat{andtable}%|\\ + | {#1~#2 \& \tablename~\thetable}|\\ + \ldots\\ + |\begin{figure}|\\ + | \centering|\\ + | \includegraphics{|\ldots|}%|\\ + | \qquad|\\ + | \begin{tabular}[b]{\ldots}|\\ + | |\ldots\\ + | \end{tabular}|\\ + | \captionlistentry[table]{|\ldots|}|\\ + | \captionsetup{labelformat=andtable}|\\ + | \caption{|\ldots|}|\\ + |\end{figure}| +\end{quote} +\DeleteShortVerb{\|}% +\noindent\begin{minipage}{\linewidth} + \captionsetup{type=figure} + \centering + \includegraphics[width=30pt]{cat}% + \qquad + \begin{tabular}[b]{r|rr} + & x & y \\\hline + a & 1 & 2 \\ + b & 3 & 4 \\ + \end{tabular} + \captionlistentry[table]{A figure and a table with a common caption} + \captionsetup{labelformat=andtable} + \caption{A figure and a table with a common caption~\footnotemark} +\end{minipage} +\footnotetext{The picture was taken with permission from the + \LaTeX\ Companion\cite{TLC2} examples.} +\MakeShortVerb{\|} + +(Please remember that |\caption|\-|list|\-|entry| increments the figure + resp.~table counter.) + +% --------------------------------------------------------------------------- % + +\clearpage +\section{Document classes \& Babel support} +\label{classes} + +%\NEWdescription{v3.1} +This section will give you an overview of the document classes the +\package{caption} supports, what do they already offer regarding captions, +what side effects will occur when using the \package{caption} package with +them, and what are the `default' settings for them. + +\NEWfeature{v3.1} +The `default' settings depend on the document class you use; they represent +how the class author wanted the captions to look like. So for example +setting |format=|\x|default| can give you different visual designs when used +with different document classes. + +\begingroup\setlength\leftmargini{0.3em}% default = 2.5em +\INFO +If you don't find the document class you use in this section, you usually +don't have to worry: Many document classes (e.g.~the \class{octavo} class) +are derived from one of the standard document classes \class{article}, +\class{report}, or \class{book}, and behave the same regarding captions. +\Thispackage\ automatically does a compatibility check against the document +class used and will give you the clear warning +\begin{quote}\footnotesize + |Package caption Warning: Unsupported document class (or package) detected,|\\ + |(caption) usage of the caption package is not recommended.|\\ + |See the caption package documentation for explanation.| +\end{quote} +if such an incompatibility was detected. +If you don't get such warning everything is fine, but if you get it the +usage of \thispackage\ is not recommended and especially not supported. +\endgroup + +\begin{Expert} +If you get such a compatibility warning but decide to use \thispackage{} +anyway, you should watch carefully what side-effects occur, usually the +look and feel of your captions will change by just including \thispackage{} +without options, meaning they do not look like as intended by the author +of the document class. +If this is fine for you, you should first specify the option |style=|\x|base| +via |\use|\-|package[style=|\x|base]{caption}| or +|\caption|\-|setup{style=|\x|base}| to set \thispackage\ into a well-defined +state. +Afterwards you can start setting your own options additionally and +keep your fingers crossed. +\end{Expert} + +\newcommand*\Option{Option} +\newcommand*\defaultvalue{\texttt{default} value} +\newcommand*\uses{\textit{uses}} +\newcommand*\settings{\textit{settings}} +\newcommand*\nofont{\textit{none}} + +\subsection{Standard \LaTeX: article, report, and book} + +\begin{tabular}{ll} +\Option & \defaultvalue \\\hline +|format=| & |plain| \\ +|labelformat=| & |simple| \\ +|labelsep=| & |colon| \\ +|justification=| & |justified| \\ +|font=| & \nofont \\ +|labelfont=| & \nofont \\ +|textfont=| & \nofont \\ +\end{tabular} + +\begin{Annotation} +This also applies to document classes derived from them. +\end{Annotation} + +\subsection{\AmS: amsart, amsproc, and amsbook} +\label{AMS} + +\begin{tabular}{ll} +\Option & \defaultvalue \\\hline +|format=| & |plain| \\ +|labelformat=| & |simple| \\ +|labelsep=| & |.\enspace| \\ +|justification=| & |justified| \\ +|font=| & |\@captionfont| \\ +|labelfont=| & |\@captionheadfont| \\ +|textfont=| & |\@captionfont\upshape| \\ +\end{tabular} + +\begin{Annotation*} +|\@caption|\-|font| will be set to |\normal|\-|font|, and +|\@caption|\-|head|\-|font| to |\sc|\-|shape| by the \AmS\ document classes. +\end{Annotation*} + +Furthermore the margin will be set to |\caption|\-|indent| for +more-than-one-line captions (which will be set to |3pc| by the \AmS\ classes), +the margin for single-line captions will be set to the half of it instead. +If you want to use a common margin for both, insert +|\clear|\-|caption|\-|setup[margin*]{single|\-|line}| +into the preamble of your document, after loading \thispackage. + +Additionally the options |figure|\-|position=b,|\x|table|\-|position=t| +will be set. You can override these settings by specifying other values for +|figure|\-|position=| or |table|\-|position=| in the option list while +loading \thispackage. + +\subsection{beamer} +\label{beamer} + +\begin{tabular}{ll} +\Option & \defaultvalue \\\hline +|format=| & |plain| \\ +|labelformat=| & \textit{not numbered} \\ +|labelsep=| & |colon| \\ +|justification=| & |raggedright| \\ +|font=| & \class{beamer} ``|caption|'' \settings \\ +|labelfont=| & \class{beamer} ``|caption name|'' \settings \\ +|textfont=| & \nofont \\ +\end{tabular} + +\subsubsection*{Build-in features, and side-effects} +You can setup font and color settings with +|\set|\-|beamer|\-|font{caption}|\marg{options} and +|\set|\-|beamer|\-|font{caption name}|\marg{options}. +This will still work, unless you set a different font with +|\caption|\-|setup{font=|\x\meta{options}|}| or +|\caption|\-|setup{label|\-|font=|\x\meta{options}|}|.\par +Furthermore the \class{beamer} classes offer different caption templates +which can be chosen with +|\set|\-|beamer|\-|template|\x|{caption}|\x|[|\meta{template}|]|. +Since \thispackage\ replaces this caption template mechanism, +|\def|\-|beamer|\-|template*|\x|{caption}|\x\marg{template code} +and +|\set|\-|beamer|\-|template|\x|{caption}|\x|[|\meta{template}|]| +will have no effect when \thispackage\ is used. +(Exception: Selecting the template |default|, |num|\-|bered|, or +|caption| |name| |own| |line| will be recognized by \thispackage and be mapped +to corresponding options.) + +\subsection{\KOMAScript: scrartcl, scrreprt, and scrbook} +\label{KOMA} + +\begin{tabular}{ll} +\Option & \defaultvalue \\\hline +|format=| & \uses\ |\setcapindent| \textit{\&} |\setcaphanging| \settings \\ +|labelformat=| & \textit{like \purett{simple}, but with support of ``autodot''}\\ +|labelsep=| & |\captionformat| \\ +|justification=| & |justified| \\ +|font=| & |\setkomafont{caption}| \settings \\ +|labelfont=| & |\setkomafont{captionlabel}| \settings \\ +|textfont=| & \nofont \\ +\end{tabular} + +\subsubsection*{Build-in features} +The \KOMAScript\ document classes offer many ways to customize the look and +feel of the captions. For an overview and a full description please take a +look at the \KOMAScript\ documentation, section `Tables and Figures'. + +\subsubsection*{Side effects} +The optional argument of |\set|\-|cap|\-|width| is not supported and +will be ignored if used in conjunction with the \package{caption} package. +Furthermore the \KOMAScript\ options |table|\-|caption|\-|above| \& +|table|\-|caption|\-|below| and the commands |\caption|\-|above| \& +|\caption|\-|below| are stronger than the |position=| setting offered by +the \package{caption} package. + +\subsection{\NTG: artikel, rapport, and boek} +\label{NTG} + +\begin{tabular}{ll} +\Option & \defaultvalue \\\hline +|format=| & |plain| \\ +|labelformat=| & |simple| \\ +|labelsep=| & |colon| \\ +|justification=| & |justified| \\ +|font=| & \nofont \\ +|labelfont=| & |\CaptionLabelFont| \\ +|textfont=| & |\CaptionTextFont| \\ +\end{tabular} + +\subsubsection*{Build-in features, and side-effects} +|\Caption|\-|Label|\-|Font| and |\Caption|\-|Text|\-|Font| can be set either +directly or by using |\Caption|\-|Fonts|. +Both is still supported unless you use one of the two options +|label|\-|font=| or |text|\-|font=| offered by \thispackage. + +\subsection{\SmF: smfart and smfbook} +\label{SMF} + +Since the \SmF\ document classes are derived from the \AmS\ document classes +the same default values are valid here. + +Additionally the margin is limited up to the tenth of the |\line|\-|width|. +If you don't like this limitation, you can switch it off with the option +|max|\-|margin=|\x|off| or |max|\-|margin=|\x|false| +(which both means the same). + +\subsection{thesis} +\label{thesis} + +\begin{tabular}{ll} +\Option & \defaultvalue \\\hline +|format=| & |hang| \\ +|labelformat=| & \textit{like \purett{simple}, but with short name}\\ +|labelsep=| & |colon| \\ +|justification=| & |justified| \\ +|font=| & \nofont \\ +|labelfont=| & |\captionheaderfont| \\ +|textfont=| & |\captionbodyfont| \\ +\end{tabular} + +\subsubsection*{Build-in features, and side-effects} +The caption label font can be set with |\caption|\-|header|\-|font|, +the caption text font with |\caption|\-|body|\-|font|. +Both is still supported unless you use one of the two options +|label|\-|font=| or |text|\-|font=| offered by \thispackage. + +\subsection{frenchb babel option} +\label{frenchb} + +If you use the \package{frenchb} option of the \package{babel} package +with one of the three standard \LaTeX{} classes (or a one derived from them) +the default |label|\-|sep=| will be set to |\Caption|\-|Sep|\-|a|\-|ra|\-|tor| +(offered by \package{frenchb}), overriding the default value set by the +document class. +So redefining |\Caption|\-|Sep|\-|a|\-|ra|\-|tor| will still work, unless you +don't select a different |label|\-|sep=| than the default one. + +\INFO* +Please load \thispackage\ \emph{after} the \package{babel} package. + +\subsection{frenchle and frenchpro packages} +\label{frenchpro} + +If you use the \package{frenchle} or \package{frenchpro} package, +the default |label|\-|sep=| will be set to |\caption|\-|sep|\-|a|\-|ra|\-|tor| +(offered by \package{frenchle/pro}) plus \cs{space}, overriding the default +value set by the document class. +So redefining |\caption|\-|sep|\-|a|\-|ra|\-|tor| will still work, unless you +don't select a different |label|\-|sep=| than the default one. + +Furthermore the default |text|\-|font=| will be set to |text|\-|font=|\x|it|, +since this emulates the default setting of |\caption|\-|font| defined by the +\package{frenchle} or \package{frenchpro} package. +%If you redefine |\captionfont| after loading the \package{frenchle} or +%\package{frenchpro} package, this redefinition gets lost. +Please note that the command |\caption|\-|font| is used by the +\package{caption} package internally for a different purpose, +so you should not change it (anymore). + +The command |\un|\-|numbered|\-|captions|\marg{figure \emph{or} table} will +still work, but only unless you don't select a different |label|\-|format=| +than the default one. + +\INFO* +Please load \thispackage\ \emph{after} the \package{frenchle} +or \package{frenchpro} package. + +% --------------------------------------------------------------------------- % + +\clearpage +\section{Package support} +\label{packages} +\label{compatibility} + +%\NEWdescription{v3.1} +\Thispackage\ was adapted to the following packages which deals with +captions, too: +\begin{quote} + \package{float}, \package{floatflt}, \package{fltpage}, + \package{hyperref}, \package{hypcap}, \package{listings}, + \package{longtable}, \package{picinpar}, \package{picins}, + \package{rotating}, \package{setspace}, \package{sidecap}, + \package{subfigure}, \package{supertabular}, \package{threeparttable}, + \package{wrapfig}, and \package{xtab} +\end{quote} + +Furthermore the \package{floatrow} package\cite{floatrow}, the +\package{subcaption} package (which is part of the \package{caption} package +bundle), and the \package{subfig} package\cite{subfig} support \thispackage{} +and use its |\caption|\-|setup| interface. + +\bigskip + +\begingroup\setlength\leftmargini{0.3em}% default = 2.5em +\INFO +If a package (or document class) unknown to \thispackage\ redefines +the |\caption| command as well, this redefinition will be preferred +over the one this package offers, providing maximum compatibility and +avoiding conflicts. +If such a potential incompatibility is detected, you will see this +warning message:~\footnote{% + You can suppress this warning by specifying the option + \texttt{compatibility=true} when loading \thispackage.} +\begin{quote}\footnotesize + |Package caption Warning: \caption will not be redefined since it's already|\\ + |(caption) redefined by a document class or package which is|\\ + |(caption) unknown to the caption package.|\\ + |See the caption package documentation for explanation.| +\end{quote} +\endgroup + +As a result, the following features offered by \thispackage\ will not be available: +\begin{itemize} + \item the options |labelformat=|, |position=auto|, |list=|, and |listformat=| + \item |\caption*| (to produce a caption without label) + \item |\caption[]{|\ldots|}| (to produce no entry in the List of Figures or Tables) + \item |\caption{}| (to produce an empty caption without label separator) + \item |\ContinuedFloat| + \item correctly justified captions in environments like \texttt{wide} and + \texttt{addmargin} which add extra margins + \item the \textsf{hypcap} feature \See{\Ref{hyperref}\,} + \item the sub-caption feature \See{\package{subcaption} package documentation} +\end{itemize} + +\DescribeMacro{compatibility=} +You can override this compatibility mode by specifying the option +\begin{quote} + |compatibility=false| +\end{quote} +when loading \thispackage. +But please note that using this option is neither recommended nor supported +since unwanted side-effects or even errors could occur afterwards. +(For that reason you will get a warning about this.) + +\newcommand\packagedescription[1]{% + \ifvmode\else\par\fi + \nopagebreak + \parbox[b]{\linewidth}{\footnotesize\leftskip=10pt\rightskip=10pt\relax#1}\par + \nopagebreak\smallskip\nopagebreak} + +\PageBreak +\subsection{algorithms} +\label{algorithms} +\packagedescription{% +The \package{algorithms} package bundle\cite{algorithms} provides two +environments: The \texttt{algorithmic} environment provides a possibility +for describing algorithms, and the \texttt{algorithm} environment provides +a ``float'' wrapper for algorithms.} + +Since the \texttt{algorithm} environment is implemented via |\new|\-|float| +provided by the \package{float} package\cite{float}, please see \Ref{float}. + +\iffalse +\pagebreak[3] +\subsection{algorithm2e} +\label{algorithm2e} +\packagedescription{% +The \package{algorithm2e} package\cite{algorithm2e} offers an environment for +writing algorithms in LaTeX2e.} + +Since the \package{algorithm2e} package does not use some kind of standard +interface for defining its floating environment (e.g.~|\newfloat| of the +\package{float} package) and typesetting its caption, +the \package{algorithm2e} package is \emph{not} supported by \thispackage. + +So if you want to customize the captions using \thispackage, +you have to build a new environment which uses a supported interface regarding +floats (e.g. using the \package{float} or \package{floatrow} package), +and combine this environment with the internal \package{algorithm2e} code. + +As first step you could define a non-floating environment \texttt{algorithmic}, +for example: +\begin{quote} + |\usepackage{algorithm2e}|\\ + |% save the "algorithm" environment from the algorithm2e package|\\ + |\let\ORIGalgorithm\algorithm|\\ + |\let\ORIGendalgorithm\endalgorithm|\\ + |% define the algorithmic environment|\\ % , based on the saved environment + |\newenvironment{algorithmic}%|\\ + | {\renewenvironment{algocf}[1][h]{}{}% pass over floating stuff|\\ + | \ORIGalgorithm}%|\\ + | {\ORIGendalgorithm}|\\ + \ldots +\end{quote} +Having defined this non-floating environment, you could define your own new +floating environment with |\newfloat| of the \package{float} package +(or |\DeclareNewFloatType| of the \package{floatrow} package), +and use the combination of this floating environment and \texttt{algorithmic} +in its body, just like you would do when you use the +\package{algorithm}/\package{algorithmic} package tandem. + +You could even use the \package{algorithm} package for this purpose, for example: +\begin{quote} + \ldots\\ + |% load the algorithm package to re-define the|\\ + |% floating environment "algorithm" and \listofalgorithms|\\ + |\let\listofalgorithms\undefined|\\ + |\usepackage{algorithm}|\\ + \ldots\\ + |% Example usage:|\\ + |\begin{algorithm}|\\ + |\caption{An algorithm}|\\ + |\begin{algorithmic}|\\ + | \SetVline|\\ + | \eIf{cond1}{|\\ + | a line\;|\\ + | }{|\\ + | another line\;|\\ + | }|\\ + |\end{algorithmic}| +\end{quote} +Now you are finally able to customize the float and caption layout like every +other floating environment defined with the \package{float} package\cite{float}, +please see \Ref{float}. + +\begin{Annotation} +An alternative would be using the \package{algorithmicx} package. +\end{Annotation} +\fi + +\pagebreak[3] +\subsection{float} +\label{float} +\packagedescription{% +The \package{float} package\cite{float} introduces the commands +\cs{restylefloat} to give existing floating environments a new look \& feel +and \cs{newfloat} to define new floating environments. +It also provides the ``\texttt{H}'' float placement option which places +the environments ``here'' instead of letting them floating around.} + +For floating environments defined with \cs{newfloat} or \cs{restylefloat} the +|po|\-|si|\-|tion| option has no effect on the main caption anymore, since its +placement and spacing will be controlled by the selected float style instead. + +A caption style and options defined with the name of the float style will be +executed additionally to the regular ones. +Using this mechanism \thispackage\ emulates the default look \& feel of the +|ruled| captions: It defines the caption style +\begin{quote} + |\DeclareCaptionStyle{ruled}%|\\ + | {labelfont=bf,labelsep=space,strut=off}|\mbox{\quad.} +\end{quote} +So to change this you need either define your own caption style called +|ruled| or use |\caption|\-|setup[ruled]|\marg{options} to specify additional +options.%, +%e.g.~|\caption|\-|setup[ruled]{labelsep=|\x|colon}|. + +Also by using this mechanism the skip between a |boxed| float and its caption +is specified, overriding its global value: +\begin{quote} + |\captionsetup[boxed]{skip=2pt}| +\end{quote} +For changing this, just use |\caption|\-|setup[boxed]{skip=|\x\meta{value}|}| +with an appropriate value. Or if you want to use the global |skip| setting +instead, you can remove the usage of the local setting for these floats with +|\clear|\-|caption|\-|setup[skip]{boxed}|. + +\begin{Note} +Only one single caption can be typeset inside environments defined with +|\new|\-|float| or |\re|\-|style|\-|float|, furthermore these environments +are not behaving exactly like the pre-defined floats |figure| and |table|. +As a consequence many packages do not cooperate well with these. +Furthermore the \package{float} package has some caveats \& limitations, +so if you just want to define a new simple floating environment---behaving +like |figure| or |table|---I recommend using |\Declare|\-|Floating|\-|Environment| +offered by the \package{newfloat} package instead. +And for defining non-simple floating environments and customization I +recommend using |\Declare|\-|New|\-|Float|\-|Type| offered by the +\package{floatrow} package\cite{floatrow}. +\end{Note} + +\iffalse +Please also note that you \emph{don't} need a |\restyle|\-|float| for using +the ``|H|'' float placement specifier. Some docs say so, but they are +wrong. +And |\restyle|\-|float{table}| is a very good method to shoot yourself +in the foot, since many packages using |table| internally are not working +correctly afterwards. +\fi + +\pagebreak[3] +\subsection{floatflt} +\label{floatflt} +\packagedescription{% +The \package{floatflt} package\cite{floatflt} offers figures and tables +which do not span the full width of a page and are float around by text.} + +\NEWfeature{v3.1} +If you want to setup special options for the |float|\-|ing|\-|figure| and +|float|\-|ing|\-|table| environments you can use +\begin{quote} + |\captionsetup[floatingfigure]|\marg{options}\quad\emph{and}\\ + |\captionsetup[floatingtable]|\marg{options}\quad. +\end{quote} +These options will be executed additionally to the regular ones for +|figure| resp.~|table|. + +\begin{Note} +The |margin| resp.~|width| setting will not be used for these figures resp.~tables, +unless you set it explicit with |\caption|\-|setup[floating|\-|figure]{|\ldots|}| +resp.~|\caption|\-|setup[floating|\-|table]{|\ldots|}|. +\end{Note} + +\pagebreak[3] +\subsection{fltpage} +\label{fltpage} +\packagedescription{% +The \package{fltpage} package\cite{fltpage} offers the outhouse of the +caption for |figure|s or |table|s which needs the whole page +for its contents. This will be done by placing the caption on the bottom +of the previous or next page.} + +\iffalse +\NEWfeature{v3.1} +Two options control the links to the environments |FPfigure| and |FPtable|: +\begin{description} +\item{\texttt{FPlist=caption} or \texttt{FPlist=figure}}\\[\smallskipamount] +If set to |caption|, the list entry will link to the caption; if set to +|figure|, it will link to the figure contents. +(The default setting is |FP|\-|list=|\x|caption|.) +\item{\texttt{FPref=caption} or \texttt{FPref=figure}}\\[\smallskipamount] +If set to |caption|, a \cs{ref}, \cs{pageref}, \cs{autoref}, or \cs{nameref} +will link to the caption; if set to |figure|, it will link to the figure contents. +(The default setting is |FP|\-|ref=|\x|figure|.) +\end{description} +\fi + +If you want to setup special options for the |FPfigure| and |FPtable| +environments you can use +\begin{quote} + |\captionsetup[FPfigure]|\marg{options}\quad\emph{and}\\ + |\captionsetup[FPtable]|\marg{options}\quad. +\end{quote} +These options will be executed additionally to the regular ones for +|figure| or |table|. + +\pagebreak[3] +\subsection{hyperref} +\label{hyperref} +\packagedescription{% +The \package{hyperref} package\cite{hyperref} is used to handle cross +referencing commands in LaTeX to produce hypertext links in the document.} + +\NEWfeature{v3.1} +There are two options available to control the placement of hyperlink +anchors:~\footnote{These options are named after the \package{hypcap} package +which they supersede.} +\begin{description} +\item{\texttt{hypcap=true} or \texttt{hypcap=false}}\\[\smallskipamount] +If set to |true| all hyperlink anchors -- where entries in the +List of Figures, |\ref|, and |\auto|\-|ref| will link to -- are placed at +the beginning of the (floating) environment.\par +If set to |false| the hyperlink anchor is (usually) placed at the caption.\par +(The default setting is |hypcap=|\x|true|.) +\item{\texttt{hypcapspace=}\meta{amount}}\\[\smallskipamount] +Because it looks poor if the hyperlink points exactly at the top of +the figure or table, you can specify a vertical distance between +the hyperlink anchor and the (floating) environment itself, +e.g.~|hyp|\-|cap|\-|space=|\x|0pt| removes this distance.\par +(The default setting is |hyp|\-|cap|\-|space=|\x|0.5\base|\-|line|\-|skip|.) +\end{description} + +Both settings have no effect in |lst|\-|listing|s (provided by the +\package{listings} package), |long|\-|table|s (provided by the +\package{longtable} package), |super|\-|tabular|s (provided by the +\package{supertabular} package), and |x|\-|tabular|s (provided by the +\package{xtab} package), within these environments hyperlink +anchors will always be placed as if |hyp|\-|cap=|\x|true| and +|hyp|\-|cap|\-|space=|\x|0pt| would be set. + +\pagebreak[3]Please note:\nopagebreak +\begin{description} +\item{\cs{captionof}\marg{type}\csmarg{\purerm\ldots} + vs.~\cs{captionsetup}\csmarg{type=\textrm{\meta{type}}}$+$\cs{caption}\csmarg{\purerm\ldots}}% +\\[\smallskipamount] +Without \package{hyperref} loaded, both will give you identical results. +But with \package{hyperref} loaded, and with |hyp|\-|cap=|\x|true| requested, +the hyperlink anchor will be placed different. +For example: +\begin{quote} +|\begin{minipage}{\linewidth}|\\ +| |\ldots\\ +| \captionof{figure}{A figure}|\\ +|\end{minipage}| +\end{quote} +will place the hyperlink anchor at the caption. +(And if |hyp|\-|cap=|\x|true| is set, you will get a warning about this.) +But +\begin{quote} +|\begin{minipage}{\linewidth}|\\ +| \captionsetup{type=figure}|\\ +| |\ldots\\ +| \caption{A figure}|\\ +|\end{minipage}| +\end{quote} +will place the hyperlink anchor at the beginning of the |mini|\-|page|, +since |\caption|\-|setup{type=|\x|figure}| does not only set the caption type +to ``figure'' but does place a hyperlink anchor, too. + +\item{\cs{caption}\csoarg{}\csmarg{\purerm\ldots} + vs.~\cs{captionsetup}\csmarg{list=false}$+$\cs{caption}\csmarg{\purerm\ldots}}\\[\smallskipamount] +Again, without \package{hyperref} loaded, both will give you identical results. +But with \package{hyperref} loaded, the difference is in the nuances. +So for example the optional argument of |\caption| will also be written to +the |aux| file, and will be used by the |\name|\-|ref| command. +So if you choose to use |\caption| with empty optional argument, +|\name|\-|ref| will also give you an empty result. +So it's better to use |\caption|\-|setup{list=|\x|false}| if you don't +want an entry in the List of Figures or List of Tables. +\end{description} + +\pagebreak[3] +\subsection{hypcap} +\label{hypcap} +\packagedescription{% +The \package{hyp\-cap} package\cite{hypcap} offers a solution to the problem +that links to a float using \package{hyper\-ref} may anchors to the caption +rather than the beginning of the float. +Since \thispackage\ \version{3.1} already solves this problem for itself, +the \package{hypcap} package is usually not needed.} +%, at least when you use \thispackage.} + +If the \package{hyp\-cap} package is loaded additionally to the +\package{hyper\-ref} package, it takes over the control of the hyperlink +anchor placement from \thispackage, overriding the options |hyp|\-|cap=| +and |hyp|\-|cap|\-|space=|. + +So for a manual placement of hyperlink anchors +|\caption|\-|setup{type=|\x\meta{type}|}| is not sufficient anymore, +instead you need to use |\cap|\-|start| (provided by the \package{hyp\-cap} +package) for this. + +Regarding the automatically placement the \package{hypcap} package offers good +placement of hyperlink anchors for the floating environments |figure| and +|table| only. In contrast the |hypcap=|\x|true| option of \thispackage\ also +offers good placements of hyperlink anchors for +|floating|\-|figure|s (provided by the \package{float\-flt} package), +|FP|\-|figure|s \& |FPtable|s (provided by the \package{flt\-page} package), +|fig|\-|window|s (provided by the \package{pic\-in\-par} package), +|par|\-|pic|s (provided by the \package{pic\-ins} package), +|SC|\-|figure|s (provided by the \package{side\-cap} package), +|three|\-|part|\-|table|s (provided by the \package{three\-part\-table} package), +and |wrapfigure|s (provided by the \package{wrap\-fig} package).%---% +%so by loading the \package{hypcap} package additionally you will +%loose that. + +\pagebreak[3] +\subsection{listings} +\label{listings} +\packagedescription{% +The \package{listings} package\cite{listings} typesets programming code.} + +If you want to setup special options for the |lst|\-|listing| environment +you can use +\begin{quote} + |\captionsetup[lstlisting]|\marg{options}\quad. +\end{quote} + +Please note that the \package{listings} package has its very own options +for controlling the position and the skips of the caption: +|caption|\-|pos=|, |above|\-|caption|\-|skip=|, and |below|\-|caption|\-|skip=|. +\See{\package{listings} documentation for details.} +These \package{listings} options override the \package{caption}'s ones, but +can be again overwritten by |\caption|\-|setup[lst|\-|listing]{|\ldots|}|, +e.g.%~ +\begin{quote}|\caption|\-|setup[lst|\-|listing]{skip=|\x|10pt}|\quad.\end{quote} + +\pagebreak[3] +\subsection{longtable} +\label{longtable} +\packagedescription{% +The \package{longtable} package\cite{longtable} offers an environment +which behaves similar to the \texttt{tabular} environment, but the table +itself can span multiple pages.} + +If you want to setup special options for the |long|\-|table| environment +you can use +\begin{quote} + |\captionsetup[longtable]|\marg{options}\quad. +\end{quote} +These options will be executed additionally to the regular ones for +|table|. + +The |margin| and |width| settings usually override |\LT|\-|cap|\-|width|, +so you get an equal look \& feel of the captions in |table|s and +|long|\-|table|s. +But if you set |\LT|\-|cap|\-|width| to a value different than its default +$=$ |4in|, \thispackage\ will follow that. +(But |\LT|\-|cap|\-|width| will be overwritten by +|\caption|\-|setup[long|\-|table]{width=|\x\meta{value}|}|, +even if it is set to a value different than |4in|.) + +\begin{Note} +|\caption|\-|of| and |\Continued|\-|Float| do \emph{not} work for |long|\-|table|s. +Furthermore neither |\caption| nor |\caption|\-|list|\-|entry| will increment +the |table| counter here; it's incremented by the |long|\-|table| environment +instead. +\NEWfeature{v3.1} +If you need a |long|\-|table| which does not increment the |table| counter +please use the |long|\-|table*| environment (offered by the +\package{ltcaption} package which is part of \thispackage\ bundle and will be +loaded automatically). +\end{Note} + +\pagebreak[3] +\subsection{picinpar} +\label{picinpar} +\packagedescription{% +Similar to the \package{floatflt} package the \package{picinpar} +package\cite{picinpar} offers figures and tables which do not span the full +width of a page and are float around by text. +For a detailed discussion about the differences between these packages +please take a look at The \LaTeX\ Companion\cite{TLC2}.} + +\NEWfeature{v3.1} +If you want to setup special options for the |fig|\-|window| and +|tab|\-|window| environments you can use +\begin{quote} + |\captionsetup[figwindow]|\marg{options}\quad\emph{and}\\ + |\captionsetup[tabwindow]|\marg{options}\quad. +\end{quote} +These options will be executed additionally to the regular ones for +|figure| or |table|. + +\begin{Note} +The |margin| resp.~|width| setting will not be used for these figures and tables, +unless you set it explicit with |\caption|\-|setup[fig|\-|window]{|\ldots|}| or +|\caption|\-|setup[fig|\-|table]{|\ldots|}|. +\end{Note} + +\pagebreak[3] +\subsection{picins} +\label{picins} +\packagedescription{% +Similar to the \package{floatflt} and \package{picinpar} package the +\package{picins} package\cite{picins} offers figures and tables which do not +span the full width of a page and are float around by text. +For a detailed discussion about the differences between these packages +please take a look at The \LaTeX\ Companion\cite{TLC2}.} + +\NEWfeature{v3.1} +If you want to setup special options for the |par|\-|pic| environment you can use +\begin{quote} + |\captionsetup[parpic]|\marg{options}\quad. +\end{quote} +These options will be executed additionally to the regular ones for +|figure| or |table|. + +Furthermore |\pic|\-|caption[]{|\ldots|}| produce no entry in the List of Figures, +and |\pic|\-|caption*{|\ldots|}| gives an unlabeled \& unnumbered caption. + +\begin{Note} +The |margin| resp.~|width| setting will not be used for these figures and tables. +\iffalse +if |pic|\-|caption|\-|side| or |pic|\-|caption|\-|top|\-|side| is used. +The |width| setting will not be used (but the |margin| setting will) if +|pic|\-|caption|\-|out|\-|side| or |pic|\-|caption|\-|in|\-|side| is used. +\fi +But you can override this by setting it explicit with +|\caption|\-|setup[par|\-|pic]{|\ldots|}|. +\end{Note} + +If you want to have a |\pic|\-|caption| of another type as |figure|, please +do \emph{not} re-define |\@cap|\-|type| as suggested by the \package{picins} +documentation. Please use the |\pic|\-|caption|\-|type|\marg{type} command +which is offered by \thispackage\ instead, e.g.: +\begin{quote} + |\piccaptiontype{table}|\\ + |\piccaption{An example table}|\\ + |\parpic(50mm,10mm)[s]{|\ldots|}| +\end{quote} + +\pagebreak[3] +\subsection{rotating} +\label{rotating} +\packagedescription{% +The \package{rotating} package\cite{rotating} offers the floating +environments \texttt{side\-ways\-figure} and \texttt{side\-ways\-table} which +are just like normal figures and tables but rotated by 90 resp.~270 degree. +Furthermore a command \cs{rot\-caption} is offered for rotated captions only.} + +\iffalse % No, we don't do that +If you want to setup special options for the |side|\-|ways|\-|figure| and +|side|\-|ways|\-|table| environments you can use +\begin{quote} + |\captionsetup[sidewaysfigure]|\marg{options}\\ + |\captionsetup[sidewaystable]|\marg{options}\quad. +\end{quote} +These options will be executed additionally to the regular ones for +|figure| or |table|. +\fi + +The command |\rot|\-|caption| will be extended by \thispackage, so +|\rot|\-|caption*| and |\rot|\-|caption|\-|of| can be used analogous to +|\caption*| and |\caption|\-|of|. + +\pagebreak[3] +\subsection{setspace} +\label{setspace} +\packagedescription{% +The \package{setspace} package\cite{setspace} offers options and commands +to change the spacing, +e.g.\ \cs{usepackage}\x\csoarg{one\-half\-spacing}\x\csmarg{set\-space} +causes the document to be typeset in one-and-a-half spacing.} + +If the \package{setspace} package is used in conjunction with \thispackage, +the caption will be typeset with single spacing as default. This can be changed +by specifying either |font=|\x|one|\-|half|\-|spacing|, +|font=|\x|double|\-|spacing|, or |font={stretch=|\x\meta{amount}|}|. +\See{also \Ref{fonts}} + +\pagebreak[3] +\subsection{sidecap} +\label{sidecap} +\packagedescription{% +The \package{sidecap} package\cite{sidecap} offers the floating environments +\texttt{SC\-figure} and \texttt{SC\-table} which are like usual figures +and tables but the caption will be put \emph{beside} the contents.} + +If you want to setup special options for the |SCfigure| and |SCtable| +environments you can use +\begin{quote} + |\captionsetup[SCfigure]|\marg{options}\quad\emph{and}\\ + |\captionsetup[SCtable]|\marg{options}\quad. +\end{quote} +These options will be executed additionally to the regular ones for +|figure| or |table|. + +\pagebreak[3] +\begin{Note} +The \package{sidecap} package offers its own options for justification. +If set, they will override the one specified with the caption option +|jus|\-|ti|\-|fi|\-|ca|\-|tion=| for captions beside their contents. +\end{Note} + +\begin{Note} +The |margin| resp.~|width| setting will not be used for these figures and tables, +unless you set it explicit with |\caption|\-|setup[SC|\-|figure]{|\ldots|}| +or |\caption|\-|setup[SC|\-|table]{|\ldots|}|. +\end{Note} + +\medskip + +\begin{Annotation*} +Instead of using the \package{sidecap} package you can also use the more +powerful and flexible \package{floatrow} package\cite{floatrow} for typesetting +captions beside the contents. +\end{Annotation*} + +\pagebreak[3] +\subsubsection*{Undocumented features} +The \package{sidecap} package \version{1.6} has some undocumented package +options and commands which allow further customization of the side-captions: + +\pagebreak[3] +\DescribeMacro{margincaption} +The package option +\begin{quote} + |margincaption|\qquad{\small(e.g.~|\usepackage[margincaption]{sidecap}|)} +\end{quote} +causes all side-captions to be placed into the margin. + +\pagebreak[3] +\DescribeMacro{\sidecaptionvpos} +The command +\begin{quote} + |\sidecaptionvpos|\marg{float type}\marg{pos} +\end{quote} +sets the vertical position of the side-caption. \meta{pos} can be either `|t|' +(for top alignment), `|b|' (for bottom alignment), or `|c|' (for center alignment). +The default setting for |table| is `|t|', for |figure| and all other ones +defined with |\Declare|\-|Floating|\-|Environment| it's `|b|'. + +\pagebreak[3] +\subsection{subfigure} +\label{subfigure} +\packagedescription{% +The \package{subfigure} package\cite{subfigure} provides support for small or +`sub' figures and tables within a single figure or table environment. +This package is obsolete, new users should use \package{subfig} instead.} + +Since the \package{subfigure} package is obsolete it will only be supported in +a way that old documents (which have used \thispackage\ \version{1.x} during +development) should still compile as expected. + +Please use the \package{subfig} or \package{subcaption} package instead which both supports \thispackage\ +\version{3.x}. + +\See{the \package{subfig} package\cite{subfig} documentation for details.} + +\pagebreak[3] +\subsection{supertabular and xtab} +\label{supertabular} +\packagedescription{% +The \package{supertabular}\cite{supertabular} and \package{xtab}\cite{xtab} +packages offer an environment which can span multiple pages and is quite +similar to the \texttt{long\-table} environment provided by the +\package{longtable} package\cite{longtable}. +For a detailed discussion about the differences between these powerful +packages please take a look at The \LaTeX\ Companion\cite{TLC2}.} + +If you want to setup special options for the |super|\-|tabular| +resp.~|x|\-|tabular| environment you can use +\begin{quote} + |\captionsetup[supertabular]|\marg{options}\quad\emph{resp.}\\ + |\captionsetup[xtabular]|\marg{options}\quad. +\end{quote} +These options will be executed additionally to the regular ones for +|table|. + +\begin{Note} +|\Continued|\-|Float| does not work for |super|\-|tabular|s and |x|\-|tabular|s. +\end{Note} + +\pagebreak[3] +\subsection{threeparttable} +\label{threeparttable} +\packagedescription{% +The \package{threeparttable} package\cite{threeparttable} provides a scheme +for tables that have a structured note section after the table contents and +the caption. +This scheme provides an answer to the old problem of putting footnotes in +tables---by making footnotes entirely unnecessary.} + +\NEWfeature{v3.1} +If you want to setup special options for the |three|\-|part|\-|table| and +|measured|\-|figure| environments you can use +\begin{quote} + |\captionsetup[threeparttable]|\marg{options}\quad\emph{and}\\ + |\captionsetup[measuredfigure]|\marg{options}\quad. +\end{quote} +These options will be executed additionally to the regular ones for +|table| or |figure|. + +\begin{Note} +Since the caption will have the same width as the contents here, +the |margin| resp.~|width| setting will not be used for these figures and tables, +at least unless you set it explicit with +|\caption|\-|setup[three|\-|part|\-|table]{|\ldots|}| or +|\caption|\-|setup[measured|\-|figure]{|\ldots|}|. +\end{Note} + +\medskip + +\begin{Annotation*} +Instead of using the \package{threeparttable} package you can +also use the \package{floatrow} package\cite{floatrow} for this purpose. +\end{Annotation*} + +\pagebreak[3] +\subsection{wrapfig} +\label{wrapfig} +\packagedescription{% +Similar to the \package{floatflt}, the \package{picinpar}, and the +\package{picins} package the \package{wrapfig} package\cite{wrapfig} offers +figures and tables which do not span the full width of a page and are float +around by text. +For a detailed discussion about the differences between these packages +please take a look at The \LaTeX\ Companion\cite{TLC2}.} + +\NEWfeature{v3.1} +If you want to setup special options for the |wrap|\-|figure| and +|wrap|\-|table| environments you can use +\begin{quote} + |\captionsetup[wrapfigure]|\marg{options}\quad\emph{and}\\ + |\captionsetup[wraptable]|\marg{options}\quad. +\end{quote} +These options will be executed additionally to the regular ones for +|figure| or |table|. + +\begin{Note} +The |margin| resp.~|width| setting will not be used for these figures and +tables, unless you set it explicit with +|\caption|\-|setup[wrap|\-|figure]{|\ldots|}| +or |\caption|\-|setup[wrap|\-|table]{|\ldots|}|. +\end{Note} + +% --------------------------------------------------------------------------- % + +\clearpage +\section{Further reading} + +I recommend the following documents for further reading: + +\begin{itemize} +\item + The \TeX\ FAQ -- Frequently asked questions about \TeX\ and \LaTeX: + \begin{quote}\url{http://faq.tug.org/}\end{quote} + +\item + A French FAQ can be found at + \begin{quote}\url{http://www.grappa.univ-lille3.fr/FAQ-LaTeX/}\end{quote} + +\item + ``What is a minimal working example?'' from Christian Faulhammer and Ulrich Schwarz: + \begin{quote}\url{http://www.minimalbeispiel.de/mini-en.html}\end{quote} + +\item + \textsf{epslatex} from Keith Reckdahl contains many tips around + including graphics in \LaTeXe\ documents. + You will find this document in the directory + \begin{quote}\url{http://mirror.ctan.org/info/epslatex/}\end{quote} +\end{itemize} + +% --------------------------------------------------------------------------- % + +\pagebreak[3] +\section{Thanks} + +I would like to thank Katja Melzner, +Steven D. Cochran, Frank Mittelbach, Olga Lapko, +David Carlisle, Carsten Heinz, Keith Reckdahl, Markus Kohm, +Heiko Oberdiek, and Herbert Vo\ss. +Thanks a lot for all your help, ideas, patience, spirit, and support! + +Also I would like to thank +Harald Harders, +Peter L\"offler, +Peng Yu, +Alexander Zimmermann, +Matthias Pospiech, +J\"urgen Wieferink, +Christoph Bartoschek, +Uwe St\"ohr, +Ralf Stubner, +Geoff Vallis, +Florian Keiler, +J\"urgen G\"obel, +Uwe Siart, +Sang-Heon Shim, +Henrik Lundell, +David Byers, +William Asquith, +Prof.~Dr.~Dirk Hoffmann, +Frank Martini, +Danie Els, +Philipp Woock, +Fadi Semmo, +Matthias Stevens, and +Leo Liu +who all helped to make this package a better one. + +% --------------------------------------------------------------------------- % + +\clearpage\appendix +\section{Alphabetical Reference} + +%\newenvironment{Warnings}% +% {\begin{trivlist}% +% \def\Message{\pagebreak[3]\leftskip=0pt\relax\item[]\color{blue}}% +% \def\Description{\nopagebreak\par\nopagebreak\color{black}\leftskip=1.5em\nopagebreak}% +% }% +% {\color{black}\end{trivlist}} +\makeatletter +\newenvironment{Warnings}{% + \newif\ifMessage + \def\Message{% + \ifMessage\end{minipage}\par\vspace\itemsep\pagebreak[3]\fi + \begin{minipage}{\linewidth}% + \setlength\parindent{0pt}% + \setlength\parskip{\smallskipamount}% + \setlength\leftskip{0pt}% + \color{blue}% + \Messagetrue}% + \def\Description{% + \par\color{black}\leftskip=1.5em}% + \def\Or{\@testopt\@Or{or}}% + \def\@Or[##1]{% + \\{\small\color{black}\hspace{1.5em}\textit{-- ##1 --}}\\}% +}{% + \ifMessage\end{minipage}\par\fi +} +\makeatother + +\subsection{Options} +%\enlargethispage{10ex} +\newcommand\preambleoption{~% + \begingroup\def\thefootnote{\fnsymbol{footnote}}% + \footnotemark[2]% + \endgroup} +\newcommand\preambleoptiontext{% + \begingroup\def\thefootnote{\fnsymbol{footnote}}% + \footnotetext[2]{These options are only available in the preamble of the document.}% + \endgroup} + +\begin{longtable*}{lll} +Option & Short description & Section \\ +\hline +\endhead +|aboveskip| & sets the skip above caption & \ref{skips} \\ +|belowskip| & sets the skip below caption & \ref{skips} \\ +|compatibility|\preambleoption & force (non-)compatibility & \ref{compatibility} \\ +%|config| & & \ref{x} \\ +|figureposition|\preambleoption & gives a hint about the figure caption position & \ref{skips} \\ +|font|(|+|) & sets the font & \ref{fonts} \\ +|format| & sets the format & \ref{formats} \\ +\iffalse +|FPlist| & To where the list entry of a FPfigure should link? & \ref{fltpage} \\ +|FPref| & To where a |\ref| to a FPfigure should link? & \ref{fltpage} \\ +\fi +|hangindent| & sets the hang indention & \ref{margins} \\ +|hypcap| & selects `hypcap' feature & \ref{hyperref} \\ +|hypcapspace| & sets the distance between hyperlink and contents & \ref{hyperref} \\ +|indention| & sets the indention & \ref{margins} \\ +|justification| & sets the justification & \ref{justification} \\ +|labelfont|(|+|) & sets the font of the caption label & \ref{fonts} \\ +|labelformat| & sets the format of the caption label & \ref{formats} \\ +|labelsep| & sets the label separator & \ref{formats} \\ +|labelseparator| & --same as |labelsep|-- & \ref{formats} \\ +|list| & switches the entries in the List on or off & \ref{lists} \\ +|listformat| & sets the `List of Figure/Table' entry format & \ref{lists} \\ +|margin| & sets the margin & \ref{margins} \\ +|margin*| & sets the margin, but only if no width is set & \ref{margins} \\ +|maxmargin| & sets the max. margin & \ref{margins} \\ +|minmargin| & sets the min. margin & \ref{margins} \\ +|name| & sets the name of the current environment & \ref{names} \\ +|oneside| & selects the one-side mode & \ref{margins} \\ +|options| & executes the given option list & \\ +|parindent| & sets the paragraph indention & \ref{margins} \\ +|parskip| & sets the skip between paragraphs & \ref{margins} \\ +|position| & gives a hint about the caption position & \ref{skips} \\ +|singlelinecheck| & switches the single-line-check on or off & \ref{justification} \\ +%|size| & sets the size of font & \ref{x} \\ +|skip| & sets the skip between content and caption & \ref{skips} \\ +|strut| & switches the usage of |\strut|s on or off & \ref{formats} \\ +|style| & sets the caption style & \ref{style} \\ +%|style*| & sets the caption style & \ref{style} \\ +|subtype| & sets the sub-caption type & \phantom{t}--~\footnotemark \\ +|tableposition|\preambleoption & gives a hint about the table caption position & \ref{skips} \\ +|textfont|(|+|) & sets the font of the caption text & \ref{fonts} \\ +|textformat| & sets the format of the caption text & \ref{formats} \\ +|twoside| & selects the two-side mode & \ref{margins} \\ +|type| & sets the caption type \& places a hyperlink anchor & \ref{types} \\ +|type*| & sets the caption type only & \ref{types} \\ +|width| & sets a fixed caption width & \ref{margins} \\ +\end{longtable*} +\preambleoptiontext +\footnotetext{The option \texttt{subtype} is explained in the + \package{subcaption} package documentation.} + +\nopagebreak\parbox[t]{\linewidth}{% prevent from page break +\begin{Note*} + Obsolete options are not listed here. See + \Ref{caption1} and + \Ref{caption2} for a list of these options. +\end{Note*}} + +\pagebreak[3] +\subsection{Commands} + +\begin{longtable*}{lll} +Command & & Section \\ +\hline +\endhead +|\abovecaptionskip| & & \ref{skips} \\ +%|\AtBeginCaption| & & \ref{hooks} \\ +%|\AtEndCaption| & & \ref{hooks} \\ +|\belowcaptionskip| & & \ref{skips} \\ +|\caption| & & \ref{caption} \\ +|\caption*| & & \ref{caption} \\ +|\captionlistentry| & & \ref{captionlistentry} \\ +|\captionof| & & \ref{caption} \\ +|\captionof*| & & \ref{caption} \\ +|\captionsetup| & & \ref{captionsetup} \\ +|\captionsetup*| & & \ref{captionsetup} \\ +|\centerfirst| & & \ref{justification} \\ +|\centerlast| & & \ref{justification} \\ +|\clearcaptionsetup| & & \ref{captionsetup} \\ +|\clearcaptionsetup*| & & \ref{captionsetup} \\ +|\ContinuedFloat| & & \ref{ContinuedFloat} \\ +|\DeclareCaptionFont| & & \ref{declare} \\ +|\DeclareCaptionFormat| & & \ref{declare} \\ +|\DeclareCaptionFormat*| & & \ref{declare} \\ +|\DeclareCaptionJustification| & & \ref{declare} \\ +|\DeclareCaptionLabelFormat| & & \ref{declare} \\ +|\DeclareCaptionLabelSeparator| & & \ref{declare} \\ +|\DeclareCaptionLabelSeparator*| & & \ref{declare} \\ +|\DeclareCaptionListFormat| & & \ref{declare} \\ +|\DeclareCaptionOption| & & \ref{declare} \\ +|\DeclareCaptionStyle| & & \ref{declare} \\ +|\DeclareCaptionSubType| & & --~\footnotemark \\ +|\DeclareCaptionTextFormat| & & \ref{declare} \\ +|\showcaptionsetup| & & \ref{captionsetup} \\ +\end{longtable*} +\footnotetext{\cs{DeclareCaptionSubType} is explained in the + \package{subcaption} package documentation.} + +\clearpage +\subsection{Warnings} + +\begin{Warnings} + +\Message + |\caption outside box or environment.| +\Or + |\captionsetup{type=...} outside box or environment.| +\Or + |\captionsetup{type*=...} or \captionof outside box|\\ + | or environment.| +\Description + You have placed a |\caption|, |\caption|\-|of|, or + |\caption|\-|setup{type=|\x\meta{type}|}| command outside an box, group, + or environment. + You should not do this since it could cause some bad side-effects. + \par\See{\Ref{types} and \Ref{caption}} + +\Message + |\caption will not be redefined since it's already|\\ + |redefined by a document class or package which is|\\ + |unknown to the caption package.| +\Description + If \thispackage\ detects that some (unknown) document class or + package has enhanced |\caption|, it will not redefine + |\caption|, too, since this would simply kill the enhancement. + As a result some features, like |\caption*|, |\Continued|\-|Float|, + using the optional argument of |\caption|\-|setup|, + or the options |list=| and |hypcap=| will not be available.\par + If you don't care about the original enhancements but would + like to use the full range of features of \thispackage\ instead + you can give the unsupported(!) option |compatibility=|\x|false| + a try and keep your fingers crossed. + (But you will get the next warning instead.) + \par\See{\Ref{classes} and \Ref{compatibility}} + +\Message + |Forced redefinition of \caption since the|\\ + |unsupported(!) package option `compatibility=false'|\\ + |was given.| +\Description + Since you were so keen to specify the option |compatibility=|\x|false| + \thispackage\ will try to do its best to fulfill your wishes. + But depending on the document class or other packages you use that + can end in non-functional features or even errors. So keep your + fingers crossed! + \par\See{\Ref{compatibility}} + +\Message + |Hyperref support is turned off because hyperref has|\\ + |stopped early.| +\Description + If the \package{hyperref} package stops early during loading + (because of what-ever reason), the \package{hyperref} support of + \thispackage\ will not be available. As a result you could get + \package{hyperref} warnings and non-functional hyperlinks to figures + or tables. + \par\See{\Ref{hyperref}\,} + +\Message + |Ignoring optional argument [|\meta{pos}|] of \setcapwidth.| +\Description + \Thispackage\ tries to emulate the \KOMAScript\ commands regarding + captions as best as it can. But the optional argument of the + \KOMAScript\ command |\setcapwidth| is not (yet) working if you use + this package, so if you try to use it anyway, you will get this warning. + \par\See{\Ref{KOMA}} + +\Message + |Internal Warning: |\meta{warning message}|.| +\Description + You should never see this warning, either you use a package which redefines + |figure| or |table| and which is unknown to \thispackage, or this is a bug + in \thispackage. + Please send me an e-mail reporting this issue. + +\Message + |\label without proper \caption| +\Description + Regarding |\label| the floating environments behave differently than its + non-floating counterparts: The internal reference will not be generated + at the beginning of the environment, but at |\caption| instead. + So you have to place the |\label| command either just \emph{after} or + \emph{inside} the caption text (mandatory argument of |\caption|). + +\Message + |Option `|\meta{option}|' was not in list `|\meta{option list}|'.| +\Description +%\showhyphens{position} + If you try to remove a specific option of an option list, + for example with |\clear|\-|caption|\-|setup[po|\-|si|\-|tion]{table}|, + and this option can not be found inside the option list, you will + get this warning. If this is not because of a typo and you would like + to suppress this warning, use |\clear|\-|caption|\-|setup*| instead of + |\clear|\-|caption|\-|setup|. + \par\See{\Ref{captionsetup}} + +\Message + |Option list `|\meta{option list}|' undefined.| +\Description +%\showhyphens{format} + If you try to remove a specific option of an option list, + for example with |\clear|\-|caption|\-|setup[for|\-|mat]{figure}|, + and this option list is not defined (yet), you will + get this warning. If this is not because of a typo and you would like + to suppress this warning, use |\clear|\-|caption|\-|setup*| instead of + |\clear|\-|caption|\-|setup|. + \par\See{\Ref{captionsetup}} + +\Message + |Obsolete option `ignoreLTcapwidth' ignored.| +\Description + The \package{caption2} package option |ignoreLTcapwidth| will not be + emulated by this version of \thispackage, usually you can simply wipe it + away. + \par\See{\Ref{caption2} and \Ref{longtable}} + +\Message + |`ragged2e' support has been changed. Rerun to get|\\ + |captions right.| +\Description + The \package{ragged2e} package will only be loaded by \thispackage\ if it + is actually needed. + At least two \LaTeX\ runs are needed for that, so on the first run you could + get this warning. + Just compile your document again and this warning should go away. + \par\See{\Ref{justification}} + +\Message + |Reference on page |\meta{page no.}| undefined.| +\Description + If you use a |twoside| page layout, \thispackage\ needs to track the + page numbers to get the margins right. + At least two \LaTeX\ runs are needed for that, on the first run you could get + this warning. + Just compile your document again and this warning should go away. + \par\See{\Ref{margins}} + +\Message + |The caption type was already set to `|\meta{type}|'.| +\Description + This warning informs you about mixed caption options. For example if + you use a |\caption|\-|setup{type=|\x|table}| or + |\caption|\-|of{table}{|\ldots|}| inside a |figure| environment, + this would result in using both option sets for that specific caption, + the one for |figure| (specified with |\caption|\-|setup[figure]{|\ldots|}|) + and the one for |table| (specified with |\caption|\-|setup[table]{|\ldots|}|) + as well.\par + {\small(You can suppress this warning by using the starred form + |\caption|\-|setup*{type=|\x\ldots|}|.)\par} + \par\See{\Ref{captionsetup}} + +\Message + |The option `hypcap=true' will be ignored for this|\\ + |particular \caption.| +\Description + \Thispackage\ hasn't found a proper hyperlink anchor for this particular + caption, so it decides to ignore the setting |hypcap=|\x|true| (which is set by + default). As a result a link to this caption (e.g.~in the List of Figures, + or set by |\ref| or |\auto|\-|ref|) will link you to the caption of the figure + or table, not to the figure or table itself.\par + This can happen if you use |\caption|\-|of| inside a non-floating environment, + but also if you use some package which redefines |figure| or |table|, and + which is unknown to \thispackage.\par + If this is ok for you but you want to suppress this warning, simply place a + |\caption|\-|setup{hyp|\-|cap=|\x|false}| just before the |\caption| or + |\caption|\-|of| command which is causing the warning. + If this is not ok for you, you can set a hyperlink anchor with + |\caption|\-|setup{type=|\x\meta{float type}|}| for yourself. + \par\See{\Ref{hyperref}\,} + +\Message + |Unsupported document class (or package) detected,|\\ + |usage of the caption package is not recommended.| +\Description + Either the document class you use is unknown to \thispackage, or you + have included a package in your document which redefines |\@make|\-|caption| + (which is responsible for typesetting the caption internally) as well. + This means \thispackage\ will either change the design of captions in an + unwanted way, or it even refuses to work correctly at all. + \par\See{\Ref{classes} and \Ref{compatibility}} + +\Message + |Unused \captionsetup[|\meta{type}|].| +\Description + You have specified options with |\caption|\-|setup[|\meta{type}|]| which are + not used later on. + This can be because of a typo in \meta{type}, + or because you use a package which redefines |figure| or |table| and + which is unknown to \thispackage, or simply because you don't have any usage + of the environment \meta{type} after this line. + (If you want to suppress this warning you can use |\caption|\-|setup*| + instead of |\caption|\-|setup|.) + \par\See{\Ref{captionsetup}} + +\Message + |Usage of the |\meta{package}| package together with the|\\ + |caption package is strongly not recommended.|\\ + |Instead of loading the |\meta{package}| package you should|\\ + |use the caption package option `tableposition=top'.| +\Description + The package \meta{package} is dealing with caption skips as well. + Please decide which one do you actually want to use, \thispackage\ or the + other one, using both can lead to wrong skips above or below the caption. + \par\See{\Ref{skips}} + +\end{Warnings} + +\pagebreak[3] +\subsection{Errors} + +\begin{Warnings} + +\Message + |Argument of \@caption has an extra }.| +\Or + |Paragraph ended before \@caption was complete.| +\Description + If you want to typeset something special (like a tabular) as caption, + you need to give an optional argument to |\caption| resp.~|\caption|\-|of| + for the List of Figures resp.~List of Tables, too, even if you don't + use such list. + \par\See{\Ref{caption}, \Ref{lists}, and \Ref{hyperref}\,} + +\Message + |\caption outside float.| +\Description + You have placed a |\caption| command outside a floating environment, or + a |long|\-|table| or |wrap|\-|figure|. + If this is what you want to, please use either + |\caption|\-|setup{type=|\x\meta{type}|}| $+$ |\caption| or + |\caption|\-|of|. + \par\See{\Ref{caption}} + +\Message + |\ContinuedFloat outside float.| +\Description + You have placed a |\Continued|\-|Float| command outside a floating + environment. % or |long|\-|table|. + If this is what you want to, please use the combination + |\caption|\-|setup{type=|\x\meta{type}|}| $+$ |\Continued|\-|Float|.\par + Please note that |\Continued|\-|Float| inside a |long|\-|table| is not + working, but maybe using the |long|\-|table*| environment, which + typesets a |long|\-|table| without incrementing the |table| counter, + if sufficient for you. + \par\See{\Ref{ContinuedFloat} and \Ref{longtable}} + +\Message + |Continued `|\meta{type}|' after `|\meta{type}|'.| +\Description + Continued figures or tables are not allowed to be interrupted by a floating + environment (or |long|\-|table|) of another type, + e.g.~a table between a figure and a continued figure. + \par\See{\Ref{ContinuedFloat}} + +\Message + |For a successful cooperation we need at least version|\\ + |`|\meta{date}|' of package |\meta{package}|, but only version|\\ + |`|\meta{old-date}|' is available.| +\Description + \Thispackage\ does not work with such an outdated package, please update it + to a more recent version, at least to the one requested. + +\Message + |Internal Error: |\meta{error message}|.| +\Description + You should never see this error. + Please send me an e-mail reporting this issue. + +\Message + |No float type '|\meta{type}|' defined.| +\Description + The \meta{type} you have specified in |\caption|\-|setup{type=|\x\meta{type}|}|, + |\caption|\-|of|\marg{type}, or |\Declare|\-|Caption|\-|Sub|\-|Type| is + not defined. + \meta{type} should be either `\texttt{figure}' or `\texttt{table}', or + any other floating environment defined with + |\Declare|\-|Floating|\-|Environment| offered by the \package{newfloat} package, + |\new|\-|float| offered by the \package{float} package\cite{float}, or + |\Declare|\-|New|\-|Float|\-|Type| offered by the \package{floatrow} package\cite{floatrow}. + +\Message + |Not allowed in longtable* environment.| +\Description + The usage of |\caption| is not allowed inside the |long|\-|table*| environment. + Please use either |\caption*| for a caption without label or use the regular + |long|\-|table| environment instead. + +\Message + |Not available in compatibility mode.| +\Description + The feature required is not supported in compatibility mode. + `compatibility mode' means that \thispackage\ has detected either an + incompatible document class or an incompatible package which also + extents the |\caption| command. Leaving the original extension intact, + some features of \thispackage\ are not supported. + \par\See{\Ref{compatibility}} + +\Message + |Only one \caption can be placed in this environment.| +\Description + Inside the environments offered by the \package{fltpage} and \package{sidecap} + package only \emph{one} caption can be placed. (This is due implementation design.) + +\Message + |Option clash for package caption.| +\Or[but sometimes also] + |Missing \begin{document}.| +\Description + \Thispackage\ has already been loaded by some other \LaTeX\ package, + so you can't do that again specifying different options. + A candidate causing this could be the \package{subfig} package; if this is + the case, please load \thispackage\ \emph{before} the \package{subfig} + package or specify the option |caption=|\x|false| while loading the + \package{subfig} package. + \par\See{the \package{subfig} package\cite{subfig} documentation} + +\Message + |Paragraph ended before \caption@makecurrent was complete.| +\Or + |Paragraph ended before \caption@prepareanchor was complete.| +\Description + If you want to typeset multi-paragraph captions, you need to give an + optional argument to |\caption| resp.~|\caption|\-|of| for the List of + Figures resp.~List of Tables, too, even if you don't use such list. + \par\See{\Ref{caption}, \Ref{lists}, and \Ref{hyperref}\,} + +\Message + |Something's wrong--perhaps a missing \caption|\\ + |in the last figure or table.| +\Description + It seems that you have used a |\sub|\-|caption| command (or a different one + which has typeset a sub-caption) without a corresponding |\caption| command. + This is not supported. + +\Message + |The option `labelsep=|\meta{name}|' does not work|\\ + |with `format=hang'.| +\Or + |The option `labelsep=|\meta{name}|' does not work|\\ + |with \setcaphanging (which is set by default).| +\Description + A caption label separator which contains a |\\| command (like + |labelsep=|\x|newline|) can not be combined with a hanging caption format + (like |format=|\x|hang|). + Please select either another caption label separator + (e.g.~|labelsep=|\x|colon|) or another caption format + (e.g.~|format=|\x|plain|). + \par\See{\Ref{formats} resp.~\Ref{KOMA}} + +\Message + |The package option `caption=false' is obsolete.|\\ + |Please pass this option to the subfig package instead|\\ + |and do *not* load the caption package anymore.| +\Description + You have specified the option |caption=|\x|false|. This used to be a workaround + for not using the whole \package{caption} package (leaving the caption stuff + offered by the document class or other packages intact), but keeping the + \package{subfig} package working. This mechanism is obsolete and not offered + anymore, please pass this option to the \package{subfig} package instead and + do not load \thispackage\ anymore. + \par\See{the \package{subfig} package\cite{subfig} documentation} + +\Message + |Undefined boolean value `|\meta{value}|'.| +\Description + You tried to set a boolean option (like |singlelinecheck=| or |hypcap=|) + with an improper value. Only |false|, |no|, |off|, |0| or |true|, |yes|, + |on|, |1| is allowed here. + +\Message + |Undefined format `|\meta{name}|'.| +\Description + You tried to set a caption format which does not exists. + Maybe a typo!? + \par\See{\Ref{formats}} + +\Message + |Undefined label format `|\meta{name}|'.| +\Description + You tried to set a caption label format which does not exists. + Maybe a typo!? + \par\See{\Ref{formats}} + +\Message + |Undefined label separator `|\meta{name}|'.| +\Description + You tried to set a caption label separator which does not exists. + Maybe a typo!? + \par\See{\Ref{formats}} + +\Message + |Undefined list format `|\meta{name}|'.| +\Description + You tried to set a caption list-of format which does not exists. + Maybe a typo!? + \par\See{\Ref{lists}} + +\Message + |Undefined position `|\meta{name}|'.| +\Description + You tried to set a caption position with an improper value. + Maybe a typo!? + \par\See{\Ref{skips}} + +\Message + |Undefined style `|\meta{name}|'.| +\Description + You tried to set a caption style which does not exists. + Maybe a typo!? + \par\See{\Ref{style}} + +\Message + |Usage of the `position' option is incompatible|\\ + |to the `|\meta{package}|' package.| +\Description +% (ftcap,nonfloat,topcapt) + The given package is dealing with caption skips as well. + Please decide which one do you actually want to use: The |position=| option + of \thispackage\ or the mechanism of the other one; using both this way + would lead to wrong skips above or below the caption and is therefore + not supported. + \par\See{\Ref{skips}} + +\Message + |Undefined text format `|\meta{name}|'.| +\Description + You tried to set a caption text format which does not exists. + Maybe a typo!? + \par\See{\Ref{formats}} + +\Message + |You can't use both, the (obsolete) caption2 *and*|\\ + |the (current) caption package.| +\Description + This error message says it all, you simply can't do that. + Please use only \thispackage. + \par\See{\Ref{caption2}} + +\end{Warnings} + +% --------------------------------------------------------------------------- % + +\clearpage +\section{Version history} +\label{history} + +The version $1.0$ was written in 1994 and was offering a handful of options +to customize the look \& feel of the captions. +Furthermore this version already supported the \package{rotating} and +\package{subfigure} packages. +Version $1.1$ introduced the |center|\-|last| option; +version $1.2$ added the support of the \package{float} package. +Version $1,3$ offered a better support of the \package{subfigure} package, +while version $1.4$ came with the new option |nooneline|. + +The \package{caption2} package $2.0$ was an experimental side-version of +the regular \package{caption} package. It was made public as beta test version +without proper documentation in 1995 because of the strong demand for new +features and adaptations to additional packages like the \package{longtable} +package. +Furthermore it offered a revised support of the \package{subfigure} package. +(An improved version $2.1$ was offered in 2002.) + +In 2003 I finally found some time, so a new regular release $3.0$ +of the \package{caption} package could be build in cooperation with +Frank Mittelbach and Steven Cochran. +It was released in December 2003 and superseded the neglected +\package{caption2} package. +Main parts were re-written and it provided a complete re-work of +the user interface. +Furthermore it supported the \package{hyperref}, \package{hypcap}, +\package{listings}, \package{sidecap}, and \package{supertabular} packages +additionally. + +While all the previous versions were designed for usage with the standard +\LaTeX\ document classes \class{article}, \class{report}, and \class{book}, +the current version $3.1$ released in 2007 also supports the \AmS, +\KOMAScript, \NTG, and \SmF\ document classes, and the \class{beamer} class +as well. +Furthermore it was adapted to the \package{frenchb} Babel option, +the \package{frenchle} \& \package{frenchpro} packages, +and the \package{floatflt}, \package{fltpage}, \package{picinpar}, +\package{picins}, \package{setspace}, \package{threeparttable}, +and \package{wrapfig} packages. +New options and commands were introduced as well, among other things +|font+|, |figure|\-|within| \& |table|\-|within|, +|list| \& |list|\-|format|, |max|\-|margin| \& |min|\-|margin|, +|\caption|\-|list|\-|entry|, |\Declare|\-|Caption|\-|List|\-|Format|. +Further benefits are the new compatibility check \see*{\Ref{compatibility}}, +the new ``hypcap'' feature \see*{\Ref{hyperref}\,}, and the sub-caption +feature \see*{\package{subcaption} package documentation}. + +% --------------------------------------------------------------------------- % + +\clearpage +\section{Compatibility to older versions} + +\subsection{caption v\texorpdfstring{$1.x$}{1.x}} +\label{caption1} + +This version of \thispackage\ still supports the old options +and commands provided by the version $1.0$ to $1.4$ of this package. +So there shouldn't occur any problems compiling old documents, but please +don't mix old options and commands with the new ones. This isn't supported +and can cause ugly side effects. + +Here comes a short oversight of the obsolete options and how +they have been replaced within this version of \thispackage: + +\begin{center}\small +\begin{tabular}{ll} +\package{caption} \version{1.x} & \package{caption} \version{3.x}\\ +\hline +%\endhead +|normal| & |format=plain|\\ +|hang| & |format=hang|\\ +|isu| & |format=hang|\\ +|center| & |justification=centering|\\ +|centerlast| & |justification=centerlast|\\ +|nooneline| & |singlelinecheck=off|\\ +|scriptsize| & |font=scriptsize|\\ +|footnotesize| & |font=footnotesize|\\ +|small| & |font=small|\\ +|normalsize| & |font=normalsize|\\ +|large| & |font=large|\\ +|Large| & |font=Large|\\ +|up| & |labelfont=up|\\ +|it| & |labelfont=it|\\ +|sl| & |labelfont=sl|\\ +|sc| & |labelfont=sc|\\ +|md| & |labelfont=md|\\ +|bf| & |labelfont=bf|\\ +|rm| & |labelfont=rm|\\ +|sf| & |labelfont=sf|\\ +|tt| & |labelfont=tt|\\ +\end{tabular} +\end{center} + +Beside the options for setting up the desired font there were also +the commands |\caption|\-|size| resp.~|\caption|\-|font| and +|\caption|\-|label|\-|font| who could be redefined with +|\re|\-|new|\-|command| and allowed an alternate and more flexible way to +change the font used for captions. +This mechanism was replaced by the commands +\begin{quote} + |\DeclareCaptionFont{|\ldots|}{|\ldots|}|\qquad and\\ + |\captionsetup{font=|\ldots|,labelfont=|\ldots|}|\qquad. +\end{quote} +\SeeUserDefined + +Setting the margin for captions was done in \version{1.x} with +\begin{quote} + |\setlength{\captionmargin}{|\ldots|}|\quad. +\end{quote} +This was replaced by +\begin{quote} + |\captionsetup{margin=|\ldots|}|\qquad. +\end{quote} +\See{\Ref{margins}} + +For example the old-style code +\begin{quote} + |\usepackage[hang,bf]{caption}|\\ + |\renewcommand\captionfont{\small\sffamily}|\\ + |\setlength\captionmargin{10pt}| +\end{quote} +will still work fine, but should be written today as +\begin{quote} + |\usepackage[format=hang,labelfont=bf,font={small,sf},|\\ + | margin=10pt]{caption}| +\end{quote} +or +\begin{quote} + |\usepackage{caption}|\\ + |\captionsetup{format=hang,labelfont=bf,font={small,sf},|\\ + | margin=10pt}|\qquad. +\end{quote} + +The quite exotic option |ruled| which allowed a partial usage of +the caption settings for |ruled| floats defined with the +\package{float} package will be emulated by this version of the +caption package, too. +But using this option is not recommended anymore since this +version of \thispackage\ offers a more flexible way +for changing the captions of these floating environments: +\begin{quote} + |\DeclareCaptionStyle{ruled}{|\ldots|}| +\end{quote} +resp. +\begin{quote} + |\captionsetup[ruled]{|\ldots|}|\qquad. +\end{quote} +\SeeUserDefined[, \Ref{captionsetup}, and \Ref{float}] + +\subsection{caption2 v\texorpdfstring{$2.x$}{2.x}} +\label{caption2} + +Although they do very similar stuff, the packages \package{caption} and +its experimental and now obsolete variant \package{caption2} have a +very different implementation design. +Therefore a full compatibility could not be offered. +For that reason you will still find a file called |caption2.sty| in +this package distribution, so old documents using the \package{caption2} +package will still compile fine. + +Newly created documents should use the actual version of +\thispackage\ instead. In most cases it's sufficient to replace the command +\begin{quote} + |\usepackage[...]{caption2}| +\end{quote} +by +\begin{quote} + |\usepackage[...]{caption}|\qquad. +\end{quote} +But some options and commands will not be emulated, so you can get +error messages afterwards. This section will hopefully help you removing +these errors. If you have problems migrating from \package{caption2} +to \package{caption} please don't hesitate to send me an e-mail asking +for help. + +In addition to the obsolete options shown in the last section +these ones will be emulated, too: + +\begin{center}\small +\begin{tabular}{ll} +\package{caption2} \version{2.x} & \package{caption} \version{3.x}\\ +\hline +%\endhead +|flushleft| & |justification=raggedright|\\ +|flushright| & |justification=raggedleft|\\ +|oneline| & |singlelinecheck=on|\\ +\end{tabular} +\end{center} + +Setting the margin for captions was done in \version{2.x} with +\begin{quote}\leavevmode\hbox{% + |\setcaptionmargin{|\ldots|}| resp. + |\setcaptionwidth{|\ldots|}|\quad. +}\end{quote} +This was replaced by +\begin{quote}\leavevmode\hbox{% + |\captionsetup{margin=|\ldots|}| resp. + |\captionsetup{width=|\ldots|}|\quad. +}\end{quote} +\See{\Ref{margins}} + +Setting an indention was done in \version{2.x} with +\begin{quote} + |\captionstyle{indent}|\\ + |\setlength\captionindent{|\ldots|}|\quad. +\end{quote} +\pagebreak[3] +This is now done with +\nopagebreak[3] +\begin{quote} + |\captionsetup{format=plain,indention=|\ldots|}|\quad. +\end{quote} + +The so-called single-line-check was controlled by the commands +|\oneline|\-|captions|\-|false| (for switching the check off) and +|\oneline|\-|captions|\-|true| (for switching the check on). +This was replaced by +|\caption|\-|setup{single|\-|line|\-|check=|\x|off}| +resp. +|\caption|\-|setup{single|\-|line|\-|check=|\x|on}|\quad. +\See{\Ref{justification}} + +The commands +\begin{quote} + |\captionlabeldelim|, |\captionlabelsep|, |\captionstyle|,\\ + |\defcaptionstyle|, |\newcaptionstyle|, and |\renewcaptionstyle| +\end{quote} +do not have a simple replacement and therefore will not be emulated +by this version of \thispackage. (So using them will +cause error messages.) Rewriting such code is not always easy and +straight-ahead, but by conscientious reading of this manual you should +be able to find appropriate options and commands instead. + +\iffalse +... (some examples) +\fi + +The \version{2.x} option |ignore|\-|LT|\-|cap|\-|width| do not have a +replacement, too. +But in most cases you can simply drop using that option because +in this version of \thispackage\ the value of |\LT|\-|cap|\-|width| +will be ignored anyway (unless you set it to a different value than the +default one which is |4in|). +\See{\Ref{longtable}} + +\subsection{caption v\texorpdfstring{$3.0$}{3.0}} +\label{caption3} + +%\NEWdescription{v3.1} +\Thispackage\ \version{3.0} did not support any document classes +other than the standard \LaTeX\ ones: \class{article}, \class{report}, +and \class{book}. +Therefore the default settings used to be fixed, but now \thispackage{} +supports more classes, therefore they are now set in dependence on the +document class used. + +For example: While in \version{3.0} the default caption +|jus|\-|ti|\-|fi|\-|ca|\-|tion| used to be always |jus|\-|ti|\-|fied|, +it's now still |jus|\-|ti|\-|fied| when using one of the standard document +classes, but |ragged|\-|right| will be used as default format when used +with the \class{beamer} document class. + +%An easy way to select the `old' defaults---if desired---is using the option +An easy way to select the `old' defaults is using the option +|style=base| when loading \thispackage\ (or later on using |\caption|\-|setup|). + +\medskip + +Another new feature is the automatic check for compatibility; if an +incompatibility will be found, a warning message will be issued and if a strong +incompatibility was found some features of \thispackage\ will be disabled. +Please note that only this check was added to \thispackage, so if you get +such warning message, the previous versions of \thispackage\ were incompatible +as well, but did not issued such warning, they were ``only'' having +side-effects or causing problems. +So these warnings only say that some bad side effects or problems could +happen, but not that they actually will happen. +Anyway, if you use \thispackage\ in such circumstances, +you should use it with care. + +\bigskip + +\begin{Note*} +\Thispackage\ \version{3.0} offered the option |caption=|\x|false|, +which used to be a workaround for not using the whole \package{caption} package +(leaving the caption stuff offered by the document class or other packages +intact), but keeping the \package{subfig} package\cite{subfig} working. +This mechanism is obsolete and not offered anymore, please pass this option +to the \package{subfig} package instead and do not load \thispackage\ anymore. +%\par\See{the \package{subfig} package documentation} +\end{Note*} + +% --------------------------------------------------------------------------- % + +\clearpage +\begin{thebibliography}{99} + + \bibitem{TLC2} + Frank Mittelbach and Michel Goossens:\\ + \newblock {\em The {\LaTeX} Companion (2nd.~Ed.)},\\ + \newblock Addison-Wesley, 2004. + + \bibitem{beamer} + Till Tantau:\\ + \href{http://www.ctan.org/pkg/beamer}% + {\emph{User Guide to the Beamer Class, Version 3.07}},\\ + March 11, 2007 + + \bibitem{KOMAScript} + Markus Kohm \& Jens-Uwe-Morawski:\\ + \href{http://www.ctan.org/pkg/koma-script}% + {\emph{KOMA-Script -- a versatile \LaTeXe\ bundle}},\\ + 2007-01-09 + + \bibitem{NTG} + Victor Eijkhout:\\ + \href{http://www.ctan.org/pkg/ntgclass}% + {\emph{An introduction to the Dutch \LaTeX\ document classes}},\\ + 3 September 1989 + + \bibitem{algorithms} + Rog\'erio Brito:\\ + \href{http://www.ctan.org/pkg/algorithms}% + {\emph{Algorithms}},\\ + June 2, 2006 + +\iffalse + \bibitem{algorithm2e} + Christophe Fiorio:\\ + \href{http://www.ctan.org/pkg/algorithm2e}% + {\emph{algorithm2e.sty -- package for algorithms}},\\ + March 11, 2007 +\fi + + \bibitem{float} + Anselm Lingnau:\\ + \href{http://www.ctan.org/pkg/float}% + {\emph{An Improved Environment for Floats}},\\ + 2001/11/08 + + \bibitem{floatflt} + Mats Dahlgren:\\ + \href{http://www.ctan.org/pkg/floatflt}% + {\emph{Welcome to the floatflt package}},\\ + 1998/06/05 + + \bibitem{floatrow} + Olga Lapko:\\ + \href{http://www.ctan.org/pkg/floatrow}% + {\emph{The floatrow package documentation}},\\ + 2007/12/24 + + \bibitem{fltpage} + Sebastian Gross:\\ + \href{http://www.ctan.org/pkg/fltpage}% + {\emph{Welcome to the beta test of fltpage package!}},\\ + 1998/11/13 + + \bibitem{hyperref} + Sebastian Rahtz \& Heiko Oberdiek:\\ + \href{http://www.ctan.org/pkg/hyperref}% + {\emph{Hypertext marks in \LaTeX}},\\ + November 12, 2007 + + \bibitem{hypcap} + Heiko Oberdiek:\\ + \href{http://www.ctan.org/pkg/hypcap}% + {\emph{The hypcap package -- Adjusting anchors of captions}},\\ + 2007/04/09 + + \bibitem{listings} + Carsten Heinz \& Brooks Moses:\\ + \href{http://www.ctan.org/pkg/listings}% + {\emph{The Listings Package}},\\ + 2007/02/22 + + \bibitem{longtable} + David Carlisle:\\ + \href{http://www.ctan.org/pkg/longtable}% + {\emph{The longtable package}},\\ + 2004/02/01 + + \bibitem{picinpar} + Friedhelm Sowa:\\ + \href{http://www.ctan.org/pkg/picinpar}% + {\emph{Pictures in Paragraphs}},\\ + July 13, 1993 + + \bibitem{picins} + Joachim Bleser and Edmund Lang:\\ + \href{http://www.ctan.org/pkg/picins}% + {\emph{PicIns-Benutzerhandbuch Version 3.0}},\\ + September~1992 + + \bibitem{rotating} + Sebastian Rahtz and Leonor Barroca:\\ + \href{http://www.ctan.org/pkg/rotating}% + {\emph{A style option for rotated objects in \LaTeX}},\\ + 1997/09/26 + + \bibitem{setspace} + Erica M. S. Harris \& Geoffrey Tobin:\\ + \href{http://www.ctan.org/pkg/setspace}% + {\emph{LaTeX Document Package ``setspace''}},\\ + 1 December 2000 + + \bibitem{sidecap} + Rolf Niepraschk \& Hubert G\"a\ss lein:\\ + \href{http://www.ctan.org/pkg/sidecap}% + {\emph{The sidecap package}},\\ + 2003/06/06 + + \bibitem{subfigure} + Steven D. Cochran:\\ + \href{http://www.ctan.org/pkg/subfigure}% + {\emph{The subfigure package}},\\ + 2002/07/02 + + \bibitem{subfig} + Steven D. Cochran:\\ + \href{http://www.ctan.org/pkg/subfig}% + {\emph{The subfig package}},\\ + 2005/07/05 + + \bibitem{supertabular} + Johannes Braams and Theo Jurriens:\\ + \href{http://www.ctan.org/pkg/supertabular}% + {\emph{The supertabular environment}},\\ + 2002/07/19 + + \bibitem{threeparttable} + Donald Arseneau:\\ + \href{http://www.ctan.org/pkg/threeparttable}% + {\emph{Three part tables: title, tabular environment, notes}},\\ + 2003/06/13 + + \bibitem{wrapfig} + Donald Arseneau:\\ + \href{http://www.ctan.org/pkg/wrapfig}% + {\emph{WRAPFIG.STY ver 3.6}},\\ + 2003/01/31 + + \bibitem{xtab} + Peter Wilson:\\ + \href{http://www.ctan.org/pkg/xtab}% + {\emph{The xtab package}},\\ + 2004/05/24 + +\end{thebibliography} + +% --------------------------------------------------------------------------- % + +\end{document} diff --git a/macros/latex/contrib/caption/caption-rus.pdf b/macros/latex/contrib/caption/caption-rus.pdf new file mode 100644 index 0000000000..108fae1235 Binary files /dev/null and b/macros/latex/contrib/caption/caption-rus.pdf differ diff --git a/macros/latex/contrib/caption/caption-rus.tex b/macros/latex/contrib/caption/caption-rus.tex new file mode 100644 index 0000000000..c3b536cc2f --- /dev/null +++ b/macros/latex/contrib/caption/caption-rus.tex @@ -0,0 +1,6229 @@ +% +% This is file `caption-rus.tex'. +% Russian translation of `caption-eng.tex' +% +% $Id$ +% $HeadURL$ +% +% Copyright (C) 1994-2007 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +% +% -------------------------------------------------------------------------- +% +% 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, +% ltcaption.dtx, and subcaption.dtx, the derived files caption.sty, +% caption2.sty, caption3.sty, ltcaption.sty, and subcaption.sty, and the +% user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. +% +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesFile{caption-rus.tex}[2008/04/06 v3.1h The caption package in Russian] +\hbadness=9999 \newcount\hbadness \hfuzz=20pt % Make TeX shut up. +%\errorcontextlines=3 + +\documentclass[USenglish,russian,a4paper]{ltxdoc} +\usepackage{mathtext} +\usepackage[T2A]{fontenc} +\usepackage[cp1251]{inputenc} +\usepackage{babel} +\usepackage{listpen,afterpage} + +\setlength\parindent{0pt} +\setlength\parskip{\smallskipamount} +\setlength\leftmargini{1.5em}% default = 2.5em +\makeatletter +\g@addto@macro\MacroFont{\normalcolor} +\@flushglue = 1em plus 1fil +\parfillskip = 1em plus 1fil +\makeatother + +\newcommand\LineBreak{\linebreak[3]} +\newcommand\PageBreak{\pagebreak[3]} +\usepackage{ifpdf} +\ifpdf + \usepackage{mathptmx} + \addtolength\marginparwidth{15pt} + \IfFileExists{literat.sty}{\usepackage{literat}}{} +% \IfFileExists{t2aftx.fd}{\def\sfdefault{ftx}}{} +% \IfFileExists{t2apxtt.fd}{\def\ttdefault{pxtt}}{} + \ifdim\paperheight=297mm % a4paper + \advance\textheight.5in + \advance\topmargin-.35in + \emergencystretch1em + \tolerance7000 + \renewcommand\LineBreak{\\} + \renewcommand\PageBreak{\clearpage} + \fi +\fi + +\usepackage[bottom]{footmisc} +\usepackage{graphicx,longtable,setspace} + +\usepackage{hypdoc} +\hypersetup{unicode} +\ifpdf\usepackage{hypdestopt}\fi +\hypersetup{pdfkeywords={LaTeX, package, caption},pdfstartpage={},pdfstartview={}} +\hypersetup{breaklinks=true} + +\usepackage[listof=0,hypcap=false]{caption}[2008/04/01] + +\def\itemautorefname {\cyr\cyrp.}% +\def\figureautorefname {\cyr\cyrr\cyri\cyrs.}% +\def\tableautorefname {\cyr\cyrt\cyra\cyrb\cyrl.}% +\def\partautorefname {\cyr\cyrch.}% +\def\appendixautorefname {\cyr\cyrp\cyrr\cyri\cyrl.}% +\def\chapterautorefname {\cyr\cyrg\cyrl.}% +\def\sectionautorefname {\cyr\cyrr\cyra\cyrz\cyrd.}% +\def\subsectionautorefname {\cyr\cyrr\cyra\cyrz\cyrd.}% +\def\subsubsectionautorefname {\cyr\cyrr\cyra\cyrz\cyrd.}% +\def\paragraphautorefname {\cyr\cyrp.}% +\def\subparagraphautorefname {\cyr\cyrp.}% +\def\pageautorefname {\cyr\cyrs.}% + +\DeclareRobustCommand*\eTeX{\texorpdfstring + {\leavevmode\hbox{$\varepsilon$}-\TeX}% + {e-TeX}} +\DeclareRobustCommand*\AmS{\texorpdfstring + {{\protect\usefont{OMS}{cmsy}{m}{n}A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}% + {AMS}} +\DeclareRobustCommand*\KOMAScript{\texorpdfstring + {\textsf{K\kern.05em O\kern.05em M\kern.05em A\kern.1em-\kern.1em Script}}% + {KOMA-Script}} +\DeclareRobustCommand*\NTG{NTG} +\DeclareRobustCommand*\SmF{SMF} + +\usepackage{marvosym} +\makeatletter +\newcommand*\INFO{\@ifstar{\@INFO{}}{\@INFO{\vbox to \ht\strutbox}}} +\newcommand*\@INFO[1]{\MARGINSYM{#1{\hspace*{-1em}\LARGE\Info\hspace*{1em}}}} +\makeatother + +\newcommand*\MARGINSYM[1]{\hskip 1sp \marginpar{\raggedleft\textcolor{blue}{{#1}}}} +\newcommand*\NEW[2]{}%\hskip 1sp \marginpar{\footnotesize\sffamily\raggedleft#1\\#2}} + +% \ContinuedFloat +\DeclareCaptionLabelFormat{continued1e}{Continued #1~#2} +\DeclareCaptionLabelFormat{continued1r}{#1~#2 (\textit{ïðîäîëæåíèå})} +\DeclareCaptionLabelFormat{continued2}{#1~#2\asbuk{ContinuedFloat}} +% \DeclareCaptionLabelFormat +\DeclareCaptionLabelFormat{bf-parens}{(\textbf{#2})} +% \DeclareCaptionStyle +\DeclareCaptionStyle{mystyle}[margin=5mm,justification=centering]% + {font=footnotesize,labelfont=sc,margin={10mm,0mm}} +% Example 1 +\DeclareCaptionFormat{myformat1}{#1#2\\#3} +\newlength\myindention +\DeclareCaptionFormat{myformat2}{#1#2\\\hspace*\myindention#3} +\DeclareCaptionOption{myindention}{\setlength\myindention{#1}} +% Example 2 +\DeclareCaptionFormat{reverse}{#3#2#1} +\DeclareCaptionLabelFormat{fullparens}{(\bothIfFirst{#1}{~}#2)} +\DeclareCaptionLabelSeparator{fill}{\hfill} +% Example 3 +\DeclareCaptionFormat{llap}{\llap{#1#2}#3\par} +\DeclareCaptionFormat{llapx}{\llap{\makebox[5em][l]{#1}}#3\par} +% Example 4 +\DeclareCaptionLabelFormat{andtable}{#1~#2 \& \tablename~\thetable} + +\newcommand*\purerm[1]{{\upshape\mdseries\rmfamily #1}} +\newcommand*\puresf[1]{{\upshape\mdseries\sffamily #1}} +\newcommand*\purett[1]{{\upshape\mdseries\ttfamily #1}} +\let\class\puresf \let\package\puresf + +\newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}} +\newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}} +\newcommand*\version[2][]{$v#2$} +\newcommand*\x{\discretionary{}{}{}} + +\newenvironment{Annotation}% + {\ifvmode\else\unskip\par\fi\pagebreak[2]% + \smallskip + \small(\ignorespaces}{\unskip)\par} +\newenvironment{Annotation*}% + {\ifvmode\else\unskip\par\fi\pagebreak[2]% + \small(\ignorespaces}{\unskip)\par} + +\newenvironment{Example}% + {\ifvmode\else\unskip\par\fi\pagebreak[2]% + \minipage{\linewidth}\smallskip}% + {\smallskip\endminipage\par} + +\makeatletter +\newcommand\example{\@ifstar + {\@example{belowskip=\abovecaptionskip}}% + {\@example{}}} +\def\@example#1{% + \@testopt{\@@example{#1}}{figure}} +\long\def\@@example#1[#2]#3#4{% + \begingroup + \captionsetup{#1,size=small,margin={\leftmargini,10pt},#3}% + \captionof{#2}[]{#4}% + \endgroup} +\makeatother + +\newenvironment{Expert}% + {\ifvmode\else\unskip\par\fi\pagebreak[3]% + \smallskip + \footnotesize\ignorespaces}{\par} +\newenvironment{Expert*}% + {\ifvmode\else\unskip\par\fi\pagebreak[3]% + \footnotesize\ignorespaces}{\par} + +\newenvironment{Note}[1][\DefaultNoteText]% + {\ifvmode\else\unskip\par\fi + \smallskip + \small\emph{#1}:~\ignorespaces}{\par} +\newenvironment{Note*}[1][\DefaultNoteText]% + {\ifvmode\else\unskip\par\fi + \small\emph{#1}:~\ignorespaces}{\par} + +\newenvironment{Options}[1]% + {\list{}{\renewcommand\makelabel[1]{\texttt{##1}\hfil}% + \settowidth\labelwidth{\texttt{#1\space}}% + \setlength\leftmargin{10pt}% + \addtolength\leftmargin{\labelwidth}% + \addtolength\leftmargin{\labelsep}}}% + {\endlist} + +\makeatletter +\newcommand*\Ref{\@ifstar{\@Ref\ref}{\@Ref\autoref}} +\newcommand*\@Ref[2]{#1{#2}: \textit{\nameref{#2}}} +\newcommand*\SEE[3][]{\nopagebreak{#1(#2 #3)}} +\newcommand*\SeeUserDefined[1][]{\See{\Ref{declare}#1}} +\makeatother + +\begin{document} +\let\subsectionautorefname\sectionautorefname +\let\subsubsectionautorefname\sectionautorefname + +\def\thispackage{ïàêåò \package{caption}} +\def\Thispackage{Ïàêåò \package{caption}} + +\newcommand*\DefaultNoteText{Çàìå÷àíèå} +% \newcommand\NEWfeature{\NEW{New feature}} +% \newcommand\NEWdescription{\NEW{New description}} +\newcommand\NEWfeature{\NEW{Íîâàÿ âîçìîæíîñòü}} +\newcommand\NEWdescription{\NEW{Íîâîå îïèñàíèå}} +\makeatletter +\newcommand*\See{\@ifstar{\SEE{Ñì.}}{\SEE[\small]{Ñì.}}} +\newcommand*\see{\@ifstar{\SEE{ñì.}}{\SEE[\small]{ñì.}}} + +% --------------------------------------------------------------------------- % + +\GetFileInfo{caption-rus.tex} +\let\docdate\filedate +\GetFileInfo{caption.sty} + +% \title{Customizing captions of floating environments +% using the caption package\texorpdfstring{\thanks{% +% This package has version number \fileversion, +% last revised \filedate. +\title{Íàñòðîéêà ïîäïèñåé ïëàâàþùèõ îáúåêòîâ (ôëîòîâ) ñ~ïîìîùüþ ïàêåòà + \package{caption}\thanks{Äàííûé ïàêåò âåðñèè +%%% \fileversion, ïîñëåäíèé ðàç ìîäèôèöèðîâàí \filedate. + v3.1m, ïîñëåäíèé ðàç ìîäèôèöèðîâàí 2010/01/09. +%^^A% Translation of the version v3.1h, dated 2008/04/03. +%^^A% The questions and notes about translation please +%^^A% send to \texttt{Lapko.O@g23.relcom.ru} (Olga Lapko). +%^^A% The version of translation could be obsolete. Please +%^^A% look English or German documentation for the new information +%^^A% (see margin labels).}} + Ïåðåâîä äîêóìåíòàöèè v3.1h, äàòèðîâàííîé 2008/04/03. + Âîïðîñû è~çàìå÷àíèÿ ïî ïåðåâîäó íàïðàâëÿéòå ïî àäðåñó \texttt{Lapko.O@g23.relcom.ru}. + \emph{Âåðñèÿ ïåðåâîäà ìîæåò îòíîñèòüñÿ ê~îäíîé èç ïðåäûäóùèõ âåðñèé ïàêåòà è~ìîæåò + ñîäåðæàòü óñòàðåâøèå äàííûå. + Îáðàùàéòåñü ê~àíãëèéñêîé èëè íåìåöêîé äîêóìåíòàöèè çà áîëåå ñâåæåé èíôîðìàöèåé + (îáðàùàéòå âíèìàíèå íà ïîìåòêè íà ïîëÿõ). + }}{}} +% \author{Axel Sommerfeldt\\ +\author{Àêñåëü Çîììåðôåëüäò (Axel Sommerfeldt)\\ + \url{https://gitlab.com/axelsommerfeldt/caption}} +\date{\docdate} +\maketitle + +% --------------------------------------------------------------------------- % + +\begin{abstract} +% \Thispackage\ offers customization of captions +% in floating environments such |figure| and |table| and cooperates with +% many other packages. +% \par\smallskip + \Thispackage\ ïðåäëàãàåò íàñòðîéêè ïå÷àòè + ïîäïèñåé äëÿ ïëàâàþùèõ îáúåêòîâ (ôëîòîâ) + |figure| è~|table| è~ñîâìåñòèì (êîîïåðèðóåòñÿ) + ñî~ìíîãèìè ïàêåòàìè. +% \textit{Please note:} Many document classes already have build-in options and +% commands for customizing captions. +% If these possibilities are sufficient for you, there is usually no need for +% you to use the \package{caption} package at all. +% And if you are just interested in using the command \cs{captionof}, loading of +% the very small \package{capt-of} package is usually sufficient. +\par\smallskip +\textit{Îáðàòèòå âíèìàíèå}: ìíîæåñòâî êëàññîâ äîêóìåíòîâ óæå èìåþò âñòðîåííûå îïöèè +è~êîìàíäû äëÿ íàñòðîéêè ïîäïèñåé. +Åñëè ýòè íàñòðîéêè âàñ óäîâëåòâîðÿþò, òî âîâñå íåò íåîáõîäèìîñòè â~èñïîëüçîâàíèè ïàêåòà +\package{caption}. +Åñëè âàì íóæíà òîëüêî êîìàíäà \cs{captionof} \cdash--- çàãðóçêà íåáîëüøîãî ïàêåòà +\package{capt-of} áóäåò äîñòàòî÷íà. +\end{abstract} + +\newcommand\exampletext{% +% White sand beaches. The pink smoothness of the conch shell. A sea abundant +% with possibilities. Duty-free shops filled with Europe's finest gifts and +% perfumes. Play your favorite game of golf amidst the tropical greens on one +% of the many championship courses.} + Òèáåòñêàÿ ìàíäàëà ïðåäñòàâëÿåò ñîáîé ñâîåîáðàçíóþ êàðòó îñîáîãî õðàìà + è~Øàìáàëû. Âèäíû âîðîòà ïî ÷åòûð¸ì ñòîðîíàì ñâåòà, ïîñòðîéêà èä¸ò + óñòóïàìè ââåðõ. (Ìîçàèêà ïîëà ðûöàðñêîãî õðàìà íà î.\,Ðîäîñ âîñïðîèçâîäèò + óçîð ìàíäàëû.)} + +% --------------------------------------------------------------------------- % + +% \section*{Introduction} +\section*{Ââåäåíèå} + +% Within the standard \LaTeX\ document classes captions haven't received the +% attention they deserve. Simply typeset as an ordinary paragraph there is no +% remarkable visual difference from the rest of the text, like here: +Âíóòðè ñòàíäàðòíûõ êëàññîâ \LaTeX'à~ïîäïèñè íå ïîëó÷èëè çàñëóæåííîãî +âíèìàíèÿ. Îíè íàáèðàþòñÿ êàê îáû÷íûé àáçàö è~âíåøíå íå îòëè÷àþòñÿ îò îñíîâíîãî +òåêñòà, êàê çäåñü: + +\example*{size=normalsize,margin=0pt}{\exampletext} + +% There should be possibilities to change this; for example, it would be nice +% to make the text of the caption a little bit smaller as the normal +% text, add an extra margin, typeset the caption label with the same font +% family and shape as your headings etc. Just like this one: +Äîëæíà áûòü âîçìîæíîñòü èçìåíèòü ýòî; íàïðèìåð, òåêñò ëó÷øå çàäàòü +ìåíüøèì êåãëåì, äîáàâèòü âòÿæêó (ñ~îáåèõ ñòîðîí), +ó~íóìåðàöèîííûõ çàãîëîâêîâ ïîäïèñåé çàäàòü òàêèå æå +íà÷åðòàíèå èëè íàñûùåííîñòü, êàê ó~çàãîëîâêîâ ðàçäåëîâ. Íàïðèìåð, êàê ñëåäóþùóþ ïîäïèñü: + +\example*{size=small,margin=10pt,labelfont=bf,labelsep=endash}{\exampletext} + +% You can do this easily with this package as there are many ready-to-use +% caption formatting options, but you are free to define your very own stuff, too. +Ñ~äàííûì ïàêåòîì ýòî ñäåëàòü ïðîñòî, ïîñêîëüêó â~í¸ì óæå åñòü ìíîæåñòâî ãîòîâûõ +îïöèé êëþ÷åé íàñòðîéêè, è~âû ñâîáîäíû è~âûáðàòü ñâî¸ ñî÷åòàíèå îïöèé äëÿ +îôîðìëåíèÿ, è~ñîçäàòü ñâîè îïöèè. + +\bigskip + +\INFO\begin{minipage}[t]{\textwidth} +\small +% Please note that \thispackage\ is only controlling the look \& feel of the +% captions. It does \emph{not} control the placement of the captions. +% (But you could do so by using other packages like the \package{floatrow} +% package\cite{floatrow}.) +Îáðàòèòå âíèìàíèå, ÷òî \thispackage\ êîíòðîëèðóåò òîëüêî îôîðìëåíèå +ïîäïèñåé. Îí \emph{íå} êîíòðîëèðóåò ðàçìåùåíèå ïîäïèñåé. +(Íî ýòî âîçìîæíî, åñëè èñïîëüçîâàòü äîïîëíèòåëüíî äðóãèå ïàêåòû, +íàïðèìåð \package{floatrow}\cite{floatrow}.) +\end{minipage} + +\begingroup\small +%^^A% \vspace{2ex}\centerline{\textbf{Frequently Appeared Design\footnote +%^^A% {Added in translated text.}}\nopagebreak} +\vspace{2ex}\centerline{\textbf{\TeX íè÷åñêîå ðåäàêòèðîâàíèå\footnote + {Äîáàâëåíî ïðè ïåðåâîäå.}}\nopagebreak} +\begin{multicols}{2}\raggedright\advance\rightskip1em + \makeatletter\let\item\@idxitem\ignorespaces\makeatother +%^^A% \item Last line of caption centered +\item Âûêëþ÷êà ïîñëåäíåé ñòðîêè ïî öåíòðó + \pageref{TeXr:centerlast} +%^^A% \item Hanged caption label +\item Íóìåðàöèîííûé çàãîëîâîê íà âåñó + \pageref{TeXr:hang:label} +% +%^^A \indexspace +% +%^^A% \item Spaces above and below captions +\item Îòáèâêè ó~ïîäïèñåé íàä è~ïîä ôëîòàìè + \pageref{TeXr:captionskips:a}%^^A--\pageref{TeXr:captionskips:z} +%^^A% \item Settings, for caption label +\item Îôîðìëåíèå +%^^A% \subitem for caption label +\subitem íóìåðàöèîííûõ çàãîëîâêîâ + \pageref{TeXr:caplabel:a}%^^A--\pageref{TeXr:caplabel:z} +%^^A% \subitem for one-line captions +\subitem îäíîñòðî÷íûõ ïîäïèñåé + \pageref{TeXr:singleline:a}%^^A--\pageref{TeXr:singleline:z} +%^^A% \subitem for multi-paragraph captions +\subitem ïîäïèñåé èç íåñêîëüêèõ àáçàöåâ + \pageref{TeXr:multipar:a}%^^A--\pageref{TeXr:multipar:z} +% +%^^A \indexspace +% +%^^A% \item Captions +\item Ïîäïèñè\nopagebreak +%^^A% \subitem for continued floats +\subitem ê~ôëîòàì ñ~ïðîäîëæåíèåì + \pageref{TeXr:continued:a}\nopagebreak %^^A--\pageref{TeXr:continued:z} +%^^A% \subitem above tables +\subitem íàä òàáëèöàìè + \pageref{TeXr:captop:a}%^^A--\pageref{TeXr:captop:z} +%^^A% \subitem skipped entry in list +\subitem áåç çàïèñè â~ñïèñêå ðèñóíêîâ, +%^^A% \subsubitem trick with empty option + \subsubitem òðþê ñ~äîïîëíèòåëüíûì àðãóìåíòîì êîìàíäû + |\caption| \pageref{TeXr:nolistentry:I} +%^^A% \subsubitem key |listof=| + \subsubitem êëþ÷ ïàêåòà |list=| + \pageref{TeXr:nolistentry:II} +%^^A% \subitem unlabeled +\subitem áåç íóìåðàöèîííîãî çàãîëîâêà + \pageref{TeXr:starcaption:a}%^^A--\pageref{TeXr:starcaption:z} +%^^A% \subitem outside float +\subitem âíå îêðóæåíèÿ ôëîòà + \pageref{TeXr:captionof:a}%^^A--\pageref{TeXr:captiononof:z} +% +\end{multicols}% +\endgroup +\clearpage +% +% --------------------------------------------------------------------------- % + +\clearpage +\tableofcontents + +% --------------------------------------------------------------------------- % + +\clearpage +% \section{Using this package} +\section{Èñïîëüçîâàíèå ïàêåòà} +\label{usage} + +\DescribeMacro{\usepackage} +% Insert +Äîáàâüòå +\begin{quote} + |\usepackage|\oarg{options}|{caption}[|\texttt{\filedate}|]| +\end{quote} +% into the preamble of your document, i.e.~the part of your document +% between |\document|\-|class| and |\begin{doc|\-|u|\-|ment}|. +% The options control how your captions will look like; e.g., +â~ïðåàìáóëó âàøåãî äîêóìåíòà, ò.\,å. â~÷àñòü ôàéëà ìåæäó êîìàíäàìè +|\document|\-|class| è~|\begin{document}|. +Îïöèè çàäàþò íàñòðîéêè îôîðìëåíèÿ ïîäïèñåé â~êíèãå; íàïðèìåð, îïöèè +\begin{quote} + |\usepackage[margin=10pt,font=small,labelfont=bf,|\\ + | labelsep=endash]{caption}|% + %|[|\texttt{\filedate}|]| +\end{quote} +% would result in captions looking like the second one in the introduction. +çàäàäóò ïîäïèñè, ïîõîæèå íà âòîðîé ïðèìåð âî ââåäåíèè. + +\DescribeMacro{\captionsetup} +% For a later change of options \thispackage\ provides the command +Äëÿ ïîñëåäóþùèõ èçìåíåíèé \thispackage\ ïðåäëàãàåò êîìàíäó +\begin{quote} + |\captionsetup|\oarg{float type}\marg{options}\quad. +\end{quote} +% So +Ñëåäîâàòåëüíî, îïðåäåëåíèÿ +\begin{quote} + |\usepackage[margin=10pt,font=small,labelfont=bf]{caption}| +\end{quote} +% and +è +\begin{quote} + |\usepackage{caption}|\\ + |\captionsetup{margin=10pt,font=small,labelfont=bf}| +\end{quote} +% are equal in their results. +ýêâèâàëåíòíû. + +% It's good to know that |\caption|\-|setup| has an effect on the current +% environment only. So if you want to change settings for the +% current |figure| or |table| only, just place the |\caption|\-|setup| command +% inside the |figure| or |table| right before the |\caption| command. +% For example +Íóæíî îáðàòèòü âíèìàíèå, ÷òî óñòàíîâêè |\captionsetup| ìîãóò äåéñòâîâàòü è~íà îäíî +îêðóæåíèå. Òàê ÷òî, åñëè âû õîòèòå èçìåíèòü óñòàíîâêè òîëüêî +îäíîãî îêðóæåíèÿ |figure| èëè |table|, ïîìåñòèòå êîìàíäó |\captionsetup| +âíóòðè |figure| èëè |table| ïðÿìî ïåðåä êîìàíäîé |\caption|. +Íàïðèìåð +\begin{quote} + |\begin{figure}|\\ + | |\ldots\\ + | \captionsetup{singlelinecheck=off}|\\ + | \caption{|\ldots|}|\\ + |\end{figure}| +\end{quote} +% switches the single-line-check off, but only for this |figure|, +% so all the other captions remain untouched. +îòêëþ÷àåò êîíòðîëü îäíîñòðî÷íîé ïîäïèñè (ñì.~îá ýòîì íèæå), íî òîëüêî äëÿ ýòîãî +îêðóæåíèÿ |figure|, äðóãèå ïîäïèñè íå èçìåíÿòñÿ. + +\smallskip + +\begin{Annotation} +% For a detailed description of |\caption|\-|setup| see \Ref{captionsetup}. +Ïîäðîáíîå îïèñàíèå êîìàíäû |\captionsetup| ñì.~â~\Ref{captionsetup}. +\end{Annotation} + +% --------------------------------------------------------------------------- % + +\clearpage +% \section{Options} +\section{Îïöèè} +\label{options} + +\def\OptionLabel{RaggedRight} +\def\UserDefined{\ldots} + +% --------------------------------------------------------------------------- % + +% \subsection{Formatting} +\subsection{Îôîðìëåíèå} +\label{formats} + +\DescribeMacro{format=} +% A figure or table caption mainly consists of three parts: the caption label, +% which says if this object is a `Figure' or `Table' and what number is +% associated with it, the caption text itself, which is normally a short +% description of contents, and the caption separator which separates the text +% from the label. +Ïîäïèñü ðèñóíêà èëè òàáëèöû îáû÷íî èìååò òðè ÷àñòè\nopagebreak: íóìåðàöèîííûé +çàãîëîâîê, êîòîðûé îáúÿâëÿåò, ÷òî ýòîò îáúåêò íàçûâàåòñÿ `Ðèñ'óíîê èëè `Òàáëèöà' è~èìååò +ñâîé íîìåð; ñîáñòâåííî òåêñò, êîòîðûé îáû÷íî äà¸ò êðàòêîå îïèñàíèå +ñîäåðæàíèÿ; ðàçäåëèòåëü ìåæäó íóìåðàöèîííûì çàãîëîâêîì è~òåêñòîì. + +% The \textit{caption format} determines how this information will be presented; +% it is specified with the option +\textit{Ôîðìàò ïîäïèñè} îïðåäåëÿåò, êàê äàííàÿ èíôîðìàöèÿ áóäåò ïðåäñòàâëåíà; +ýòî çàäà¸òñÿ êëþ÷îì +\begin{quote} + |format=|\meta{format name}\quad +\end{quote} +% having the name of the caption format as its argument. +ñ~îïöèåé, îïðåäåëÿþùåé îôîðìëåíèå (ôîðìàò) ïîäïèñè. + +% There are two standard caption formats: +Äàëåå äâà ñòàíäàðòíûõ îôîðìëåíèÿ ïîäïèñè: +%\footnote{You have the option to +%define your own ones, too. See section \ref{declare}: +%\textit{``Do it yourself!''} for details.} + +\begin{Options}{\OptionLabel} + \item[plain]%\NEWdescription{v3.0h} +% Typesets the captions as a normal paragraph. + Ïå÷àòàåò ïîäïèñè êàê îáû÷íûé àáçàö. + + \item[hang] +% Indents the caption text, so it will `hang' under the first line of the text. + Äåëàåò âòÿæêó òàê, ÷òî ïåðâàÿ ñòðîêà [íóìåðàöèîííûé çàãîëîâîê] âûñòóïàåò âëåâî.% + \label{TeXr:hang:label} + + \item[\UserDefined] +% Own formats can be defined using |\Declare|\-|Caption|\-|Format|.\LineBreak +% \SeeUserDefined + Ñîáñòâåííîå îôîðìëåíèå ìîæåò áûòü îïðåäåëåíî, ñ~ïîìîùüþ êîìàíäû + |\Declare|\-|Caption|\-|Format|. \SeeUserDefined +\end{Options} + +\begin{Example} +% An example: Specifying the option + Ïðèìåð: çàäàíèå îïöèè + \begin{quote} + |format=hang| + \end{quote} +% yields captions like this: + ñîçäà¸ò ïîäïèñè êàê ýòà: + \example{format=hang}{\exampletext} +\end{Example} + +\pagebreak[3] +\DescribeMacro{indention=} +% For both formats (\texttt{plain} and \texttt{hang}) you can setup an extra +% indention starting at the second line of the caption. You do this with the +% option +Äëÿ îáîèõ îôîðìëåíèé (\texttt{plain} è~\texttt{hang}) ìîæíî óñòàíîâèòü +äîïîëíèòåëüíóþ âòÿæêó âòîðûõ ñòðîê ïîäïèñè. Ýòî ìîæíî ñäåëàòü ñ~êëþ÷îì +\begin{quote} + |indention=|\meta{amount}\quad. +\end{quote} +%^^A% [Please note, that indention of the keys \verb|format=hang| and +%^^A% |indention=|\meta{amount} are summarized.---\emph{Trans.}] +[Îáðàòèòå âíèìàíèå, ÷òî âòÿæêà èç êëþ÷åé \verb|format=hang| è~|indention=|\meta{amount} +ñóììèðóþòñÿ. \cdash--- \emph{Ïðèì.\,ïåðåâ.}] + +% Two examples: +Ïàðà ïðèìåðîâ: + +\begin{Example} + \begin{quote} + |format=plain,indention=.5cm| + \end{quote} + \captionsetup{skip=0pt} + \example{format=plain,indention=.5cm}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |format=hang,indention=-0.5cm| + \end{quote} + \captionsetup{skip=0pt} + \example{format=hang,indention=-0.5cm}{\exampletext} +\end{Example} + +\bigskip + +\pagebreak[3] +\DescribeMacro{labelformat=} +% With the option +Ñ~êëþ÷îì\label{TeXr:caplabel:a}% +\nopagebreak[3] +\begin{quote} + |labelformat=|\meta{label format name} +\end{quote} +\nopagebreak[3] +%\NEWdescription{v3.0e} +% you specify how the caption label will be typeset. +% There are five standard caption label formats: +âû çàäà¸òå, êàê ïå÷àòàåòñÿ íóìåðàöèîííàÿ ÷àñòü. +Ñóùåñòâóþò ÷åòûðå ñòàíäàðòíûõ îôîðìëåíèÿ íóìåðàöèîííîãî çàãîëîâêà: + +\begin{Options}{\OptionLabel} + \item[default] +% The caption label will be typeset as specified by the document class, +% usually this means the name and the number (like \texttt{simple}). +% (This is the default behaviour.) + íóìåðàöèîííûé çàãîëîâîê ïå÷àòàåòñÿ òàê æå êàê â~ñòàíäàðòíûõ êëàññàõ, + ýòî îáû÷íî íàçâàíèå ôëîòà è~íîìåð (êàê \texttt{simple}). + (Çàäà¸òñÿ ïî óìîë÷àíèþ.) + + \item[empty] +% The caption label will be empty. + Íóìåðàöèîííûé çàãîëîâîê îòñóòñòâóåò. +\iffalse +% (This option makes sense when used together with other options like +% \texttt{labelsep=none}.) + (Ýòà îïöèÿ èìååò ñìûñë âìåñòå ñ~îïöèÿìè òèïà \texttt{labelsep=none}.) +\fi + + \item[simple] +% The caption label will be typeset as a name and a number. + Íóìåðàöèîííûé çàãîëîâîê ïå÷àòàåòñÿ êàê íàçâàíèå ôëîòà è~åãî íîìåð. + + \item[brace]\NEWfeature{v3.1f} +% The caption label will be closed with a single (right) brace. + Íóìåðàöèîííûé çàãîëîâîê (íîìåð ïîäôëîòà) îòäåë¸í ñïðàâà êðóãëîé ñêîáêîé. + + \item[parens] +% The number of the caption label will be typeset in parentheses. + Íîìåð â~íóìåðàöèîííîé ÷àñòè çàãîëîâêà ïå÷àòàåòñÿ â~ñêîáêàõ. + + \item[\UserDefined] +% Own label formats can be defined using |\Declare|\-|Caption|\-|Label|\-|Format|. +% \SeeUserDefined + Ñîáñòâåííîå îôîðìëåíèå ìîæåò áûòü îïðåäåëåíî ñ~ïîìîùüþ + êîìàíäû |\Declare|\-|Caption|\-|Label|\-|Format|. +\end{Options} + +\begin{Example} +% An example: Using the options + Ïðèìåð: ñ~îïöèÿìè êëþ÷åé + \begin{quote} + |format=plain,labelformat=parens,labelsep=quad| + \end{quote} +% gives captions like this one: + ñîçäà¸òñÿ òàêàÿ ïîäïèñü: + \example{format=plain,labelformat=parens,labelsep=quad}{\exampletext} +\end{Example} +[Íàçâàíèå â~íóìåðàöèîííîì çàãîëîâêå äëÿ äàííîãî ïðèìåðà èçìåíåíî ñ~ïîìîùüþ +îïöèè |figurename|. \See{\Ref{names}}] + +\medskip + +\begin{Note*} +% Some environments, e.g.~the |algorithm| environment offered by the +% \package{algorithm2e} package, might react allergic to a change of the +% caption label format. +Ó~íåêîòîðûõ îêðóæåíèé, íàïðèìåð ó~îêðóæåíèÿ |algorithm|, ïðåäëàãàåìîãî +ïàêåòîì \package{algorithm2e}, èçìåíåíèå ôîðìàòà íóìåðàöèîííîãî çàãîëîâêà +ìîæåò âûçâàòü àëëåðãèþ. +\end{Note*} + +\bigskip + +\pagebreak[3] +\DescribeMacro{labelsep=} +% With the option +Ñ~êëþ÷îì +\begin{quote} + |labelsep=|\meta{label separator name} +\end{quote} +% you specify what caption separator will be used.\footnote{% +% If the caption label or the caption text is empty, +% no separator will be used.} +% You can choose one of the following: +âû îïðåäåëÿåòå êàêîé ðàçäåëèòåëü [ìåæäó íóìåðàöèîííûì çàãîëîâêîì è~òåêñòîì] +áóäåò èñïîëüçîâàòüñÿ\footnote{% + Åñëè íóìåðàöèîííûé çàãîëîâîê èëè òåêñò ïîäïèñè ïóñòûå, + ðàçäåëèòåëü íå èñïîëüçóåòñÿ.}. +Âû ìîæåòå çàäàòü ñëåäóþùèå îïöèè: + +\begin{Options}{newline} + \item[none] +% There is no caption separator. + Îòñóòñòâóåò ðàçäåëèòåëü íóìåðàöèîííîé ÷àñòè è~òåêñòà ïîäïèñè. +\iffalse +% (This option makes sense when used together with other options like +% \texttt{labelformat=empty}.) + (Ïðèìåíåíèå ýòîé îïöèè + èìååò ñìûñë âìåñòå ñ~îïöèÿìè òèïà \texttt{labelformat=empty}.) +\fi + + \item[colon] +% The caption label and text will be separated by a colon and a space. + Íóìåðàöèîííûé çàãîëîâîê è~òåêñò ðàçäåëåíû äâîåòî÷èåì è~ïðîáåëîì. + + \item[period] +% The caption label and text will be separated by a period and a space. + Íóìåðàöèîííûé çàãîëîâîê è~òåêñò ðàçäåëåíû òî÷êîé è~ïðîáåëîì. + + \item[space] +% The caption label and text will be separated by a single space. + Íóìåðàöèîííûé çàãîëîâîê è~òåêñò ðàçäåëåíû ïðîáåëîì. + + \item[quad] +% The caption label and text will be separated by a |\quad|. + Íóìåðàöèîííûé çàãîëîâîê è~òåêñò ðàçäåëåíû êåãåëüíîé (|\quad|). + + \item[newline] +% The caption label and text will be separated by a line break (|\\|). +% Please note that this separator does not work with all caption +% formats (e.g.~|format=|\x|hang|), and you'll get an error message +% trying such combination of options. + Íóìåðàöèîííûé çàãîëîâîê è~òåêñò ðàçäåëåíû íîâîé ñòðîêîé~(|\\|). + Îáðàòèòå âíèìàíèå, ÷òî ýòîò ðàçäåëèòåëü íå ðàáîòàåò ñ~íåêîòîðûìè + ôîðìàòàìè (íàïðèìåð, |format=|\x|hang|), è~âû ïîëó÷èòå ñîîáùåíèå + îá îøèáêå ïðè ïîïûòêå èñïîëüçîâàòü ýòó êîìáèíàöèþ. + + \item[endash]\NEWfeature{v3.0h} +% The caption label and text will be separated by an en-dash, +% surrounded by spaces (\verb*| -- |). + Íóìåðàöèîííûé çàãîëîâîê è~òåêñò ðàçäåëÿåòñÿ êðàòêèì òèðå, + îêðóæ¸ííûì ïðîáåëàìè (\verb*| -- |). + + \item[\UserDefined] +% Own separators can be defined using |\Declare|\-|Caption|\-|Label|\-|Sep|\-|a|\-|ra|\-|tor|. +% \SeeUserDefined + Ñîáñòâåííûå ðàçäåëèòåëè ìîæíî îïðåäåëèòü, èñïîëüçóÿ êîìàíäó + |\Declare|\-|Caption|\-|Label|\-|Sep|\-|a|\-|ra|\-|tor|. + \SeeUserDefined +\end{Options} + +% Three examples: +Òðè ïðèìåðà: +\begin{Example} + \begin{quote} + |format=plain,labelsep=period| + \end{quote} + \captionsetup{skip=0pt} + \example{format=plain,labelsep=period}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |format=plain,labelsep=newline,singlelinecheck=false| + \end{quote} + \captionsetup{skip=0pt} + \example{format=plain,labelsep=newline,singlelinecheck=false}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |format=plain,labelsep=endash| + \end{quote} + \captionsetup{skip=0pt} + \example{format=plain,labelsep=endash}{\exampletext} +\end{Example} + +\bigskip + +\pagebreak[3] +\DescribeMacro{textformat=}\NEWfeature{v3.0l}% +% With the option +Ñ~îïöèåé +\nopagebreak[3] +\begin{quote} + |textformat=|\meta{text format name} +\end{quote} +\nopagebreak[3] +% you specify how the caption text will be typeset. +% There are two standard caption text formats: +âû îïðåäåëÿåòå êàê òåêñò ïîäïèñè áóäåò íàïå÷àòàí. +Ñóùåñòâóåò äâà ñòàíäàðòíûõ ôîðìàòà ïîäïèñè: + +\begin{Options}{\OptionLabel} + \item[simple] +% The caption text will be typeset as it is. + Òåêñò ïîäïèñè áóäåò íàïå÷àòàí êàê åñòü. + + \item[period] +% The caption text will be followed by a period. + Â~êîíöå ïîäïèñè ñòàâèòñÿ òî÷êà. + + \item[\UserDefined] +% Own label formats can be defined using |\Declare|\-|Caption|\-|Text|\-|Format|. +% \SeeUserDefined + Ñîáñòâåííûå ôîðìàòû òåêñòà ìîãóò áûòü îïðåäåëåíû ñ~èñïîëüçîâàíèåì êîìàíäû |\Declare|\-|Caption|\-|Text|\-|Format|. + \SeeUserDefined +\end{Options} + +% --------------------------------------------------------------------------- % + +\PageBreak +% \subsection{Justification} +\subsection{Âûêëþ÷êà} +\label{justification} + +\DescribeMacro{justification=} +% As addition to the caption format you could also specify a +% \emph{caption justification}; it is specified with the option +Ïðè îôîðìëåíèè ïîäïèñè âû ìîæåòå îïðåäåëèòü +\emph{âûêëþ÷êó ïîäïèñè}; îíà çàäà¸òñÿ êëþ÷îì +\begin{quote} + |justification=|\meta{justification name}\quad. +\end{quote} + +% You can choose one of the following: +Âû ìîæåòå âûáðàòü ñëåäóþùèå îïöèè: + +\begin{Options}{\OptionLabel} + \item[justified] +% Typesets the caption as a normal paragraph. + Ïå÷àòàåò ïîäïèñü â~âèäå îáû÷íîãî àáçàöà. (Ïî óìîë÷àíèþ.) + + \item[centering] +% Each line of the caption will be centered. + Âñå ñòðîêè âûêëþ÷åíû ïî öåíòðó. + +% \item[Centering] + + \item[centerlast] +% The last line of each paragraph of the caption text will be centered. + Àáçàö íàáèðàåòñÿ íà ïîëíûé ôîðìàò, ïîñëåäíÿÿ ñòðîêà âûêëþ÷åíà ïî öåíòðó. + + \item[centerfirst] +% Only the first line of the caption will be centered. + Öåíòðèðóåòñÿ òîëüêî ïåðâàÿ ñòðîêà [îñòàëüíûå, â~òîì ÷èñëå è~êîíöåâàÿ, + âûêëþ÷àþòñÿ íà ïîëíûé ôîðìàò]. + + \item[raggedright] +% Each line of the caption will be moved to the left margin. + Ñòðîêè ïîäïèñè âûêëþ÷åíû âëåâî. + +\iffalse + \item[RaggedRight] +% Each line of the caption will be moved to the left margin using +% the command |\RaggedRight| from the \package{ragged2e} package. + Ñòðîêè ïîäïèñè âûêëþ÷åíû âëåâî ñ~èñïîëüçîâàíèåì êîìàíäû + |\RaggedRight| èç ïàêåòà \package{ragged2e}. +\else + \item[RaggedRight] +% Each line of the caption will be moved to the left margin, too. +% But this time the command |\RaggedRight| of the \package{ragged2e} +% package will be used to achieve this. +% The main difference to |raggedright| is that the word breaking +% algorithm of \TeX\ will work inside captions.\footnote{% +% The need for the \package{ragged2e} package will be detected at +% run-time, therefore you maybe need a second \LaTeX\ run if this +% option is used for the first time.} + Ñòðîêè ïîäïèñè òàêæå âûêëþ÷åíû âëåâî. + Íî â~äàííîì ñëó÷àå èñïîëüçóåòñÿ êîìàíäà |\RaggedRight| ïàêåòà + \package{ragged2e}. Îñíîâíîå îòëè÷èå îò îïöèè |raggedright| + çàêëþ÷àåòñÿ â~èñïîëüçîâàíèè àëãîðèòìà Plain \TeX'à äëÿ ðàçðûâà + ñëîâ âíóòðè ïîäïèñè.\footnote{ + Íåîáõîäèìîñòü â~ýòîì ïàêåòå îïðåäåëÿåòñÿ «íà ëåòó», + ïîýòîìó ïðè èñïîëüçîâàíèè ýòîé îïöèè äîêóìåíò íóæíî äâàæäû îáðàáîòàòü \LaTeX'îì.}. +\fi + + \item[raggedleft] +% Each line of the caption will be moved to the right margin. + Ñòðîêè ïîäïèñè âûêëþ÷åíû âïðàâî. + +% \item[RaggedLeft] +% % Each line of the caption will be moved to the right margin using +% % the command |\RaggedLeft| from the \package{ragged2e} package. +% Ñòðîêè ïîäïèñè âûêëþ÷åíû âïðàâî ñ~èñïîëüçîâàíèåì êîìàíäû +% |\RaggedRight| èç ïàêåòà \package{ragged2e}. + +%\showhyphens{justification} + \item[\UserDefined] +% Own justifications can be defined using +% |\Declare|\-|Caption|\-|Jus|\-|ti|\-|fi|\-|ca|\-|tion|. +% \SeeUserDefined + Ñîáñòâåííûå îïðåäåëåíèÿ âûêëþ÷êè ìîæíî çàäàòü ñ~ïîìîùüþ êîìàíäû + |\Declare|\-|Caption|\-|Jus|\-|ti|\-|fi|\-|ca|\-|tion|. + \SeeUserDefined +\end{Options} + +% Three examples: +Òðè ïðèìåðà:\label{TeXr:centerlast}% +\begin{Example} + \begin{quote} + |format=plain,justification=centerlast| + \end{quote} + \captionsetup{skip=0pt} + \example{format=plain,justification=centerlast}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |format=hang,justification=raggedright| + \end{quote} + \captionsetup{skip=0pt} + \example{format=hang,justification=raggedright}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |format=plain,labelsep=newline,justification=centering| + \end{quote} + \captionsetup{skip=0pt} + \example*{format=plain,labelsep=newline,justification=centering}{\exampletext} +\end{Example} + +\smallskip + +\PageBreak +\DescribeMacro{singlelinecheck=}\label{TeXr:singleline:a}% +% The standard \LaTeX\ document classes (\class{article}, \class{report}, and +% \class{book}) automatically center a caption if it fits in one single line: +Ñòàíäàðòíûå êëàññû \LaTeX'à (\class{article}, \class{report}, è~\class{book}) +àâòîìàòè÷åñêè öåíòðèðóþò ïîäïèñü åñëè îíà îäíîñòðî÷íàÿ: + +\example*{}{A short caption.} + +\INFO +% \Thispackage\ adapts this behavior and therefore usually ignores the +% justification \& indention you have set with |justification=| \& +% |indention=| in such case. +% But you can switch this special treatment of such short captions off +% with the option +\Thispackage\ ñëåäóåò çà ýòèì àëãîðèòìîì è~ïîýòîìó +â~òàêèõ ñëó÷àÿõ èãíîðèðóåò âûêëþ÷êó, çàäàííóþ êëþ÷àìè |justification=| è~|indention=|. +Îïðåäåëèòü, ñëåäîâàòü ýòîìó àëãîðèòìó èëè íåò ìîæíî, +çàäàâ êëþ÷ +\begin{quote} + |singlelinecheck=|\meta{bool}\quad. +\end{quote} +% Using |false|, |no|, |off| or |0| for \meta{bool} switches the +% extra centering off: +Èñïîëüçóÿ |false|, |no|, |off| èëè |0| âìåñòî \meta{bool} âû îòêëþ÷èòå +öåíòðèðîâàíèå îäíîñòðî÷íîé ïîäïèñè: +\begin{quote} + |singlelinecheck=false| +\end{quote} +% Doing so the above short caption would look like +Ïîñëå ýòîãî îïðåäåëåíèÿ êîðîòêèå ïîäïèñè +[ïðè çàäàíèè âûêëþ÷êè ïî óìîë÷àíèþ, â~âèäå îáû÷íîãî àáçàöà] +áóäóò âûãëÿäåòü òàê + +\begingroup + \captionsetup{type=figure} + \ContinuedFloat + \example*{singlelinecheck=false}{A short caption.} +\endgroup + +% You switch the extra centering on again by using |true|, |yes|, |on| or |1| +% for \meta{bool}. (The default is on.) +Èñïîëüçóÿ |true|, |yes|, |on| èëè |1| âìåñòî \meta{bool} âû âêëþ÷èòå ìåõàíèçì +öåíòðèðîâàíèÿ êîðîòêèõ ïîäïèñåé. (Çàäàíî ïî óìîë÷àíèþ.)%^^A +\label{TeXr:singleline:z} + +% --------------------------------------------------------------------------- % + +% \subsection{Fonts} +\subsection{Øðèôòû} +\label{fonts} + +\DescribeMacro{font=} +\DescribeMacro{labelfont=} +\DescribeMacro{textfont=} +% There are three font options which affects different parts of the caption: +% One affecting the whole caption (|font|), one which only affects the caption +% label and separator (|label|\-|font|) and at least one which only affects the +% caption text (|text|\-|font|). +% You set them up using the options +Çàäàíû òðè êëþ÷à êîòîðûå îïðåäåëÿþò øðèôò ðàçíûõ ýëåìåíòîâ ïîäïèñè: +Ïåðâûé çàäà¸ò øðèôò äëÿ âñåé ïîäïèñè (|font|), âòîðîé çàäà¸ò øðèôò òîëüêî +äëÿ íóìåðàöèîííîãî çàãîëîâêà è~ðàçäåëèòåëÿ (|label|\-|font|), è~òðåòèé +\cdash--- øðèôò äëÿ òåêñòà (|text|\-|font|). +Âû çàäà¸òå èõ, èñïîëüçóÿ êëþ÷è +\begin{quote}\begin{tabular}{@{}r@{}ll} + |font=| & \marg{font options} & ,\\ + |labelfont=| & \marg{font options} & , è\\ + |textfont=| & \marg{font options} & .\\ +\end{tabular}\end{quote} +% where \meta{font options} is a list of comma separated font options. +ãäå àðãóìåíòîì \meta{font options} ÿâëÿþòñÿ ïåðå÷èñëåííûå ÷åðåç çàïÿòóþ îïöèè. + +% And these are the available font options: +Äàëåå óæå ñîçäàííûå îïöèè äàííûõ êëþ÷åé: + +\begin{Options}{stretch=\meta{amount}} + \item[scriptsize] {\scriptsize Î÷åíü ìàëåíüêèé} + \item[footnotesize] {\footnotesize Îáû÷íî èñïîëüçóåòñÿ â~ñíîñêàõ} + \item[small] {\small Ìàëåíüêèé} + \item[normalsize] {\normalsize Íîðìàëüíûé} + \item[large] {\large Áîëüøîé} + \item[Large] {\Large Åù¸ áîëüøå} +\end{Options} +\vspace{0pt}\pagebreak[3] +\begin{Options}{stretch=\meta{amount}} +% \item[normalfont] {\normalfont Normal shape \& series \& family} + \item[normalfont] {\normalfont Èñõîäíûå ñåìåéñòâî, íàñûùåííîñòü è~íà÷åðòàíèå} + + \item[up] {\upshape Ïðÿìîé} + \item[it] {\itshape Êóðñèâ} + \item[sl] {\slshape Íàêëîííûé} + \item[sc] {\scshape Êàïèòåëü} + + \item[md] {\mdseries Íîðìàëüíàÿ íàñûùåííîñòü (ñâåòëûé)} + \item[bf] {\bfseries Ïîëóæèðíûé} + + \item[rm] {\rmfamily Øðèôò ñ~çàñå÷êàìè} + \item[sf] {\sffamily Ðóáëåíûé} + \item[tt] {\fontfamily{cmtt}\selectfont Øðèôò ïèøóùåé ìàøèíêè (ðàâíîøèðèííûé)} +\end{Options} +\vspace{0pt}\pagebreak[3] +\begin{Options}{stretch=\meta{amount}} +% \item[singlespacing] Single spacing \See{\Ref{setspace}} +% \item[onehalfspacing] One-and-a-half spacing \See{\Ref{setspace}} +% \item[doublespacing] Double spacing \See{\Ref{setspace}} +% \item[stretch=\meta{amount}] |\setstretch|\marg{amount} \See{\Ref{setspace}} + \item[singlespacing] Îäèíàðíûé èíòåðëèíüÿæ \See{\Ref{setspace}} + \item[onehalfspacing] Ïîëóòîðíûé èíòåðëèíüÿæ \See{\Ref{setspace}} + \item[doublespacing] Äâîéíîé èíòåðëèíüÿæ \See{\Ref{setspace}} + \item[stretch=\meta{amount}] ${} \equiv {}$|\setstretch|\marg{amount} \See{\Ref{setspace}} +\end{Options} +\vspace{0pt}\pagebreak[3] +\begin{Options}{stretch=\meta{amount}} +% \item[normalcolor] |\normalcolor| +% \item[color=\meta{colour}] |\color|\marg{colour} +% {\small(If the \package{color} or \package{xcolor} package is loaded, +% see \Ref{declare} for an example)} + \item[normalcolor] ñîîòâåòñòâóåò êîìàíäå |\normalcolor| + \item[color=\meta{colour}] îïöèÿ êëþ÷à ýêâèâàëåíòíà àðãóìåíòó êîìàíäû |\color|\marg{colour} + {\small(Åñëè çàãðóæåí ïàêåò \package{color} èëè \package{xcolor}, + ñì., íàïðèìåð~\Ref{declare})} +\end{Options} +\vspace{0pt}\pagebreak[3] +\begin{Options}{stretch=\meta{amount}} +% \item[normal] The combination of the options |normal|\-|color|, +% |normal|\-|font|, |normal|\-|size|, and |single|\-|spacing| + \item[normal] Êîìáèíàöèÿ îïöèé |normal|\-|color|, + |normal|\-|font|, |normal|\-|size| è~|single|\-|spacing| + + \item[\UserDefined] +% Own font options can be defined using |\Declare|\-|Caption|\-|Font|. +% \SeeUserDefined + Ñîáñòâåííûå îïöèè ìîãóò áûòü îïðåäåëåíû ñ~ïîìîùüþ êîìàíäû + |\Declare|\-|Caption|\-|Font|. + \SeeUserDefined +\end{Options} + +% If you use only one of these options you can omit the braces; +% e.g., the options +Åñëè èñïîëüçóåòñÿ îäíà îïöèÿ êëþ÷à, ôèãóðíûå ñêîáêè ìîæíî îïóñòèòü; +íàïðèìåð, îïöèè +%\begin{quote} + |font={small}| +%\end{quote} +% and +è +%\begin{quote} + |font=small| +%\end{quote} +% will give the same result. +äàäóò îäèíàêîâûé ðåçóëüòàò. + +% Three examples: +Òðè ïðèìåðà +\begin{Example} + \begin{quote} + |font=it,labelfont=bf| + \end{quote} + \captionsetup{skip=0pt} + \example{font=it,labelfont=bf}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |labelfont=bf,textfont=it| + \end{quote} + \captionsetup{skip=0pt} + \example{labelfont=bf,textfont=it}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |font={small,stretch=0.80}| + \end{quote} + \captionsetup{skip=0pt} + \example{font={small,stretch=0.80}}{\exampletext} +\end{Example} + +\medskip + +\pagebreak[3] +\DescribeMacro{font+=} +\DescribeMacro{labelfont+=} +\DescribeMacro{textfont+=} +\NEWfeature{v3.1f}% +% You can also add font options to the current ones, so for example +Âû òàêæå ìîæåòå äîáàâèòü îïöèè øðèôòà ê~òåêóùèì, òàê íàïðèìåð çàïèñü +\begin{quote} + |\captionsetup{font=small}|\\ + |\captionsetup{font+=it}| +\end{quote} +% is identical to +áóäåò èäåíòè÷íà +\begin{quote} + |\captionsetup{font={small,it}}| +\end{quote} + +% --------------------------------------------------------------------------- % + +% \subsection{Margins and further paragraph options} +\subsection{Ïîëÿ è~äðóãèå îïöèè ôîðìèðîâàíèÿ àáçàöà} +\label{margins} + +\DescribeMacro{margin=} +\DescribeMacro{width=} +% For all captions you can specify \emph{either} an extra margin \emph{or} +% a fixed width:~\footnote{Only fixed widths are supported here; if you are +% looking for a way to limit the width of the caption to the width of the +% figure or table, please take a look at the \package{floatrow}\cite{floatrow} +% or \package{threeparttable}\cite{threeparttable} package.} +Äëÿ âñåõ ïîäïèñåé ìîæíî îïðåäåëèòü \emph{ëèáî} äîïîëíèòåëüíóþ âòÿæêó +\emph{ëèáî} ôèêñèðîâàííóþ øèðèíó. Ýòî çàäà¸òñÿ êëþ÷àìè\footnote{Çäåñü ïîääåðæèâàþòñÿ + òîëüêî ôèêñèðîâàííûå øèðèíû; åñëè âàì íóæíî çàäàòü øèðèíó ïîäïèñè ïî øèðèíå + ãðàôèêè èëè òàáëè÷íîãî ìàòåðèàëà, îáðàòèòåñü ê~ïàêåòàì \package{floatrow}\cite{floatrow} + èëè \package{threeparttable}\cite{threeparttable}.} +\begin{quote}\begin{tabular}{@{}r@{}ll} + |margin=| & \meta{amount} & \emph{--èëè--}\\ + |margin=| & |{|\meta{left amount}|,|\meta{right amount}|}| & \emph{--èëè--}\\ + |width=| & \meta{amount} & \\ +\end{tabular}\end{quote} +\NEWfeature{v3.1} +% If you specify just one \meta{amount} for the margin, it will be used for +% both, the left and right margin, e.g.~|margin=|\x|10pt| is equivalent to +% |margin=|\x|{10pt,10pt}|. +% In two-side documents the left and right margin will be swapped on even pages. +Åñëè âû îïðåäåëèòå òîëüêî îäíî çíà÷åíèå \meta{amount} äëÿ ïîëÿ, îíî áóäåò èñïîëüçîâàíî äëÿ îáîèõ ïîëåé, +ëåâîãî è~ïðàâîãî, íàïðèìåð,~|margin=|\x|10pt| ýêâèâàëåíòíî |margin=|\x|{10pt,10pt}|. +Äëÿ äâóñòîðîííèõ äîêóìåíòîâ ëåâîå è~ïðàâîå ïîëÿ íà ÷¸òíûõ ïîëîñàõ çåðêàëüíî îòîáðàçÿòñÿ. +\DescribeMacro{oneside} +\DescribeMacro{twoside} +% To prevent this you can specify the option |oneside| additionally, +% e.g.~|\caption|\-|setup{margin=|\x|{0pt,10pt},|\x|oneside}|.\par +% But if you are specifying a width, then both, the left and the right margin, +% will have the same amount. +Åñëè âàì ýòî íå íóæíî âû ìîæåòå çàäàòü äîïîëíèòåëüíî îïöèþ |oneside|, +íàïðèìåð,~|\caption|\-|setup|\x|{margin=|\x|{0pt,10pt},|\x|oneside}|.\par +Íî åñëè âû îïðåäåëÿåòå øèðèíó ïîäïèñè, òî îáà ïîëÿ áóäóò îäèíàêîâûìè. + +% Three examples will illustrating this: +Òðè ïðèìåðà äëÿ èëëþñòðàöèè: +\begin{Example} + \begin{quote} + |margin=10pt| + \end{quote} + \captionsetup{skip=0pt} + \example{margin=10pt}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |margin={1cm,0cm}| + \end{quote} + \captionsetup{skip=0pt} + \example{margin={1cm,0cm}}{\exampletext} +\end{Example} + +\begin{Example} + \begin{quote} + |width=.75\textwidth| + \end{quote} + \captionsetup{skip=0pt} + \example{width=.75\textwidth}{\exampletext} +\end{Example} + +\begin{Note} +% When the caption is placed beside the contents (for example in a |SC|\-|figure| +% environment offered by the \package{sidecap} package\cite{sidecap}) or the +% figure is an in-text figure (for example in a |wrap|\-|figure| environment +% offered by the \package{wrapfig} package\cite{wrapfig}), the margin setting +% will be automatically reset to |0pt| at the very beginning of the environment. +% But if you really want to setup an extra margin for these environments, you can +% do so by setting this margin either inside the environment itself, of by +% specifying a margin for this particular environment, +% e.g.~|\caption|\-|setup[SC|\-|figure]{margin=|\x|10pt}|. +Êîãäà ïîäïèñü ïîìåùåíà ðÿäîì ñ~ñîäåðæèìûì (íàïðèìåð âíóòðè +îêðóæåíèÿ |SCfigure|, ïðåäëàãàåìîãî ïàêåòîì \package{sidecap} package\cite{sidecap}) +èëè îêðóæåíèå ôëîòà îáòåêàåòñÿ òåêñòîì (ôëîò ïîìåù¸í â~îáîðêó, íàïðèìåð â~îêðóæåíèè |wrap|\-|figure| +ïðåäëàãàåìîì ïàêåòîì \package{wrapfig}\cite{wrapfig}), óñòàíîâêè ïîëåé +îáíóëÿþòñÿ â~íà÷àëå îêðóæåíèÿ. Íî åñëè âàì äåéñòâèòåëüíî íóæíî çàäàòü +âòÿæêó äëÿ ýòèõ îêðóæåíèé, âû ìîæåòå çàäàòü íóæíûå ïîëÿ âíóòðè îêðóæåíèÿ, çàäàâ +óñòàíîâêè ïîëåé ñïåöèàëüíî äëÿ ýòèõ îêðóæåíèé, íàïðèìåð, +|\caption|\-|setup[SC|\-|figure]|\x|{margin=10pt}|. + \end{Note} + +\begin{Expert} +\DescribeMacro{margin*=}\NEWfeature{v3.1}% +% There is also a starred variant of the |margin=| option, |margin*=|, which only +% changes the margin if no width was set. +Ñóùåñòâóåò òàêæå «çâ¸çäíûé» âàðèàíò êëþ÷à |margin=|, êëþ÷ |margin*=|, êîòîðûé +èçìåíÿåò ïîëÿ òîëüêî êîãäà íå çàäàíà øèðèíà. +\end{Expert} + +\begin{Expert} +\DescribeMacro{minmargin=} +\DescribeMacro{maxmargin=}\NEWfeature{v3.1}% +% You can also set a minimum or maximum margin amount. This can be useful for +% limiting the margin amount in smaller environments, e.g.~|minipage|s. +% For example the \SmF\ document classes limit the margin amount to +% |maxmargin=|\x|0.1\linewidth|. (See \Ref{SMF}) +Âû ìîæåòå òàêæå çàäàòü ìèíèìàëüíûé èëè ìàêñèìàëüíûé ðàçìåð ïîëåé. Ýòî ìîæåò áûòü ïîëåçíî +äëÿ îãðàíè÷åíèÿ ðàçìåðà ïîëåé â~óìåíüøåííûõ ôîðìàòàõ, íàïðèìåð âíóòðè îêðóæåíèÿ~|minipage|. +Íàïðèìåð êëàññû äîêóìåíòîâ \SmF\ îãðàíè÷èâàþò ïîëÿ +|maxmargin=|\x|0.1\linewidth|. (Ñì.~\Ref{SMF}) +\end{Expert} + +\medskip + +\pagebreak[3] +\DescribeMacro{parskip=}\label{TeXr:multipar:a}% +% This option is useful for captions containing more than one paragraph. +% It specifies the extra vertical space inserted between them: +Äàííûé êëþ÷ ïîíàäîáèòñÿ, åñëè ïîäïèñè ñîäåðæàò áîëåå îäíîãî àáçàöà. +Îí çàäà¸ò äîïîëíèòåëüíóþ âåðòèêàëüíóþ îòáèâêó ìåæäó àáçàöàìè: +\begin{quote} + |parskip=|\meta{amount} +\end{quote} +% One example: +Ïðèìåð: +\begin{Example} + \begin{quote} + |margin=10pt,parskip=5pt| + \end{quote} + \captionsetup{skip=0pt} + \example{margin=10pt,parskip=5pt}{% +% First paragraph of the caption. This one contains some test, just to +% show how these options affect the layout of the caption.\par +% Second paragraph of the caption. This one contains some text, too, to +% show how these options affect the layout of the caption.} + Ïåðâûé àáçàö ïîäïèñè. Îí ñîäåðæèò íåìíîãî òåêñòà, ÷òîáû ïîêàçàòü + êàê çàäàííûå íàñòðîéêè ñîçäàþò îôîðìëåíèå ïîäïèñè.\par + Âòîðîé àáçàö ïîäïèñè. Îí òîæå ñîäåðæèò íåìíîãî òåêñòà, ÷òîáû ïîêàçàòü + êàê çàäàííûå íàñòðîéêè ñîçäàþò îôîðìëåíèå ïîäïèñè.} +\end{Example} + +\pagebreak[3] +\DescribeMacro{hangindent=} +% The option +Êëþ÷ +\begin{quote} + |hangindent=|\meta{amount} +\end{quote} +% is for setting up a hanging indention starting from the second line of each +% paragraph. If the caption contains just a single paragraph, using this option +% leads to the same result as the option |indention=|\meta{amount} you already +% know about. +% But if the caption contains multiple paragraphs you will notice the difference: +çàäà¸ò âòÿæêó äëÿ âòîðûõ ñòðîê êàæäîãî àáçàöà ïîäïèñè. +Åñëè ïîäïèñü ñîñòîèò èç îäíîãî àáçàöà, ýòîò êëþ÷ äà¸ò òîò æå ðåçóëüòàò +÷òî è~èçâåñòíûé âàì êëþ÷ |indention=|\meta{amount}. +Íî â~ïîäïèñè èç íåñêîëüêèõ àáçàöåâ âû óâèäèòå ðàçíèöó: + +\begin{Example} + \begin{quote} + |format=hang,indention=-.5cm| + \end{quote} + \captionsetup{skip=0pt} + \example{format=hang,indention=-.5cm}{% +% First paragraph of the caption. This one contains some test, just to +% show how these options affect the layout of the caption.\par +% Second paragraph of the caption. This one contains some text, too, to +% show how these options affect the layout of the caption.} + Ïåðâûé àáçàö ïîäïèñè. Îí ñîäåðæèò íåìíîãî òåêñòà, ÷òîáû ïîêàçàòü + êàê çàäàííûå íàñòðîéêè ñîçäàþò îôîðìëåíèå ïîäïèñè.\par + Âòîðîé àáçàö ïîäïèñè. Îí òîæå ñîäåðæèò íåìíîãî òåêñòà, ÷òîáû ïîêàçàòü + êàê çàäàííûå íàñòðîéêè ñîçäàþò îôîðìëåíèå ïîäïèñè.} +\end{Example} + +\begin{Example} + \begin{quote} + |format=hang,hangindent=-.5cm| + \end{quote} + \captionsetup{skip=0pt} + \example{format=hang,hangindent=-.5cm}{% +% First paragraph of the caption. This one contains some test, just to +% show how these options affect the layout of the caption.\par +% Second paragraph of the caption. This one contains some text, too, to +% show how these options affect the layout of the caption.} + Ïåðâûé àáçàö ïîäïèñè. Îí ñîäåðæèò íåìíîãî òåêñòà, ÷òîáû ïîêàçàòü + êàê çàäàííûå íàñòðîéêè ñîçäàþò îôîðìëåíèå ïîäïèñè.\par + Âòîðîé àáçàö ïîäïèñè. Îí òîæå ñîäåðæèò íåìíîãî òåêñòà, ÷òîáû ïîêàçàòü + êàê çàäàííûå íàñòðîéêè ñîçäàþò îôîðìëåíèå ïîäïèñè.} +\end{Example} + +\begin{Note} +% If your caption contains more than one paragraph, you have +% to specify an alternative caption for the list-of-figures using the +% optional argument of |\caption| or |\caption|\-|of|, otherwise you will +% get an error message. +Åñëè ïîäïèñü ñîäåðæèò áîëåå îäíîãî àáçàöà, âàì íóæíî +çàäàòü ñîêðàù¸ííûé âàðèàíò ïîäïèñè äëÿ ñïèñêîâ ðèñóíêîâ èëè òàáëèö, èñïîëüçóÿ +äîïîëíèòåëüíûé àðãóìåíò êîìàíä |\caption| èëè |\captionof|, èíà÷å âû ïîëó÷èòå +ñîîáùåíèå îá îøèáêå. +\end{Note} + +% --------------------------------------------------------------------------- % + +\PageBreak +% \subsection{Styles} +\subsection{Ñòèëè} +\label{style} + +\DescribeMacro{style=} +% A suitable combination of caption options is called \emph{caption style}. +% You can compare them more or less to page styles which you set up with +% |\page|\-|style|; +% the caption style provides all settings for a whole caption layout. +Îïðåäåë¸ííàÿ êîìáèíàöèÿ íåñêîëüêèõ êëþ÷åé ñîçäà¸ò \emph{ñòèëü ïîäïèñè}. +Ýòî ìîæíî ñðàâíèòü ñî ñòèëÿìè êîëîíòèòóëà, çàäàâàåìîãî êîìàíäîé +|\pagestyle|: ñòèëü ïîäïèñè çàäà¸ò âñå íàñòðîéêè äëÿ îôîðìëåíèÿ ïîäïèñè. + +% You switch to an already defined caption style with the option +Ïðåäâàðèòåëüíî ñîçäàííûé ñòèëü ìîæíî âûçâàòü êëþ÷îì +\begin{quote} + |style=|\meta{style name}\quad. +\end{quote} +% \Thispackage\ pre-defines two styles: |base| and |default|. +\Thispackage\ îïðåäåëÿåò äâà ñòèëÿ: |base| è~|default|. + +\NEWfeature{v3.1} +% The |base| style puts all options you already know about to values reflecting +% the look of the captions when using one of the base \LaTeX\ document classes +% \class{article}, \class{report}, and \class{book}. +% This means that specifying the option +Ñòèëü |base| çàäà¸ò âñå èçâåñòíûå âàì êëþ÷è ñî çíà÷åíèÿìè, +ñîîòâåòñòâóþùèìè çàäàííûì â~áàçîâûõ êëàññàõ \LaTeX'à +\class{article}, \class{report} è~\class{book}. +Ýòî îçíà÷àåò, ÷òî çàäàíèå îïöèè +\begin{quote} + |style=base| +\end{quote} +% has the same effect as specifying all these options: +äàñò òîò æå ýôôåêò, ÷òî è çàäàíèå âñåõ ïåðå÷èñëåííûõ îïöèé: +\begin{quote} + |format=plain,labelformat=default,labelsep=colon,|\\ + |justification=justified,font={},labelfont={},|\\ + |textfont={},margin=0pt,indention=0pt|\\ + |parindent=0pt,hangindent=0pt,singlelinecheck=true| +\end{quote} +\begin{Annotation*} +% But |justification=centering,indention=0pt| will be set if +% the caption fits into a single line. +À~äëÿ îäíîñòðî÷íîé ïîäïèñè áóäóò çàäàíû íàñòðîéêè |justification=|\x|centering,|\x|indention=0pt|. +\end{Annotation*} + +% In contrast the |default| style follows the default values, reflecting +% the look of the captions given by the document class you actually use. +% This style is selected by default and represents these options: +Â~îòëè÷èå îò ïðåäûäóùåãî ñòèëü |default| çàäà¸ò çíà÷åíèÿ, îòâå÷àþùèå +âèäó ïîäïèñåé, ñîçäàâàåìûõ äàííûì êëàññîì äîêóìåíòà. +Ýòîò ñòèëü îïðåäåëÿåò ñëåäóþùèå îïöèè: +\begin{quote} + |format=default,labelformat=default,labelsep=default,|\\ + |justification=default,font=default,labelfont=default,|\\ + |textfont=default,margin=0pt,indention=0pt|\\ + |parindent=0pt,hangindent=0pt,singlelinecheck=true| +\end{quote} +\begin{Annotation*} +% But again |justification=centering,indention=0pt| will be set if +% the caption fits into a single line. +Íî ïðè ýòîì ñíîâà äåéñòâóþò íàñòðîéêè +|justification=|\x|centering,|\x|indention=0pt| äëÿ îäíîñòðî÷íûõ ïîäïèñåé. +\end{Annotation*} + +% So if you use one of the base \LaTeX\ document classes \class{article}, +% \class{report}, or \class{book}, both caption styles, |base| and |default|, +% point to (nearly) the same settings. +Ïîýòîìó, åñëè âû èñïîëüçóåòå îäèí èç êëàññîâ \LaTeX'à \class{article}, +\class{report} èëè \class{book}, îáå îïöèè, |base| è~|default|, çàäàäóò ôàêòè÷åñêè +îäèíàêîâûå íàñòðîéêè. + +\begin{Note} +% Own caption styles can be defined using |\Declare|\-|Caption|\-|Style|.\LineBreak +% \SeeUserDefined +Ñîáñòâåííûå ñòèëè ïîäïèñè ìîãóò áûòü îïðåäåëåíû ñ~ïîìîùüþ +êîìàíäû |\Declare|\-|Caption|\-|Style|.\LineBreak\SeeUserDefined +\end{Note} + +% --------------------------------------------------------------------------- % + +% \subsection{Skips} +\subsection{Îòáèâêè} +\label{skips} + +\DescribeMacro{skip=}\NEWfeature{v3.0d}% +% The vertical space between the caption and the figure or table contents is +% controlled by the option +Âåðòèêàëüíàÿ îòáèâêà ìåæäó ïîäïèñüþ è~ñîäåðæèìûì ðèñóíêà èëè òàáëèöû +îïðåäåëÿåòñÿ êëþ÷îì +\begin{quote} + |skip=|\meta{amount}\quad. +\end{quote} +% The standard \LaTeX\ document classes \class{article}, \class{report} and +% \class{book} preset it to |skip=|\x|10pt|, but other document classes may +% use a different amount. +Ñòàíäàðòíûå êëàññû \LaTeX'à |article|, |report| è~|book| îïðåäåëÿþò êëþ÷ êàê +|skip=|\x|10pt|, +íî äðóãèå êëàññû ìîãóò çàäàòü äðóãîå çíà÷åíèå. + +\bigskip + +\pagebreak[3] +\DescribeMacro{position=}\label{TeXr:captionskips:a}% +% The |\caption| command offered by \LaTeX{} has a design flaw: +% The command does not know if it stands on the beginning of the figure or +% table, or at the end. Therefore it does not know where to put the space +% separating the caption from the content of the figure or table. +% While the standard implementation always puts the space above the caption +% in floating environments (and inconsistently below the caption in +% |long|\-|table|s), the implementation offered by this package is more +% flexible: +% By giving the option +Êîìàíäà |\caption|, ïðåäëàãàåìàÿ \LaTeX'îì èìååò íåäîñòàòîê â~îôîðìëåíèè: +êîìàíäà íå çíàåò, ñòîèò ëè îíà â~íà÷àëå îêðóæåíèÿ ðèñóíêà èëè òàáëèöû, èëè â~êîíöå. +Ïîýòîìó îíà íå çíàåò, êàê ðàññòàâèòü îòáèâêè, îòäåëÿþùèå ïîäïèñü îò ñîäåðæèìîãî +ðèñóíêà èëè òàáëèöû. Ïîêà ÷òî ñòàíäàðòíûå îïðåäåëåíèÿ çàäàþò îòáèâêó âñåãäà ñâåðõó +ïîäïèñè (è~ñíèçó òàáëè÷íîãî çàãîëîâêà â~îêðóæåíèè |long|\-|table|, ÷òî ïðîòèâîðå÷èò ñòàíäàðòíîìó), +ðåøåíèå, ïðåäëàãàåìîå äàííûì ïàêåòîì áîëåå ãèáêîå. +Çàäàíèå îïöèè +\begin{quote} + |position=top|\quad èëè\quad |position=above| +\end{quote} +% it's assumed that the caption is standing at the \emph{top} of the +% environment and therefore the space setup with |skip=|\x\meta{amount} +% is placed below the caption. +% (Please note that |position=|\x|top| does \emph{NOT} mean that the +% caption is actually placed at the top of the figure or table. +% Instead the caption is usually placed where you place the |\caption| +% command.) +% But with +áóäåò îçíà÷àòü, ÷òî ïîäïèñü ðàçìåùàåòñÿ \emph{ñâåðõó} ñîäåðæèìîãî +îêðóæåíèÿ, è~ñëåäîâàòåëüíî îòáèâêà |skip=|\meta{amount} áóäåò +çàäàíà ñíèçó ïîäïèñè. +(Îáðàòèòå âíèìàíèå, ÷òî |position=|\x|top| \emph{ÍÅ} îçíà÷àåò, +÷òî ïîäïèñü äåéñòâèòåëüíî íàïå÷àòàåòñÿ ñâåðõó ðèñóíêà èëè òàáëèöû. +Ïîäïèñü áóäåò ïå÷àòàòüñÿ òàì, ãäå âû çàäàëè êîìàíäó |\caption|.) +Íî çàäàíèå +\begin{quote} + |position=bottom|\quad èëè\quad |position=below| +\end{quote} +% it's assumed that the caption is standing at the \emph{bottom} of the +% environment and therefore the space is placed above the caption. +% And finally with +îçíà÷àåò, ÷òî ïîäïèñü ñòîèò \emph{ñíèçó} ñîäåðæèìîãî +îêðóæåíèÿ è~ñëåäîâàòåëüíî îòáèâêà ñòàâèòñÿ ñâåðõó ïîäïèñè. +È~íàêîíåö, çàäàâ +\begin{quote} +% |position=auto|\quad {\small(which is the default setting)} + |position=auto|\quad {\small(÷òî ÿâëÿåòñÿ çíà÷åíèåì ïî óìîë÷àíèþ)} +\end{quote} +% \thispackage\ tries its best to determine the actual position of +% the caption on its own. Please note that while this is successfully in +% most cases, it could give wrong results under rare circumstances. +\thispackage\ ïîñòàðàåòñÿ ñàìîñòîÿòåëüíî îïðåäåëèòü ðåàëüíîå ïîëîæåíèå +ïîäïèñè. Îáðàòèòå âíèìàíèå, ÷òî, õîòÿ ýòî è~äàñò âåðíûé ðåçóëüòàò â~áîëüøèíñòâå ñëó÷àåâ, +â~íåêîòîðûõ ðåäêèõ ñèòóàöèÿõ ýòî ìîæåò äàòü íåâåðíûé ðåçóëüòàò. + +\medskip + +\pagebreak[3] +\DescribeMacro{figureposition=}%\NEWfeature{v3.0a} +\DescribeMacro{tableposition=}%\NEWfeature{v3.0a} +% The |position| option is especially useful when used together with the +% optional argument of the |\caption|\-|setup| command. +% \See{also \Ref{captionsetup}}\par +% For example +Îïöèÿ |position| îñîáåííî ïîëåçíà, êîãäà èñïîëüçóåòñÿ â~íàñòðîéêàõ +ñ~îïöèåé â~êîìàíäå |\captionsetup|. +\See{\Ref{captionsetup}}\par +Íàïðèìåð\label{TeXr:captop:a} +\begin{quote} + |\captionsetup[table]{position=above}| +\end{quote} +% causes all captions within tables to be treated as captions \emph{above} +% the table (regarding spacing around it). +% Because this is a very common setting, \thispackage\ offers +% the abbreviating options |figure|\-|position=|\x\meta{pos} and +% |table|\-|position=|\x\meta{pos}, e.g. +îïðåäåëÿåò, ÷òî âñå òàáëè÷íûå çàãîëîâêè ïîìåùåíû \emph{íàä} ñîäåðæèìûì +òàáëèöû (ñ~ñîîòâåòñòâóþùèìè îòáèâêàìè). +Ïîñêîëüêó ýòî äîñòàòî÷íî ÷àñòî èñïîëüçóåìûå íàñòðîéêè, \thispackage\ ïðåäëàãàåò +êëþ÷è-àááðåâèàòóðû |figure|\-|position=|\allowbreak\meta{pos} +è~|table|\-|position=|\allowbreak\meta{pos}, +íàïðèìåð +\begin{quote} + |\usepackage[|\ldots|,tableposition=top]{caption}| +\end{quote} +% is equivalent to +ýêâèâàëåíòíî ñëåäóþùåìó +\begin{quote} + |\usepackage[|\ldots|]{caption}|\\ + |\captionsetup[table]{position=top}| +\end{quote} + +\medskip + +\INFO +% Please note that the options |skip=|, |position=|, |figure|\-|position=|, +% and |table|\-|position=| do not always have an effect. +% Since it's a matter of the document class to supply the environments +% |figure| and |table|, it could use its very own spacing, and could +% decide for itself if the caption will be typeset as ``top'' or ``bottom'' +% caption. + Îáðàòèòå âíèìàíèå, ÷òî êëþ÷è |skip=|, |position=|, + |figure|\-|position=| è~|table|\-|position=| íå âñåãäà äàäóò ýôôåêò. + Ïîñêîëüêó îïðåäåëåíèå îêðóæåíèé |figure| è~|table| äàþò êëàññû äîêóìåíòà, + òî îíè è~îïðåäåëÿþò, áóäåò ëè ïîäïèñü ïîìåùåíà ñâåðõó èëè ñíèçó. +% For example the \KOMAScript\ document classes support the |skip=| +% setting, but will always typeset |figure| captions as ``bottom'' captions, +% and |table| captions are dependent on the global option +% |table|\-|captions|\-|above| resp.\ |table|\-|captions|\-|below|. +% \See{\Ref{KOMA}} + Íàïðèìåð, êëàññû äîêóìåíòîâ \KOMAScript\ ïîääåðæèâàþò íàñòðîéêó |skip=|, + íî îíà âñåãäà ïå÷àòàåò ïîäïèñè ê~ðèñóíêàì (|figure|) ñíèçó, + à~ðàçìåùåíèå òàáëè÷íûõ çàãîëîâêîâ (|table|) çàâèñèò îò ãëîáàëüíîé îïöèè + |table|\-|captions|\-|above| è, ñîîòâåòñòâåííî, |table|\-|captions|\-|below|. + \See{\Ref{KOMA}} + +% Furthermore some packages control the behavior of the spacing above and +% below the caption for themself, e.g.~the \package{float}, the +% \package{floatrow}, and the \package{supertabular} package. + Áîëåå òîãî íåêîòîðûå ïàêåòû ñàìè êîíòðîëèðóþò îòáèâêè ñâåðõó è~ñíèçó ïîäïèñè, + íàïðèìåð, ïàêåòû \package{float}, + \package{floatrow}, è~\package{supertabular}. + +\bigskip + +\begin{Expert*} +% Internally the skip between caption and contents is represented by +% |\above|\-|caption|\-|skip| (which is always set above the caption in +% \LaTeX{}s implementation). +% But there is a second value |\below|\-|caption|\-|skip| (usually set to +% |0pt| by default) which is set below the caption in \LaTeX{}s implementation, +% but on the other side than |\above|\-|caption|\-|skip| by this package. +% So technically speaking, this package swaps the meaning of these two skips +% when |position=|\x|top| is set. +% Please note that there are several packages around which do the same trick +% (like the \package{ftcap}, the \package{nonfloat}, and the \package{topcap} +% package), so the usage of the \package{caption} option |position=| is not +% supported if one of these packages will be used, too. +Ñîáñòâåííî ãîâîðÿ, îòáèâêà ìåæäó ïîäïèñüþ è~ñîäåðæèìûì ôëîòà îïðåäåëÿåòñÿ çíà÷åíèåì +|\above|\-|caption|\-|skip| (êîòîðàÿ â~ñòàíäàðòíîì +\LaTeX'å âñåãäà çàäà¸òñÿ ñâåðõó ïîäïèñè). +Íî ñóùåñòâóåò è~âòîðàÿ êîìàíäà îòáèâêè |\below|\-|caption|\-|skip| (îáû÷íî +ðàâíàÿ |0pt|) êîòîðàÿ â~ñòàíäàðòíîì \LaTeX'å ïîìåùàåòñÿ ñíèçó ïîäïèñè, +èëè ñ~ïðîòèâîïîëîæíîé ñòîðîíû îò |\above|\-|caption|\-|skip|, â~äàííîì ïàêåòå. +Èíà÷å ãîâîðÿ, äàííûé ïàêåò ïåðåêëþ÷àåò çíà÷åíèÿ ýòèõ îòáèâîê ïðè çàäàíèè îïöèè + |position=|\x|top|. +Îáðàòèòå âíèìàíèå, ÷òî ñóùåñòâóåò íåñêîëüêî ïàêåòîâ, êîòîðûå äåëàþò òîò æå òðþê +(ýòî ïàêåòû \package{ftcap}, \package{nonfloat} è~\package{topcap}); +ïîýòîìó, â~ñëó÷àå èñïîëüçîâàíèÿ îäíîãî èç ýòèõ ïàêåòîâ, èñïîëüçîâàíèå êëþ÷à +|position=| ïàêåòà \package{caption} íå ïîääåðæèâàåòñÿ. +\end{Expert*} + +% --------------------------------------------------------------------------- % + +% \subsection{Lists} +\subsection{Ñïèñêè ôëîòîâ} +\label{lists} + +\DescribeMacro{list=}\label{TeXr:nolistentry:II}\NEWfeature{v3.1}% +% The |\caption| command usually places an entry in the List of Figures +% resp.~List of Tables. You can either suppress that individually by giving an +% empty optional argument to |\caption| {\small(see \Ref{caption})}, or +% programmatically by saying +Êîìàíäà |\caption| îáû÷íî ïîìåùàåò òåêñò â~Ñïèñîê ðèñóíêîâ èëè Ñïèñîê òàáëèö. +Âû ìîæåòå çàïðåòèòü ýòî, çàäàâ ïóñòîé äîïîëíèòåëüíûé àðãóìåíò â~êîìàíäå +|\caption| {\small(ñì.~\Ref{caption})}, èëè çàäàòü îáùóþ óñòàíîâêó, çàïèñàâ +\begin{quote} +% |list=no|\quad(or any other boolean value instead of |no|)\quad.~\footnote{% +% Please note that the \package{subfig} package\cite{subfig} is not supporting +% this option, it uses the counters \texttt{lofdepth} \& \texttt{lotdepth} for +% this purpose instead.} + |list=no|\quad(èëè äðóãîå çíà÷åíèå áóëåâà ïàðàìåòðà âìåñòî |no|)\quad.~\footnote{% + Îáðàòèòå âíèìàíèå, ÷òî ïàêåò \package{subfig} package\cite{subfig} íå ïîääåðæèâàåò ýòó îïöèþ, + îí èñïîëüçóåò äëÿ ýòîé öåëè ñ÷¸ò÷èêè \texttt{lofdepth} \& \texttt{lotdepth}.} +\end{quote} + +\pagebreak[3] +\DescribeMacro{listformat=}\NEWfeature{v3.1}% +% With the option +Ñ~ïîìîùüþ êëþ÷à +\nopagebreak[3] +\begin{quote} + |listformat=|\meta{list format name} +\end{quote} +\nopagebreak[3] +% you can specify how the |figure| or |table| number will be typeset within +% the List of Figures resp.~List of Tables. +% There are five standard caption list formats: +âû ìîæåòå îïðåäåëèòü êàê íîìåð ðèñóíêà (|figure|) èëè òàáëèöû (|table|) áóäóò íàïå÷àòàíû +â~Ñïèñêå ðèñóíêîâ èëè Ñïèñêå òàáëèö. +Ñóùåñòâóþò ïÿòü ñòàíäàðòíûõ ôîðìàòîâ âûâîäà ïîäïèñåé â~Ñïèñêàõ: + +\begin{Options}{\OptionLabel} + \item[empty] +% No number will be typeset. + Íîìåð íå ïå÷àòàåòñÿ. + + \item[simple] +% The number will be typeset with label prefix. + Íîìåð ïå÷àòàåòñÿ ñ~ïðåôèêñîì ìåòêè. + + \item[parens] +% The number will be typeset in parentheses, with label prefix. + Íîìåð ïå÷àòàåòñÿ â~ñêîáêàõ ñ~ïðåôèêñîì ìåòêè. + + \item[subsimple] +% Same as |simple|, but without label prefix. (default) + Òî æå, ÷òî |simple|, íî áåç ïðåôèêñà. (çàäàíî ïî óìîë÷àíèþ) + + \item[subparens] +% Same as |parens|, but without label prefix. + Òî æå, ÷òî |parens|, íî áåç ïðåôèêñà. + + \item[\UserDefined] +% Own list formats can be defined using |\Declare|\-|Caption|\-|List|\-|Format|. +% \SeeUserDefined + Ñîáñòâåííûå ôîðìàòû ìåòêè â~Ñïèñêàõ ìîãóò áûòü îïðåäåëåíû ñ~èñïîëüçîâàíèåì êîìàíäû |\Declare|\-|Caption|\-|List|\-|Format|. + \SeeUserDefined +\end{Options} + +% The prefix ($=$|\p@figure| resp.~|\p@table|), which runs ahead of the +% number ($=$|\the|\-|figure| resp.~|\the|\-|table|) in lists (e.g.~List of +% Figure/Table) and references, is usually empty, +% so the list formats |simple| and |subsimple| gives equal results; +% same with |parens| and |subparens|. +% But this can be different for sub-figures or sub-tables listed in the List of +% Figures resp.~List of Tables, or when the label prefix is redefined for a +% different purpose.\footnote{% +% Sub-figures and sub-tables can be typeset using the \package{subcaption} +% or \package{subfig} package.} +Ïðåôèêñû ìåòêè ($=$|\p@figure| èëè~|\p@table|), êîòîðûå ïîìåùàþòñÿ îáû÷íî +ïåðåä íîìåðàìè ($=$|\the|\-|figure| èëè~|\the|\-|table| ñîîòâåòñòâåííî) +â~Ñïèñêàõ (ðèñóíêîâ èëè òàáëèö) îáû÷íî ïóñòû, +ïîýòîìó ôîðìàòû |simple| è~|subsimple| äàäóò îäèíàêîâûé ðåçóëüòàò, +òî æå ñàìîå ïðîèçîéä¸ò ñ~|parens| +è~|subparens|. +Íî ýòî ìîæåò äàâàòü îòëè÷íûå ðåçóëüòàòû äëÿ ïîäðèñóíêîâ èëè ïîäòàáëèö +ïîìåù¸ííûõ â~Ñïèñêå ðèñóíêîâ èëè Ñïèñêå òàáëèö, èëè êîãäà ïðåôèêñ ìåòêè ïåðåîïðåäåë¸í +äëÿ äðóãèõ öåëåé.\footnote{% + Ïîäïèñè äëÿ ÷àñòåé ðèñóíêîâ è~òàáëèö ìîãóò áûòü ñîçäàíû + ñ~ïîìîùüþ ïàêåòîâ \package{subcaption} + èëè \package{subfig}.} + +% --------------------------------------------------------------------------- % + +% \subsection{Names \& Numbering} +\subsection{Íàèìåíîâàíèÿ è~íóìåðàöèÿ} +\label{names}\label{numbering} + +\DescribeMacro{figurename=} +\DescribeMacro{tablename=}\NEWfeature{v3.0l}% +% You can change the name of the figures and tables with the options +Âû ìîæåòå èçìåíèòü íàçâàíèå ðèñóíêà è~òàáëèöû ñ~ïîìîùüþ êëþ÷åé +\begin{quote}\begin{tabular}{@{}r@{}l@{\quad}l@{}} + |figurename=| & \meta{name} & è\\ + |tablename=| & \meta{name} & .\\ +\end{tabular}\end{quote} +% The document class usually sets them to ``Figure'' and ``Table'', but for +% example with +Êëàññ äîêóìåíòà îïðåäåëÿåò èõ îáû÷íî êàê «Figure» è~«Table», íî åñëè +âû çàäàäèòå, íàïðèìåð +\begin{quote} + |figurename=Fig.| +\end{quote} +% you can change the figure name to ``Fig''. +âû èçìåíèòå èìÿ ðèñóíêà íà «Fig». + +\smallskip\INFO +% If you use the \package{babel} package, please load \thispackage\ \emph{after} +% the \package{babel} package. +Åñëè âû ïîëüçóåòåñü ïàêåòîì \package{babel}, çàãðóæàéòå \thispackage\ \emph{ïîñëå} +ïàêåòà \package{babel}. + +\medskip + +\pagebreak[3] +\DescribeMacro{name=}\NEWfeature{v3.1f}% +% In contrast to the options |figure|\-|name| and |table|\-|name| the option +Â~îòëè÷èå îò îïöèé |figure|\-|name=| è~|table|\-|name=| îïöèÿ +\emph{äàííîãî} îêðóæåíèÿ ñ~ïîìîùüþ êëþ÷à +\begin{quote} + |name=|\meta{name}\quad. +\end{quote} +% changes the name of the \emph{current} environment. +% This could be useful in conjunction with the optional argument of +% |\caption|\-|setup|, e.g. +èçìåíÿåò èìÿ òåêóùåé ìåòêè òåêóùåãî îêðóæåíèÿ. +Ýòî ìîæåò áûòü ïîëåçíûì ïðè èñïîëüçîâàíèè äîïîëíèòåëüíîãî àðãóìåíòà â~êîìàíäå +|\caption|\-|setup|, íàïðèìåð çàäàíèå +\begin{quote} + |\captionsetup[wrapfigure]{name=Fig.}| +\end{quote} +% changes the name to ``Fig.'' for all |wrap|\-|figure|s (while all the other +% figure captions will still have ``Figure'' as name). +èçìåíÿåò èìÿ ðèñóíêà íà «Fig.» äëÿ âñåõ îêðóæåíèé |wrap|\-|figure| (â~òî âðåìÿ êàê ïîäïèñè +ó~äðóãèõ îêðóæåíèé ðèñóíêîâ îñòàþòñÿ «Figure»). + +\medskip + +\pagebreak[3]% +\DescribeMacro{listfigurename=} +\DescribeMacro{listtablename=}\NEWfeature{v3.1g}% +% Analogous to the options |figure|\-|name| and |table|\-|name| you can change +% the title of the lists here. So for example +Àíàëîãè÷íî îïöèÿì |figure|\-|name| è~|table|\-|name| âû ìîæåòå èçìåíèòü +çàãîëîâîê äëÿ ñïèñêîâ ôëîòîâ. Òàê íàïðèìåð +\begin{quote} + |listfigurename=List of Images| +\end{quote} +% changes the title ``List of Figures'' to ``List of images''. +Èçìåíèò çàãîëîâîê «List of Figures» íà «List of Images». + +[Èëè, åñëè äëÿ ðóññêîé ëèòåðàòóðû âû çàäàäèòå: +\begin{quote} + |listfigurename=\CYRS\cyrp\cyri\cyrs\cyro\cyrk\ |\\ |\cyri\cyrl\cyrl\cyryu\cyrs\cyrt\cyrr\cyra\cyrc\cyri\cyrishrt| +\end{quote} +èëè +\begin{quote}\def\ttdefault{cmtt} + |listfigurename=Ñïèñîê èëëþñòðàöèé| +\end{quote} +ïðåâðàòèò çàãîëîâîê â~«Ñïèñîê èëëþñòðàöèé».] + +\bigskip + +\pagebreak[3] +\DescribeMacro{figurewithin=} +\DescribeMacro{tablewithin=}\NEWfeature{v3.1f}% +% If a document class providing |\chapter| is used (e.g.~\class{report} or +% \class{book}), usually the |figure| and |table| caption counters +% are dependent on the |chapter| counter. Otherwise usually the |figure| and +% |table| counters are continuous throughout the document. +Åñëè êëàññ äîêóìåíòà çàäà¸ò ãëàâû, è~èñïîëüçóåòñÿ êîìàíäà |\chapter| +(íàïðèìåð \package{report} èëè +\package{book}), òî íóìåðàöèÿ ñ÷¸ò÷èêîâ ïîäïèñåé |figure| è~|table| +ïîä÷èíåíà ñ÷¸ò÷èêó ãëàâû |chapter|. Â~ïðîòèâíîì ñëó÷àå íóìåðàöèÿ |figure| +è~|table| ïðîäîëæàåòñÿ ïî âñåìó äîêóìåíòó. + +% This can be changed with the options +Ýòî ìîæåò áûòü èçìåíåíî ñ~ïîìîùüþ îïöèè +\begin{quote}\begin{tabular}{r@{}l} + |figurewithin=| & \texttt{chapter} \emph{èëè} \texttt{section} \emph{èëè} \texttt{none}\quad è\\ + |tablewithin=| & \texttt{chapter} \emph{èëè} \texttt{section} \emph{èëè} \texttt{none}\quad .\\ +\end{tabular}\end{quote} +% If ``|none|'' is given as value, the numbering of figures resp. tables will +% be continuous throughout the document. +% Otherwise the numbering will be dependent on the given counter, +% e.g.~|figure|\-|within=|\x|section| gives figures a section-dependent +% numbering scheme. +Åñëè çàäàíà îïöèÿ «|none|», íóìåðàöèÿ ðèñóíêîâ è~òàáëèö áóäåò ñêâîçíîé âî +âñ¸ì äîêóìåíòå. +Â~ïðîòèâíîì ñëó÷àå íóìåðàöèÿ áóäåò ïîä÷èíåíà çàäàííîìó ñ÷¸ò÷èêó, +íàïðèìåð, |figurewithin=|\x|section| ñîçäàñò íóìåðàöèþ ðèñóíêîâ, +ïîä÷èí¸ííóþ çàãîëîâêàì ðàçäåëîâ +ïåðâîãî óðîâíÿ. + +\bigskip + +\begin{Expert*} +% The name and numbering is internally done by the commands +% |\|\meta{type}|name| \& |\the|\meta{type}, e.g.~|\figure|\-|name| \& +% |\the|\-|figure| for figures. +% While usually using the above options are sufficient, sometimes a direct +% re-definition of these two macros is necessary. For example: +Íàçâàíèå è~íóìåðàöèÿ îïðåäåëÿþòñÿ êîìàíäàìè |\|\meta{type}|name| +è~|\the|\meta{type}, íàïðèìåð |\figurename| è~|\thefigure| äëÿ ðèñóíêîâ. +Õîòÿ çàäàíèå êëþ÷åé, îïèñûâàåìûõ âûøå äîñòàòî÷íî, èíîãäà íåîáõîäèìî +ïðÿìîå ïåðåîïðåäåëåíèå ýòèõ äâóõ êîìàíä. Íàïðèìåð: +\begin{quote} + |\captionsetup{figurewithin=section}|\\ + |\renewcommand\thefigure{\arabic{section}\alph{figure}}| +\end{quote} +% gives you a section-dependent numbering scheme \meta{section}\meta{figure} +% with a numerical section counter and a alphanumerical figure counter, +% e.g.~``|Figure 2b|''. +äàñò âàì ïîä÷èí¸ííóþ ðàçäåëó ñõåìó íóìåðàöèè \meta{section}\meta{figure} +ãäå íîìåð ðàçäåëà çàäàí â~âèäå àðàáñêîé öèôðû, à~íîìåð ðèñóíêà \cdash--- â~âèäå íóìåðàöèè áóêâàìè, +íàïðèìåð, «|Figure 2b|». +\end{Expert*} + +% --------------------------------------------------------------------------- % + +% \subsection{Types} +\subsection{Òèïû (ôëîòîâ)} +\label{types} + +\DescribeMacro{type=}\NEWfeature{v3.0d}% +% The |\caption| command can typeset captions for different types, +% e.g.~|figure| and |table|. If you try to use the |\caption| command outside +% these environments you will get an error message, because it does not know what +% kind of caption do you want to have here. But in such situations you can set +% the caption type manually with +Êîìàíäà |\caption| ìîæåò ñîçäàòü ïîäïèñè ðàçëè÷íûõ òèïîâ, +íàïðèìåð, |figure| è~|table|. Åñëè âû ïîïðîáóåòå çàäàòü êîìàíäó |\caption| çà ïðåäåëàìè +ýòèõ îêðóæåíèé, òî ïîëó÷èòå ñîîáùåíèå îá îøèáêå, ïîñêîëüêó ýòà êîìàíäà íå çíàåò +êàêîé òèï ïîäïèñè âû õîòèòå çäåñü ñîçäàòü. Íî â~ïîäîáíûõ ñèòóàöèÿõ +âû ìîæåòå çàäàòü òèï ïîäïèñè âðó÷íóþ, èñïîëüçóÿ +\begin{quote} + |type=|\meta{float type} +\end{quote} +% prior to the usage of the |\caption| command (and other commands like +% |\Continued|\-|Float|, or |\sub|\-|caption|\-|box| offered by the +% \package{subcaption} package, or |\sub|\-|float| offered by the +% \package{subfig} package\cite{subfig}), +% for example within an non-floating environment like |minipage|: +ïåðåä èñïîëüçîâàíèåì êîìàíäû |\caption| (è~äðóãèõ êîìàíä òèïà +|\Continued|\-|Float|, èëè |\sub|\-|caption|\-|box| ïðåäëàãàåìîé ïàêåòîì + \package{subcaption} èëè |\subfloat| ïðåäëàãàåìîé ïàêåòîì \package{subfig}\cite{subfig}), +íàïðèìåð âíóòðè íåïëàâàþùåãî îêðóæåíèÿ âðîäå |minipage|: +\begin{quote} + |\noindent\begin{minipage}{\textwidth}|\\ + | \captionsetup{type=figure}|\\ + | \subfloat{|\ldots|}|\\ + | |\ldots\\ + | \caption{|\ldots|}|\\ + |\end{minipage}| +\end{quote} + +\begin{Expert} +% There is also a starred variant of this option, |type*=|\meta{float type}, +% which behaves different than |type=|\meta{float type} if the +% \package{hyperref} package\cite{hyperref} is loaded: While |type=| sets an +% hyperlink anchor (if |hypcap=|\x|true| is set), |type*=| does not. +% (See also \Ref{hyperref}\,) +Ñóùåñòâóåò çâ¸çäíûé âàðèàíò ýòîãî êëþ÷à, |type*=|\x\meta{float type}, +êîòîðûé îòëè÷àåòñÿ îò |type=|\x\meta{float type} åñëè çàãðóæåí ïàêåò +\package{hyperref}\cite{hyperref}: â~òî âðåìÿ êàê êëþ÷ |type=| çàäà¸ò +ìåòêó ãèïåðññûëêè (hyperlink anchor, åñëè çàäàí êëþ÷ |hypcap=|\x|true|), êëþ÷ |type*=| ýòîãî íå äåëàåò. +(Ñì.~òàêæå \Ref{hyperref}) +\end{Expert} +\begin{Expert} +% \emph{\DefaultNoteText:} Please don't re-define the internal macro |\@captype| +% for yourself, like suggested by some documentations, always use +% |\caption|\-|setup{type=|\x\ldots|}| instead. +\emph{\DefaultNoteText}: íå ïåðåîïðåäåëÿéòå, ïîæàëóéñòà, âíóòðåííþþ ìàêðîêîìàíäó |\@captype|, +êàê ïðåäëàãàåòñÿ íåêîòîðûìè ðóêîâîäñòâàìè èëè äîêóìåíòàìè ïàêåòîâ, äëÿ +ýòîãî èñïîëüçóéòå âñåãäà +|\caption|\-|setup{type=|\x\ldots|}|. +\end{Expert} + +\medskip + +% Own float types can be defined with |\Declare|\-|Caption|\-|Type| offered by +% this package, |\new|\-|float| offered by the \package{float} +% package\cite{float}, or |\Declare|\-|New|\-|Float|\-|Type| offered by the +% \package{floatrow} package\cite{float}. +Ñîáñòâåííûå òèïû ôëîòîâ ìîãóò áûòü îïðåäåëåíû ñ~ïîìîùüþ êîìàíäû |\Declare|\-|Caption|\-|Type| +ïðåäëàãàåìîé ýòèì ïàêåòîì, êîìàíäîé |\new|\-|float|, ïðåäëàãàåìîé ïàêåòîì \package{float}\cite{float}, +èëè |\Declare|\-|New|\-|Float|\-|Type| ïðåäëàãàåìîé ïàêåòîì +\package{floatrow}\cite{floatrow}. + +\medskip + +\INFO % \NEWdescription{v3.1} +% Please note that you should use the option |type=| only +% \emph{inside} boxes or environments (like |\par|\-|box| or |mini|\-|page|), +% at best one where no page break could happen between contents and caption. +% Furthermore some visual side-effects (e.g.~mixed-up figure and table settings +% regarding captions) could occur without using a box or environment, +% therefore a warning message will be issued if you try to do so.\footnote{% +% You only get this warning message if you use \eTeX\ as underlying \TeX\ engine.} +Îáðàòèòå âíèìàíèå, ÷òî ëó÷øå èñïîëüçîâàòü êëþ÷ |type=| òîëüêî +\emph{âíóòðè} áîêñîâ èëè òàêèõ îêðóæåíèé (òèïà |\parbox| èëè |minipage|), ò.\,å. +ãäå íå ìîæåò ïðîèçîéòè ïåðåõîäà íà ñëåäóþùóþ ñòðàíèöó ìåæäó ïîäïèñüþ è~ñîäåðæèìûì ôëîòà. +Ïîìèìî ýòîãî âîçìîæíû íåêîòîðûå ïîáî÷íûå ýôôåêòû (íàïðèìåð, ñìåøåíèå íàñòðîåê äëÿ ïîäïèñåé +ðèñóíêîâ è~òàáëèö) åñëè íå èñïîëüçóåòñÿ áîêñ èëè îêðóæåíèå, êðîìå ýòîãî +âû ïîëó÷èòå ïðåäóïðåæäåíèå, åñëè ïîïðîáóåòå ýòî ñäåëàòü.\footnote{% +Âû ïîëó÷èòå ýòî ïðåäóïðåæäåíèå òîëüêî â~ñëó÷àå, êîãäà â~êà÷åñòâå êîìïèëÿòîðà \TeX'à èñïîëüçóåòñÿ +\eTeX.} + + +% --------------------------------------------------------------------------- % + +\clearpage +% \section{Commands} +\section{Êîìàíäû} + +% \subsection{Typesetting captions} +\subsection{Ïå÷àòü ïîäðèñóíî÷íûõ ïîäïèñåé} +\label{caption} +\label{captionlistentry} + +\DescribeMacro{\caption} +% The command +Êîìàíäà +\begin{quote} + |\caption|\oarg{list entry}\marg{heading} +\end{quote} +% typesets the caption inside a floating environment like |figure| or |table|. +% Well, you already know this, but \thispackage\ offers an extension: +% If you leave the argument \meta{list entry} empty, no entry in the list of +% figures or tables will be made. For example: +ïå÷àòàåò ïîäïèñü âíóòðè îêðóæåíèÿ ôëîòà, òèïà |figure| èëè |table|. +Òàê, ýòî íàì èçâåñòíî, íî íîâîñòü ñîñòîèò â~òîì, ÷òî åñëè +çàäàòü àðãóìåíò \meta{list entry} ïóñòûì, ïîäïèñü â~ñïèñêå ðèñóíêîâ èëè +òàáëèö íå ïîÿâèòñÿ; íàïðèìåð, +\begin{quote} +% |\caption[]{A figure without list entry.}| + |\caption[]{Ïîäïèñü áåç çàïèñè â~ñïèñêå ðèñóíêîâ.}| + \label{TeXr:nolistentry:I}% +\end{quote} + +\begin{Expert} +% Please remember that the \meta{heading} is a so-called \emph{moving} argument, +% if no \meta{list entry} has been given. But if a \meta{list entry} is given, +% this argument is moving instead. +% ``\emph{Moving} argument'' means that the argument will be written to the +% list-of file, make it appearing in the ``List of Figures'' resp. +% ``List of Tables'', too. +% \emph{Moving} arguments are not allowed to contain \emph{fragile} commands, +% everything must be \emph{robust}, otherwise the argument could get +% \emph{broken}, resulting in strange errors at the next \LaTeX\ run. +% Some \emph{fragile} commands could be \emph{protected} by a leading |\protect|, +% own definitions could get defined with |\Declare|\-|Robust|\-|Command| instead of +% |\new|\-|command| to make them \emph{robust}. +Íàïîìíèì, ÷òî àðãóìåíò \meta{heading} áóäåò \emph{ïîäâèæíûì}, +åñëè íå çàäàí äîïîëíèòåëüíûé àðãóìåíò \meta{list entry}. Åñëè æå çàäàí \meta{list entry}, +òî ñòàíîâèòñÿ ïîäâèæíûì ýòîò äîïîëíèòåëüíûé àðãóìåíò. Òåðìèí «\emph{ïîäâèæíûé} àðãóìåíò» +â~äàííîì ñëó÷àå îçíà÷àåò, ÷òî îí çàïèñûâàåòñÿ â~ôàéëå Ñïèñêà, ÷òîáû +çàòåì åãî âûâåñòè â~ðàçäåëàõ «Ñïèñîê ðèñóíêîâ» èëè «Ñïèñîê òàáëèö». +Â~\emph{ïîäâèæíûå} àðãóìåíòû íåëüçÿ ïîìåùàòü \emph{õðóïêèå} êîìàíäû, +âñå ýëåìåíòû äîëæíû áûòü \emph{íåðàçáèâàåìûìè} (íåõðóïêèìè), èíà÷å àðãóìåíò áóäåò +«\emph{ðàçáèò}» (ðàñêðûò), ñîçäàâàÿ ñòðàííûå îøèáêè â~ñëåäóþùèõ +îáðàáîòêàõ \LaTeX'îì. Íåêîòîðûå \emph{õðóïêèå} +êîìàíäû ìîãóò áûòü \emph{çàùèùåíû} çàäàíèåì ïåðåä íèìè êîìàíäû |\protect|. +×òîáû ñîáñòâåííûå +îïðåäåëåíèÿ áûëè \emph{íåðàçáèâàåìûìè}, èõ íóæíî îïðåäåëÿòü ÷åðåç |\DeclareRobustCommand|, à~íå +÷åðåç |\newcommand|. + +% An example: |\caption{${}^{137}_{\phantom{1}55}$Cs}| will cause errors since +% |\phantom| is \emph{fragile}. +% So we have either have to use the optional argument \meta{list entry} +% (e.g.~|\caption[${}^|\x|{137}_|\x|{55}$|\x|Cs]|\x|{${}^|\x|{137}_|\x|{\phantom{1}55}$|\x|Cs}|) +% or add |\protect| to prevent the |\phantom| command from getting \emph{broken}: +% |\caption{${}^|\x|{137}_|\x|{|\textcolor{blue}{\cs{protect}}|\phantom{1}55}$|\x|Cs}|. +Ïðèìåð: çàïèñü |\caption{${}^{137}_{\phantom{1}55}$Cs}| âûäàñò ñîîáùåíèÿ îá îøèáêàõ, +ïîñêîëüêó êîìàíäà |\phantom| \emph{õðóïêàÿ}. Ïîýòîìó íóæíî ëèáî çàäàòü äîïîëíèòåëüíûé àðãóìåíò +\meta{list entry} +(íàïðèìåð, +|\caption[${}^|\x|{137}_|\x|{55}$|\x|Cs]|\x|{${}^|\x|{137}_|\x|{\phantom{1}55}$|\x|Cs}|) +èëè äîáàâèòü êîìàíäó |\protect|, äëÿ çàùèòû êîìàíäû |\phantom| îò òîãî, ÷òîáû îíà +\emph{ðàçáèëàñü}: +|\caption{${}^|\x|{137}_|\x|{|\textcolor{blue}{\cs{protect}}|\phantom{1}55}$|\x|Cs}|. + +% But sometimes even this is not sufficient. The reason behind is the so-called +% single-line-check: It puts the \meta{heading} into a horizontal box to determine +% the width of the caption, and this could cause error messages, too. +% An example: +% |\caption{A| |scheme.| |\[V_{C}| |\sim| |\left| |\{| |\begin{array}{cc}| +% |E_{g}| |&| |\textrm{p-n}| |\\| |e\phi_{B}| |&| |\textrm{M-S}| |\end{array}| +% |\right.| |\]}|. +% Using |\caption[A| |scheme]{|\ldots|}| is not sufficient here, it's still +% leading to errors. (``\texttt{Missing \$ inserted.}'') +% So we have to put a |\caption|\-|setup{single|\-|line|\-|check=|\x|off}| +% just in front of the |\caption| command additionally. +Íî èíîãäà è~ýòî íå ïîìîãàåò. Ïðè÷èíà êðîåòñÿ â~òàê íàçûâàåìîé ïðîâåðêå +íà îäíîñòðî÷íóþ ïîäïèñü +(single-line-check): ìàêðîêîìàíäà ïîìåùàåò ñîäåðæèìîå àðãóìåíòà \meta{heading} +â~ãîðèçîíòàëüíûé áîêñ, +÷òîáû îïðåäåëèòü øèðèíó ïîäïèñè, è~ýòî òàêæå ìîæåò ñîçäàòü ñîîáùåíèÿ îá îøèáêàõ. +Ïðèìåð: +|\caption{A| |scheme.| |\[V_{C}| |\sim| |\left| |\{| |\begin{array}{cc}| +|E_{g}| |&| |\textrm{p-n}| |\\| |e\phi_{B}| |&| |\textrm{M-S}| |\end{array}| +|\right.| |\]}|. +Èñïîëüçîâàíèå |\caption[A| |scheme]{|\ldots|}| çäåñü íå ãîäèòñÿ, +ýòî òîæå ïðèâåä¸ò ê~îøèáêàì. +(«\texttt{Missing \$ inserted.}») Ïîýòîìó ìû âûíóæäåíû äîïîëíèòåëüíî çàäàòü +|\captionsetup{singlelinecheck=off}| ïåðåä êîìàíäîé |\caption|. + +% For more information about \emph{moving} arguments and \emph{fragile} \& +% \emph{robust} commands, take a closer look at your \LaTeX\ manual or visit +% \url{http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/teTeX/latex/latex2e-html/fragile.html}. +Áîëåå ïîëíóþ èíôîðìàöèþ î~\emph{ïîäâèæíûõ} àðãóìåíòàõ è~\emph{õðóïêèõ} +è~\emph{íåðàçáèâàåìûõ} êîìàíäàõ, ñìîòðèòå â~âàøåì ðóêîâîäñòâå ïî \LaTeX'ó èëè îáðàòèòåñü ê~% +\url{http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/teTeX/latex/latex2e-html/fragile.html}. +\end{Expert} + +\medskip + +\pagebreak[3] +\DescribeMacro{\caption*}\label{TeXr:starcaption:a}% +% The \package{longtable} package defines the command |\caption*| which +% typesets the caption without label and without entry in the list of tables. +% An example: +Ïàêåò \package{longtable} îïðåäåëÿåò êîìàíäó |\caption*| êîòîðàÿ +ïå÷àòàåò ïîäïèñü áåç ìåòêè è~çàíåñåíèÿ å¸ â~ñïèñîê òàáëèö. +Ïðèìåð: +\begin{quote} + |\begin{longtable}{|\ldots|}|\\ + | \caption*{A table}\\|\\ + | |\ldots\\ + |\end{longtable}| +\end{quote} +% looks like +âûãëÿäèò ñëåäóþùèì îáðàçîì:\nopagebreak +\DeleteShortVerb{\|} +\vskip\intextsep +\begin{minipage}{\linewidth} + \captionsetup{type=table,position=t} + \caption*{A table} + \centering + \begin{tabular}{r|rr} + & x & y \\\hline + a & 1 & 2 \\ + b & 3 & 4 \\ + \end{tabular} +\end{minipage} +\vskip\intextsep +\MakeShortVerb{\|} +% \Thispackage\ offers this feature, too, so you can use this command now within +% every floating environment like |figure| or |table|, like: +\Thispackage\ òîæå ïðåäëàãàåò òàêóþ âîçìîæíîñòü. È~òåïåðü âû ìîæåòå èñïîëüçîâàòü ýòó êîìàíäó +ñ~ëþáûì îêðóæåíèåì ïëàâàþùåãî îáúåêòà, íàïðèìåð |figure| èëè |table|, êàê çäåñü: +\begin{quote} + |\begin{table}|\\ + | \caption*{A table}|\\ +% | \begin{tabular}{|\ldots|}|\\ +% | |\ldots\\ +% | \end{tabular}|\\ + | |\ldots\\ + |\end{table}| +\end{quote} + +\pagebreak[3] +\DescribeMacro{\captionof}\label{TeXr:captionof:a}% +\DescribeMacro{\captionof*} +% Sometimes you want to typeset a caption \emph{outside} a floating environment, +% putting a figure within a non-floating |mini|\-|page| for instance. +% For this purpose \thispackage\ offers the command +Èíîãäà âàì íóæíî ñîçäàòü ïîäïèñü \emph{âíå} îêðóæåíèÿ ôëîòà, +ïîìåñòèâ, ê~ïðèìåðó, ïîäïèñü âíóòðè îêðóæåíèÿ |minipage|. Äëÿ ýòîé öåëè ïàêåò +\thispackage\ ïðåäëàãàåò êîìàíäó +\begin{quote} + |\captionof|\marg{float type}\oarg{list entry}\marg{heading}\quad. +\end{quote} +% Note that the first argument, the \meta{float type}, is mandatory here, because +% the |\captionof| command needs to know which name to put into the caption label +% (e.g. ``Figure'' or ``Table'') and in which list to put the contents entry. +% An example: +Îáðàòèòå âíèìàíèå, ÷òî ïåðâûé àðãóìåíò, \meta{float type}, â~äàííîì ñëó÷àå ÿâëÿåòñÿ +îáÿçàòåëüíûì, ïîñêîëüêó êîìàíäà |\captionof| äîëæíà çíàòü, ê~êàêîìó ïëàâàþùåìó +îáúåêòó ñîçäàòü ïîäïèñü (íàïðèìåð. «Ðèñ.» èëè «Òàáëèöà») è~â~êàêîé ñïèñîê ôëîòîâ ïîìåñòèòü +ïîäïèñü. Ïðèìåð +\begin{quote} +% |\captionof{figure}{A figure}|\\ + |\captionof{table}{A table}| +\end{quote} +% typesets captions like this: +ñîçäà¸ò ïîäïèñè êàê çäåñü: +\begin{Example} +% \begingroup +% \captionof{figure}{A figure} +% \endgroup + \captionsetup{position=top} +% \begingroup + \captionof{table}{A table} +% \endgroup +\end{Example} + +% The star variant |\caption|\-|of*| has the same behavior as the |\caption*| +% command: +% It typesets the caption without label and without entry to the list of figures +% or tables. +«Çâ¸çäíûé» âàðèàíò |\captionof*| äà¸ò òîò æå ðåçóëüòàò, ÷òî è~|\caption*|: +ïå÷àòàåò ïîäïèñü áåç íóìåðàöèîííîãî çàãîëîâêà è~âûâîäà â~Ñïèñîê ðèñóíêîâ èëè +òàáëèö. + +\INFO % \NEWdescription{v3.1} +% Since |\caption|\-|of| uses the option |type| internally, the same +% restrictions as for the |type| option apply here, so you should use both +% |\caption|\-|of| and |\caption|\-|of*| only \emph{inside} boxes or +% environments, too. +Ïîñêîëüêó êîìàíäà |\captionof| èñïîëüçóåò âíóòðè ñåáÿ êëþ÷ |type|, òå æå îãðàíè÷åíèÿ, ÷òî è~äëÿ +êëþ÷à |type=| äåéñòâóþò çäåñü, ïîýòîìó âû ìîæåòå èñïîëüçîâàòü è~|\captionof| +è~|\captionof*| òîëüêî \emph{âíóòðè} áîêñîâ èëè îêðóæåíèé. +\See{\Ref{types}} + +\bigskip + +\pagebreak[3] +\DescribeMacro{\captionlistentry}\NEWfeature{v3.1}% +% Under certain circumstances it could be useful to make a list-of-figure +% (or table) entry on its own. +% This could be achieved with +Â~íåêîòîðûõ ñëó÷àÿõ ìîæåò áûòü ïîëåçíûì ñîçäàíèå òåêñòà äëÿ Ñïèñêà ðèñóíêîâ (èëè òàáëèö) îòäåëüíî. +Ýòî ìîæíî ñäåëàòü ñ~ïîìîùüþ +\begin{quote} + |\captionlistentry|\oarg{float type}\marg{list entry}\quad. +\end{quote} + +% One example: It's quite easy to have a |long|\-|table| with captions above the +% contents and a single list entry which points to the first page of the table: +Îäèí ïðèìåð: î÷åíü ëåãêî ïîëó÷èòü òàáëèöó â~îêðóæåíèè |long|\-|table| +ñ~ïîäïèñÿìè ñâåðõó òàáëèöû +è~îäíèì âõîæäåíèåì â~Ñïèñêå êîòîðîå îòìå÷àåò ïåðâóþ ñòðàíèöó òàáëèöû: +\begin{quote} + |\begin{longtable}{|\ldots|}|\\ + | \caption{|\ldots|}\\|\\ + |\endfirsthead|\\ + | \caption[]{|\ldots|}\\|\\ + |\endhead|\\ + | |\ldots +\end{quote} +% But since the \package{longtable} package does not offer an +% |\end|\-|first|\-|foot| command, you cannot easily have captions \emph{below} +% the table contents and a single list entry which points to the first page of +% the table. +% Here is were the |\caption|\-|list|\-|entry| command could be used: +Íî, ïîñêîëüêó ïàêåò \package{longtable} íå ïðåäëàãàåò êîìàíäû |\endfirstfoot|, +âû íå ìîæåòå èñïîëüçîâàòü ïîäïèñè \emph{ñíèçó} òàáëèöû, äëÿ ñîçäàíèÿ åäèíñòâåííîãî +âõîæäåíèÿ â~Ñïèñîê, êîòîðûé îòìå÷àåò ïåðâóþ ñòðàíèöó òàáëèöû. +Ýòî ñèòóàöèÿ, ãäå êîìàíäà |\captionlistentry| ìîæåò áûòü ïîëåçíà: +\begin{quote} + |\begin{longtable}{|\ldots|}|\\ + | \caption[]{|\ldots|}\\|\\ + |\endfoot|\\ + | \captionlistentry{|\ldots|}|\\ + | |\ldots +\end{quote} +\begin{Annotation*} +% Another example can be found in \Ref{examples}. +Äðóãîé ïðèìåð ìîæíî íàéòè â~\Ref{examples}. +\end{Annotation*} + +\smallskip + +\begin{Expert} +% There is also a starred variant, |\caption|\-|list|\-|entry*|, which does not +% increment the \meta{float type} counter. +% (Note that inside |long|\-|table| environments |\caption|\-|list|\-|entry| +% never increments the |table| counter. See also \Ref{longtable}.) +Òàêæå ñóùåñòâóåò «çâ¸çäíûé» âàðèàíò |\caption|\-|list|\-|entry*|, êîòîðûé +íå óâåëè÷èâàåò çíà÷åíèå ñ÷¸ò÷èêà ôëîòà. +(Îáðàòèòå âíèìàíèå, ÷òî âíóòðè îêðóæåíèÿ |long|\-|table| êîìàíäà |\caption|\-|list|\-|entry| +íèêîãäà íå óâåëè÷èâàåò çíà÷åíèÿ ñ÷¸ò÷èêà òàáëèöû. Ñì.~òàêæå îïèñàíèå \Ref{longtable}.) +\end{Expert} + +\begin{Expert} +% Please note that \meta{list entry} is a \emph{moving} argument, so everything +% it contains must be \emph{robust}. (See also explanation of |\caption|) +Îáðàòèòå òàêæå âíèìàíèå, ÷òî \meta{list entry} ÿâëÿåòñÿ \emph{ïîäâèæíûì} +àðãóìåíòîì, ïîýòîìó âñ¸ åãî +ñîäåðæèìîå äîëæíî áûòü \emph{íåðàçáèâàåìûì}. (Ñì.~òàêæå îïèñàíèå êîìàíäû |\caption|) +\end{Expert} + + +% \subsection{Setting options} +\subsection{Çàäàíèå êëþ÷åé è~îïöèé} +\label{captionsetup} + +\DescribeMacro{\captionsetup} +% We already know the |\caption|\-|setup| command (see \Ref{usage}), +% but this time we get enlighten about its optional argument +% \meta{float type}. +Íàì óæå èçâåñòíà êîìàíäà |\captionsetup| (ñì.~\Ref{usage}), +íî ñåé÷àñ ìû ðàçáåð¸ì çíà÷åíèå äîïîëíèòåëüíîãî àðãóìåíòà, \meta{float type}. + +% Remember, the syntax of this command is +Íàïîìíèì ñèíòàêñèñ ýòîé êîìàíäû +\begin{quote} + |\captionsetup|\oarg{float type}\marg{options}\quad. +\end{quote} + +% If a \meta{float type} gets specified, all the \meta{options} don't +% change anything at this time. Instead they only get marked for a later use, +% when a caption inside of a floating environment of the particular type +% \meta{float type} gets typeset. +% For example +Åñëè \meta{float type} çàäàí, âñå êëþ÷è è~îïöèè, \meta{options} íè÷åãî +íå èçìåíÿò â~ìåñòå çàäàíèÿ. Îíè òîëüêî îïðåäåëåíû äëÿ áóäóùåãî èñïîëüçîâàíèÿ +â~ìîìåíò, êîãäà ïîäïèñü îêàæåòñÿ âíóòðè îêðóæåíèÿ ôëîòà +\meta{float type}. +Íàïðèìåð +\begin{quote} + |\captionsetup[figure]|\marg{options} +\end{quote} +% forces captions within a |figure| environment to use the given \meta{options}. +îïðåäåëÿåò îôîðìëåíèå \meta{options} äëÿ ïîäïèñè âíóòðè îêðóæåíèÿ |figure|. + +% Here comes an example to illustrate this: +Äàëåå èä¸ò ïðèìåð èëëþñòðèðóþùèé ñêàçàííîå: +\begin{quote} + |\captionsetup{font=small}|\\ + |\captionsetup[figure]{labelfont=bf,textfont=it}| +\end{quote} +% gives captions like this: +ñîçäàñò ïîäïèñè âèäà: +\begin{Example} + \captionsetup{font=small} + \captionsetup[figure]{labelfont=bf,textfont=it} + \begingroup + \captionof{figure}{A figure} + \endgroup + \captionsetup{position=top} + \begingroup + \captionof{table}{A table} + \endgroup +\end{Example} +% As you see the command |\caption|\-|setup[figure]{|\ldots|}| only changes +% the look of the |figure| caption labels, not touching the other ones. +Êàê âû âèäèòå óñòàíîâêà |\caption|\-|setup[figure]{labelfont=bf}| èçìåíÿåò +òîëüêî øðèôò íóìåðàöèîííîé ÷àñòè ïîäïèñè, âñ¸ îñòàëüíîå îñòà¸òñÿ. + +% As \meta{float type} you can usually give one of these two only: +% |figure| or |table|. +% But as we will see later some \LaTeX\ packages (like the \package{floatrow}, +% \package{longtable}, and \package{sidecap} package for example) and also +% this package offer additional environments with captions and these two +% commands can also be used with them. +% \See{\Ref{declare} and \Ref{packages}} +Â~êà÷åñòâå \meta{float type} âû îáû÷íî çàäà¸òå òîëüêî äâå îïöèè: +|figure| èëè |table|. +Íî êàê áóäåò âèäíî ïîçäíåå íåêîòîðûå ïàêåòû \LaTeX'à (íàïðèìåð \package{floatrow}, +\package{longtable} è~\package{sidecap}) à~òàêæå äàííûé ïàêåò +ïðåäëàãàþò äîïîëíèòåëüíûå îêðóæåíèÿ ñ~ïîäïèñÿìè è~ýòè äâå êîìàíäû +ìîãóò áûòü ñ~íèìè èñïîëüçîâàíû. +\See{\Ref{declare} è~\Ref{packages}} + +\smallskip + +\pagebreak[3] +\NEWfeature{v3.1} +\begin{Expert} +% There is also a starred variant of |\caption|\-|setup|: +Ñóùåñòâóåò è~çâ¸çäíûé âàðèàíò êîìàíäû |\captionsetup|: +\begin{quote} + |\captionsetup*|\oarg{float type}\marg{options} +\end{quote} +% While the non-starred variant can give you warnings---for example if the +% \meta{options} are actually not used throughout the document +% (e.g.~a |\caption|\-|setup[table]{font=|\x|sf}| without a |table|)---the +% starred variant will not. +% \iffalse +% This can get quite useful when setting generic options which are independent +% of a specific document. +% \fi +Â~òî âðåìÿ êàê íåçâ¸çäíûé âàðèàíò äàñò âàì ïðåäóïðåæäåíèå, åñëè \meta{options} íå +èñïîëüçîâàëèñü â~äîêóìåíòå (íàïðèìåð íàñòðîéêè |\captionsetup[table]{font=sf}| \cdash--- +è~íè îäíîãî îêðóæåíèÿ |table|), çâ¸çäíûé âàðèàíò ýòîãî íå äåëàåò. +\iffalse +Ýòî ìîæåò áûòü î÷åíü ïîëåçíî äëÿ ñîçäàíèÿ íàñòðîåê, íåçàâèñèìûõ îò êîíêðåòíîãî äîêóìåíòà. +\fi +\end{Expert} + +\medskip + +\pagebreak[3] +\DescribeMacro{\clearcaptionsetup} +% If you want to get rid of these parameters marked for an automatic use within +% a particular environment you can use the command +Åñëè âàì âíóòðè äàííîãî îêðóæåíèÿ íóæíî îòìåíèòü ïàðàìåòðû, çàäàííûå äëÿ +òåêóùåãî òèïà ôëîòà, èñïîëüçóéòå êîìàíäó +\begin{quote} + |\clearcaptionsetup|\oarg{option}\marg{float type}\quad. +\end{quote} + +% For example |\clearcaptionsetup{figure}| would clear all the extra handling +% for figures in the example above: +Íàïðèìåð |\clearcaptionsetup{figure}| îòìåíèò äîïîëíèòåëüíûå íàñòðîéêè +èç ïðèìåðà âûøå: +\begin{quote} + |\captionsetup{font=small}|\\ + |\captionsetup[figure]{labelfont=bf,textfont=it}|\\ + \ldots\\ + | \caption{A figure}|\\ + \ldots\\ + |\clearcaptionsetup{figure}|\\ + \ldots\\ + | \caption{A figure}|\\ + \ldots\\ +\end{quote} +\pagebreak[3] +\begin{Example} + \captionsetup{font=small} + \captionsetup[figure]{labelfont=bf,textfont=it} + \begingroup + \captionof{figure}{A figure} + \endgroup + \captionsetup{position=top} + \clearcaptionsetup{figure} + \begingroup + \captionof{figure}{A figure} + \endgroup +\end{Example} + +\pagebreak[3] +\NEWfeature{v3.1} +% If an optional argument \meta{option} is given, only the settings regarding +% this particular \meta{option} are cleared.\footnote{You can only specify +% \emph{one} option here, not a list of options. +% If you want to clean more than one option, you need to use more than one +% \cs{clear}\-\texttt{caption}\-\texttt{setup}.} +% While the example above not only clears the options +% |labelfont=bf,|\x|textfont=it| +% for figures (but all options for figures instead), +% this one would only clear the |labelfont=bf| setting, leaving all other +% settings for figures intact: +Åñëè çàäàí äîïîëíèòåëüíûé àðãóìåíò \meta{option}, îòìåíÿþòñÿ òîëüêî íàñòðîéêè +äàííîé îïöèè \meta{option}.\footnote{Âû ìîæåòå çàäàòü òîëüêî +\emph{îäíó} îïöèþ, à~íå ñïèñîê îïöèé. +Åñëè âàì íóæíî îòìåíèòü íàñòðîéêè äëÿ ðÿäà îïöèé, âàì ïðèä¸òñÿ èñïîëüçîâàòü íåñêîëüêî êîìàíä +\cs{clearcaptionsetup}.} +Â~òî âðåìÿ êàê ïðèìåð âûøå íå òîëüêî îòìåíèë îïöèè êëþ÷åé |labelfont=bf,|\allowbreak +|textfont=it| +äëÿ ðèñóíêîâ (íî è~âñå îïöèè äëÿ ðèñóíêîâ), +ñëåäóþùèé ïðèìåð îòìåíèò òîëüêî íàñòðîéêó |labelfont=bf|, îñòàâèâ âñå îñòàëüíûå +íàñòðîéêè íåòðîíóòûìè: +\begin{quote} + |\captionsetup{font=small}|\\ + |\captionsetup[figure]{labelfont=bf,textfont=it}|\\ + \ldots\\ + | \caption{A figure}|\\ + \ldots\\ + |\clearcaptionsetup[labelfont]{figure}|\\ + \ldots\\ + | \caption{A figure}|\\ + \ldots +\end{quote} +\begin{Example} + \captionsetup{font=small} + \captionsetup[figure]{labelfont=bf,textfont=it} + \begingroup + \captionof{figure}{A figure} + \endgroup + \captionsetup{position=top} + \clearcaptionsetup[labelfont]{figure} + \begingroup + \captionof{figure}{A figure} + \endgroup +\end{Example} +\begin{Expert} +% Analogous to |\caption|\-|setup*| there is also a starred form +% |\clear|\-|caption|\-|setup*| which suppresses warnings if the given +% \meta{option} was not setup for the specified \meta{float type}. +Àíàëîãè÷íî êîìàíäå |\captionsetup*| ñóùåñòâóåò òàêæå çâ¸çäíàÿ ôîðìà +|\clearcaptionsetup*| êîòîðàÿ îòìåíÿåò ïðåäóïðåæäåíèÿ, åñëè \meta{option} +íå ÿâëÿåòñÿ íàñòðîéêîé äëÿ äàííîãî \meta{float type}. +\end{Expert} + +\medskip + +\DescribeMacro{\showcaptionsetup} +% For debugging purposes the command\nopagebreak +Äëÿ âîçìîæíîñòåé íàñòðîéêè íàñòðîåê, ïðåäëîæåíà êîìàíäà\nopagebreak +\begin{quote} + |\showcaptionsetup|\marg{float type}\quad.\nopagebreak[3] +\end{quote} +% is offered. It generates a log file entry, showing the given options +% for the specified \meta{float type}. For example +Îíà ñîçäà¸ò ñîîáùåíèå â~log-ôàéëå, ïîêàçûâàÿ çàäàííûå îïöèè +äëÿ âûáðàííîãî \meta{float type}. Íàïðèìåð +\begin{quote} + |\captionsetup[figure]{labelfont=bf,textfont=it}|\\ + |\showcaptionsetup{figure}| +\end{quote} +% gives the info: +äàñò ñîîáùåíèå: +\begin{quote}\small + |Caption Info: Option list on `figure'|\\ + |Caption Data: {labelfont=bf,textfont=it} on input line 5.| +\end{quote} + +\pagebreak[3] +% \subsection{Continued floats} +\subsection{Ïðîäîëæàþùèåñÿ ôëîòû} +\label{ContinuedFloat} + +\DescribeMacro{\ContinuedFloat}\label{TeXr:continued:a}% +% Sometimes you want to split figures or tables without giving them +% their own reference number. This is what the command +Èíîãäà âîçíèêàåò íåîáõîäèìîñòü ðàçáèòü ðèñóíêè èëè òàáëèöû íà íåñêîëüêî +÷àñòåé, çàäàâ èì îáùèé íîìåð. Äëÿ ýòîãî ïðåäíàçíà÷åíà êîìàíäà +\begin{quote} + |\ContinuedFloat|\quad. +\end{quote} +% is for; it should be used as first command inside the floating environment. +% It prevents the incrementation of the relevant counter (usually done by +% |\caption|), so a figure or table containing a |\Continued|\-|Float| inside +% gets the same reference number as the figure or table before. +% An example: +Ëó÷øå å¸ ïîñòàâèòü ïåðâîé âíóòðè îêðóæåíèÿ ôëîòà. +Êîìàíäà |\ContinuedFloat| îòìåíÿåò óâåëè÷åíèå ñîîòâåòñòâóþùåãî ñ÷¸ò÷èêà ôëîòà +(èñïîëüçóåìîãî êîìàíäîé |\caption|) +è~çàäà¸ò òîò æå íîìåð êàê è~ó~ðèñóíêà èëè òàáëèöû âûøå. Ïðèìåð +\begin{quote} + |\begin{table}|\\ + | \caption{A table}|\\ + | |\ldots\\ + |\end{table}|\\ + \ldots\\ + |\begin{table}\ContinuedFloat|\\ + | \caption{A table (cont.)}|\\ + | |\ldots\\ + |\end{table}| +\end{quote} +% gives the following result: +äàñò ñëåäóþùèé ðåçóëüòàò: +\begin{Example} + \captionsetup{type=table,position=b,skip=0pt} + \caption{A table} + \centerline{\ldots} + \ContinuedFloat + \caption{A table (cont.)} + \centerline{\ldots} +\end{Example} + +\bigskip + +\NEWfeature{v3.1} +% Furthermore the |\Continued|\-|Float| command executes options associated with +% the type name ``|Continued|\-|Float|''. For example this can be used to switch +% to a different label format for continued figures or tables, as shown here: +Ïîìèìî ýòîãî êîìàíäà |\Continued|\-|Float| âêëþ÷àåò îïöèè, ñâÿçàííûå +ñ~ñîîòâåòñòâóþùåé îïöèåé"=òèïîì «|Continued|\-|Float|». Íàïðèìåð, ýòî ìîæåò áûòü èñïîëüçîâàíî äëÿ +ñîçäàíèÿ àëüòåðíàòèâíûõ ôîðìàòîâ ìåòîê äëÿ òàáëèö è~ðèñóíêîâ, êàê ïîêàçàíî çäåñü: +\begin{quote} + |\DeclareCaptionLabelFormat{continued}{Continued #1~#2}|\\ + |\captionsetup[ContinuedFloat]{labelformat=continued}|\\ + \ldots\\ + |\begin{table}\ContinuedFloat|\\ + | \caption{A table}|\\ + | |\ldots\\ + |\end{table}| +\end{quote} +\begin{Example}\selectlanguage{USenglish} + \captionsetup{type=table,position=b,skip=0pt} + \captionsetup[ContinuedFloat]{labelformat=continued1e} + \ContinuedFloat + \caption{A table}\label{continued1e} + \centerline{\ldots} +\end{Example} +Â~ðóññêîé äîêóìåíòàöèè ýòî ìîæåò âûãëÿäåòü òàê: +\begin{quote} + |\DeclareCaptionLabelFormat{continued}{#1~#2 (\textit{ïðîäîëæåíèå})}|\\ + |\captionsetup[ContinuedFloat]{labelformat=continued}|\\ + \ldots\\ + |\begin{table}\ContinuedFloat|\\ + | \caption{A table}|\\ + | |\ldots\\ + |\end{table}| +\end{quote} +\begin{Example} + \captionsetup{type=table,position=b,skip=0pt} + \captionsetup[ContinuedFloat]{labelformat=continued1r} + \ContinuedFloat + \caption{A table}\label{continued1r} + \centerline{\ldots} +\end{Example} +\smallskip +% \See{\Ref{declare} for an explanation of +% \cs{Declare}\-\texttt{Caption}\-\texttt{Label}\-\texttt{Format}.} +\See{\Ref{declare} îïèñûâàþùèé + \cs{Declare}\-\texttt{Caption}\-\texttt{Label}\-\texttt{Format}.} + +\medskip + +% There is also a \LaTeX\ counter called |Continued|\-|Float| which could be +% used for own purposes. +% For ordinary (floating) environments it's set to zero, to one for the first +% continued float, to two inside the second one, and so on. +% So every |\Continued|\-|Float| increments this counter and a floating +% environment without |\Continued|\-|Float| command resets this counter to zero. +% An example: +Ñîçäàí òàêæå ñ÷¸ò÷èê \LaTeX'à, íàçâàííûé |Continued|\-|Float|, êîòîðûé ìîæåò áûòü +èñïîëüçîâàí ïðè íåîáõîäèìîñòè. +Â~îáû÷íûõ îêðóæåíèÿõ ïëàâàþùèõ îáúåêòîâ îí ðàâåí íóëþ, â~ïåðâîì ïðîäîëæàþùåìñÿ +ôëîòå îí ðàâåí åäèíèöå, â~ñëåäóþùåì äëÿ âòîðîãî îêðóæåíèÿ è~ò.\,ä. +Òàê, êàæäàÿ êîìàíäà |\Continued|\-|Float| óâåëè÷èâàåò ýòîò ñ÷¸ò÷èê è~ïëàâàþùèé îáúåêò +áåç êîìàíäû |\Continued|\-|Float| âíîâü îáíóëÿåò ýòîò ñ÷¸ò÷èê. +Ïðèìåð: +\begin{quote} + |\DeclareCaptionLabelFormat{cont}{#1~#2\asbuk{ContinuedFloat}}|\\ + |\captionsetup[ContinuedFloat]{labelformat=cont}|\\ + \ldots\\ + |\begin{table}\ContinuedFloat|\\ + | \caption{A table}|\\ + | |\ldots\\ + |\end{table}| +\end{quote} +\begin{Example} + \captionsetup{type=table,position=b,skip=0pt} + \captionsetup[ContinuedFloat]{labelformat=continued2} + \ContinuedFloat + \caption{A table}\label{continued2} + \centerline{\ldots} +\end{Example} +\medskip +% A reference to this table would still result in the output +% ``\autoref{continued2}'' since only the caption label format was changed. +% If you would like to use the |Continued|\-|Float| counter for the references, +% too, you could redefine the command |\the|\-|Continued|\-|Float| instead, +% which will be appended to the figure or table counter automatically in +% continued floats and is preset to be empty. +Ññûëêà íà ýòó òàáëèöó îñòàíåòñÿ â~âèäå +«\autoref{continued2}», ïîñêîëüêó èçìåíÿëñÿ òîëüêî ôîðìàò ìåòêè. +Åñëè âàì íóæíî èñïîëüçîâàòü òàêæå ñ÷¸ò÷èê |Continued|\-|Float| â~ññûëêàõ, +âû äîëæíû ïåðåîïðåäåëèòü êîìàíäó |\the|\-|Continued|\-|Float|, +êîòîðàÿ, ïîäêëþ÷àåòñÿ àâòîìàòè÷åñêè â~ïðîäîëæàþùèõñÿ ôëîòàõ, +òîãäà êàê ïî óìîë÷àíèþ ýòà êîìàíäà ïóñòà. +\begin{quote} + |\renewcommand\theContinuedFloat{\asbuk{ContinuedFloat}}|\\ + \ldots\\ + |\begin{table}\ContinuedFloat|\\ + | \caption{A table}|\\ + | |\ldots\\ + |\end{table}| +\end{quote} +\begin{Example} + \captionsetup{type=table,position=b,skip=0pt} + \renewcommand\theContinuedFloat{\asbuk{ContinuedFloat}} + \ContinuedFloat + \caption{A table}\label{continued3} + \centerline{\ldots} +\end{Example} +\medskip +% A reference to that table would result in the output ``\autoref{continued3}''. +Ññûëêà íà ýòó òàáëèöó äàñò ñëåäóþùèé ðåçóëüòàò «\autoref{continued3}». + +\pagebreak[3] +\DescribeMacro{\ContinuedFloat*} +% Suppose you want to start the first figure or table of such a series with a +% kind of ``Figure 7a'' and not with ``Figure 7'' (and the second one with +% ``Figure 7b'' instead of ``Figure 7a''). +% This is possible, too, by using the starred variant |\Continued|\-|Float*| +% which---just like |\Continued|\-|Float|---executes options associated with the +% type name ``|Continued|\-|Float|'' and increments the \LaTeX\ counter +% |Continued|\-|Float|, \emph{but} marks the first figure or table of a series +% instead: +Ïðåäïîëîæèì âàì íóæíî ñîçäàòü ïðîäîëæàþùèåñÿ ðèñóíîê èëè òàáëèöó ñ~íóìåðàöèîííûì +çàãîëîâêîì âèäà «Figure 7a», à~íå «Figure 7» (à~çàòåì, êàê +«Figure 7b», âìåñòî «Figure 7a»). +Ýòî òàêæå âîçìîæíî, åñëè èñïîëüçîâàòü çâ¸çäíûé âàðèàíò êîìàíäû |\Continued|\-|Float*| +êîòîðàÿ \cdash--- êàê è~|\Continued|\-|Float| \cdash--- ïîäêëþ÷àåò îïöèè +ñ~ïîìîùüþ êîìàíäû «|Continued|\-|Float|» è~óâåëè÷èâàåò ñ÷¸ò÷èê \LaTeX'à +|Continued|\-|Float|, \emph{íî} îòìå÷àåò è~ïåðâûé ôëîò èç ñåðèè +ïðîäîëæàþùèõñÿ ôëîòîâ: +\begin{quote} + |\renewcommand\theContinuedFloat{\asbuk{ContinuedFloat}}|\\ + \ldots\\ + |\begin{figure}\ContinuedFloat*|\\ + | |\ldots\\ + | \caption{First figure of a series}|\\ + |\end{figure}|\\ + \ldots\\ + |\begin{figure}\ContinuedFloat|\\ + | |\ldots\\ + | \caption{Second figure of a series}|\\ + |\end{figure}|\\ + \ldots\\ + |\begin{figure}\ContinuedFloat|\\ + | |\ldots\\ + | \caption{Third figure of a series}|\\ + |\end{figure}| +\end{quote} +\begin{Example} + \captionsetup{type=figure,position=b,skip=0pt} + \renewcommand\theContinuedFloat{\asbuk{ContinuedFloat}} + \begingroup + \ContinuedFloat* + \centerline{\ldots} + \caption{First figure of a series} + \endgroup + \begingroup + \ContinuedFloat + \centerline{\ldots} + \caption{Second figure of a series} + \endgroup + \begingroup + \ContinuedFloat + \centerline{\ldots} + \caption{Third figure of a series} + \endgroup +\end{Example} +\smallskip +% \Note{Unfortunately \cs{ContinuedFloat*} is not available if the +% \package{subfig} package\cite{subfig} is loaded.} +\Note{Ê~ñîæàëåíèþ êîìàíäó \cs{ContinuedFloat*} íåëüçÿ èñïîëüçîâàòü ïðè çàãðóæåííîì ïàêåòå + \package{subfig}\cite{subfig}.} + +\pagebreak[3] +% \subsubsection*{A note about longtables} +\subsubsection*{A note about longtables} +% If you want to have a different caption label in |long|\-|table|s (offered +% by the \package{longtable} package\cite{longtable}) after a page break, +% this can \emph{not} be archived by using |\Continued|\-|Float|, +% but instead you could write something like: +Åñëè âàì íóæíî ñîçäàòü îòëè÷àþùèéñÿ ôîðìàò ìåòêè äëÿ ïðîäîëæåíèÿ +îêðóæåíèÿ |long|\-|table| +(ïðåäëàãàåìîãî ïàêåòîì \package{longtable}\cite{longtable}) +íà ñëåäóþùåé ñòðàíèöå, +èñïîëüçîâàíèå |\Continued|\-|Float| \emph{íå} äàñò ðåçóëüòàòîâ, +íî âû ìîæåòå çàäàòü ÷òî-òî âðîäå: +\begin{quote} + |\DeclareCaptionLabelFormat{continued}{Continued #1~#2}|\\ + \ldots\\ + |\begin{longtable}{|\ldots|}|\\ + | \caption{A longtable}\\|\\ + |\endfirsthead|\\ + | \captionsetup{labelformat=continued}|\\ + | \caption[]{A longtable}\\|\\ + |\endhead|\\ + | |\ldots\\ + |\end{longtable}| +\end{quote} + +% --------------------------------------------------------------------------- % + +\clearpage +% \section{Own enhancements} +\section{Ñîáñòâåííûå íàñòðîéêè} +\label{declare} + +% A family of commands is provided to allow users to define their own formats +% etc. +% This enables information on separators, justification, fonts, and styles to +% be associated with a name and kept in one place. +% (These commands need to appear in the document preamble, +% this is the part between |\document|\-|class| and |\begin{document}|.) +Èìååòñÿ ñåìåéñòâî êîìàíä, ïîçâîëÿþùèõ ïîëüçîâàòåëþ ñàìîñòîÿòåëüíî +ñîçäàòü ñîáñòâåííîå îôîðìëåíèå. +Ýòî ïîçâîëÿåò èíôîðìàöèþ î~ðàçäåëèòåëÿõ, âûêëþ÷êå, øðèôòàõ, è~ñòèëÿõ +ïðèâÿçàòü ê~îïðåäåë¸ííîìó êëþ÷ó, è~ïîìåñòèòü âñ¸ ýòî â~îäíîì ìåñòå +(òàêèå êîìàíäû äîëæíû íàõîäèòüñÿ â~ïðåàìáóëå äîêóìåíòà \cdash--- +ýòî ÷àñòü ìåæäó ñòðîêàìè êîìàíä |\document|\-|class| è~|\begin{document}|). + +\pagebreak[3] +\DescribeMacro{\DeclareCaption-\\Format} +% You can define your own caption formats using the command +Âû ìîæåòå îïðåäåëèòü ñâî¸ îôîðìëåíèå ïîäïèñè, èñïîëüçóÿ êîìàíäó +\begin{quote} +% |\DeclareCaptionFormat|\marg{name}\marg{code using \#1, \#2 and \#3}\mbox{\quad.} + |\DeclareCaptionFormat|\marg{name}\marg{êîä, èñïîëüçóþùèé \#1, \#2 è~\#3}\mbox{\ .} +\end{quote} +% At usage the system replaces \#1 with the caption label, \#2 with the +% separator and \#3 with the text. So the standard format |plain| is +% pre-defined by \thispackage\ as +Ïðè èñïîëüçîâàíèè ïðîãðàììà çàìåíÿåò \#1 íà íóìåðàöèîííûé çàãîëîâîê, \#2 íà +ðàçäåëèòåëü è~\#3 íà òåêñò ïîäïèñè. Èòàê, ñòàíäàðòíûé ôîðìàò |plain| îïðåäåë¸í +âíóòðè ïàêåòà \thispackage\ êàê +\begin{quote} + |\DeclareCaptionFormat{plain}{#1#2#3\par}|\quad. +\end{quote} +\begin{Expert} +% There is also a starred variant, |\Declare|\-|Caption|\-|Format*|, +% which causes the code being typeset in \TeX s vertical (instead of +% horizontal) mode, but does not support the |indention=| option. +Ñóùåñòâóåò òàêæå çâ¸çäíûé âàðèàíò |\Declare|\-|Caption|\-|Format*|, êîòîðûé +ñîçäà¸ò êîä, ïå÷àòàþùèéñÿ â~âåðòèêàëüíîì ðåæèìå (ìîäå) \TeX'à (âìåñòî +îáû÷íîãî ãîðèçîíòàëüíîãî), +íî â~ýòîì ñëó÷àå íå ïîääåðæèâàåòñÿ êëþ÷ |indention=|. +\end{Expert} + +\pagebreak[3] +\DescribeMacro{\DeclareCaption-\\LabelFormat} +% Likewise you can define your own caption label formats: +Àíàëîãè÷íî âû ìîæåòå îïðåäåëèòü ôîðìàò íóìåðàöèîííîãî çàãîëîâêà: +\begin{quote} + |\DeclareCaptionLabelFormat|\marg{name}\marg{êîä èñïîëüçóþùèé \#1 è~\#2} +\end{quote} +% At usage \#1 gets replaced with the name (e.g. ``figure'') and \#2 +% gets replaced with the reference number (e.g. ``12''). +% An example: +Ïðè èñïîëüçîâàíèè \#1 çàìåíÿåòñÿ íà èìÿ ôëîòà (íàïðèìåð. «Ðèñ.») è~\#2 +çàìåíÿåòñÿ íà ïîðÿäêîâûé íîìåð (íàïðèìåð «12»). Ïðèìåð: +\begin{quote} + |\DeclareCaptionLabelFormat{bf-parens}{(\textbf{#2})}|\\ + |\captionsetup{labelformat=bf-parens,labelsep=quad}| +\end{quote} +\example*{labelformat=bf-parens,labelsep=quad}{\exampletext} + +\pagebreak[3] +\DescribeMacro{\bothIfFirst} +\DescribeMacro{\bothIfSecond} +% If you define your own caption label formats and use the +% \package{subcaption} or \package{subfig}\cite{subfig} package, +% you should take care of empty caption label names. +% For this purpose the commands +Êîãäà âû îïðåäåëÿåòå ñâî¸ îôîðìëåíèå íóìåðàöèîííîãî çàãîëîâêà è~èñïîëüçóåòå +òàêæå ïàêåòû \package{subcaption} èëè \package{subfig}, +âû äîëæíû ïîìíèòü ÷òî â~ïîäôëîòàõ ýëåìåíò +«èìÿ ôëîòà» áóäåò ïóñòûì. Äëÿ ýòîé öåëè ñëåäóþùèå êîìàíäû +\begin{quote} + |\bothIfFirst|\marg{first arg}\marg{second arg}\quad è\\ + |\bothIfSecond|\marg{first arg}\marg{second arg} +\end{quote} +% are offered. |\bothIfFirst| tests if the first argument exists (means: is +% not empty), |\bothIfSecond| tests if the second argument exists. If yes, +% both arguments get typeset, otherwise none of them. +ïðåäëîæåíû. Êîìàíäà |\bothIfFirst| òåñòèðóåò íàëè÷èå ïåðâîãî àðãóìåíòà (÷òî îí +íåïóñòîé), êîìàíäà |\bothIfSecond| òåñòèðóåò íàëè÷èå âòîðîãî. Åñëè òåñòèðóåìûé +àðãóìåíò åñòü, òî ïå÷àòàþòñÿ îáà àðãóìåíòà, â~ïðîòèâíîì ñëó÷àå íè îäíîãî. + +\smallskip + +\pagebreak[3] +% For example the standard label format |simple| is \emph{not} defined as +Íàïðèìåð, ñòàíäàðòíîå îôîðìëåíèå íóìåðàöèè |simple| îïðåäåëåíî íå òàê: +\begin{quote} + |\DeclareCaptionLabelFormat{simple}{#1~#2}|\mbox{\quad,} +\end{quote} +% because this could cause an extra space if \#1 is empty. Instead |simple| +% is defined as +ïîñêîëüêó àðãóìåíò \#1 ìîæåò áûòü ïóñòûì. Âìåñòî ýòîãî |simple| +îïðåäåë¸í ñëåäóþùèì îáðàçîì +\begin{quote} + |\DeclareCaptionLabelFormat{simple}%|\\ + | {\bothIfFirst{#1}{~}#2}|\mbox{\quad,} +\end{quote} +% causing the space to appear only if the label name is present. +â~ðåçóëüòàòå ïðîáåë ïîÿâèòñÿ òîëüêî òîãäà, êîãäà åñòü èìÿ íóìåðàöèîííîãî +çàãîëîâêà. + +\smallskip + +\pagebreak[3] +\DescribeMacro{\DeclareCaption-\\TextFormat}\NEWfeature{v3.0l}% +% Likewise you can define your own caption text formats: +Àíàëîãè÷íî ìîæíî îïðåäåëèòü ôîðìàò òåêñòà ïîäïèñè: +\begin{quote} +% |\DeclareCaptionTextFormat|\marg{name}\marg{code using \#1} + |\DeclareCaptionTextFormat|\marg{name}\marg{êîä, èñïîëüçóþùèé àðãóìåíò \#1} +\end{quote} +% At usage \#1 gets replaced with the caption text. +Ïðè èñïîëüçîâàíèè \#1 çàìåíÿåòñÿ òåêñòîì ïîäïèñè. + +\bigskip + +\pagebreak[3] +\DescribeMacro{\DeclareCaption-\\LabelSeparator} +% You can define your own caption label separators with +Ìîæíî îïðåäåëèòü ñâîé ðàçäåëèòåëü íîìåðà è~òåêñòà ïîäïèñè ñ~ïîìîùüþ + êîìàíäû +\begin{quote} + |\DeclareCaptionLabelSeparator|\marg{name}\marg{code}\mbox{\quad.} +\end{quote} +% Again an easy example taken from \thispackage\ itself: +È~îïÿòü ïðîñòîé ïðèìåð èç òîãî, ÷òî ïðåäëàãàåò \thispackage: +\begin{quote} + |\DeclareCaptionLabelSeparator{colon}{: }| + \end{quote} + \begin{Expert} +% There is also a starred variant, |\Declare|\-|Caption|\-|Label|\-|Separator*|, +% which causes the code being typeset without using the |label|\-|font=| setting. +% So for example the label separators |quad|, |new|\-|line|, and |en|\-|dash| +% are defined in this way. +Ñóùåñòâóåò òàêæå çâ¸çäíûé âàðèàíò, |\Declare|\-|Caption|\-|Label|\-|Separator*|, +êîòîðûé îïðåäåëÿåò êîä, áåç èñïîëüçîâàíèÿ íàñòðîåê èç êëþ÷à |label|\-|font=|. +Òàê, íàïðèìåð, ðàçäåëèòåëè |quad|, |newline| è |endash| +îïðåäåëåíû ýòîé êîìàíäîé. +\end{Expert} + +\bigskip + +\pagebreak[3] +\DescribeMacro{\DeclareCaption-\\Justification} +% You can define your own caption justifications with +Âû ìîæåòå îïðåäåëèòü ñîáñòâåííóþ âûêëþ÷êó ñ~ïîìîùüþ êîìàíäû +\begin{quote} + |\DeclareCaptionJustification|\marg{name}\marg{code}\mbox{\quad.} +\end{quote} +% The \meta{code} simply gets typeset just before the caption. +% E.g.~using the justification |raggedright|, which is defined as +Àðãóìåíò \meta{code} çàäà¸ò âûêëþ÷êó äî íà÷àëà ïîäïèñè. +Íàïðèìåð èñïîëüçîâàíèå âûêëþ÷êè |raggedright|, êîòîðàÿ îïðåäåëåíà êàê +\begin{quote} + |\DeclareCaptionJustification{raggedright}{\raggedright}|\mbox{\quad,} +\end{quote} +% typesets captions with all lines moved to the left margin. +âûêëþ÷àåò âñå ñòðîêè ïîäïèñè â~ëåâûé êðàé. + +\bigskip + +\pagebreak[3] +\DescribeMacro{\DeclareCaption-\\Font} +% You can define your own caption fonts with +Âû ìîæåòå çàäàòü ñâîé øðèôò äëÿ ïîäïèñè ñ~ïîìîùüþ +\begin{quote} + |\DeclareCaptionFont|\marg{name}\marg{code}\quad. +\end{quote} +% For example this package defines the options |small| and |bf| as +Íàïðèìåð äàííûé ïàêåò îïðåäåëÿåò îïöèè |small| è~|bf| êàê +\begin{quote} + |\DeclareCaptionFont{small}{\small}|\quad è\\ + |\DeclareCaptionFont{bf}{\bfseries}|\quad. +\end{quote} +\iffalse +% The line spacing could be customized using the \package{setspace} package, +% for example:%\NEWdescription{v3.0h} +Èíòåðëèíüÿæ ìîæåò áûòü íàñòðîåí ñ~ïîìîùüþ ïàêåòà \package{setspace}, +íàïðèìåð:%\NEWdescription{v3.0h} +\begin{quote} + |\usepackage{setspace}|\\ +% |\DeclareCaptionFont{singlespacing}{\setstretch{1}}|~\footnote{% +% \emph{\DefaultNoteText:} Using \cs{singlespacing} does not work here since +% it contains a \cs{vskip} command.}\\ + |\DeclareCaptionFont{singlespacing}{\setstretch{1}}|\quad\footnote{% + \emph{\DefaultNoteText}: Èñïîëüçîâàíèå \cs{singlespacing} â äàííîì ñëó÷àå + íå ðàáîòàåò ïîñêîëüêó ñîäåðæèò êîìàíäó \cs{vskip}.}\\ + |\DeclareCaptionFont{onehalfspacing}{\onehalfspacing}|\\ + |\DeclareCaptionFont{doublespacing}{\doublespacing}|\\ + |\captionsetup{font={onehalfspacing,small},labelfont=bf}| +\end{quote} +\example{font={onehalfspacing,small},labelfont=bf,singlelinecheck=off}{\exampletext} +\fi +% An example which brings color into life: +Ïðèìåð èñïîëüçîâàíèÿ öâåòà: +\begin{quote} + |\usepackage{color}|\\ + |\DeclareCaptionFont{red}{\color{red}}|\\ + |\DeclareCaptionFont{green}{\color{green}}|\\ + |\DeclareCaptionFont{blue}{\color{blue}}|\\ + |\captionsetup{labelfont={blue,bf},textfont=green}| +\end{quote} +\example*{labelfont={color=blue,bf},textfont={color=green},singlelinecheck=off}{\exampletext} +% But since \thispackage\ already includes the tricky definition +Íî ïîñêîëüêó \thispackage\ óæå èñïîëüçóåò õèòðîóìíîå îïðåäåëåíèå +\begin{quote} + |\DeclareCaptionFont{color}{\color{#1}}| +\end{quote} +% you can get the same result simply with +âû ìîæåòå ïîëó÷èòü òîò æå ðåçóëüòàò çàäàâ ïðîñòî +\begin{quote} + |\usepackage{color}|\\ + |\captionsetup{labelfont={color=blue,bf},|\\ + | textfont={color=green}}|\quad. +\end{quote} + +\medskip + +\pagebreak[3] +\DescribeMacro{\DeclareCaption-\\Style} +% You can define your own caption styles with +Âû ìîæåòå îïðåäåëèòü ñâîè ñîáñòâåííûå ñòèëè ñ~ïîìîùüþ +\begin{quote} + |\DeclareCaptionStyle|\marg{name}\oarg{additional options}\marg{options}\mbox{\quad.} +\end{quote} +% Remember, caption styles are just a collection of suitable options, saved +% under a given name. You can wake up these options at any time with the +% option |style=|\meta{style name}. +Íàïîìíèì, ÷òî ñòèëè ïîäïèñè ýòî êîëëåêöèÿ êëþ÷åé, ñîõðàí¸ííûõ +ïîä äàííûì èìåíåì. Âû ìîæåòå ïðèâåñòè èõ â~äåéñòâèå ñ~ïîìîùüþ êëþ÷à +|style=|\meta{style name}. + +% All caption styles are based on the |base| set of options. (See \Ref{style} +% for a complete list.) So you only need to specify options which are different +% to them. +Âñå ñòèëè ïîäïèñåé áàçèðóþòñÿ íà óñòàíîâêàõ ïî óìîë÷àíèþ. (Ñì. ïîëíûé ñïèñîê +â~\Ref{style}.) Ïîýòîìó äîñòàòî÷íî îïðåäåëèòü îïöèè, îòëè÷íûå +îò óæå çàäàííûõ. + +% If you specify \meta{additional options} they get used in addition when +% the caption fits into a single line and this check was not disabled with +% the option |single|\-|line|\-|check=off|. +Åñëè âû îïðåäåëèòå \meta{additional options} îíè áóäóò èñïîëüçîâàòüñÿ êîãäà +ïîäïèñü áóäåò îäíîñòðî÷íîé, è~êîíòðîëü êîðîòêèõ ïîäïèñåé íå îòêëþ÷åí +çàäàíèåì îïöèè |single|\-|line|\-|check=off|. + +% Again a very easy example taken from the core of this package: The +% caption style |base| is pre-defined as +Îïÿòü æå î÷åíü ïðîñòîé ïðèìåð èç ñàìîãî ïàêåòà. Ñòèëü ïîäïèñåé |base| +îïðåäåë¸í êàê: +\begin{quote} + |\DeclareCaptionStyle{base}%|\\ + | [justification=centering,indention=0pt]{}|\quad. +\end{quote} + +% Something more exciting: +×òî-òî ïîèíòåðåñíåå: +\begin{quote} + |\DeclareCaptionStyle{mystyle}%|\\ + | [margin=5mm,justification=centering]%|\\ + | {font=footnotesize,labelfont=sc,margin={10mm,0mm}}|\\ + |\captionsetup{style=mystyle}| +\end{quote} +% gives you caption like these ones: +äàñò âàì ïîäïèñè êàê â~ñëåäóþùåì ïðèìåðå: +\begin{Example} + \captionsetup{type=figure,style=mystyle,position=b} + \caption{Êîðîòêàÿ ïîäïèñü.} + \caption{Äëèííàÿ, äëèííàÿ, äëèííàÿ, äëèííàÿ, äëèííàÿ, äëèííàÿ, + äëèííàÿ, äëèííàÿ, äëèííàÿ, äëèííàÿ, äëèííàÿ, + äëèííàÿ, äëèííàÿ, äëèííàÿ, äëèííàÿ, äëèííàÿ, ïîäïèñü.} +\end{Example} + +\bigskip + +\pagebreak[3] +\DescribeMacro{\DeclareCaption-\\ListFormat}\NEWfeature{v3.1}% +% You can define your own caption list formats with +Âû ìîæåòå îïðåäåëèòü ñâîé ôîðìàò äëÿ Ñïèñêîâ, èñïîëüçóÿ +\begin{quote} + |\DeclareCaptionListFormat|\marg{name}\marg{êîä èñïîëüçóþùèé \#1 è~\#2}\mbox{\quad.} +\end{quote} +% At usage \#1 gets replaced with the label prefix (e.g.~|\p@figure|), +% and \#2 gets replaced with the reference number (e.g.~|\thefigure|). +Ïðè èñïîëüçîâàíèè \#1 çàìåíÿåòñÿ íà ïðåôèêñ ìåòêè (íàïðèìåð |\p@figure|) +è~\#2 \cdash--- íà íîìåð (íàïðèìåð, |\thefigure|). + +\bigskip + +\pagebreak[3] +\DescribeMacro{\DeclareCaptionType}\NEWfeature{v3.1f}% +% You can define your own floating environments and caption types with +Âû ìîæåòå îïðåäåëèòü ñîáñòâåííûå îêðóæåíèÿ è~òèïû ïîäïèñåé, èñïîëüçóÿ +\begin{quote} + |\DeclareCaptionType|\oarg{options}\marg{type}\oarg{name}\oarg{list name} +\end{quote} +% where \meta{options} are one or more of +ãäå \meta{options} îäíà èç +\begin{quote}\begin{tabular}{r@{}l@{\qquad}l} + |fileext=| & \meta{file extension} + & {\small(íàïðèìåð~|fileext=lod|)}\\ +% |listname=|\meta{list name}\\ +% |name=|\meta{prosa name}\\ + |placement=| & \meta{combination of \,\purett{htbp}} + & {\small(íàïðèìåð~|placement=tbp|)}\\ + |within=| & \meta{``within'' counter} \emph{or} \texttt{none}\quad. + & {\small(íàïðèìåð~|within=section|)} +\end{tabular}\end{quote} +% If no \meta{options} are given, ``lo\meta{type}'' will be used as \meta{file +% extension} for the list, ``|tbp|'' as \meta{placement} specifier, +% and ``|chapter|'' resp. ``|none|'' as \meta{``within'' counter}, +% i.e., the counter which resets the numbering. +% (If ``|none|'' was specified as value, the numbering of the new +% type will be continuous throughout the document.) +Åñëè \meta{options} íå çàäàíû, «lo\meta{type}» áóäåò èñïîëüçîâàí êàê \meta{file +extension} äëÿ Ñïèñêà, «|tbp|» êàê îïöèÿ ðàçìåùåíèÿ \meta{placement} +è~«|chapter|» èëè «|none|» êàê ñ÷¸ò÷èê \meta{``within'' counter}, +ò.\,å. ñ÷¸ò÷èê, êîíòðîëèðóþùèé ïåðåíóìåðàöèþ. +(Åñëè çàäàí «|none|», íóìåðàöèÿ íîâîãî òèïà ôëîòà +áóäåò ñêâîçíàÿ.) + +% If no \meta{name} is given, the name of the newly created type will be set +% to \meta{type}, but with an uppercase first letter. +% If no \meta{list name} is given, the list name will be set to ``List of +% \meta{name}s''. +Åñëè íå çàäàí êëþ÷ \meta{name}, èìÿ âíîâü ñîçäàííîãî òèïà ôëîòîâ áóäåò âçÿòî +èç àðãóìåíòà \meta{type}, íî ñ~ïåðâîé ïðîïèñíîé áóêâîé. +Åñëè íåò àðãóìåíòà \meta{list name}, íàçâàíèå Ñïèñêà áóäåò çàäàíî êàê «List of +\meta{name}s». [Äëÿ îïöèè \meta{name} íåò ïîääåðæêè íà ðóññêîì ÿçûêå.] +% caption-deu.tex: +% (Diese Vorbelegungen sind also nur fur +% englischsprachige Dokumente geeignet, +% bei anderssprachigen Dokumenten sollte man also immer \meta{Name} und +% \meta{Listenname} mit angeben.) which means: +% +% (This presets are only appropriate for English documents, so for +% other languages you should use the optional arguments "name" and "list name".) +(Ýòè àâòîìàòè÷åñêèå óñòàíîâêè âîçìîæíû òîëüêî äëÿ +àíãëèéñêèõ äîêóìåíòîâ, ïîýòîìó äëÿ +äðóãèõ ÿçûêîâ îïöèè \meta{name} è~\meta{list name} +îáÿçàòåëüíû.) + +% The list will be typeset using the command |\list|\-|of|\meta{type}|s|, +% analogous to |\list|\-|of|\-|figures| and |\list|\-|of|\-|tables|. +% If the \package{fltpage} package is loaded, an environment called +% |FP|\meta{type} will be defined, same for |sideways|\meta{type} +% (\package{rotating} package), |SC|\meta{type} (\package{sidecap} package), +% and |wrap|\meta{type} (\package{wrapfig} package). +Ñïèñîê ôëîòîâ ìîæåò áûòü ñîçäàí ñ~ïîìîùüþ êîìàíäû |\listof|\meta{type}|s|, +àíàëîãè÷íûé |\list|\-|of|\-|figures| è~|\list|\-|of|\-|tables|. +Åñëè èñïîëüçóåòñÿ ïàêåò \package{fltpage}, îêðóæåíèå +|FP|\meta{type} áóäåò îïðåäåëåíî, òî æå äëÿ |sideways|\meta{type} +(ïàêåò \package{rotating}), |SC|\meta{type} (ïàêåò \package{sidecap}), +è~|wrap|\meta{type} (ïàêåò \package{wrapfig}). + +\smallskip + +\pagebreak[3] +% So for example +Òàê, íàïðèìåð +\begin{quote} + |\DeclareCaptionType{diagram}| +\end{quote} +% will define a new caption type and floating environment called |diagram|, +% the list will be stored in a file with the extension |lodiagram|, the name +% (used for the caption) will be ``Diagram'' and the list name +% ``List of Diagrams''. +% The list could be typeset with |\listofdiagrams|. +% Dependent on which packages are loaded, the environments |FPdiagram|, +% |sidewaysdiagram|, |SCdiagram|, and |wrapdiagram| will be defined additionally. +îïðåäåëÿåò íîâûé òèï ïîäïèñè è~îêðóæåíèå ôëîòà, íàçâàííûé |diagram|, +Ñïèñîê áóäåò çàïèñûâàòüñÿ â~ôàéë ñ~ðàñøèðåíèåì |lodiagram|, èìÿ +(èñïîëüçóåìîå â~íóìåðàöèîííîì çàãîëîâêå ïîäïèñè) áóäåò «|Diagram|» è~çàãîëîâîê Ñïèñêà +«|List of Diagrams|». Ñïèñîê ìîæåò áûòü ðàñïå÷àòàí êîìàíäîé |\listofdiagrams|. +Â~çàâèñèìîñòè îò òîãî, êàêèå ïàêåòû çàãðóæåíû, îïðåäåëÿòñÿ äîïîëíèòåëüíî îêðóæåíèÿ +|FPdiagram|, +|sideways|\-|diagram|, |SCdiagram| è~|wrap|\-|diagram|. + +%caption-deu.tex +% So definiert zum Beispiel +% \begin{quote} +% |\DeclareCaptionType{diagram}[Diagramm][Diagrammverzeichnis]| +% \end{quote} +% +Ïîäîáíîå æå îïðåäåëåíèå äëÿ ðóññêîé äîêóìåíòàöèè äîëæíî âûãëÿäåòü òàê: +\begin{quote} + |\DeclareCaptionType{diagram}[Äèàãðàììà][Ñïèñîê äèàãðàìì]| +\end{quote} + +% --------------------------------------------------------------------------- % + +% \subsection{Further examples} +\subsection{Åù¸ íåñêîëüêî ïðèìåðîâ} +\label{examples} + +\subsubsection*{Example 1} + +%\NEWdescription{v3.1} +% If you would like to have a line break between caption label and text +% you could define it this way: +Åñëè âàì íóæíî çàäàòü íîâóþ ñòðîêó ìåæäó íóìåðàöèîííûì çàãîëîâêîì è~òåêñòîì, +âû ìîæåòå çàäàòü ýòî ñëåäóþùèì îáðàçîì: +\begin{quote} + |\DeclareCaptionFormat{myformat}{#1#2\\#3}| +\end{quote} +% If you select this format with |\caption|\-|setup{format=|\x|myformat}| +% you get captions like this: +Åñëè âû âûáåðåòå ýòîò ôîðìàò, çàäàâ |\caption|\-|setup{format=|\x|myformat}| +âû ïîëó÷èòå òàêîé âèä ïîäïèñåé: +%\begin{Example} +% \captionsetup{skip=0pt} + \example{format=myformat1,labelfont=bf}{\exampletext} +%\end{Example} +% You could even use an indention with this caption format: +Âû ìîæåòå èñïîëüçîâàòü âòÿæêó ñ~ýòèì ôîðìàòîì: +\begin{quote} + |\captionsetup{format=myformat,indention=1cm}| +\end{quote} +% This would look like this: +Ýòî áóäåò âûãëÿäåòü òàê: +%\begin{Example} +% \captionsetup{skip=0pt} + \example{format=myformat1,indention=1cm,labelfont=bf}{\exampletext} +%\end{Example} +% Instead, you would like to have an indention only of the first line of +% the caption text? No problem, e.g. +À~÷òî åñëè, âìåñòî ýòîãî, çàäàòü âòÿæêó òîëüêî äëÿ ïåðâîé ñòðîêè ïîäïèñè? +Íåò ïðîáëåì, íàïðèìåð +\begin{quote} + |\newlength\myindention|\\ + |\DeclareCaptionFormat{myformat}%|\\ + | {#1#2\\\hspace*{\myindention}#3}|\\ + \ldots\\ + |\setlength\myindention{1cm}|\\ + |\captionsetup{format=myformat}| +\end{quote} +% would give you captions like +äàñò ïîäïèñü âèäà +%\begin{Example} +% \captionsetup{skip=0pt} + \example{format=myformat2,myindention=1cm,labelfont=bf}{\exampletext} +%\end{Example} +% But you want to have an caption option for this indention, so you can use +% it for example with +% |\caption|\-|setup|\x|[figure]|\x|{my|\-|indention=|\x\ldots|}|? +% This could be done, too: +Íî âû õîòèòå ñîçäàòü îïöèþ äëÿ ýòîé âòÿæêè, äëÿ òîãî, ÷òîáû +èñïîëüçîâàòü å¸ êàê |\captionsetup|\x|[figure]|\x|{myindention=|\ldots|}|? +Ýòî òîæå ìîæíî ñäåëàòü: +\begin{quote} + |\newlength\myindention|\\ + |\DeclareCaptionOption{myindention}%|\\ + | {\setlength\myindention{#1}}|\\ + |\DeclareCaptionFormat{myformat}%|\\ + | {#1#2\\\hspace\myindention #3}|\\ + \ldots\\ + |\captionsetup{format=myformat,myindention=1cm}| +\end{quote} +% would give the same result as the example above. +÷òî äàñò ðåçóëüòàò àíàëîãè÷íûé ïðèâåä¸ííîìó âûøå. + +% \subsubsection*{Example 2} +\subsubsection*{Ïðèìåð 2} + +% You want captions to look like this: +Âû õîòèòå ïîëó÷èòü ïîäïèñè òàêîãî âèäà: +%\begin{Example} +% \captionsetup{skip=0pt} + \example{format=reverse,labelformat=fullparens,labelsep=fill,labelfont=it}{\exampletext} +%\end{Example} +\pagebreak[2] +% You could do it this way: +Ýòî ìîæíî ñäåëàòü ñëåäóþùèì îáðàçîì: +\nopagebreak[3] +\begin{quote} + |\DeclareCaptionFormat{reverse}{#3#2#1}|\\ + |\DeclareCaptionLabelFormat{fullparens}%|\\ + | {(\bothIfFirst{#1}{~}#2)}|\\ + |\DeclareCaptionLabelSeparator{fill}{\hfill}|\\ + |\captionsetup{format=reverse,labelformat=fullparens,|\\ + | labelsep=fill,font=small,labelfont=it}| +\end{quote} + +% \subsubsection*{Example 3} +\subsubsection*{Ïðèìåð 3} + +% The caption text should go into the left margin? A possible solution would be: +Òåêñò íóìåðàöèîííîãî çàãîëîâêà ïîäïèñè äîëæåí áûòü âûâåäåí â~ëåâîå ïîëå? Âîçìîæíîå ðåøåíèå: +\begin{quote} + |\DeclareCaptionFormat{llap}{\llap{#1#2}#3\par}|\\ + |\captionsetup{format=llap,labelsep=quad,singlelinecheck=no}| +\end{quote} +% As a result you would get captions like this: +Â~ðåçóëüòàòå âû ïîëó÷èòå òàêèå ïîäïèñè: +\example{format=llap,labelsep=quad,singlelinecheck=no,margin=0pt}{\exampletext} + +\medskip + +% If the indention into the margin shall be fixed, you could use a combination +% of |\llap| and |\makebox|, for example: +Åñëè ëåâûé êðàé ïîäïèñè ïðè âûõîäå ïîäïèñè íà ïîëÿ äîëæåí áûòü íà ôèêñèðîâàííîì ðàññòîÿíèè, +ìîæíî èñïîëüçîâàòü êîìáèíàöèþ êîìàíä +|\llap| è~|\makebox|, íàïðèìåð: +\begin{quote} + |\DeclareCaptionFormat{llapx}%|\\ + | {\llap{\makebox[5em][l]{#1}}#3\par}|\\ + |\captionsetup{format=llapx,singlelinecheck=off}| +\end{quote} +\example{format=llapx,singlelinecheck=off,skip=0pt,margin=0pt}{\exampletext} + +% \subsubsection*{Example 4} +\subsubsection*{Ïðèìåð 4} + +% This example puts a figure aside a table, but uses only one common caption for both. +% This will be achieved by a combination of +% |\Declare|\-|Caption|\-|Label|\-|Format| and |\caption|\-|list|\-|entry|: +Ñëåäóþùèé ïðèìåð ïîìåùàåò ðèñóíîê ðÿäîì ñ~òàáëèöåé, íî èñïîëüçóåò îáùóþ äëÿ íèõ ïîäïèñü. +Ýòî ìîæíî ñäåëàòü êîìáèíàöèåé êîìàíä +|\Declare|\-|Caption|\-|Label|\-|Format| è~|\caption|\-|list|\-|entry|: +\begin{quote} + |\DeclareCaptionLabelFormat{andtable}%|\\ + | {#1~#2 \& \tablename~\thetable}|\\ + \ldots\\ + |\begin{figure}|\\ + | \centering|\\ + | \includegraphics{|\ldots|}%|\\ + | \qquad|\\ + | \begin{tabular}[b]{\ldots}|\\ + | |\ldots\\ + | \end{tabular}|\\ + | \captionlistentry[table]{|\ldots|}|\\ + | \captionsetup{labelformat=andtable}|\\ + | \caption{|\ldots|}|\\ + |\end{figure}| +\end{quote} +\DeleteShortVerb{\|}% +\noindent\begin{minipage}{\linewidth} + \captionsetup{type=figure} + \centering + \includegraphics[width=30pt]{cat}% + \qquad + \begin{tabular}[b]{r|rr} + & x & y \\\hline + a & 1 & 2 \\ + b & 3 & 4 \\ + \end{tabular} +% \captionlistentry[table]{A figure and a table with a common caption} +% \captionsetup{labelformat=andtable} +% \caption{A figure and a table with a common caption~\footnotemark} + \captionlistentry[table]{Ðèñóíîê è~òàáëèöà ñ~îáùåé ïîäïèñüþ} + \captionsetup{labelformat=andtable} + \caption{Ðèñóíîê è~òàáëèöà ñ~îáùåé ïîäïèñüþ\footnotemark} +\end{minipage} +% \footnotetext{The picture was taken with permission from the +% \LaTeX\ Companion\cite{TLC2} examples.} +\IfFileExists{cat.eps}% +{\footnotetext{Ðèñóíîê ëþáåçíî ïðåäîñòàâëåí èç ïðèìåðîâ êíèãè + \LaTeX\ Companion\cite{TLC2}.}}{} +\MakeShortVerb{\|} +% (Please remember that |\caption|\-|list|\-|entry| increments the figure +% resp.~table counter.) +(Íàïîìíèì, ÷òî êîìàíäà |\caption|\-|list|\-|entry|, êàê è~|\caption|, óâåëè÷èâàåò ñ÷¸ò÷èê ôëîòà.) + + +% --------------------------------------------------------------------------- % + +\clearpage +% \section{Document classes \& Babel support} +\section{Êëàññû äîêóìåíòîâ è~ïîääåðæêà ïàêåòà \package{babel}} +\label{classes} + +% This section will give you an overview of the document classes the +% \package{caption} supports, what do they already offer regarding captions, +% what side effects will occur when using the \package{caption} package with +% them, and what are the `default' settings for them. +Ýòîò ðàçäåë äàñò îáçîð êëàññîâ äîêóìåíòîâ, êîòîðûå ïîääåðæèâàþòñÿ ïàêåòîì +\package{caption}, ÷òî îíè óæå ïðåäëàãàþò äëÿ ðàáîòû ñ~ïîäïèñÿìè, +êàêèå ïîáî÷íûå ýôôåêòû âîçíèêàþò ïðè èñïîëüçîâàíèè ñ~íèìè ïàêåòà \package{caption} +è~êàêîâû óñòàíîâêè ïî óìîë÷àíèþ äëÿ ýòèõ êëàññîâ. + +\NEWfeature{v3.1} +% The `default' settings depend on the document class you use; they represent +% how the class author wanted the captions to look like. So for example +% setting |format=|\x|default| can give you different visual designs when used +% with different document classes. +Óñòàíîâêè ïî óìîë÷àíèþ çàâèñÿò îò êëàññà äîêóìåíòà, èñïîëüçóåìîãî âàìè; îíè ïðåäñòàâëÿþò +îôîðìëåíèå ïîäïèñåé, ñîîòâåòñòâóþùåå çàìûñëàì àâòîðà äàííîãî êëàññà äîêóìåíòà. Íàïðèìåð, íàñòðîéêè +|format=|\x|default| äàäóò ðàçëè÷íûé ðåçóëüòàò ïðè èñïîëüçîâàíèè ñ~ðàçíûìè êëàññàìè. + +\begingroup\setlength\leftmargini{0.3em}% default = 2.5em +\INFO +% If you don't find the document class you use in this section, you usually +% don't have to worry: Many document classes (e.g.~the \class{octavo} class) +% are derived from one of the standard document classes \class{article}, +% \class{report}, or \class{book}, and behave the same regarding captions. +% \Thispackage\ automatically does a compatibility check against the document +% class used and will give you the clear warning +Åñëè âû íå íàøëè êëàññ äîêóìåíòà â~ýòîì ðàçäåëå, òî, îáû÷íî, ýòî íå ïîâîä äëÿ âîëíåíèÿ: +ìíîæåñòâî êëàññîâ äîêóìåíòîâ (íàïðèìåð, êëàññ \class{octavo}) +ïîëó÷åíû èç ñòàíäàðòíûõ êëàññîâ äîêóìåíòîâ +\class{article}, \class{report} èëè \class{book}, è~èìåþò +àíàëîãè÷íûå íàñòðîéêè äëÿ ïîäïèñåé. +\Thispackage\ àâòîìàòè÷åñêè äåëàåò ïðîâåðêó ñîâìåñòèìîñòè êëàññà äîêóìåíòà +è~äà¸ò íåäâóñìûñëåííîå ïðåäóïðåæäåíèå +\begin{quote}\footnotesize + |Package caption Warning: Unsupported document class (or package) detected,|\\ + |(caption) usage of the caption package is not recommended.|\\ + |See the caption package documentation for explanation.| +\end{quote} +% if such an incompatibility was detected. +% If you don't get such warning everything is fine, but if you get it the +% usage of \thispackage\ is not recommended and especially not supported. +åñëè áûëà îïðåäåëåíà íåñîâìåñòèìîñòü. +Åñëè âû òàêîãî ïðåäóïðåæäåíèÿ íå ïîëó÷èëè, òî âñ¸ â~ïîðÿäêå, íî åñëè âû ýòî ïðåäóïðåæäåíèå +âñ¸ æå ïîëó÷èëè, \thispackage\ íå ðåêîìåíäóåòñÿ è~òåì áîëåå íå ïîääåðæèâàåòñÿ. + +\begin{Expert} +% If you get such a compatibility warning but decide to use \thispackage{} +% anyway, you should watch carefully what side-effects occur, usually the +% look and feel of your captions will change by just including \thispackage{} +% without options, meaning they do not look like as intended by the author +% of the document class. +% If this is fine for you, you should first specify the option |style=|\x|base| +% via |\use|\-|package[style=|\x|base]{caption}| or +% |\caption|\-|setup{style=|\x|base}| to set \thispackage\ into a well-defined +% state. +% Afterwards you can start setting your own options additionally and +% keep your fingers crossed. +Åñëè âû, íåñìîòðÿ íà ïðåäóïðåæäåíèå, ðåøèëè âñ¸ ðàâíî èñïîëüçîâàòü \thispackage{}, +âû äîëæíû ïðîâåðèòü, êàêîé ïîáî÷íûé ýôôåêò âîçíèêàåò. Îáû÷íî ïîäêëþ÷åííûé \thispackage{} +áåçî âñÿêèõ îïöèé â~òàêèõ ñëó÷àÿõ èçìåíÿåò âûâîä ïîäïèñåé, è~îíè âûãëÿäÿò íå òàê, êàê +ïðåäóñìîòðåíî àâòîðîì êëàññà äîêóìåíòà. +Åñëè ýòî âàñ óäîâëåòâîðÿåò, âû ìîæåòå äëÿ íà÷àëà çàäàòü êëþ÷ |style=|\x|base|, +çàäàâ åãî â~ñòðîêå |\use|\-|package[style=|\x|base]{caption}| èëè â~êîìàíäå +|\caption|\-|setup{style=|\x|base}|, ÷òî âåðí¸ò õîðîøî íàñòðîåííûå ïàêåòîì óñòàíîâêè. +Ïîñëå ýòîãî âû ìîæåòå çàäàâàòü ñâîè îïöèè è~íàäåÿòüñÿ íà ëó÷øåå. +\end{Expert} +\endgroup + +\newcommand*\Option{Îïöèÿ} +\newcommand*\defaultvalue{çíà÷åíèå \texttt{ïî óìîë÷àíèþ}} +\newcommand*\uses{\textit{èñïîëüçóåò}} +\newcommand*\settings{\textit{íàñòðîéêè}} +\newcommand*\nofont{\textit{îòñóòñòâóåò}} + +% \subsection{Standard \LaTeX: article, report, and book} +\subsection{Ñòàíäàðòíûé \LaTeX: article, report, è~book} + +\begin{tabular}{ll} +\Option & \defaultvalue \\\hline +|format=| & |plain| \\ +|labelformat=| & |simple| \\ +|labelsep=| & |colon| \\ +|justification=| & |justified| \\ +|font=| & \nofont \\ +|labelfont=| & \nofont \\ +|textfont=| & \nofont \\ +\end{tabular} + +\begin{Annotation} +% This also applies to document classes derived from them. +Ýòî îòíîñèòñÿ è~ê~ïðîèçâîäíûì îò íèõ êëàññàì. +\end{Annotation} + +% \subsection{\AmS: amsart, amsproc, and amsbook} +\subsection{Êëàññû \AmS: amsart, amsproc, è~amsbook} +\label{AMS} + +\begin{tabular}{ll} +\Option & \defaultvalue \\\hline +|format=| & |plain| \\ +|labelformat=| & |simple| \\ +|labelsep=| & |.\enspace| \\ +|justification=| & |justified| \\ +|font=| & |\@captionfont| \\ +|labelfont=| & |\@captionheadfont| \\ +|textfont=| & |\@captionfont\upshape| \\ +\end{tabular} + +\begin{Annotation*} +% |\@caption|\-|font| will be set to |\normal|\-|font|, and +% |\@caption|\-|head|\-|font| to |\sc|\-|shape| by the \AmS\ document classes. +Êëàññû \AmS\ îïðåäåëÿþò êîìàíäó |\@caption|\-|font|, êîòîðàÿ çàäà¸òñÿ êàê +|\normal|\-|font|, à~|\@caption|\-|head|\-|font| \cdash--- êàê |\scshape|. +\end{Annotation*} + +% Furthermore the margin will be set to |\caption|\-|indent| for +% more-than-one-line captions (which will be set to |3pc| by the \AmS\ classes), +% the margin for single-line captions will be set to the half of it instead. +% If you want to use a common margin for both, insert +% |\clear|\-|caption|\-|setup[margin*]{single|\-|line}| +% into the preamble of your document, after loading \thispackage. +Êðîìå ýòîãî ïîëå ïðèíèìàåò çíà÷åíèå |\captionindent| â~ìíîãîñòðî÷íûõ ïîäïèñÿõ +(êîòîðîå ðàâíî â~ýòèõ êëàññàõ~|3pc|), +ïîëå äëÿ îäíîñòðî÷íîé ïîäïèñè óìåíüøàåòñÿ â~äâà ðàçà. +Åñëè âû õîòèòå çàäàòü îáùåå ïîëå äëÿ îáîèõ âàðèàíòîâ, äîáàâüòå â~ïðåàìáóëå äîêóìåíòà +|\clear|\-|caption|\-|setup[margin*]{single|\-|line}| +ïîñëå çàãðóçêè ïàêåòà. + +% Additionally the options |figure|\-|position=b,|\x|table|\-|position=t| +% will be set. You can override these settings by specifying other values for +% |figure|\-|position=| or |table|\-|position=| in the option list while +% loading \thispackage. +Äîïîëíèòåëüíî çàäàþòñÿ îïöèè |figure|\-|position=b,|\x|table|\-|position=t|. +Âû ìîæåòå èçìåíèòü ýòè óñòàíîâêè, çàäàâ äðóãèå çíà÷åíèÿ äëÿ êëþ÷åé +|figure|\-|position=| èëè |table|\-|position=| ïðè çàãðóçêå ïàêåòà. + +\subsection{Êëàññ beamer} +\label{beamer} + +\begin{tabular}{ll} +\Option & \defaultvalue \\\hline +|format=| & |plain| \\ +|labelformat=| & \textit{íå íóìåðóåòñÿ} \\ +|labelsep=| & |colon| \\ +|justification=| & |raggedright| \\ +|font=| & \class{beamer} «|caption|» \settings \\ +|labelfont=| & \class{beamer} «|caption name|» \settings \\ +|textfont=| & \nofont \\ +\end{tabular} + +% \subsubsection*{Build-in features, and side-effects} +% You can setup font and color settings with +% |\set|\-|beamer|\-|font{caption}|\marg{options} and +% |\set|\-|beamer|\-|font{caption name}|\marg{options}. +% This will still work, unless you set a different font with +% |\caption|\-|setup{font=|\x\meta{options}|}| or +% |\caption|\-|setup{label|\-|font=|\x\meta{options}|}|.\par +% Furthermore the \class{beamer} classes offer different caption templates +% which can be chosen with +% |\set|\-|beamer|\-|template|\x|{caption}|\x|[|\meta{template}|]|. +% Since \thispackage\ replaces this caption template mechanism, +% |\def|\-|beamer|\-|template*|\x|{caption}|\x\marg{template code} +% and +% |\set|\-|beamer|\-|template|\x|{caption}|\x|[|\meta{template}|]| +% will have no effect when \thispackage\ is used. +\subsubsection*{Âñòðîåííûå îñîáåííîñòè è~ïîáî÷íûå ýôôåêòû} +Âû ìîæåòå çàäàòü øðèôò è~öâåò ñ~ïîìîùüþ +|\set|\-|beamer|\-|font{caption}|\marg{options} è~% +|\set|\-|beamer|\-|font{caption name}|\marg{options}. +Ýòî áóäåò ðàáîòàòü, åñëè òîëüêî âû íå çàäàäèòå äðóãîé øðèôò ÷åðåç +|\caption|\-|setup{font=|\x\meta{options}|}| èëè +|\caption|\-|setup{label|\-|font=|\x\meta{options}|}|.\par +Êðîìå ýòîãî êëàññ \class{beamer} ïðåäëàãàåò ðàçëè÷íûå øàáëîíû +îôîðìëåíèÿ ïîäïèñåé, çàäàâàåìûå ÷åðåç +|\set|\-|beamer|\-|template|\x|{caption}|\x|[|\meta{template}|]|. +Ïîñêîëüêó \thispackage\ çàìåíÿåò ýòîò ìåõàíèçì, êîìàíäû +|\def|\-|beamer|\-|template*|\x|{caption}|\x\marg{template code} +è~|\set|\-|beamer|\-|template|\x|{caption}|\x|[|\meta{template}|]| +íå èìåþò ñèëû ïðè åãî èñïîëüçîâàíèè. + +% \subsection{\KOMAScript: scrartcl, scrreprt, and scrbook} +\subsection{Êëàññû \KOMAScript: scrartcl, scrreprt, è~scrbook} +\label{KOMA} + +\begin{tabular}{ll} +\Option & \defaultvalue \\\hline +% |format=| & \uses\ |\setcapindent| \textit{\&} |\setcaphanging| \settings \\ +|format=| & \uses\ |\setcapindent| è~|\setcaphanging| \settings \\ +% |labelformat=| & \textit{like \purett{simple}, but with support of ``autodot''}\\ +|labelformat=| & \textit{òî æå, ÷òî \purett{simple}, íî ñ~ïîääåðæêîé ``autodot''}\\ +|labelsep=| & |\captionformat| \\ +|justification=| & |justified| \\ +|font=| & \settings\ |\setkomafont{caption}| \\ +|labelfont=| & \settings\ |\setkomafont{captionlabel}| \\ +|textfont=| & \nofont \\ +\end{tabular} + +% \subsubsection*{Build-in features} +% The \KOMAScript\ document classes offer many ways to customize the look and +% feel of the captions. For an overview and a full description please take a +% look at the \KOMAScript\ documentation, section `Tables and Figures'. +\subsubsection*{Âñòðîåííûå âîçìîæíîñòè} +Êëàññû \KOMAScript\ ïðåäëàãàþò ìíîãî âàðèàíòîâ äëÿ íàñòðîéêè âûâîäà +ïîäïèñåé. Ïîëíûé îáçîð âû ìîæåòå íàéòè â~[àíãëèéñêîé] äîêóìåíòàöèè +\KOMAScript, ðàçäåë `Tables and Figures'. + +% \subsubsection*{Side effects} +% The optional argument of |\set|\-|cap|\-|width| is not supported and +% will be ignored if used in conjunction with the \package{caption} package. +% Furthermore the \KOMAScript\ options |table|\-|caption|\-|above| \& +% |table|\-|caption|\-|below| and the commands |\caption|\-|above| \& +% |\caption|\-|below| are stronger than the |position=| setting offered by +% the \package{caption} package. +\subsubsection*{Ïîáî÷íûå ýôôåêòû} +Äîïîëíèòåëüíûé àðãóìåíò êîìàíäû |\setcapwidth| íå ïîääåðæèâàåòñÿ (ïîêà) +è~áóäåò èãíîðèðîâàòüñÿ ïðè ñîâìåñòíîì èñïîëüçîâàíèè ñ~ïàêåòîì \package{caption}. +Ïîìèìî ýòîãî, îïöèè \KOMAScript\ |tablecaptionabove| è~% +|table|\-|caption|\-|below| è~êîìàíäû |\caption|\-|above| è~|\caption|\-|below| +áóäóò ñèëüíåå ÷åì íàñòðîéêè êëþ÷à |position=| ïðåäëàãàåìîãî ïàêåòîì \package{caption}. + +% \subsection{\NTG: artikel, rapport, and boek} +\subsection{Êëàññû \NTG: artikel, rapport, è~boek} +\label{NTG} + +\begin{tabular}{ll} +\Option & \defaultvalue \\\hline +|format=| & |plain| \\ +|labelformat=| & |simple| \\ +|labelsep=| & |colon| \\ +|justification=| & |justified| \\ +|font=| & \nofont \\ +|labelfont=| & |\CaptionLabelFont| \\ +|textfont=| & |\CaptionTextFont| \\ +\end{tabular} + +% \subsubsection*{Build-in features, and side-effects} +% |\Caption|\-|Label|\-|Font| and |\Caption|\-|Text|\-|Font| can be set either +% directly or by using |\Caption|\-|Fonts|. +% Both is still supported unless you use one of the two options +% |label|\-|font=| or |text|\-|font=| offered by \thispackage. +\subsubsection*{Âñòðîåííûå îñîáåííîñòè è~ïîáî÷íûå ýôôåêòû} +|\CaptionLabelFont| è~|\Caption|\-|Text|\-|Font| ìîãóò áûòü +çàäàíû ëèáî íåïîñðåäñòâåííî, ëèáî +ñ~èñïîëüçîâàíèåì êîìàíäû |\Caption|\-|Fonts|. Îáà âàðèàíòà +ïîääåðæèâàþòñÿ, òîëüêî åñëè íå áûë +çàäàí îäèí èç êëþ÷åé |labelfont=| èëè |textfont=| äàííîãî ïàêåòà. + +% \subsection{\SmF{}: smfart and smfbook} +\subsection{Êëàññû \SmF{}: smfart è~smfbook} +\label{SMF} + +% Since the \SmF\ document classes are derived from the \AmS\ document classes +% the same default values are valid here. +Ïîñêîëüêó êëàññû \SmF\ ÿâëÿþòñÿ ïðîèçâîäíûìè êëàññîâ \AmS, òî òå æå îãðàíè÷åíèÿ +äåéñòâóþò è~çäåñü. + +% Additionally the margin is limited up to the tenth of the |\line|\-|width|. +% If you don't like this limitation, you can switch it off with the option +% |max|\-|margin=|\x|off| or |max|\-|margin=|\x|false| +% (which both means the same). +Êðîìå òîãî ðàçìåð ïîëÿ îãðàíè÷åí îäíîé äåñÿòîé îò çíà÷åíèÿ |\linewidth|. +Åñëè âàñ íå óñòðàèâàþò ýòè îãðàíè÷åíèÿ, èõ ìîæíî îòêëþ÷èòü ñ~ïîìîùüþ +|maxmargin=|\x|off| èëè |maxmargin=|\x|false| (îáà âàðèàíòà äàþò îäíî è~òî æå). + +\subsection{Êëàññ thesis} +\label{thesis} + +\begin{tabular}{ll} +\Option & \defaultvalue \\\hline +|format=| & |hang| \\ +% |labelformat=| & \textit{like \purett{simple}, but with short name}\\ +|labelformat=| & \textit{òî æå, ÷òî \purett{simple}, íî ñ~êðàòêèì èìåíåì}\\ +|labelsep=| & |colon| \\ +|justification=| & |justified| \\ +|font=| & \nofont \\ +|labelfont=| & |\captionheaderfont| \\ +|textfont=| & |\captionbodyfont| \\ +\end{tabular} + +% \subsubsection*{Build-in features, and side-effects} +\subsubsection*{Âñòðîåííûå îñîáåííîñòè è~ïîáî÷íûå ýôôåêòû} +% The caption label font can be set with |\caption|\-|header|\-|font|, +% the caption text font with |\caption|\-|body|\-|font|. +% Both is still supported unless you use one of the two options +% |label|\-|font=| or |text|\-|font=| offered by \thispackage. +Øðèôò íóìåðàöèîííîãî çàãîëîâêà ìîæåò áûòü çàäàí ÷åðåç êîìàíäó |\caption|\-|header|\-|font|, +øðèôò äëÿ òåêñòà ïîäïèñè \cdash--- ÷åðåç |\caption|\-|body|\-|font|. +Îáå êîìàíäû ïîääåðæèâàþòñÿ, òîëüêî åñëè âû íå èñïîëüçîâàëè îïöèè +|label|\-|font=| èëè |text|\-|font=|, êîòîðûå ïðåäëàãàåò \thispackage. + +% \subsection{frenchb Babel option} +\subsection{Îïöèÿ frenchb ïàêåòà Babel} +\label{frenchb} + +% If you use the \package{frenchb} option of the \package{babel} package +% with one of the three standard \LaTeX{} classes (or a one derived from them) +% the default |label|\-|sep=| will be set to |\Caption|\-|Sep|\-|a|\-|ra|\-|tor| +% (offered by \package{frenchb}), overriding the default value set by the +% document class. +% So redefining |\Caption|\-|Sep|\-|a|\-|ra|\-|tor| will still work, unless you +% don't select a different |label|\-|sep=| than the default one. +Åñëè âû èñïîëüçóåòå îïöèþ \package{frenchb} ïàêåòà \package{babel} +ñ~îäíèì èç òð¸õ ñòàíäàðòíûõ êëàññîâ \LaTeX'à (èëè èõ ïðîèçâîäíûìè) +çíà÷åíèå ïî óìîë÷àíèþ êëþ÷à |labelsep=| [îïöèÿ |labelsep=default|] áóäåò èñïîëüçîâàòü +çíà÷åíèå êîìàíäû |\Caption|\-|Sep|\-|a|\-|ra|\-|tor| (ïðåäëàãàåìîé +ïàêåòîì \package{frenchb}), çàìåíèâ çíà÷åíèå ïî óìîë÷àíèþ, çàäàííîå êëàññîì. +À~ïåðåîïðåäåë¸ííàÿ êîìàíäà |\Caption|\-|Sep|\-|a|\-|ra|\-|tor| +áóäåò ðàáîòàòü äî òåõ ïîð, ïîêà âû +íå îïðåäåëèòå äðóãîå çíà÷åíèå |labelsep=|, îòëè÷àþùååñÿ îò çíà÷åíèÿ ïî óìîë÷àíèþ. + +\INFO* +% Please load \thispackage\ \emph{after} the \package{babel} package. +Ïîæàëóéñòà çàãðóæàéòå \thispackage\ \emph{ïîñëå} ïàêåòà \package{babel}. + +% \subsection{frenchle and frenchpro packages} +\subsection{Ïàêåòû frenchle è~frenchpro} +\label{frenchpro} + +% If you use the \package{frenchle} or \package{frenchpro} package, +% the default |label|\-|sep=| will be set to |\caption|\-|sep|\-|a|\-|ra|\-|tor| +% (offered by \package{frenchle/pro}) plus \cs{space}, overriding the default +% value set by the document class. +% So redefining |\caption|\-|sep|\-|a|\-|ra|\-|tor| will still work, unless you +% don't select a different |label|\-|sep=| than the default one. +Åñëè âû èñïîëüçóåòå ïàêåòû \package{frenchle} èëè \package{frenchpro}, +çíà÷åíèå ïî óìîë÷àíèþ |label|\-|sep=| îïðåäåëèò çíà÷åíèå êîìàíäû +|\caption|\-|sep|\-|a|\-|ra|\-|tor| (ïðåäëàãàåìîé +ïàêåòàìè \package{frenchle/pro}) ïëþñ \cs{space}, çàìåíèâ çíà÷åíèå, çàäàííîå êëàññîì +ïî óìîë÷àíèþ. +Ïîýòîìó ïåðåîïðåäåëåíèå |\caption|\-|sep|\-|a|\-|ra|\-|tor| +ðàáîòàåò äî òåõ ïîð, ïîêà âû +íå îïðåäåëèòå äðóãîå çíà÷åíèå |labelsep=|, îòëè÷àþùååñÿ îò çíà÷åíèÿ ïî óìîë÷àíèþ. + +% Furthermore the default |text|\-|font=| will be set to |text|\-|font=|\x|it|, +% since this emulates the default setting of |\caption|\-|font| defined by the +% \package{frenchle} or \package{frenchpro} package. +% %If you redefine |\captionfont| after loading the \package{frenchle} or +% %\package{frenchpro} package, this redefinition gets lost. +Ïîìèìî ýòîãî êëþ÷ ïî óìîë÷àíèþ |text|\-|font=| áóäåò çàäàí êàê |text|\-|font=|\x|it|, +ïîñêîëüêó ýòî ýìóëèðóåò íàñòðîéêè êîìàíäû |\caption|\-|font| îïðåäåë¸ííîé ïàêåòàìè +\package{frenchle} èëè \package{frenchpro}. +% %Åñëè âû ïåðåîïðåäåëèòå êîìàíäó |\captionfont| ïîñëå çàãðóçêè \package{frenchle} èëè +% %\package{frenchpro}, ýòî ïåðåîïðåäåëåíèå ïðîïàä¸ò. +% Please note that the command |\caption|\-|font| is used by the +% \package{caption} package internally for a different purpose, +% so you should not change it (anymore). +Îáðàòèòå âíèìàíèå, ÷òî êîìàíäà |\caption|\-|font| èñïîëüçóåòñÿ ïàêåòîì +\package{caption} äëÿ äðóãèõ öåëåé, ïîýòîìó ëó÷øå åþ áîëüøå íå ïîëüçîâàòüñÿ. + +% The command |\un|\-|numbered|\-|captions|\marg{figure \emph{or} table} will +% still work, but only unless you don't select a different |label|\-|format=| +% than the default one. +Êîìàíäà |\un|\-|numbered|\-|captions|\marg{figure \emph{èëè} table} áóäåò ðàáîòàòü, +íî òîëüêî, åñëè âû íå îïðåäåëèëè êëþ÷ |label|\-|format=|, îòëè÷àþùèéñÿ +îò çíà÷åíèÿ ïî óìîë÷àíèþ. + +\INFO* +% Please load \thispackage\ \emph{after} the \package{frenchle} +% or \package{frenchpro} package. +Ïîæàëóéñòà, çàãðóæàéòå \thispackage\ \emph{ïîñëå} ïàêåòîâ \package{frenchle} +èëè \package{frenchpro}. + +% --------------------------------------------------------------------------- % + +\pagebreak[4] +% \section{Package support} +\section{Ïîääåðæêà ïàêåòîâ} +\label{packages} +\label{compatibility} + +%\NEWdescription{v3.1} +% \Thispackage\ was adapted to the following packages which deals with +% captions, too: +\Thispackage\ àäàïòèðîâàí ñ~ïàêåòàìè, êîòîðûå òàêæå ðàáîòàþò ñ~ïîäðèñóíî÷íûìè ïîäïèñÿìè: +\begin{quote} + \package{float}, \package{floatflt}, \package{fltpage}, + \package{hyperref}, \package{hypcap}, \package{listings}, + \package{longtable}, \package{picinpar}, \package{picins}, + \package{rotating}, \package{setspace}, \package{sidecap}, + \package{subfigure}, \package{supertabular}, \package{threeparttable}, + \package{wrapfig}, and \package{xtab} +\end{quote} + +% Furthermore the \package{floatrow} package\cite{floatrow}, the +% \package{subcaption} package (which is part of the \package{caption} package +% bundle), and the \package{subfig} package\cite{subfig} support \thispackage{} +% and use its |\caption|\-|setup| interface. +Ïîìèìî ýòîãî ïàêåòû \package{floatrow}\cite{floatrow}, +ïàêåò \package{subcaption} (ÿâëÿåòñÿ ÷àñòüþ ãðóïïû ïàêåòîâ \package{caption}), +è~ïàêåò \package{subfig}\cite{subfig} +ïîääåðæèâàþò \thispackage\ è~èñïîëüçóþò èíòåðôåéñ |\caption|\-|setup|. + +\begingroup\setlength\leftmargini{0.3em}% default = 2.5em +\INFO +% If a package (or document class) unknown to \thispackage\ redefines +% the |\caption| command as well, this redefinition will be preferred +% over the one this package offers, providing maximum compatibility and +% avoiding conflicts. +% If such a potential incompatibility is detected, you will see this +% warning message:~\footnote{% +% You can suppress this warning by specifying the option +% \texttt{compatibility=true} when loading \thispackage.} +Åñëè ïàêåò (èëè êëàññ äîêóìåíòà), íåèçâåñòíûé äàííîìó ïàêåòó, ïåðåîïðåäåëÿåò +êîìàíäó |\caption|, ýòî ïåðåîïðåäåëåíèå áóäåò áîëåå ïðåäïî÷òèòåëüíî ïî +ñðàâíåíèþ ñ~òåì ÷òî ïðåäëàãàåò \thispackage, ÷òî ñîçäàñò ìàêñèìóì ñîâìåñòèìîñòè +è~äàñò âîçìîæíîñòü èçáåæàòü ïîñëåäñòâèé êîíôëèêòîâ. +Åñëè ïîòåíöèàëüíàÿ íåñîâìåñòèìîñòü áóäåò îáíàðóæåíà, âû óâèäèòå ñëåäóþùåå +ïðåäóïðåæäåíèå:\footnote{% + Âû ìîæåòå çàïðåòèòü ýòî ïðåäóïðåæäåíèå, çàäàâ îïöèþ \texttt{compatibility=true} + ïðè çàãðóçêå äàííîãî ïàêåòà.} +\begin{quote}\footnotesize + |Package caption Warning: \caption will not be redefined since it's already|\\ + |(caption) redefined by a document class or package which is|\\ + |(caption) unknown to the caption package.|\\ + |See the caption package documentation for explanation.| +\end{quote} +\endgroup + +% As a result, the following features offered by \thispackage\ will not be available: +Â~ðåçóëüòàòå, ñëåäóþùèå íàñòðîéêè, êîòîðûå ïðåäëàãàåò \thispackage, +íå áóäóò ðàáîòàòü: +\begin{itemize} +% \item the options |labelformat=|, |position=auto|, |list=|, and |listformat=| +% \item |\caption*| (to produce a caption without label) +% \item |\caption[]{|\ldots|}| (to produce no entry in the List of Figures or Tables) +% \item |\caption{}| (to produce an empty caption without label separator) +% \item |\ContinuedFloat| +% \item correctly justified captions in environments like \texttt{wide} and +% \texttt{addmargin} which add extra margins +% \item the \textsf{hypcap} feature \See{\Ref{hyperref}\,} +% \item the sub-caption feature \See{\package{subcaption} package documentation} + \item îïöèè |labelformat=|, |position=auto|, |list=| è~|listformat=| + \item |\caption*| (ñîçäàíèå ïîäïèñè áåç íóìåðàöèîííîãî çàãîëîâêà) + \item |\caption[]{|\ldots|}| (îòêëþ÷åíèå âûâîäà â~Ñïèñîê ôëîòîâ) + \item |\caption{}| (ñîçäàíèå ïîäïèñè áåç ðàçäåëèòåëÿ ìåæäó íóìåðàöèîííûì çàãîëîâêîì è~òåêñòîì) + \item |\ContinuedFloat| + \item ïðàâèëüíàÿ âûêëþ÷êà ïîäïèñåé â~îêðóæåíèÿõ òèïà \texttt{wide} è~\texttt{addmargin}, + êîòîðûå äîáàâëÿþò äîïîëíèòåëüíûå ïîëÿ + \item îïöèÿ \textsf{hypcap} \See{\Ref{hyperref}\,} + \item âîçìîæíîñòü ñîçäàíèÿ ïîäïîäïèñè \See{äîêóìåíòàöèþ ê~ïàêåòó \package{subcaption}} +\end{itemize} + +\DescribeMacro{compatibility=} +% You can override this compatibility mode by specifying the option +Âû ìîæåòå îòêëþ÷èòü òàêîé ðåæèì ñîâìåñòèìîñòè, çàäàâ +\begin{quote} + |compatibility=false| +\end{quote} +% when loading \thispackage. +% But please note that using this option is neither recommended nor supported +% since unwanted side-effects or even errors could occur afterwards. +% (For that reason you will get a warning about this.) +ïðè çàãðóçêå ïàêåòà. +Íî îáðàòèòå âíèìàíèå, ÷òî èñïîëüçîâàíèå ýòîé îïöèè è~íå ðåêîìåíäóåòñÿ, è~íå ïîääåðæèâàåòñÿ +ïîñêîëüêó ìîãóò âîçíèêíóòü ïîáî÷íûå ýôôåêòû è~äàæå îøèáêè. +(Ïî ýòîìó ïîâîäó âû êàê ðàç óæå ïîëó÷èëè ïðåäóïðåæäåíèå.) + +\newcommand\packagedescription[1]{% + \ifvmode\else\par\fi + \nopagebreak + \parbox[b]{\linewidth}{\footnotesize\leftskip=10pt\rightskip=10pt\relax#1}\par + \nopagebreak\smallskip\nopagebreak} + +\pagebreak[3] +\subsection{Ïàêåò algorithms} +\label{algorithms} +\packagedescription{% +% The \package{algorithms} package bundle\cite{algorithms} provides two +% environments: The \texttt{algorithmic} environment provides a possibility +% for describing algorithms, and the \texttt{algorithm} environment provides +% a ``float'' wrapper for algorithms.} +Ãðóïïà ïàêåòîâ \package{algorithms}\cite{algorithms} ïðåäëàãàåò äâà îêðóæåíèÿ: +Îêðóæåíèå \texttt{algorithmic} ïðåäëàãàåò âîçìîæíîñòü äëÿ çàïèñè àëãîðèòìîâ, +à~\texttt{algorithm} \cdash--- «ïëàâàþùèé» âàðèàíò àëãîðèòìîâ.} + +% Since the \texttt{algorithm} environment is implemented via |\new|\-|float| +% provided by the \package{float} package\cite{float}, please see \Ref{float}. +Ïîñêîëüêó îêðóæåíèå \texttt{algorithm} çàäà¸òñÿ ÷åðåç êîìàíäó |\new|\-|float|, +ïðåäëàãàåìóþ ïàêåòîì \package{float}\cite{float}, îçíàêîìüòåñü ñ~\Ref{float}. + +\iffalse +\pagebreak[3] +\subsection{Ïàêåò algorithm2e} +\label{algorithm2e} +\packagedescription{% +% The \package{algorithm2e} package\cite{algorithm2e} offers an environment for +% writing algorithms in LaTeX2e.} +Ïàêåò \package{algorithm2e}\cite{algorithm2e} ïðåäëàãàåò îêðóæåíèå äëÿ +çàïèñè àëãîðèòìîâ â~LaTeX2e.} + +% Since the \package{algorithm2e} package does not use some kind of standard +% interface for defining its floating environment (e.g.~|\newfloat| of the +% \package{float} package) and typesetting its caption, +% the \package{algorithm2e} package is \emph{not} supported by \thispackage. +Ïîñêîëüêó ïàêåò \package{algorithm2e} íå èñïîëüçóåò ñòàíäàðòíûé èíòåðôåéñ äëÿ +îïðåäåëåíèÿ ñîáñòâåííîãî îêðóæåíèÿ ôëîòà (íàïðèìåð, êîìàíäó~|\newfloat| èç ïàêåòà +\package{float}) è~ñîçäàíèÿ ïîäïèñè, +ïàêåò \package{algorithm2e} \emph{íå} ïîääåðæèâàåòñÿ äàííûì ïàêåòîì. +% +% So if you want to customize the captions using \thispackage, +% you have to build a new environment which uses a supported interface regarding +% floats (e.g. using the \package{float} or \package{floatrow} package), +% and combine this environment with the internal \package{algorithm2e} code. +Ïîýòîìó, åñëè âàì íóæíî íàñòðîèòü ïîäïèñè èñïîëüçóÿ \thispackage, +âû äîëæíû ñàìè ñîçäàòü íîâîå îêðóæåíèå, èñïîëüçóÿ ïîääåðæèâàåìûé èíòåðôåéñ ðàáîòû ñ~ôëîòàìè +(íàïðèìåð, èñïîëüçóÿ ïàêåòû \package{float} èëè \package{floatrow}), +è~ñêîìáèíèðîâàòü ýòî îêðóæåíèå ñ~êîäîì ïàêåòà \package{algorithm2e}. +% +% As first step you could define a non-floating environment \texttt{algorithmic}, +% for example: +Ñíà÷àëà âû äîëæíû îïðåäåëèòü íåïëàâàþùåå îêðóæåíèå \texttt{algorithmic}, +íàïðèìåð: +\begin{quote} + |\usepackage{algorithm2e}|\\ + |% save the "algorithm" environment from the algorithm2e package|\\ + |\let\ORIGalgorithm\algorithm|\\ + |\let\ORIGendalgorithm\endalgorithm|\\ + |% define the algorithmic environment|\\ % , based on the saved environment + |\newenvironment{algorithmic}%|\\ + | {\renewenvironment{algocf}[1][h]{}{}% pass over floating stuff|\\ + | \ORIGalgorithm}%|\\ + | {\ORIGendalgorithm}|\\ + \ldots +\end{quote} +% Having defined this non-floating environment, you could define your own new +% floating environment with |\newfloat| of the \package{float} package +% (or |\DeclareNewFloatType| of the \package{floatrow} package), +% and use the combination of this floating environment and \texttt{algorithmic} +% in its body, just like you would do when you use the +% \package{algorithm}/\package{algorithmic} package tandem. +Îïðåäåëèâ òàêîå íåïëàâàþùåå îêðóæåíèå, +âû ìîæåòå îïðåäåëèòü ñâî¸ ñîáñòâåííîå îêðóæåíèå ôëîòà ñ~ïîìîùüþ êîìàíäû |\newfloat| ïàêåòà +\package{float}, (èëè |\DeclareNewFloatType| ïàêåòà \package{floatrow}), +è~èñïîëüçîâàòü êîìáèíàöèþ ýòîãî îêðóæåíèÿ ôëîòà è~îêðóæåíèÿ +\texttt{algorithmic} âíóòðè íåãî, àíàëîãè÷íî òîìó, êàê ýòî èñïîëüçóåòñÿ +ïðè òàíäåìå ïàêåòîâ +\package{algorithm}/\package{algorithmic}. + +% You could even use the \package{algorithm} package for this purpose, for example: +Âû ìîæåòå èñïîëüçîâàòü äëÿ ýòèõ öåëåé ïàêåò \package{algorithm}, íàïðèìåð: +\begin{quote} + \ldots\\ + |% load the algorithm package to re-define the|\\ + |% floating environment "algorithm" and \listofalgorithms|\\ + |\let\listofalgorithms\undefined|\\ + |\usepackage{algorithm}|\\ + \ldots\\ + |% Example usage:|\\ + |\begin{algorithm}|\\ + |\caption{An algorithm}|\\ + |\begin{algorithmic}|\\ + | \SetVline|\\ + | \eIf{cond1}{|\\ + | a line\;|\\ + | }{|\\ + | another line\;|\\ + | }|\\ + |\end{algorithmic}| +\end{quote} +% Now you are finally able to customize the float and caption layout like every +% other floating environment defined with the \package{float} package\cite{float}, +% please see \Ref{float}. +Òåïåðü âû ìîæåòå ñîçäàòü íàñòðîéêè äëÿ ñîäåðæèìîãî ôëîòà è~åãî ïîäïèñè, àíàëîãè÷íî ëþáîìó äðóãîìó +îêðóæåíèþ ôëîòà, îïðåäåë¸ííîìó ïàêåòîì \package{float} package\cite{float}, +ñì.~\Ref{float}. + +% \begin{Annotation} +% An alternative would be using the \package{algorithmicx} package. +Â~êà÷åñòâå àëüòåðíàòèâû ìîæíî èñïîëüçîâàòü ïàêåò \package{algorithmicx}. +% \end{Annotation} +\fi + +\pagebreak[3] +\subsection{Ïàêåò float} +\label{float} +\packagedescription{% +% The \package{float} package\cite{float} introduces the commands +% \cs{restylefloat} to give existing floating environments a new look \& feel +% and \cs{newfloat} to define new floating environments. +% It also provides the ``\texttt{H}'' float placement option which places +% the environments ``here'' instead of letting them floating around.} +Ïàêåò \package{float}\cite{float} ïðåäëàãàåò êîìàíäû +\cs{restylefloat} äëÿ ïåðåîïðåäåëåíèÿ óæå ñóùåñòâóþùåãî ìàêåòà ôëîòà +è~\cs{newfloat} äëÿ îïðåäåëåíèÿ íîâûõ îêðóæåíèé ôëîòîâ. +Òàêæå îí ïðåäëàãàåò ñïåöèàëüíóþ îïöèþ ðàçìåùåíèÿ ôëîòà \texttt{H}, êîòîðàÿ ïîìåùàåò +ôëîò «çäåñü», îòêëþ÷èâ ïëàâàíèå ôëîòà.} + +% For floating environments defined with \cs{newfloat} or \cs{restylefloat} the +% |po|\-|si|\-|tion| option has no effect on the main caption anymore, since its +% placement and spacing will be controlled by the selected float style instead. +Äëÿ îêðóæåíèé ôëîòîâ, îïðåäåë¸ííûõ ñ~ïîìîùüþ êîìàíä \cs{newfloat} èëè +\cs{restylefloat} îïöèÿ +|po|\-|si|\-|tion| íå èìååò ýôôåêòà, òàê êàê ìåõàíèçì ðàçìåùåíèÿ è~ðàññòàíîâîê +îòáèâîê êîíòðîëèðóåòñÿ ñòèëåì ôëîòà ïàêåòà \package{float}. + +% A caption style and options defined with the name of the float style will be +% executed additionally to the regular ones. +% Using this mechanism \thispackage\ emulates the default look \& feel of the +% |ruled| captions: It defines the caption style +Ñòèëè ïîäïèñè è~êëþ÷è àññîöèèðîâàííûå ñ~íàçâàíèåì äàííîãî ñòèëÿ ôëîòà +âêëþ÷àþòñÿ ïðè çàïóñêå äàííîãî îêðóæåíèÿ. +Èñïîëüçóÿ ýòîò ìåõàíèçì \thispackage\ ýìóëèðóåò âûâîä ïîäïèñåé â~ñòèëå +|ruled|: îí îïðåäåëÿåò ñòèëü ïîäïèñè +\begin{quote} + |\DeclareCaptionStyle{ruled}%|\\ + | {labelfont=bf,labelsep=space,strut=off}|\mbox{\quad.} +\end{quote} +% So to change this you need either define your own caption style called +% |ruled| or use |\caption|\-|setup[ruled]|\marg{options} to specify additional +% options.%, +%e.g.~|\caption|\-|setup[ruled]{labelsep=|\x|colon}|. +Òàê, ÷òîáû èçìåíèòü ýòî âû ìîæåòå ëèáî îïðåäåëèòü ñâîé ñòèëü ïîäïèñè, íàçâàííûé +|ruled| èëè èñïîëüçîâàòü |\caption|\-|setup[ruled]|\x\marg{options} è~îïðåäåëèòü +äîïîëíèòåëüíûå îïöèè.%, + +% Also by using this mechanism the skip between a |boxed| float and its caption +% is specified, overriding its global value: +Òàêæå, èñïîëüçóÿ ýòîò ìåõàíèçì, îòáèâêà ìåæäó ôëîòîì â~ðàìêå (|boxed|) è~åãî +ïîäïèñüþ ïåðåîïðåäåëÿåò çíà÷åíèå: +\begin{quote} + |\captionsetup[boxed]{skip=2pt}| +\end{quote} +% For changing this, just use |\caption|\-|setup[boxed]{skip=|\x\meta{value}|}| +% with an appropriate value. Or if you want to use the global |skip| setting +% instead, you can remove the usage of the local setting for these floats with +% |\clear|\-|caption|\-|setup[skip]{boxed}|. +Äëÿ èçìåíåíèÿ ýòîãî, èñïîëüçóéòå |\caption|\-|setup[boxed]{skip=|\x\meta{value}|}| +ñ~ñîîòâåòñòâóþùèì çíà÷åíèåì. Èëè, åñëè âàì íóæíî âìåñòî ýòîãî èñïîëüçîâàòü îáùèå +(ãëîáàëüíûå) óñòàíîâêè êëþ÷à |skip|, +âû ìîæåòå îòìåíèòü èñïîëüçîâàíèå ëîêàëüíîãî îïðåäåëåíèÿ, çàäàâ +|\clear|\-|caption|\-|setup[skip]{boxed}|. + +\begin{Note} +% Only one single caption can be typeset inside environments defined with +% |\new|\-|float| or |\re|\-|style|\-|float|, furthermore these environments +% are not behaving exactly like the pre-defined floats |figure| and |table|. +% As a consequence many packages do not cooperate well with these. +% Furthermore the \package{float} package has some caveats \& limitations, +% so if you just want to define a new simple floating environment---behaving +% like |figure| or |table|---I recommend using |\Declare|\-|Caption|\-|Type| +% instead. +% And for defining non-simple floating environments and customization I +% recommend using |\Declare|\-|New|\-|Float|\-|Type| offered by the +% \package{floatrow} package\cite{floatrow}. +Âíóòðè îêðóæåíèé îïðåäåë¸ííûõ êîìàíäàìè |\new|\-|float| èëè |\re|\-|style|\-|float| +ìîæíî çàäàòü òîëüêî îäíó ïîäðèñóíî÷íóþ ïîäïèñü, êðîìå òîãî +ýòè îêðóæåíèÿ ðàáîòàþò íå òàê, êàê +îïðåäåë¸ííûå â~ñòàíäàðòíîì \LaTeX'å |figure| è~|table|. +Â~ðåçóëüòàòå ìíîæåñòâî ïàêåòîâ íå ìîæåò áûòü êîîïåðèðîâàòüñÿ ñ~äàííûì ïàêåòîì. +Áîëåå òîãî ïàêåò \package{float} èìååò íåêîòîðûå íåäîñòàòêè è~îãðàíè÷åíèÿ, ïîýòîìó, åñëè +âàì íóæíî îïðåäåëèòü íîâîå îêðóæåíèå, ðàáîòàþùåå êàê +|figure| èëè |table| \cdash--- ÿ ðåêîìåíäîâàë áû äëÿ ýòîãî èñïîëüçîâàòü êîìàíäó +|\Declare|\-|Caption|\-|Type|. +À~äëÿ îïðåäåëåíèÿ äðóãèõ îêðóæåíèé ôëîòîâ è~èõ íàñòðîéêè ìîæíî +èñïîëüçîâàòü êîìàíäó |\Declare|\-|New|\-|Float|\-|Type| èç ïàêåòà +\package{floatrow}\cite{floatrow}. +\end{Note} + +\iffalse +% Please also note that you \emph{don't} need a |\restyle|\-|float| for using +% the ``|H|'' float placement specifier. Some docs say so, but they are +% wrong. +% And |\restyle|\-|float{table}| is a very good method to shoot yourself +% in the foot, since many packages using |table| internally are not working +% correctly afterwards. +Îáðàòèòå âíèìàíèå, ÷òî âàì \emph{íå} íóæíî çàäàâàòü |\restyle|\-|float| äëÿ èñïîëüçîâàíèÿ +îïöèè ðàçìåùåíèÿ «|H|». Íåêîòîðûå ðóêîâîäñòâà ñîâåòóþò ýòî, íî ýòî íåâåðíî. +À~çàäàíèå |\restyle|\-|float{table}| õîðîøèé ñïîñîá ñáèòü ñåáÿ ñ~íîã, +ïîñêîëüêó ìíîãèå ïàêåòû, èñïîëüçóþùèå â~ñâîèõ ìàêðîêîìàíäàõ îêðóæåíèå |table| ïåðåñòàþò +ðàáîòàòü. +\fi + +\pagebreak[3] +\subsection{Ïàêåò floatflt} +\label{floatflt} +\packagedescription{% +% The \package{floatflt} package\cite{floatflt} offers figures and tables +% which do not span the full width of a page and are float around by text.} +Ïàêåò \package{floatflt}\cite{floatflt} ïðåäëàãàåò îêðóæåíèÿ íåáîëüøèõ +ðèñóíêîâ è~òàáëèö, +îáòåêàåìûõ òåêñòîì.} + +\NEWfeature{v3.1} +% If you want to setup special options for the |float|\-|ing|\-|figure| and +% |float|\-|ing|\-|table| environments you can use +Åñëè âû õîòèòå çàäàòü ñïåöèàëüíûå îïöèè äëÿ îêðóæåíèé |floating|\-|figure| +è~|floating|\-|table|, +ìîæíî çàäàòü +\begin{quote} + |\captionsetup[floatingfigure]|\marg{options}\quad\emph{è}\\ + |\captionsetup[floatingtable]|\marg{options}\quad. +\end{quote} +% These options will be executed additionally to the regular ones for +% |figure| resp.~|table|. +Ýòè îïöèè áóäóò äîáàâëåíû ñîîòâåòñòâåííî ê~îñíîâíûì äëÿ |figure| èëè |table|. + +\begin{Note} +% The |margin| resp.~|width| setting will not be used for these figures resp.~tables, +% unless you set it explicit with |\caption|\-|setup[floating|\-|figure]{|\ldots|}| +% resp.~|\caption|\-|setup[floating|\-|table]{|\ldots|}|. +Íàñòðîéêè êëþ÷åé |margin| èëè |width| íå èñïîëüçóþòñÿ äëÿ òàêèõ ðèñóíêîâ èëè òàáëèö, +òîëüêî åñëè âû íå çàäàäèòå èõ ñòðîãî, +âíóòðè |\caption|\-|setup[floating|\-|figure]{|\ldots|}| èëè +|\caption|\-|setup[floating|\-|table]{|\ldots|}|. +\end{Note} + +\pagebreak[3] +\subsection{Ïàêåò fltpage} +\label{fltpage} +\packagedescription{% +% The \package{fltpage} package\cite{fltpage} offers the outhouse of the +% caption for |figure|s or |table|s which needs the whole page +% for its contents. This will be done by placing the caption on the bottom +% of the previous or next page.} +Ïàêåò \package{fltpage}\cite{fltpage} ïðåäëàãàåò âíåøíþþ ïîäïèñü äëÿ ôëîòîâ +|figure| èëè |table|, ñîäåðæèìîå êîòîðûõ çàíèìàåò öåëóþ ñòðàíèöó. +Ïîäïèñü ïðè ýòîì ðàçìåùàåòñÿ íà ïðåäûäóùåé èëè ñëåäóþùåé ñòðàíèöå [íà ðàçâîðîòå].} + +\iffalse +\NEWfeature{v3.1} +% Two options control the links to the environments |FPfigure| and |FPtable|: +Ñëåäóþùèå êëþ÷è êîíòðîëèðóþò ññûëêè íà îêðóæåíèÿ |FPfigure| è~|FPtable|: +\begin{description} +% \item{\texttt{FPlist=caption} or \texttt{FPlist=figure}}\\[\smallskipamount] +% If set to |caption|, the list entry will link to the caption; if set to +% |figure|, it will link to the figure contents. +% (The default setting is |FP|\-|list=|\x|caption|.) +% \item{\texttt{FPref=caption} or \texttt{FPref=figure}}\\[\smallskipamount] +% If set to |caption|, a \cs{ref}, \cs{pageref}, \cs{autoref}, or \cs{nameref} +% will link to the caption; if set to |figure|, it will link to the figure contents. +% (The default setting is |FP|\-|ref=|\x|figure|.) + \item{\texttt{FPlist=caption} èëè \texttt{FPlist=figure}}\\[\smallskipamount] +Åñëè îïðåäåëåíà îïöèÿ |caption|, ññûëêà â~Ñïèñêå ðèñóíêîâ áóäåò îòíîñèòüñÿ ê~ïîäïèñè; à~åñëè +|figure| \cdash--- òî ê~ñîäåðæèìîìó ôëîòà. +(Çíà÷åíèå ïî óìîë÷àíèþ |FPlist=|\x|caption|.) +\item{\texttt{FPref=caption} èëè \texttt{FPref=figure}}\\[\smallskipamount] +Åñëè îïðåäåëåíà îïöèÿ |caption|, ññûëêè \cs{ref}, \cs{pageref}, \cs{autoref}, èëè \cs{nameref} +áóäóò ïðèâÿçàíû ê~ïîäïèñè; à~åñëè |figure| \cdash--- òî ê~ñîäåðæèìîìó ôëîòà. +(Çíà÷åíèå ïî óìîë÷àíèþ |FPref=figure|.) +\end{description} +\fi + +% If you want to setup special options for the |FPfigure| and |FPtable| +% environments you can use +Åñëè âû õîòèòå çàäàòü ñïåöèàëüíûå íàñòðîéêè äëÿ îêðóæåíèé |FPfigure| è~|FPtable| +âû ìîæåòå èñïîëüçîâàòü +\begin{quote} + |\captionsetup[FPfigure]|\marg{options}\quad\emph{è}\\ + |\captionsetup[FPtable]|\marg{options}\quad. +\end{quote} +% These options will be executed additionally to the regular ones for +% |figure| or |table|. +Ýòè îïöèè áóäóò çàäàíû äîïîëíèòåëüíî ê~îñíîâíûì íàñòðîéêàì äëÿ +|figure| èëè |table|. + +% Furthermore |\Declare|\-|Caption|\-|Type|\marg{name} will also define +% an environment called |FP|\meta{name} which behaves like |FP|\-|figure| and +% |FP|\-|table|. +Ïîìèìî ýòîãî êîìàíäà \cs{DeclareCaptionType}\marg{name} òàêæå îïðåäåëèò +îêðóæåíèå |FP|\meta{name}, êîòîðîå áóäåò àíàëîãè÷íî |FPfigure| è~|FPtable|. + +\pagebreak[3] +\subsection{Ïàêåò hyperref} +\label{hyperref} +\packagedescription{% +% The \package{hyperref} package\cite{hyperref} is used to handle cross +% referencing commands in LaTeX to produce hypertext links in the document.} +Ïàêåò hyperref\cite{hyperref} èñïîëüçóåòñÿ äëÿ óïðàâëåíèÿ êîìàíäàìè ïåðåêð¸ñòíûõ ññûëîê +â~\LaTeX'å äëÿ ñîçäàíèÿ ãèïåðòåêñòîâûõ ññûëîê âíóòðè äîêóìåíòà.} + +\NEWfeature{v3.1} +% There are two options available to control the placement of hyperlink +% anchors:~\footnote{These options are named after the \package{hypcap} package +% which they supersede.} +Ñóùåñòâóþò äâà êëþ÷à, êîíòðîëèðóþùèõ ðàçìåùåíèå ãèïåðññûëîê:\footnote{Ýòè +îïöèè íàçâàíû ïî ïàêåòó \package{hypcap}, êîòîðûé îíè çàìåíÿþò.} +\begin{description} +% \item{\texttt{hypcap=true} or \texttt{hypcap=false}}\\[\smallskipamount] +% If set to |true| all hyperlink anchors -- where entries in the +% List of Figures, |\ref|, and |\auto|\-|ref| will link to -- are placed at +% the beginning of the (floating) environment.\par +% If set to |false| the hyperlink anchor is (usually) placed at the caption.\par +% (The default setting is |hypcap=|\x|true|.) +\item{\texttt{hypcap=true} èëè \texttt{hypcap=false}}\\[\smallskipamount] +Åñëè çàäàíà îïöèÿ |true| âñå ãèïåðññûëêè \cdash--- çàïèñè â~Ñïèñêàõ ðèñóíêîâ (òàáëèö), +êîìàíäû |\ref| è~|\autoref| \cdash--- áóäóò ïðèâÿçàíû +ê~íà÷àëó îêðóæåíèÿ ôëîòà.\par +Åñëè çàäàíà îïöèÿ |false| ãèïåðññûëêè (îáû÷íî) ïðèâÿçûâàþòñÿ ê~ïîäïèñè.\par +(Çíà÷åíèå ïî óìîë÷àíèþ |hypcap=true|.) +% \item{\texttt{hypcapspace=}\meta{amount}}\\[\smallskipamount] +% Because it looks poor if the hyperlink points exactly at the top of +% the figure or table, you can specify a vertical distance between +% the hyperlink anchor and the (floating) environment itself, +% e.g.~|hyp|\-|cap|\-|space=|\x|0pt| removes this distance.\par +% (The default setting is |hypcapspace=0.5\baselineskip|.) +\item{\texttt{hypcapspace=}\meta{amount}}\\[\smallskipamount] +Ïîñêîëüêó ýòî âûãëÿäèò ïëîõî, åñëè ãèïåðññûëêà ïîïàäàåò òî÷íî ââåðõ ðèñóíêà èëè òàáëèöû, +âû ìîæåòå çàäàòü ñïåöèàëüíûé ïàðàìåòð ðàññòîÿíèÿ ìåæäó ïðèâÿçêîé ãèïåðññûëêè +è~îêðóæåíèåì ôëîòà, +íàïðèìåð, |hyp|\-|cap|\-|space=|\x|0pt| óáèðàåò ýòî ðàññòîÿíèå.\par +(Çíà÷åíèå ïî óìîë÷àíèþ |hypcapspace=0.5\baselineskip|.) +\end{description} + +% Both settings have no effect in |lst|\-|listing|s (provided by the +% \package{listings} package), |long|\-|table|s (provided by the +% \package{longtable} package), |super|\-|tabular|s (provided by the +% \package{supertabular} package), and |x|\-|tabular|s (provided by the +% \package{xtab} package), within these environments hyperlink +% anchors will always be placed as if |hyp|\-|cap=|\x|true| and +% |hyp|\-|cap|\-|space=|\x|0pt| would be set. +Îáå íàñòðîéêè íå èìåþò ýôôåêòà â~îêðóæåíèÿõ |lstlisting| (ïðåäëàãàåìîì ïàêåòîì +\package{listings}), |longtable| (ïðåäëàãàåìîì ïàêåòîì +\package{longtable}), |super|\-|tabular| (ïðåäëàãàåìîì ïàêåòîì +\package{supertabular}) è |xtabular| (ïðåäëàãàåìîì ïàêåòîì \package{xtab}), +âíóòðè ýòèõ îêðóæåíèé ãèïåðññûëêè âñåãäà áóäóò çàäàíû òàê, +áóäòî çàäàíû îïöèè |hyp|\-|cap=|\x|true| è~|hyp|\-|cap|\-|space=|\x|0pt|. + +%\pagebreak[3]Please note:\nopagebreak +\pagebreak[3]Îáðàòèòå âíèìàíèå:\nopagebreak +\begin{description} +% \item{\cs{captionof}\marg{type}\csmarg{\purerm\ldots} +% vs.~\cs{captionsetup}\csmarg{type=\textrm{\meta{type}}}$+$\cs{caption}\csmarg{\purerm\ldots}}% +% \\[\smallskipamount] +% Without \package{hyperref} loaded, both will give you identical results. +% But with \package{hyperref} loaded, and with |hyp|\-|cap=|\x|true| requested, +% the hyperlink anchor will be placed different. +% For example: +\item{\cs{captionof}\marg{type}\csmarg\ldots\ è~% + \cs{captionsetup}\csmarg{type=\textrm{\meta{type}}}$+$\cs{caption}\csmarg\ldots}\\[\smallskipamount] +Áåç ïàêåòà \package{hyperref}, äàäóò âàì èäåíòè÷íûå ðåçóëüòàòû. +Íî ñ~çàãðóæåííûì ïàêåòîì \package{hyperref}, è~ñ~îïöèåé |hypcap=|\x|true|, +ãèïåðññûëêà áóäåò äðóãîé. Íàïðèìåð: +\begin{quote} +|\begin{minipage}{\linewidth}|\\ +| |\ldots\\ +| \captionof{figure}{A figure}|\\ +|\end{minipage}| +\end{quote} +% will place the hyperlink anchor at the caption. +% (And if |hyp|\-|cap=|\x|true| is set, you will get a warning about this.) +% But +Ïîìåñòèò ãèïåðññûëêó â~ïîäïèñü. +(À~åñëè çàäàíà îïöèÿ |hyp|\-|cap=|\x|true|, âû ïîëó÷èòå ïðåäóïðåæäåíèå.) +Íî +\begin{quote} +|\begin{minipage}{\linewidth}|\\ +| \captionsetup{type=figure}|\\ +| |\ldots\\ +| \caption{A figure}|\\ +|\end{minipage}| +\end{quote} +% will place the hyperlink anchor at the beginning of the |mini|\-|page|, +% since |\caption|\-|setup{type=|\x|figure}| does not only set the caption type +% to ``figure'' but does place a hyperlink anchor, too. +ïîìåñòèò ãèïåðññûëêó â~íà÷àëî îêðóæåíèÿ |mini|\-|page|, +ïîñêîëüêó êîìàíäà |\caption|\-|setup|\x|{type=|\x|figure}| íå òîëüêî çàäà¸ò íàñòðîéêè äëÿ +ôëîòà «figure», íî òàêæå ïîìåùàåò ãèïåðññûëêó. + +% \item{\cs{caption}\csoarg{}\csmarg{\purerm\ldots} +% vs.~\cs{captionsetup}\csmarg{list=false}$+$\cs{caption}\csmarg{\purerm\ldots}}\\[\smallskipamount] +\item{\cs{caption}\csoarg{}\csmarg\ldots\ è~% + \cs{captionsetup}\csmarg{list=false}$+$\cs{caption}\csmarg\ldots}\\[\smallskipamount] +% Again, without \package{hyperref} loaded, both will give you identical results. +% But with \package{hyperref} loaded, the difference is in the nuances. +% So for example the optional argument of |\caption| will also be written to +% the |aux| file, and will be used by the |\name|\-|ref| command. +% So if you choose to use |\caption| with empty optional argument, +% |\name|\-|ref| will also give you an empty result. +% So it's better to use |\caption|\-|setup{list=|\x|false}| if you don't +% want an entry in the List of Figures or List of Tables. +Îïÿòü æå, áåç ïàêåòà \package{hyperref}, îáà âàðèàíòà äàäóò îäèíàêîâûé ðåçóëüòàò. +À~ñ~çàãðóæåííûì ïàêåòîì \package{hyperref}, îòëè÷èå áóäåò â~íþàíñàõ. +Òàê, íàïðèìåð, äîïîëíèòåëüíûé àðãóìåíò êîìàíäû |\caption| òàêæå áóäåò çàïèñàí â~% +|aux|-ôàéë, è~òàêæå áóäåò èñïîëüçîâàòüñÿ êîìàíäà |\name|\-|ref|. +Ïîýòîìó, åñëè âû èñïîëüçóåòå êîìàíäó ïîäïèñè~|\caption| ñ~ïóñòûì äîïîëíèòåëüíûì àðãóìåíòîì, êîìàíäà +|\name|\-|ref| òàêæå äàñò âàì «ïóñòîé» ðåçóëüòàò. +Ïîýòîìó ëó÷øå èñïîëüçîâàòü \cs{captionsetup}\csmarg{list=false}, åñëè âàì íå íóæíî +çàïèñûâàòü ðèñóíîê â~Ñïèñîê ðèñóíêîâ èëè òàáëèö. +\end{description} + +\pagebreak[3] +\subsection{Ïàêåò hypcap} +\label{hypcap} +\packagedescription{% +% The \package{hyp\-cap} package\cite{hypcap} offers a solution to the problem +% that links to a float using \package{hyper\-ref} may anchors to the caption +% rather than the beginning of the float. +% Since \thispackage\ \version{3.1} already solves this problem for itself, +% the \package{hypcap} package is usually not needed.} +% %, at least when you use \thispackage.} +Ïàêåò \package{hypcap}\cite{hypcap} ïðåäëàãàåò ðåøåíèå ïðîáëåì, ñâÿçàííûõ ñ~ôëîòàìè +ïðè èñïîëüçîâàíèè ïàêåòà \package{hyperref}, êîòîðûé ïîìåùàåò ãèïåðññûëêè â~ïîäïèñü, +à~íå â~íà÷àëî ôëîòà. +Ïîñêîëüêó \thispackage\ \version{3.1} óæå ðåøèë ýòó ïðîáëåìó ñâîèìè ñðåäñòâàìè, +ïàêåò \package{hypcap} îáû÷íî íå íóæåí.% +% , êîãäà âû èñïîëüçóåòå +% \thispackage. +} + +% If the \package{hyp\-cap} package is loaded additionally to the +% \package{hyper\-ref} package, it takes over the control of the hyperlink +% anchor placement from \thispackage, overriding the options |hyp|\-|cap=| +% and |hyp|\-|cap|\-|space=|. +Åñëè ïàêåò \package{hypcap} çàãðóæåí äîïîëíèòåëüíî ê~ïàêåòó \package{hyperref}, +òî êîíòðîëü çà ãèïåðññûëêàìè ïåðåõîäèò îò ïàêåòà \package{caption} ê~íåìó, +ïåðåêðûâàÿ îïöèè êëþ÷åé |hypcap=| è~|hyp|\-|cap|\-|space=|. + +% So for a manual placement of hyperlink anchors +% |\caption|\-|setup{type=|\x\meta{type}|}| is not sufficient anymore, +% instead you need to use |\cap|\-|start| (provided by the \package{hyp\-cap} +% package) for this. +Ïîýòîìó äëÿ ðó÷íîãî ðàçìåùåíèÿ ãèïåðññûëêè |\caption|\-|setup{type=|\x\meta{type}|}| +óæå íå ãîäèòñÿ, è~âìåñòî ýòîãî âû äîëæíû èñïîëüçîâàòü êîìàíäó |\capstart| +(ïðåäëàãàåìóþ ïàêåòîì \package{hypcap}). + +% Regarding the automatically placement the \package{hypcap} package offers good +% placement of hyperlink anchors for the floating environments |figure| and +% |table| only. In contrast the |hypcap=|\x|true| option of \thispackage\ also +% offers good placements of hyperlink anchors for +% |floating|\-|figure|s (provided by the \package{float\-flt} package), +% |FP|\-|figure|s \& |FPtable|s (provided by the \package{flt\-page} package), +% |fig|\-|window|s (provided by the \package{pic\-in\-par} package), +% |par|\-|pic|s (provided by the \package{pic\-ins} package), +% |SC|\-|figure|s (provided by the \package{side\-cap} package), +% |three|\-|part|\-|table|s (provided by the \package{three\-part\-table} package), +% and |wrapfigure|s (provided by the \package{wrap\-fig} package).%---% +% %so by loading the \package{hypcap} package additionally you will +% %loose that. +Ïðè àâòîìàòè÷åñêîì ðàçìåùåíèè ãèïåðññûëîê, ïàêåò \package{hypcap} çàäà¸ò âåðíîå +ðàçìåùåíèå òîëüêî äëÿ îêðóæåíèé |figure| è~% +|table|. Â~òî âðåìÿ êàê îïöèÿ êëþ÷à |hypcap=true| ïàêåòà \package{caption}, ïðåäëàãàåò òàêæå +êîððåêòíîå ðàçìåùåíèÿ ññûëîê äëÿ îêðóæåíèé +|floating|\-|figure| (ïðåäëàãàåìîãî ïàêåòîì \package{floatflt}), +|FPfigure| è~|FPtable| (ïðåäëàãàåìûõ ïàêåòîì \package{fltpage}), +|figwindow| (ïðåäëàãàåìîãî ïàêåòîì \package{picinpar}), +|parpic| (ïðåäëàãàåìîãî ïàêåòîì \package{picins}), +|SCfigure| (ïðåäëàãàåìîãî ïàêåòîì \package{sidecap}), +|three|\-|part|\-|table| (ïðåäëàãàåìîãî ïàêåòîì \package{threeparttable}), +è~|wrap|\-|figure| (ïðåäëàãàåìîãî ïàêåòîì \package{wrapfig}).%---% +%ïîýòîìó, çàãðóæàÿ ïàêåò \package{hypcap}, âû òåðÿåòå ýòè âîçìîæíîñòè. + +\pagebreak[3] +\subsection{Ïàêåò listings} +\label{listings} +\packagedescription{% +% The \package{listings} package\cite{listings} typesets programming code.} +Ïàêåò \package{listings}\cite{listings} ïîìîãàåò ðàñïå÷àòàòü ïðîãðàììíûé êîä.} + +% If you want to setup special options for the |lst|\-|listing| environment +% you can use +Åñëè âû æåëàåòå ñîçäàòü ñïåöèàëüíûå îïöèè äëÿ îêðóæåíèÿ |lstlinsting| +âû ìîæåòå èñïîëüçîâàòü +\begin{quote} + |\captionsetup[lstlisting]|\marg{options}\quad. +\end{quote} + +% Please note that the \package{listings} package has its very own options +% for controlling the position and the skips of the caption: +% |caption|\-|pos=|, |above|\-|caption|\-|skip=|, and |below|\-|caption|\-|skip=|. +% \See{\package{listings} documentation for details.} +% These \package{listings} options override the \package{caption}'s ones, but +% can be again overwritten by |\caption|\-|setup[lst|\-|listing]{|\ldots|}|, +% e.g.%~ +Îáðàòèòå âíèìàíèå, ÷òî ïàêåò \package{listings} èìååò ñîáñòâåííûå îïöèè +äëÿ êîíòðîëÿ ðàñïîëîæåíèÿ îòáèâîê âîêðóã ïîäïèñè: +|caption|\-|pos=|, |above|\-|caption|\-|skip=|, è~|below|\-|caption|\-|skip=|. +\See{ïîäðîáíåå â~äîêóìåíòàöèè ïàêåòà \package{listings}.} +Îïöèè ïàêåòà \package{listings} ïåðåîïðåäåëÿþò îïöèè \package{caption}, íî +ìîãóò áûòü â~ñâîþ î÷åðåäü ïåðåïèñàíû ñ~ïîìîùüþ íàñòðîåê +|\caption|\-|setup[lst|\-|listing]{|\ldots|}|, +íàïðèìåð, +\begin{quote}|\caption|\-|setup[lst|\-|listing]{skip=|\x|10pt}|\quad.\end{quote} + +\pagebreak[3] +\subsection{Ïàêåò longtable} +\label{longtable} +\packagedescription{% +% The \package{longtable} package\cite{longtable} offers an environment +% which behaves similar to the \texttt{tabular} environment, but the table +% itself can span multiple pages.} +Ïàêåò \package{longtable}\cite{longtable} ïðåäëàãàåò îêðóæåíèå, +êîòîðîå ðàáîòàåò àíàëîãè÷íî \texttt{tabular}, íî òàáëè÷íûé ìàòåðèàë ìîæåò çàíèìàòü +íåñêîëüêî ñòðàíèö.} + +% If you want to setup special options for the |long|\-|table| environment +% you can use +Åñëè âû æåëàåòå ñîçäàòü ñïåöèàëüíûå íàñòðîéêè äëÿ îêðóæåíèÿ |long|\-|table| +âû ìîæåòå èñïîëüçîâàòü +\begin{quote} + |\captionsetup[longtable]|\marg{options}\quad. +\end{quote} +% These options will be executed additionally to the regular ones for +% |table|. +Ýòè îïöèè áóäóò äîáàâëåíû ê~îñíîâíûì íàñòðîéêàì äëÿ +|table|. + +% The |margin| and |width| settings usually override |\LT|\-|cap|\-|width|, +% so you get an equal look \& feel of the captions in |table|s and +% |long|\-|table|s. +% But if you set |\LT|\-|cap|\-|width| to a value different than its default +% $=$ |4in|, \thispackage\ will follow that. +% (But |\LT|\-|cap|\-|width| will be overwritten by +% |\caption|\-|setup[long|\-|table]{width=|\x\meta{value}|}|, +% even if it is set to a value different than |4in|.) +Íàñòðîéêè êëþ÷åé |margin| è~|width| îáû÷íî ïåðåêðûâàþò çíà÷åíèå êîìàíäû +|\LTcapwidth|, ïîýòîìó +âû ìîæåòå ïîëó÷èòü èäåíòè÷íîå îôîðìëåíèå äëÿ ïîäïèñåé â~îêðóæåíèÿõ |table| è~% +|longtable|. +Íî åñëè âû çàäàäèòå çíà÷åíèå |\LT|\-|cap|\-|width| îòëè÷íîå îò çàäàííîãî ïî óìîë÷àíèþ, +÷òî ðàâíî ${}={}$|4in|, \thispackage\ áóäåò èñïîëüçîâàòü ýòî çíà÷åíèå. +(Íî |\LTcapwidth| áóäåò ïåðåïèñàíî ïîñëåäóþùåé íàñòðîéêîé +|\caption|\-|setup[long|\-|table]{width=|\x\meta{value}|}|, äàæå åñëè îíî çàäàíî +îòëè÷íûì îò~|4in|.) + +\begin{Note} +% |\caption|\-|of| and |\Continued|\-|Float| do \emph{not} work for |long|\-|table|s. +% Furthermore neither |\caption| nor |\caption|\-|list|\-|entry| will increment +% the |table| counter here; it's incremented by the |long|\-|table| environment +% instead. +% \NEWfeature{v3.1} +% If you need a |long|\-|table| which does not increment the |table| counter +% please use the |long|\-|table*| environment (offered by the +% \package{ltcaption} package which is part of \thispackage\ bundle and will be +% loaded automatically). +Êîìàíäû |\caption|\-|of| è~|\Continued|\-|Float| íå ðàáîòàþò â~îêðóæåíèÿõ |long|\-|table|. +Êðîìå òîãî íè |\caption| íè |\caption|\-|list|\-|entry| íå óâåëè÷èâàþò çíà÷åíèå ñ÷¸ò÷èêà +òàáëèö |table|; åãî çíà÷åíèå óïðàâëÿåòñÿ îêðóæåíèåì |long|\-|table|. +\NEWfeature{v3.1} +Åñëè âàì íóæíî ñîçäàòü îêðóæåíèå |longtable| áåç óâåëè÷åíèÿ ñ÷¸ò÷èêà òàáëèö, |table|, +èñïîëüçóéòå îêðóæåíèå |longtable*|, ïðåäëàãàåìîå ïàêåòîì \package{ltcaption}, +êîòîðûé ÿâëÿåòñÿ ÷àñòüþ ãðóïïû ïàêåòîâ ïàêåòà \package{caption} è~çàãðóæàåòñÿ àâòîìàòè÷åñêè. +\end{Note} + +\pagebreak[3] +\subsection{Ïàêåò picinpar} +\label{picinpar} +\packagedescription{% +% Similar to the \package{floatflt} package the \package{picinpar} +% package\cite{picinpar} offers figures and tables which do not span the full +% width of a page and are float around by text. +% For a detailed discussion about the differences between these packages +% please take a look at The \LaTeX\ Companion\cite{TLC2}.} +Àíàëîãè÷íûé ïàêåòó \package{floatflt}, ïàêåò \package{picinpar}% +\cite{picinpar} ïðåäëàãàåò îêðóæåíèÿ íåáîëüøèõ ðèñóíêîâ è~òàáëèö, îáòåêàåìûõ òåêñòîì. +Çà áîëåå ïîäðîáíîé èíôîðìàöèåé î~ðàçëè÷èÿõ ïàêåòîâ îáðàùàéòåñü +ê~\LaTeX\ Companion\cite{TLC2}.} + +\NEWfeature{v3.1} +% If you want to setup special options for the |fig|\-|window| and +% |tab|\-|window| environments you can use +Åñëè âàì íóæíû ñïåöèàëüíûå íàñòðîéêè äëÿ îêðóæåíèé |figwindow| è~|tabwindow| +âû ìîæåòå çàäàòü +\begin{quote} + |\captionsetup[figwindow]|\marg{options}\quad\emph{è}\\ + |\captionsetup[tabwindow]|\marg{options}\quad. +\end{quote} +% These options will be executed additionally to the regular ones for +% |figure| or |table|. +Ýòè íàñòðîéêè áóäóò äîáàâëåíû ê~îñíîâíûì íàñòðîéêàì +|figure| èëè |table|. + +\begin{Note} +% The |margin| resp.~|width| setting will not be used for these figures and tables, +% unless you set it explicit with |\caption|\-|setup[fig|\-|window]{|\ldots|}| or +% |\caption|\-|setup[fig|\-|table]{|\ldots|}|. +Íàñòðîéêè êëþ÷åé |margin| è~|width| íå èñïîëüçóþòñÿ äëÿ ýòèõ ðèñóíêîâ è~òàáëèö, +òîëüêî åñëè âû íå çàäàäèòå ñòðîãî |\caption|\-|setup|\x|[figwindow]{|\ldots|}| èëè +|\caption|\-|setup|\x|[figtable]{|\ldots|}|. +\end{Note} + +\pagebreak[3] +\subsection{Ïàêåò picins} +\label{picins} +\packagedescription{% +% Similar to the \package{floatflt} and \package{picinpar} package the +% \package{picins} package\cite{picins} offers figures and tables which do not +% span the full width of a page and are float around by text. +% For a detailed discussion about the differences between these packages +% please take a look at The \LaTeX\ Companion\cite{TLC2}.} +Àíàëîãè÷åí ïàêåòàì \package{floatflt} è~\package{picinpar} +\package{picins}\cite{picins} ïðåäëàãàåò îêðóæåíèÿ íåáîëüøèõ ðèñóíêîâ è~òàáëèö, îáòåêàåìûõ òåêñòîì. +Çà áîëåå ïîäðîáíîé èíôîðìàöèåé î~ðàçëè÷èÿõ ïàêåòîâ îáðàùàéòåñü +ê~\LaTeX\ Companion\cite{TLC2}.} + +\NEWfeature{v3.1} +% If you want to setup special options for the |par|\-|pic| environment you can use +Åñëè âû õîòèòå çàäàòü ñïåöèàëüíûå íàñòðîéêè äëÿ îêðóæåíèÿ |parpic| âû ìîæåòå çàäàòü +\begin{quote} + |\captionsetup[parpic]|\marg{options}\quad. +\end{quote} +% These options will be executed additionally to the regular ones for +% |figure| or |table|. +Ýòè íàñòðîéêè áóäóò äîáàâëåíû ê~îñíîâíûì íàñòðîéêàì +|figure| èëè |table|.\par + +% Furthermore |\pic|\-|caption[]{|\ldots|}| produce no entry in the List of Figures, +% and |\pic|\-|caption*{|\ldots|}| gives an unlabeled \& unnumbered caption. +Ïîìèìî ýòîãî êîìàíäà |\pic|\-|caption[]{|\ldots|}| íå ñîçäà¸ò çàïèñè â~Ñïèñêå ðèñóíêîâ, +à~êîìàíäà |\pic|\-|caption*{|\ldots|}| çàäà¸ò ïîäïèñü áåç íóìåðàöèîííîãî çàãîëîâêà. + +\begin{Note} +% The |margin| resp.~|width| setting will not be used for these figures and tables. +% \iffalse +% if |pic|\-|caption|\-|side| or |pic|\-|caption|\-|top|\-|side| is used. +% The |width| setting will not be used (but the |margin| setting will) if +% |pic|\-|caption|\-|out|\-|side| or |pic|\-|caption|\-|in|\-|side| is used. +% \fi +% But you can override this by setting it explicit with +% |\caption|\-|setup[par|\-|pic]{|\ldots|}|. +Íàñòðîéêè êëþ÷åé |margin| è~|width| íå èñïîëüçóþòñÿ äëÿ ýòèõ ðèñóíêîâ è~òàáëèö. +\iffalse +åñëè çàäàíû êîìàíäû |pic|\-|caption|\-|side| èëè |pic|\-|caption|\-|top|\-|side|. +Íàñòðîéêè êëþ÷à |width| íå áóäóò èñïîëüçîâàòüñÿ (íî êëþ÷ |margin| áóäåò), åñëè +çàäàíû êîìàíäû |pic|\-|caption|\-|out|\-|side| èëè |pic|\-|caption|\-|in|\-|side|. +\fi +Íî ýòî ìîæíî ïåðåîïðåäåëèòü íàñòðîéêàìè +|\caption|\-|setup[par|\-|pic]{|\ldots|}|. +\end{Note} + +% If you want to have a |\pic|\-|caption| of another type as |figure|, please +% do \emph{not} re-define |\@cap|\-|type| as suggested by the \package{picins} +% documentation. Please use the |\pic|\-|caption|\-|type|\marg{type} command +% which is offered by \thispackage\ instead, e.g.: +Åñëè âàì íóæíî çàäàòü ïîäïèñü, |\piccaption|, íå äëÿ |figure|, à~äëÿ äðóãîãî òèïà ôëîòà, +\emph{íå} ïåðåîïðåäåëÿéòå êîìàíäó |\@captype|, êàê ïðåäëîæåíî â~äîêóìåíòàöèè ïàêåòà +\package{picins}. +Èñïîëüçóéòå êîìàíäó |\piccaptiontype|\marg{type}, ïðåäëàãàåìóþ äàííûì ïàêåòîì, +íàïðèìåð: +\begin{quote} + |\piccaptiontype{table}|\\ + |\piccaption{An example table}|\\ + |\parpic(50mm,10mm)[s]{|\ldots|}| +\end{quote} + +\pagebreak[3] +\subsection{Ïàêåò rotating} +\label{rotating} +\packagedescription{% +% The \package{rotating} package\cite{rotating} offers the floating +% environments \texttt{side\-ways\-figure} and \texttt{side\-ways\-table} which +% are just like normal figures and tables but rotated by 90 resp.~270 degree. +% Furthermore a command \cs{rot\-caption} is offered for rotated captions only.} +Ïàêåò \package{rotating}\cite{rotating} ïðåäëàãàåò îêðóæåíèÿ ôëîòîâ +\texttt{side\-ways\-figure} è~\texttt{side\-ways\-table} +êîòîðûå ÿâëÿþòñÿ òåìè æå ðèñóíêàìè è~òàáëèöàìè, íî ðàçâ¸ðíóòûìè íà 90~ãðàäóñîâ. +Ïîìèìî ýòîãî èñïîëüçóåòñÿ êîìàíäà \cs{rotcaption} äëÿ ïîâîðîòà òîëüêî ïîäïèñåé.} + +\iffalse % No, we don't do that +% If you want to setup special options for the |side|\-|ways|\-|figure| and +% |side|\-|ways|\-|table| environments you can use +Åñëè âû õîòèòå çàäàòü íàñòðîéêè äëÿ îêðóæåíèé |sidewaysfigure| è~|sidewaystable| +âû ìîæåòå çàäàòü +\begin{quote} + |\captionsetup[sidewaysfigure]|\marg{options}\\ + |\captionsetup[sidewaystable]|\marg{options}\quad. +\end{quote} +Ýòè íàñòðîéêè áóäóò äîáàâëåíû ê~îñíîâíûì íàñòðîéêàì +|figure| èëè |table|.\par +\fi + +% The command |\rot|\-|caption| will be extended by \thispackage, so +% |\rot|\-|caption*| and |\rot|\-|caption|\-|of| can be used analogous to +% |\caption*| and |\caption|\-|of|. +Êîìàíäà |\rot|\-|caption| áûëà ðàñøèðåíà äàííûì ïàêåòîì, ïîýòîìó +|\rot|\-|caption*| èëè |\rot|\-|caption|\-|of| ìîãóò áûòü èñïîëüçîâàíû àíàëîãè÷íî +êîìàíäàì |\caption*| è~|\captionof|. + +\NEWfeature{v3.1} +% Furthermore |\Declare|\-|Caption|\-|Type|\marg{name} will also define +% an environment called |side|\-|ways|\meta{name} which behaves like +% |side|\-|ways|\-|figure| and |side|\-|ways|\-|table|. +Ïîìèìî ýòîãî êîìàíäà |\Declare|\-|Caption|\-|Type|\marg{name} îïðåäåëèò +îêðóæåíèå, íàçûâàåìîå |side|\-|ways|\meta{name}, êîòîðîå ðàáîòàåò àíàëîãè÷íî +|side|\-|ways|\-|figure| è~|side|\-|ways|\-|table|. + +\pagebreak[3] +\subsection{Ïàêåò setspace} +\label{setspace} +\packagedescription{% +% The \package{setspace} package\cite{setspace} offers options and commands +% to change the spacing, +% e.g.\ \cs{usepackage}\x\csoarg{one\-half\-spacing}\x\csmarg{set\-space} +% causes the document to be typeset in one-and-a-half spacing.} +Ïàêåò \package{setspace}\cite{setspace} ïðåäëàãàåò îïöèè è~êîìàíäû äëÿ +èçìåíåíèÿ èíòåðëèíüÿæà, +íàïðèìåð \cs{usepackage}\x\csoarg{one\-half\-spacing}\x\csmarg{set\-space} +ñîçäàñò äîêóìåíò, ðàñïå÷àòàííûé ñ~ïîëóòîðíûì èíòåðëèíüÿæåì.} + +% If the \package{setspace} package is used in conjunction with \thispackage, +% the caption will be typeset with single spacing as default. This can be changed +% by specifying either |font=|\x|one|\-|half|\-|spacing|, +% |font=|\x|double|\-|spacing|, or |font={stretch=|\x\meta{amount}|}|. +% \See{also \Ref{fonts}} +Åñëè ïàêåò \package{setspace} èñïîëüçóåòñÿ âìåñòå ñ~äàííûì ïàêåòîì, +ïîäïèñü áóäåò íàïå÷àòàíà ñ~îäèíàðíûì èíòåðëèíüÿæåì. Ýòî ìîæíî ïåðåîïðåäåëèòü, +çàäàâ ëèáî |font=onehalfspacing|, |font=doublespacing|, ëèáî +|font={stretch=|\meta{amount}|}|. \See{òàêæå \Ref{fonts}} + +\pagebreak[3] +\subsection{Ïàêåò sidecap} +\label{sidecap} +\packagedescription{% +% The \package{sidecap} package\cite{sidecap} offers the floating environments +% \texttt{SC\-figure} and \texttt{SC\-table} which are like usual figures +% and tables but the caption will be put \emph{beside} the contents.} +Ïàêåò \package{sidecap}\cite{sidecap} ïðåäëàãàåò îêðóæåíèÿ ôëîòîâ +|SCfigure| è~|SCtable|, êîòîðûå ÿâëÿþòñÿ òåìè æå ðèñóíêàìè è~òàáëèöàìè, +íî ïîäïèñè ïîìåùàþòñÿ \emph{ñáîêó} ñîäåðæèìîãî.} + +% If you want to setup special options for the |SCfigure| and |SCtable| +% environments you can use +Åñëè âàì íóæíî çàäàòü íàñòðîéêè äëÿ îêðóæåíèé |SCfigure| è~|SCtable| +âû ìîæåòå çàäàòü +\begin{quote} + |\captionsetup[SCfigure]|\marg{options}\quad\emph{and}\\ + |\captionsetup[SCtable]|\marg{options}\quad. +\end{quote} +% These options will be executed additionally to the regular ones for +% |figure| or |table|. +Ýòè íàñòðîéêè áóäóò äîáàâëåíû ê~îñíîâíûì íàñòðîéêàì +|figure| èëè |table|.\par + +\pagebreak[3] +\NEWfeature{v3.1} +% Furthermore |\Declare|\-|Caption|\-|Type|\marg{name} will also define +% an environment called |SC|\meta{name} which behaves like |SC|\-|figure| and +% |SC|\-|table|. +Ïîìèìî ýòîãî êîìàíäà \cs{DeclareCaptionType}\marg{name} ìîæåò îïðåäåëèòü +îêðóæåíèå |SC|\meta{name}, êîòîðîå ðàáîòàåò àíàëîãè÷íî |SCfigure| è~|SCtable|. + +\pagebreak[3] +\begin{Note} +% The \package{sidecap} package offers its own options for justification. +% If set, they will override the one specified with the caption option +% |jus|\-|ti|\-|fi|\-|ca|\-|tion=| for captions beside their contents. +Ïàêåò \package{sidecap} ïðåäëàãàåò îïöèè äëÿ âûêëþ÷êè ïîäïèñåé. +È~åñëè îíè çàäàíû, òî îíè ïåðåîïðåäåëÿò íàñòðîéêè êëþ÷à +|justification=| äëÿ ïîäïèñåé ñòîÿùèõ ñáîêó. +\end{Note} + +\begin{Note} +% The |margin| resp.~|width| setting will not be used for these figures and tables, +% unless you set it explicit with |\caption|\-|setup[SC|\-|figure]{|\ldots|}| +% or |\caption|\-|setup[SC|\-|table]{|\ldots|}|. +Íàñòðîéêè êëþ÷åé |margin| è~|width| íå èñïîëüçóþòñÿ äëÿ ýòèõ ðèñóíêîâ è~òàáëèö, +òîëüêî åñëè âû íå çàäàäèòå ñòðîãî |\captionsetup|\x|[SCfigure]|\x|{|\ldots|}| +èëè |\captionsetup|\x|[SCtable]|\x|{|\ldots|}|. +\end{Note} + +\medskip + +\begin{Annotation*} +% Instead of using the \package{sidecap} package you can also use the more +% powerful and flexible \package{floatrow} package\cite{floatrow} for typesetting +% captions beside the contents. +Âìåñòî èñïîëüçîâàíèÿ ïàêåòà \package{sidecap} âû ìîæåòå âîñïîëüçîâàòüñÿ +ïàêåòîì \package{floatrow}\cite{floatrow} äëÿ ðàçìåùåíèÿ ïîäïèñåé ñáîêó ôëîòîâ. +\end{Annotation*} + +\pagebreak[3] +% \subsubsection*{Undocumented features} +% The \package{sidecap} package \version{1.6} has some undocumented package +% options and commands which allow further customization of the side-captions: +\subsubsection*{Íåäîêóìåíòèðîâàííûå îñîáåííîñòè} +Ïàêåò \package{sidecap} âåðñèè \version{1.6} èìååò íåêîòîðûå íåäîêóìåíòèðîâàííûå +îïöèè è~êîìàíäû êîòîðûå ïîçâîëÿþò çàäàòü äîïîëíèòåëüíûå íàñòðîéêè: + +\pagebreak[3] +\DescribeMacro{margincaption} +% The package option +Îïöèÿ ïàêåòà +\begin{quote} + |margincaption|\qquad{\small(e.g.~|\usepackage[margincaption]{sidecap}|)} +\end{quote} +% causes all side-captions to be placed into the margin. +ïîçâîëÿåò ïîìåñòèòü âñå ïîäïèñè ñáîêó íà ïîëå. + +\pagebreak[3] +\DescribeMacro{\sidecaptionvpos} +% The command +Êîìàíäà +\begin{quote} + |\sidecaptionvpos|\marg{float type}\marg{pos} +\end{quote} +% sets the vertical position of the side-caption. \meta{pos} can be either `|t|' +% (for top alignment), `|b|' (for bottom alignment), or `|c|' (for center alignment). +% The default setting for |table| is `|t|', for |figure| and all other ones +% defined with |\Declare|\-|Caption|\-|Type| it's `|b|'. +çàäà¸ò âåðòèêàëüíîå ïîëîæåíèå ïîäïèñè. Àðãóìåíò \meta{pos} ìîæåò áûòü ëèáî `|t|' +(äëÿ âûðàâíèâàíèÿ ïî âåðõó), `|b|' (äëÿ âûðàâíèâàíèÿ ïî íèçó), èëè `|c|' +(äëÿ âûðàâíèâàíèÿ ïî öåíòðó). +Çíà÷åíèå ïî óìîë÷àíèþ äëÿ òàáëèö, |table|, \cdash--- `|t|', +äëÿ ðèñóíêîâ, |figure|, è~âñåõ äðóãèõ îêðóæåíèé, îïðåäåë¸ííûõ +ñ~ïîìîùüþ |\Declare|\-|Caption|\-|Type| \cdash--- `|b|'. + +\pagebreak[3] +\subsection{Ïàêåò subfigure} +\label{subfigure} +\packagedescription{% +% The \package{subfigure} package\cite{subfigure} provides support for small or +% `sub' figures and tables within a single figure or table environment. +% This package is obsolete, new users should use \package{subfig} instead.} +Ïàêåò \package{subfigure}\cite{subfigure} ïðåäëàãàåò ïîääåðæêó äëÿ ÷àñòåé ôëîòîâ (ïîäôëîòîâ) +âíóòðè îäíîãî îêðóæåíèÿ |figure| èëè |table|. +Ýòîò ïàêåò ÿâëÿåòñÿ óñòàðåâøèì, íîâûå ïîëüçîâàòåëÿì ðåêîìåíäóåòñÿ ïàêåò \package{subfig}.} + +% Since the \package{subfigure} package is obsolete it will only be supported in +% a way that old documents (which have used \thispackage\ \version{1.x} during +% development) should still compile as expected. +Ïîñêîëüêó ïàêåò \package{subfigure} óñòàðåâøèé, îí ïîääåðæèâàåòñÿ è~êîìïèëèðóåòñÿ òîëüêî â~ñòàðûõ äîêóìåíòàõ +(èñïîëüçóþùèõ \thispackage\ \version{1.x}). + +% Please use the \package{subfig} package instead with supports \thispackage\ +% \version{3.x}. +Âìåñòî ýòîãî èñïîëüçóéòå, ïîæàëóéñòà, ïàêåò \package{subfig}; åãî ïîääåðæèâàåò \thispackage\ +\version{3.x}. + +% \See{the \package{subfig} package\cite{subfig} documentation for details.} +\See{äîêóìåíòàöèþ ïàêåòà \package{subfig}\cite{subfig}.} + +\pagebreak[3] +\subsection{Ïàêåòû supertabular è~xtab} +\label{supertabular} +\packagedescription{% +% The \package{supertabular}\cite{supertabular} and \package{xtab}\cite{xtab} +% packages offer an environment which can span multiple pages and is quite +% similar to the \texttt{long\-table} environment provided by the +% \package{longtable} package\cite{longtable}. +% For a detailed discussion about the differences between these powerful +% packages please take a look at The \LaTeX\ Companion\cite{TLC2}.} +Ïàêåòû \package{supertabular}\cite{supertabular} è~\package{xtab}\cite{xtab} +ïðåäëàãàþò îêðóæåíèå, +àíàëîãè÷íîå \texttt{long\-table}, (ïàêåò \package{longtable}\cite{longtable}), +êîòîðîå ìîæåò ðàçáèâàòüñÿ íà íåñêîëüêî ñòðàíèö. +Äåòàëüíûå îáúÿñíåíèÿ ðàçëè÷èé ýòèõ ìîùíûõ ïàêåòîâ +ñì.~â~\LaTeX\ Companion\cite{TLC2}.} + +% If you want to setup special options for the |super|\-|tabular| +% resp.~|x|\-|tabular| environment you can use +Åñëè âàì íóæíî çàäàòü ñïåöèàëüíûå íàñòðîéêè äëÿ îêðóæåíèé |super|\-|tabular| +èëè~|xtabular| âû ìîæåòå çàïèñàòü +\begin{quote} + |\captionsetup[supertabular]|\marg{options}\quad\emph{è, ñîîòâåòñòâåííî}\\ + |\captionsetup[xtabular]|\marg{options}\quad. +\end{quote} +% These options will be executed additionally to the regular ones for +% |table|. +Ýòè íàñòðîéêè áóäóò äîáàâëåíû ê~îñíîâíûì íàñòðîéêàì +|figure| èëè |table|.\par + +\begin{Note} +% |\Continued|\-|Float| does not work for |super|\-|tabular|s and |x|\-|tabular|s. +Êîìàíäà |\Continued|\-|Float| íå ðàáîòàåò ñ~|super|\-|tabular| è~|xtabular|. +\end{Note} + +\pagebreak[3] +\subsection{Ïàêåò threeparttable} +\label{threeparttable} +\packagedescription{% +% The \package{threeparttable} package\cite{threeparttable} provides a scheme +% for tables that have a structured note section after the table contents and +% the caption. +% This scheme provides an answer to the old problem of putting footnotes in +% tables---by making footnotes entirely unnecessary.} +Ïàêåò \package{threeparttable}\cite{threeparttable} +ïðåäëàãàåò ñõåìó äëÿ òàáëèö, èìåþùèõ ñòðóêòóðèðîâàííûé ðàçäåë çàìå÷àíèé ïîñëå òàáëè÷íîãî ìàòåðèàëà +è~ïîäïèñè. +Ýòà ñõåìà ïðåäëàãàåò îòâåò äëÿ ñòàðîé ïðîáëåìû ðàçìåùåíèÿ ñíîñîê â~òàáëèöàõ áåç íåîáõîäèìîñòè +ñîçäàíèÿ ñíîñîê.} + +\NEWfeature{v3.1} +% If you want to setup special options for the |three|\-|part|\-|table| and +% |measured|\-|figure| environments you can use +Åñëè âàì íóæíî ñîçäàòü ñïåöèàëüíûå íàñòðîéêè äëÿ îêðóæåíèé +|three|\-|part|\-|table| è~|measured|\-|figure|, +âû ìîæåòå çàäàòü +\begin{quote} + |\captionsetup[threeparttable]|\marg{options}\quad\emph{è}\\ + |\captionsetup[measuredfigure]|\marg{options}\quad. +\end{quote} +% These options will be executed additionally to the regular ones for +% |table| or |figure|. +Ýòè íàñòðîéêè áóäóò äîáàâëåíû ê~îñíîâíûì íàñòðîéêàì +|figure| èëè |table|.\par + +\begin{Note} +% Since the caption will have the same width as the contents here, +% the |margin| resp.~|width| setting will not be used for these figures and tables, +% at least unless you set it explicit with +% |\caption|\-|setup[three|\-|part|\-|table]{|\ldots|}| or +% |\caption|\-|setup[measured|\-|figure]{|\ldots|}|. +Ïîñêîëüêó øèðèíà ïîäïèñè ðàâíà øèðèíå òàáëèöû, +êëþ÷è |margin| è~|width| çäåñü íå èñïîëüçóþòñÿ äëÿ ðèñóíêîâ è~òàáëèö, +òîëüêî åñëè âû íå çàäàäèòå ñòðîãî +|\caption|\-|setup|\x|[threeparttable]|\x|{|\ldots|}| +èëè |\caption|\-|setup|\x|[measuredfigure]|\x|{|\ldots|}|. +\end{Note} + +\medskip + +\begin{Annotation*} +% Instead of using the \package{threeparttable} package you can +% also use the \package{floatrow} package\cite{floatrow} for this purpose. +Âìåñòî ïàêåòà \package{threeparttable} ìîæíî èñïîëüçîâàòü +ïàêåò \package{floatrow}\cite{floatrow}. +\end{Annotation*} + +\pagebreak[3] +\subsection{Ïàêåò wrapfig} +\label{wrapfig} +\packagedescription{% +% Similar to the \package{floatflt}, the \package{picinpar}, and the +% \package{picins} package the \package{wrapfig} package\cite{wrapfig} offers +% figures and tables which do not span the full width of a page and are float +% around by text. +% For a detailed discussion about the differences between these packages +% please take a look at The \LaTeX\ Companion\cite{TLC2}.} +Àíàëîãè÷íî ïàêåòàì \package{floatflt}, \package{picinpar} è~% +\package{picins}, ïàêåò \package{wrapfig}\cite{wrapfig} ïðåäëàãàåò +îêðóæåíèÿ íåáîëüøèõ ðèñóíêîâ è~òàáëèö îáòåêàåìûõ òåêñòîì. +Çà áîëåå ïîäðîáíîé èíôîðìàöèåé î~ðàçëè÷èÿõ ïàêåòîâ îáðàùàéòåñü +ê~\LaTeX\ Companion\cite{TLC2}.} + +\NEWfeature{v3.1} +% If you want to setup special options for the |wrap|\-|figure| and +% |wrap|\-|table| environments you can use +Åñëè âàì íóæíî çàäàòü ñïåöèàëüíûå íàñòðîéêè äëÿ îêðóæåíèé |wrap|\-|figure| +è~|wrap|\-|table| âû ìîæåòå çàäàòü +\begin{quote} + |\captionsetup[wrapfigure]|\marg{options}\\ + |\captionsetup[wraptable]|\marg{options}\quad. +\end{quote} +% These options will be executed additionally to the regular ones for +% |figure| or |table|. +Ýòè íàñòðîéêè áóäóò äîáàâëåíû ê~îñíîâíûì íàñòðîéêàì +|figure| èëè |table|.\par + +% Furthermore |\Declare|\-|Caption|\-|Type|\marg{name} will also define +% an environment called |wrap|\meta{name} which behaves like |wrap|\-|figure| +% and |wrap|\-|table|. +Ïîìèìî ýòîãî êîìàíäà |\Declare|\-|Caption|\-|Type|\marg{name} îïðåäåëèò +íîâîå îêðóæåíèå |wrap|\meta{name}, êîòîðîå àíàëîãè÷íî |wrap|\-|figure| è~|wrap|\-|table|. + +\begin{Note} +% The |margin| resp.~|width| setting will not be used for these figures and +% tables, unless you set it explicit with +% |\caption|\-|setup[wrap|\-|figure]{|\ldots|}| +% or |\caption|\-|setup[wrap|\-|table]{|\ldots|}|. +Íàñòðîéêè êëþ÷åé |margin| è~|width| íå èñïîëüçóþòñÿ äëÿ ðèñóíêîâ è~òàáëèö, +òîëüêî åñëè âû íå çàäàäèòå ñòðîãî |\caption|\-|setup|\x|[wrapfigure]{|\ldots|}| +èëè |\caption|\-|setup|\x|[wraptable]{|\ldots|}|. +\end{Note} + +\begin{Note} +% If the \package{wrapfig} package should be used in coorperation with the +% \package{float} package, it needs to be loaded \emph{after} the +% \package{float} package. Furthermore |\new|\-|float| and |\restyle|\-|float| +% commands \emph{should} be placed after \emph{both} packages have been loaded. +Åñëè ïàêåò \package{wrapfig} äîëæåí áûòü èñïîëüçîâàí ñîâìåñòíî ñ~ïàêåòîì +\package{float}, òî åãî íóæíî çàãðóçèòü \emph{ïîñëå} ïàêåòà +\package{float}. Êðîìå òîãî êîìàíäû |\new|\-|float| èëè |\restyle|\-|float| +\emph{äîëæíû} áûòü ïîìåùåíû ïîñëå çàãðóçêè \emph{îáîèõ} ïàêåòîâ. +\end{Note} + +% --------------------------------------------------------------------------- % + +\clearpage +% \section{Further reading} +\section{Ðåêîìåíäóåìàÿ ëèòåðàòóðà} + +% I recommend the following documents for further reading: +ß ðåêîìåíäóþ ñëåäóþùèå äîêóìåíòû äëÿ äàëüíåéøåãî ÷òåíèÿ: + +\begin{itemize} +\item +% The \TeX\ FAQ -- Frequently asked questions about \TeX\ and \LaTeX: + The \TeX\ FAQ -- ×àÂî ïî \TeX'ó è~\LaTeX'ó: + \begin{quote}\url{http://faq.tug.org/}\end{quote} + +\item + A French FAQ can be found at + \begin{quote}\url{http://www.grappa.univ-lille3.fr/FAQ-LaTeX/}\end{quote} + +\item + ``What is a minimal working example?'' from Christian Faulhammer and Ulrich Schwarz: + \begin{quote}\url{http://www.minimalbeispiel.de/mini-en.html}\end{quote} + +\item +%^^A \textsf{epslatex} from Keith Reckdahl contains many tips around +%^^A including graphics in \LaTeXe\ documents. +%^^A You will find this document in the directory + \textsf{epslatex} (Keith Reckdahl) ñîäåðæèò ìíîæåñòâî ïîäñêàçîê + êàê ðàçìåñòèòü èëëþñòðàöèîííûé ìàòåðèàë â~äîêóìåíòàöèè ñîçäàííîé â~\LaTeXe. + Âû íàéäåòå ýòîò ôàéë â~äèðåêòîðèè + \begin{quote}\url{http://mirror.ctan.org/info/epslatex/}\end{quote} +\end{itemize} + +% --------------------------------------------------------------------------- % + +\pagebreak[3] +% \section{Thanks} +\section{Áëàãîäàðíîñòè} + +{\fontencoding{T1}%\fontfamily{ptm} +\selectfont +I would like to thank Katja Melzner, +Steven D. Cochran, Frank Mittelbach, Olga Lapko, +David Carlisle, Carsten Heinz, and Keith Reckdahl. +Thanks a lot for all your help, ideas, patience, spirit, and support! + +Also I would like to thank +Harald Harders, +Peter L\"offler, +Peng Yu, +Alexander Zimmermann, +Matthias Pospiech, +J\"urgen Wieferink, +Christoph Bartoschek, +Uwe St\"ohr, +Ralf Stubner, +Geoff Vallis, +Florian Keiler, +J\"urgen G\"obel, +Uwe Siart, +Sang-Heon Shim, +Henrik Lundell, +David Byers, +William Asquith, +Prof.~Dr.~Dirk Hoffmann, +Frank Martini, +Danie Els, +and +Markus Kohm, +who all helped to make this package a better one.} + +% --------------------------------------------------------------------------- % + +\clearpage\appendix +% \section{Alphabetical Reference} +\section{Àëôàâèòíûé óêàçàòåëü} + +%\newenvironment{Warnings}% +% {\begin{trivlist}% +% \def\Message{\pagebreak[3]\leftskip=0pt\relax\item[]\color{blue}}% +% \def\Description{\nopagebreak\par\nopagebreak\color{black}\leftskip=1.5em\nopagebreak}% +% }% +% {\color{black}\end{trivlist}} +\makeatletter +\newenvironment{Warnings}{% + \newif\ifMessage + \def\Message{% + \ifMessage\end{minipage}\par\vspace\itemsep\pagebreak[3]\fi + \begin{minipage}{\linewidth}% + \setlength\parindent{0pt}% + \setlength\parskip{\smallskipamount}% + \setlength\leftskip{0pt}% + \color{blue}% + \Messagetrue}% + \def\Description{% + \par\color{black}\leftskip=1.5em}% + \def\Or{\@testopt\@Or{èëè}}% + \def\@Or[##1]{% + \\{\small\color{black}\hspace{1.5em}\textit{-- ##1 --}}\\}% +}{% + \ifMessage\end{minipage}\par\fi +} +\makeatother + +% \subsection{Options} +\subsection{Êëþ÷è (îïöèè)} +\newcommand\preambleoption{\,% + \begingroup\def\thefootnote{\fnsymbol{footnote}}% + \footnotemark[2]% + \endgroup} +\newcommand\preambleoptiontext{% + \begingroup\def\thefootnote{\fnsymbol{footnote}}% +% \footnotetext[2]{These options are only available in the preamble of the document.}% + \footnotetext[2]{Ýòè îïöèè ìîæíî èñïîëüçîâàòü òîëüêî â~ïðåàìáóëå äîêóìåíòà.}% + \endgroup} + +\newcommand\cell[1]{\tabular[t]{@{}l@{}}#1\endtabular} + +\begin{longtable*}{@{}l@{\ }ll@{}} +% Option & Short description & Section \\ +Êëþ÷ & Êðàòêîå îïèñàíèå & Ðàçäåë \\ +\hline\noalign{\vskip2pt} +\endhead +% |aboveskip| & sets the skip above caption & \ref{skips} \\ +|aboveskip| & çàäà¸ò îòáèâêó íàä ïîäïèñüþ & \ref{skips} \\ +% |belowskip| & sets the skip below caption & \ref{skips} \\ +|belowskip| & çàäà¸ò îòáèâêó ïîä ïîäïèñüþ & \ref{skips} \\ +% |compatibility|\preambleoption & force (non-)compatibility & \ref{classes} \\ +|compatibility|\preambleoption & ôîðñèðîâàòü (íå)ñîâìåñòèìîñòü & \ref{compatibility} \\ +%|config| & & \ref{x} \\ +% |figurename|\preambleoption & sets the figure name & \ref{names} \\ +|figurename|\preambleoption & çàäàíèå èìåíè ðèñóíêà â~ìåòêå & \ref{names} \\ +% |figureposition|\preambleoption & gives a hint about the figure caption position & \ref{skips} \\ +|figureposition|\preambleoption & äà¸ò ïîäñêàçêó î~ðàçìåùåíèè ïîçèöèè ïîäïèñè ðèñóíêà & \ref{skips} \\ +% |figurewithin|\preambleoption & sets the figure ``within'' counter & \ref{numbering} \\ +|figurewithin|\preambleoption & \cell{çàäà¸ò ñ÷¸ò÷èê ðàçäåëà, êîòîðîìó ïîä÷èíÿåòñÿ\\ íóìåðàöèÿ ðèñóíêîâ} + & \ref{numbering} \\ +% |font|(|+|) & sets the font & \ref{fonts} \\ +|font|(|+|) & çàäà¸ò øðèôò & \ref{fonts} \\ +% |format| & sets the format & \ref{formats} \\ +|format| & çàäà¸ò ôîðìàò & \ref{formats} \\ +\iffalse +% |FPlist| & to where the list entry of a FPfigure should link? & \ref{fltpage} \\ +|FPlist| & ê~÷åìó ïðèâÿçûâàòü FPfigure â~Ñïèñêå ôëîòîâ? & \ref{fltpage} \\ +% |FPref| & to where a |\ref| to a FPfigure should link? & \ref{fltpage} \\ +|FPref| & ê~÷åìó ïðèâÿçûâàòü |\ref| äëÿ FPfigure? & \ref{fltpage} \\ +\fi +% |hangindent| & sets the hang indention & \ref{margins} \\ +|hangindent| & \cell{çàäà¸ò âòÿæêó [íà âåñó;\\ ñîîòâåòñòâóåò êîìàíäå \cs{hangindent}]} & \ref{margins} \\ +% |hypcap| & select `hypcap' feature & \ref{hyperref} \\ +|hypcap| & îïðåäåëÿåò ðàáîòó ïàêåòà `hypcap' & \ref{hyperref} \\ +% |hypcapspace| & sets the distance between hyperlink \& contents & \ref{hyperref} \\ +|hypcapspace| & \cell{çàäà¸ò ðàññòîÿíèå ìåæäó ãèïåðññûëêîé\\ è~ñîäåðæèìûì +îáúåêòà} & \ref{hyperref} \\ +% |indention| & sets the indention & \ref{margins} \\ +|indention| & çàäà¸ò âòÿæêó & \ref{margins} \\ +% |justification| & sets the justification & \ref{justification} \\ +|justification| & çàäà¸ò âûêëþ÷êó & \ref{justification} \\ +% |labelfont|(|+|) & sets the font of the caption label & \ref{fonts} \\ +|labelfont|(|+|) & çàäà¸ò øðèôò äëÿ ìåòêè ôëîòà & \ref{fonts} \\ +% |labelformat| & sets the format of the caption label & \ref{formats} \\ +|labelformat| & \cell{çàäà¸ò ôîðìàò [îôîðìëåíèå] íóìåðàöèîííîãî\\ çàãîëîâêà} & \ref{formats} \\ +% |labelsep| & sets the label separator & \ref{formats} \\ +|labelsep| & \cell{çàäà¸ò ðàçäåëèòåëü ìåæäó íóìåðàöèîííûì\\ çàãîëîâêîì +è~òåêñòîì ïîäïèñè} & \ref{formats} \\ +% |labelseparator| & sets the label separator & \ref{formats} \\ +|labelseparator| & \cell{çàäà¸ò ðàçäåëèòåëü ìåæäó íóìåðàöèîííûì\\ çàãîëîâêîì +è~òåêñòîì ïîäïèñè} & \ref{formats} \\ +% |list| & switches the entries in the `List of' on or off & \ref{lists} \\ +|list| & \cell{îïðåäåëÿåò (âêëþ÷àåò/îòêëþ÷àåò) âûâîä ïîäïèñåé\\ â~Ñïèñêå ôëîòîâ} & \ref{lists} \\ +% |listformat| & sets the `List of' entry format & \ref{lists} \\ +% |listfigurename| & sets the `List of Figure' name & \ref{names} \\ +|listfigurename| & çàäà¸ò çàãîëîâîê äëÿ Ñïèñêà ðèñóíêîâ & \ref{names} \\ +|listformat| & îïðåäåëÿåò ôîðìàò äëÿ âûâîäà â~Ñïèñêå ôëîòîâ & \ref{lists} \\ +% |listtablename| & sets the `List of Tables' name & \ref{names} \\ +|listtablename| & çàäà¸ò çàãîëîâîê äëÿ Ñïèñêà òàáëèö & \ref{names} \\ +% |margin| & sets the margin & \ref{margins} \\ +|margin| & çàäà¸ò ïîëÿ âîêðóã ïîäïèñè & \ref{margins} \\ +% |margin*| & sets the margin, but only if no width is set & \ref{margins} \\ +|margin*| & \cell{çàäà¸ò ïîëÿ, â~ñëó÷àå, åñëè øèðèíà ïîäïèñè\\ íå çàäàíà} & \ref{margins} \\ +% |maxmargin| & sets the max. margin & \ref{margins} \\ +|maxmargin| & çàäà¸ò ìàêñèìàëüíóþ âåëè÷èíó ïîëÿ & \ref{margins} \\ +% |minmargin| & sets the min. margin & \ref{margins} \\ +|minmargin| & çàäà¸ò ìèíèìàëüíóþ âåëè÷èíó ïîëÿ & \ref{margins} \\ +%| name| & sets the name of the current environment & \ref{names} \\ +|name| & çàäà¸ò èìÿ íîâîãî îêðóæåíèÿ & \ref{names} \\ +% |oneside| & selects the one-side mode & \ref{margins} \\ +|oneside| & çàäà¸ò îäíîñòîðîííþþ ïå÷àòü äîêóìåíòà & \ref{margins} \\ +% |options| & executes the given option list & \ref{x} \\ +|options| & âêëþ÷àåò äàííûé ñïèñîê îïöèé & \\ +% |parindent| & sets the paragraph indention & \ref{margins} \\ +|parindent| & çàäà¸ò àáçàöíûé îòñòóï & \ref{margins} \\ +% |parskip| & sets the skip between paragraphs & \ref{margins} \\ +|parskip| & çàäà¸ò îòáèâêó ìåæäó àáçàöàìè & \ref{margins} \\ +% |position| & gives a hint about the caption position & \ref{skips} \\ +|position| & äà¸ò ïîäñêàçêó î~ðàçìåùåíèè ïîäïèñè & \ref{skips} \\ +% |singlelinecheck| & switches the single-line-check on or off & \ref{justification} \\ +|singlelinecheck| & âêëþ÷àåò êîíòðîëü [îôîðìëåíèÿ] îäíîñòðî÷íûõ ïîäïèñåé & \ref{justification} \\ +%|size| & sets the size of font & \ref{x} \\ +% |skip| & sets the skip between content \& caption & \ref{skips} \\ +|skip| & \cell{çàäà¸ò îòáèâêó ìåæäó ñîäåðæèìûì ôëîòà è~ïîäïèñè} & \ref{skips} \\ +% |strut| & switches the usage of |\strut|s on or off & \ref{formats} \\ +|strut| & âêëþ÷àåò èñïîëüçîâàíèå êîìàíäû ðàñïîðêè |\strut| & \ref{formats} \\ +% |style| & sets the caption style & \ref{style} \\ +|style| & çàäà¸ò ñòèëü îôîðìëåíèÿ ïîäïèñè & \ref{style} \\ +%|style*| & sets the caption style & \ref{style} \\ +% |subtype| & sets the sub-caption type & \phantom{t}--~\footnotemark \\ +|subtype| & çàäà¸ò âûâîä ïîäïèñè ÷àñòè ôëîòà & \phantom{t}--~\footnotemark \\ +% |tablename|\preambleoption & sets the table name & \ref{names} \\ +|tablename|\preambleoption & çàäà¸ò èìÿ òàáëèöû & \ref{names} \\ +% |tableposition|\preambleoption & gives a hint about the table caption position & \ref{skips} \\ +|tableposition|\preambleoption & \cell{äà¸ò ïîäñêàçêó î~ïîëîæåíèè ïîäïèñè òàáëèöû + \\(òàáëè÷íîãî çàãîëîâêà)} & \ref{skips} \\ +% |tablewithin|\preambleoption & sets the table ``within'' counter & \ref{numbering} \\ +|tablewithin|\preambleoption & \cell{çàäà¸ò ñ÷¸ò÷èê ðàçäåëà, êîòîðîìó ïîä÷èíÿåòñÿ\\ íóìåðàöèÿ òàáëèö} + & \ref{numbering} \\ +% |textfont|(|+|) & sets the font of the caption text & \ref{fonts} \\ +|textfont|(|+|) & çàäà¸ò øðèôò äëÿ òåêñòà ïîäïèñè & \ref{fonts} \\ +% |textformat| & sets the format of the caption text & \ref{formats} \\ +|textformat| & çàäà¸ò ôîðìàò òåêñòà ïîäïèñè & \ref{formats} \\ +% |twoside| & selects the two-side mode & \ref{margins} \\ +|twoside| & çàäà¸ò äâóñòîðîííþþ ïå÷àòü äîêóìåíòà & \ref{margins} \\ +% |type| & sets the caption type \& places a hyperlink anchor & \ref{types} \\ +|type| & çàäà¸ò òèï ïîäïèñè è~ïîìåùàåò íà÷àëî ãèïåðññûëêè & \ref{types} \\ +% |type*| & sets the caption type only & \ref{types} \\ +|type*| & çàäà¸ò òîëüêî òèï ïîäïèñè & \ref{types} \\ +% |width| & sets a fixed caption width & \ref{margins} \\ +|width| & çàäà¸ò ôèêñèðîâàííóþ øèðèíó ïîäïèñè & \ref{margins} \\ +\end{longtable*} +\preambleoptiontext +% \footnotetext{The option \opt{subtype} is explained in the +% \package{subcaption} package documentation.} +\footnotetext{Çíà÷åíèå îïöèè \texttt{subtype} îáúÿñíÿåòñÿ â~äîêóìåíòàöèè ê~ïàêåòó + \package{subcaption}.} + +\nopagebreak\parbox[t]{\linewidth}{% +\begin{Note*} +% Obsolete options are not listed here. See +% \Ref{caption1} and +% \Ref{caption2} for a list of these options.} + Óñòàðåâøèå îïöèè çäåñü íå ïåðå÷èñëÿþòñÿ. Çà ñïèñêîì ýòèõ îïöèé îáðàòèòåñü ê~äîêóìåíòàöèè + \Ref{caption1} è~\Ref{caption2}. +\end{Note*}} + +% \subsection{Commands} +\subsection{Êîìàíäû} + +\begin{longtable*}{lll} +Êîìàíäà & & Ðàçäåë \\ +\hline +\endhead +|\abovecaptionskip| & & \ref{skips} \\ +%|\AtBeginCaption| & & \ref{hooks} \\ +%|\AtEndCaption| & & \ref{hooks} \\ +|\belowcaptionskip| & & \ref{skips} \\ +|\caption| & & \ref{caption} \\ +|\caption*| & & \ref{caption} \\ +|\captionlistentry| & & \ref{captionlistentry} \\ +|\captionof| & & \ref{caption} \\ +|\captionof*| & & \ref{caption} \\ +|\captionsetup| & & \ref{captionsetup} \\ +|\captionsetup*| & & \ref{captionsetup} \\ +|\centerfirst| & & \ref{justification} \\ +|\centerlast| & & \ref{justification} \\ +|\clearcaptionsetup| & & \ref{captionsetup} \\ +|\clearcaptionsetup*| & & \ref{captionsetup} \\ +|\ContinuedFloat| & & \ref{ContinuedFloat} \\ +|\DeclareCaptionFont| & & \ref{declare} \\ +|\DeclareCaptionFormat| & & \ref{declare} \\ +|\DeclareCaptionFormat*| & & \ref{declare} \\ +|\DeclareCaptionJustification| & & \ref{declare} \\ +|\DeclareCaptionLabelFormat| & & \ref{declare} \\ +|\DeclareCaptionLabelSeparator| & & \ref{declare} \\ +|\DeclareCaptionLabelSeparator*| & & \ref{declare} \\ +|\DeclareCaptionListFormat| & & \ref{declare} \\ +|\DeclareCaptionOption| & & \ref{declare} \\ +|\DeclareCaptionStyle| & & \ref{declare} \\ +|\DeclareCaptionSubType| & & --~\footnotemark \\ +|\DeclareCaptionTextFormat| & & \ref{declare} \\ +|\DeclareCaptionType| & & \ref{declare} \\ +|\showcaptionsetup| & & \ref{captionsetup} \\ +\end{longtable*} +% \footnotetext{\cs{DeclareCaptionSubType} is explained in the +% \package{subcaption} package documentation.} +\footnotetext{Êîìàíäà \cs{DeclareCaptionSubType} îïèñàíà + â~äîêóìåíòàöèè ê~ïàêåòó \package{subcaption}.} + +\clearpage +% \subsection{Warnings} +\subsection{Ïðåäóïðåæäåíèÿ} + +\begin{Warnings} + +\Message + |\caption outside box or environment.| +\Or + |\captionsetup{type=...} outside box or environment.| +\Or + |\captionsetup{type*=...} or \captionof outside box|\\ + | or environment.| +\Description +% You have placed a |\caption|, |\caption|\-|of|, or +% |\caption|\-|setup{type=|\x\meta{type}|}| command outside an box, group, +% or environment. +% You should not do this since it could cause some bad side-effects. +% \par\See{\Ref{types} and \Ref{caption}} + Âû ïîìåñòèëè |\caption|, |\caption|\-|of|, èëè + |\caption|\-|setup{type=|\x\meta{type}|}| âíå áîêñà, ãðóïïû + èëè îêðóæåíèÿ. + Ýòî ìîæåò ñîçäàòü ïîáî÷íûå ýôôåêòû. + \par\See{\Ref{types} è~\Ref{caption}} + +\Message + |\caption will not be redefined since it's already|\\ + |redefined by a document class or package which is|\\ + |unknown to the caption package.| +\Description +% If \thispackage\ detects that some (unknown) document class or +% package has enhanced |\caption|, it will not redefine +% |\caption|, too, since this would simply kill the enhancement. +% As a result some features, like |\caption*|, |\Continued|\-|Float|, +% using the optional argument of |\caption|\-|setup|, +% or the options |list=| and |hypcap=| will not be available.\par +% If you don't care about the original enhancements but would +% like to use the full range of features of \thispackage\ instead +% you can give the unsupported(!) option |compatibility=|\x|false| +% a try and keep your fingers crossed. +% (But you will get the next warning instead.) +% \par\See{\Ref{classes} and \Ref{compatibility}} + \Thispackage\ îáíàðóæèë, ÷òî èñïîëüçóåòñÿ êàêîé-ëèáî (íåèçâåñòíûé) êëàññ äîêóìåíòà èëè + ïàêåò, ðàñøèðèâøèé îïðåäåëåíèå |\caption|, ïîýòîìó äàëüíåéøåå ïåðåîïðåäåëåíèå + |\caption| ìîæåò óíè÷òîæèòü èñïîëüçóåìûå íàñòðîéêè. + Â~ðåçóëüòàòå íåêîòîðûå îñîáåííîñòè, òàêèå êàê |\caption*|, |\ContinuedFloat|, + èñïîëüçîâàíèå äîïîëíèòåëüíîãî àðãóìåíòà |\captionsetup|, + èëè îïöèé |list=| è~|hypcap=| íåâîçìîæíî.\par + Åñëè âàì íå íóæíû îðèãèíàëüíûå íàñòðîéêè è~âàæíåå èñïîëüçîâàòü + ïîëíûé ñïåêòð âîçìîæíîñòåé äàííîãî ïàêåòà, âû ìîæåòå çàäàòü + íåïîääåðæèâàåìóþ(!) îïöèþ |compatibility=false| + è~íàäåÿòüñÿ íà ëó÷øåå. + (Íî â~ýòîì ñëó÷àå âû ïîëó÷èòå ñëåäóþùåå ïðåäóïðåæäåíèå.) + \par\See{\Ref{classes}} + +\Message + |Forced redefinition of \caption since the|\\ + |unsupported(!) package option `compatibility=false'|\\ + |was given.| +\Description +% Since you were so keen to specify the option |compatibility=|\x|false| +% \thispackage\ will try to do its best to fulfill your wishes. +% But depending on the document class or other packages you use that +% can end in non-functional features or even errors. So keep your +% fingers crossed! + Åñëè âû áûëè ñòîëü îòâàæíû, çàäàâ îïöèþ |compatibility=|\x|false|, + \thispackage\ ïîñòàðàåòñÿ ñäåëàòü âñ¸, ÷òî âû ïîòðåáóåòå. + Íî òàêîå èñïîëüçîâàíèå ýòîãî ïàêåòà ñîâìåñòíî ñ~òàêèì ïàêåòîì èëè êëàññîì + ìîæåò îòêëþ÷èòü íåêîòîðûå îñîáåííîñòè èëè ïîðîäèòü îøèáêè. + Èòàê, íàäåéòåñü íà ëó÷øåå! + \par\See{\Ref{compatibility}} + +\Message + |Hyperref support is turned off because hyperref has|\\ + |stopped early.| +\Description +% If the \package{hyperref} package stops early during loading +% (because of what-ever reason), the \package{hyperref} support of +% \thispackage\ will not be available. As a result you could get +% \package{hyperref} warnings and non-functional hyperlinks to figures +% or tables. + Åñëè çàãðóçêà ïàêåòà \package{hyperref} çàâåðøèëàñü ðàíüøå ïîëîæåííîãî + (ïî êàêîé-ëèáî ïðè÷èíå), ïîääåðæêà ïàêåòà \package{hyperref} ïàêåòîì + \package{caption} áóäåò îòêëþ÷åíà. Â~ðåçóëüòàòå âû ïîëó÷èòå + \package{hyperref} ïðåäóïðåæäåíèÿ è~íåôóíêöèîíèðóþùèå ãèïåðññûëêè íà ðèñóíêè + èëè òàáëèöû. + \par\See{\Ref{hyperref}\,} + +\Message + |Ignoring optional argument [|\meta{pos}|] of \setcapwidth.| +\Description +% \Thispackage\ tries to emulate the \KOMAScript\ commands regarding +% captions as best as it can. But the optional argument of the +% \KOMAScript\ command |\setcapwidth| is not (yet) working if you use +% this package, so if you try to use it anyway, you will get this warning. + \Thispackage\ ñòàðàåòñÿ êîððåêòíî ýìóëèðîâàòü êîìàíäû \KOMAScript, îòíîñÿùèåñÿ ê~ïîäïèñÿì. + Íî îïöèÿ êîìàíäû |\setcapwidth| èç + \KOMAScript\ åù¸ íå ðàáîòàåò âìåñòå ñ~ýòèì ïàêåòîì, + ïîýòîìó, åñëè âû ðåøèòå å¸ èñïîëüçîâàòü, âû ïîëó÷èòå ïðåäóïðåæäåíèå. + \par\See{\Ref{KOMA}} + +\Message + |Internal Warning: |\meta{warning message}|.| +\Description +% You should never see this warning, either you use a package which redefines +% |figure| or |table| and which is unknown to \thispackage, or this is a bug +% in \thispackage. +% Please send me an e-mail reporting this issue. + Íàäåþñü âû íå óâèäèòå òàêîãî ñîîáùåíèÿ, îíî ïîÿâèòñÿ â~ñëó÷àå ïåðåîïðåäåëåíèé îêðóæåíèé + |figure| èëè |table|, íåèçâåñòíûõ äàííîìó ïàêåòó, èëè ýòî îøèáêà ñàìîãî ïàêåòà + \package{caption}. + Ïîæàëóéñòà, ïðèøëèòå e-mail ñ~îáðàçöîì, äàþùèì ýòî ñîîáùåíèå. + +\Message + |\label before \caption ignored| +\Description +% Regarding |\label| the floating environments behave differently than its +% non-floating counterparts: The internal reference will not be generated +% at the beginning of the environment, but at |\caption| instead. +% So you have to place the |\label| command either just \emph{after} or +% \emph{inside} the caption text (mandatory argument of |\caption|). + Ìåòêè, |\label|, ê~ïëàâàþùèì îáúåêòàì ðàáîòàþò íå òàê, êàê íåïëàâàþùèå îêðóæåíèÿ: + èíôîðìàöèÿ äëÿ ìåòêè ãåíåðèðóåòñÿ íå â~íà÷àëå îêðóæåíèÿ, + à~ïîñëå êîìàíäû |\caption|. + Ïîýòîìó âû äîëæíû ïîìåñòèòü êîìàíäó |\label| ëèáî \emph{ïîñëå} òåêñòà + |\caption| ëèáî âíóòðè òåêñòà ïîäïèñè. + +\Message + |Option `|\meta{option}|' was not in list `|\meta{option list}|'.| +\Description +% If you try to remove a specific option of an option list, +% for example with |\clear|\-|caption|\-|setup[po|\-|si|\-|tion]{table}|, +% and this option can not be found inside the option list, you will +% get this warning. If this is not because of a typo and you would like +% to suppress this warning, use |\clear|\-|caption|\-|setup*| instead of +% |\clear|\-|caption|\-|setup|. + Åñëè âû ïîïðîáóåòå óäàëèòü îïöèþ èç ñïèñêà îïöèé, + íàïðèìåð, |\clear|\-|caption|\-|setup[po|\-|si|\-|tion]{table}|, + à~ýòà îïöèÿ íå áûëà îáíàðóæåíà â~ñïèñêå, âû ïîëó÷èòå + ýòî ïðåäóïðåæäåíèå. Åñëè ýòî ïðîèñõîäèò íå èç-çà îïå÷àòêè è~âû õîòèòå çàïðåòèòü ýòî + ïðåäóïðåæäåíèå, èñïîëüçóéòå |\clearcaptionsetup*| âìåñòî + |\clearcaptionsetup|. + \par\See{\Ref{captionsetup}} + +\Message + |Option list `|\meta{option list}|' undefined.| +\Description +% If you try to remove a specific option of an option list, +% for example with |\clear|\-|caption|\-|setup[for|\-|mat]{figure}|, +% and this option list is not defined (yet), you will +% get this warning. If this is not because of a typo and you would like +% to suppress this warning, use |\clear|\-|caption|\-|setup*| instead of +% |\clear|\-|caption|\-|setup|. + Åñëè âû ïîïðîáóåòå óäàëèòü îïöèþ èç ñïèñêà îïöèé, + íàïðèìåð, |\clear|\-|caption|\-|setup[for|\-|mat]{figure}|, + à~ýòà îïöèÿ íå áûëà îáíàðóæåíà â~ñïèñêå, âû ïîëó÷èòå + ýòî ïðåäóïðåæäåíèå. Åñëè ýòî ïðîèñõîäèò íå èç-çà îïå÷àòêè è~âû õîòèòå çàïðåòèòü ýòî + ïðåäóïðåæäåíèå, èñïîëüçóéòå |\clearcaptionsetup*| âìåñòî + |\clearcaptionsetup|. + \par\See{\Ref{captionsetup}} + +\iffalse +\Message + |Possibly superfluous \restylefloat{|\meta{type}|} detected.|\\ + |If you think that this warning is unjustified,|\\ + |you can switch it off using the caption package|\\ + |option `restylefloatcheck=off'.| +\Description + \TODO +\fi + +\Message + |`ragged2e' package not loaded, therefore|\\ + |substituting \raggedright for \RaggedRight.| +\Description +% The caption option |justification=|\x|RaggedRight| is only full functional +% if you have the \package{ragged2e} package installed in your \TeX\ system. +% If not, you will get this warning, and |justification=|\x|RaggedRight| +% will be treated as |justification=|\x|raggedright|. + Îïöèÿ |justification=|\x|RaggedRight| áóäåò ôóíêöèîíèðîâàòü + åñëè ïàêåò \package{ragged2e} èíñòàëëèðîâàí â~âàøåé ñèñòåìå \TeX{}. + Åñëè ïàêåòà íåò, âû ïîëó÷èòå ïðåäóïðåæäåíèå, è~|justification=|\x|RaggedRight| + áóäåò ðàáîòàòü êàê |justification=|\x|raggedright|. + \par\See{\Ref{justification}} + +\Message + |Obsolete option `ignoreLTcapwidth' ignored.| +\Description +% The \package{caption2} package option |ignoreLTcapwidth| will not be +% emulated by this version of \thispackage, usually you can simply wipe it +% away. + Îïöèÿ ïàêåòà \package{caption2}, |ignoreLTcapwidth|, íå áóäåò ýìóëèðîâàòüñÿ + äàííîé âåðñèåé ïàêåòà, îáû÷íî ýòî ïðåäóïðåæäåíèå ìîæíî èãíîðèðîâàòü. + \par\See{\Ref{caption2} and \Ref{longtable}} + +\Message + |`ragged2e' support has been changed. Rerun to get|\\ + |captions right.| +\Description +% The \package{ragged2e} package will only be loaded by \thispackage\ if it +% is actually needed. +% At least two \LaTeX\ runs are needed for that, so on the first run you could +% get this warning. +% Just compile your document again and this warning should go away. + Ïàêåò \package{ragged2e} ìîæåò áûòü çàãðóæåí ïàêåòîì \package{caption} åñëè ýòî + äåéñòâèòåëüíî íåîáõîäèìî. + Ïî êðàéíåé ìåðå äëÿ ýòîãî íóæíû äâå îáðàáîòêè \LaTeX'à, è~ïðè ïåðâîé îáðàáîòêå + âû ïîëó÷èòå ýòî ñîîáùåíèå. + Ñêîìïèëèðóéòå äîêóìåíò âòîðîé ðàç è ïðåäóïðåæäåíèå èñ÷åçíåò. + \par\See{\Ref{justification}} + +\Message + |Reference on page |\meta{page no.}| undefined.| +\Description +% If you use a |twoside| page layout, \thispackage\ needs to track the +% page numbers to get the margins right. +% At least two \LaTeX\ runs are needed for that, on the first run you could get +% this warning. +% Just compile your document again and this warning should go away. + Åñëè âû èñïîëüçóåòå îïöèþ äîêóìåíòà |twoside|, ïàêåòó íóæíî êîíòðîëèðîâàòü íóìåðàöèþ ñòðàíèö, + ÷òîáû ïîëó÷èòü âåðíî ðàçìåù¸ííûå ïîëÿ. + Äëÿ ýòîãî íóæíû äâå îáðàáîòêè \LaTeX'îì, à~ïðè ïåðâîé îáðàáîòêå âû ïîëó÷èòå ýòî + ñîîáùåíèå. + Ñêîìïèëèðóéòå äîêóìåíò âòîðîé ðàç è ïðåäóïðåæäåíèå èñ÷åçíåò. + \par\See{\Ref{margins}} + +\Message + |The caption type was already set to `|\meta{type}|'.| +\Description +% This warning informs you about mixed caption options. For example if +% you use a |\caption|\-|setup{type=|\x|table}| or +% |\caption|\-|of{table}{|\ldots|}| inside a |figure| environment, +% this would result in using both option sets for that specific caption, +% the one for |figure| (specified with |\caption|\-|setup[figure]{|\ldots|}|) +% and the one for |table| (specified with |\caption|\-|setup[table]{|\ldots|}|) +% as well.\par +% {\small(You can suppress this warning by using the starred form +% |\caption|\-|setup*{type=|\x\ldots|}|.)\par} + Ýòî ïðåäóïðåæäåíèå èíôîðìèðóåò î~ñìåøåíèè îïöèé. Íàïðèìåð, + âû èñïîëüçóåòå |\captionof{table}{|\ldots|}| âíóòðè îêðóæåíèÿ |figure|, + ýòî ÿâëÿåòñÿ ðåçóëüòàòîì èñïîëüçîâàíèÿ îáåèõ îïöèé äëÿ ýòîé ñïåöèôè÷åñêîé ïîäïèñè: + äëÿ |figure| (çàäàííîé ñ~ïîìîùüþ |\captionsetup[figure]{|\ldots|}|) + è~äëÿ |table| (çàäàííîé ñ~ïîìîùüþ |\captionsetup[table]{|\ldots|}|).\par + {\small(Âû ìîæåòå îòêëþ÷èòü ýòî ïðåäóïðåæäåíèå, èñïîëüçóÿ çâ¸çäíóþ ôîðìó êîìàíäû + |\caption|\-|setup*{type=|\x\ldots|}|.)\par} + \par\See{\Ref{captionsetup}} + +\Message + |The option `hypcap=true' will be ignored for this|\\ + |particular \caption.| +\Description +% \Thispackage\ hasn't found a proper hyperlink anchor for this particular +% caption, so it decides to ignore the setting |hypcap=|\x|true| (which is set by +% default). As a result a link to this caption (e.g.~in the List of Figures, +% or set by |\ref| or |\auto|\-|ref|) will link you to the caption of the figure +% or table, not to the figure or table itself.\par + \Thispackage\ íå íàø¸ë ïîäõîäÿùåå ìåñòî äëÿ ãèïåðññûëêè äëÿ äàííîé + ïîäïèñè, ïîýòîìó ïàêåò ðåøàåò èãíîðèðîâàòü íàñòðîéêè |hypcap=|\x|true| (çàäàííûå + ïî óìîë÷àíèþ). Â~ðåçóëüòàòå ññûëêà íà ýòó ïîäïèñü (íàïðèìåð, â~Ñïèñêå ðèñóíêîâ, + èëè â~êîìàíäàõ |\ref| èëè |\autoref|) áóäåò ïðèâÿçàíà ê~ïîäïèñè ðèñóíêà èëè òàáëèöû, + à~íå ê~ñîäåðæèìîìó ðèñóíêà èëè òàáëèöû.\par +% This can happen if you use |\caption|\-|of| inside a non-floating environment, +% but also if you use some package which redefines |figure| or |table|, and +% which is unknown to \thispackage.\par + Ýòî ìîæåò ïðîèçîéòè åñëè âû èñïîëüçóåòå êîìàíäó |\captionof| â~íåïëàâàþùåì îêðóæåíèè, + à~òàêæå ïðè èñïîëüçîâàíèè ïàêåòà, ïåðåîïðåäåëÿþùåãî îêðóæåíèÿ |figure| èëè |table|, + íåèçâåñòíîãî äàííîìó ïàêåòó.\par +% If this is ok for you but you want to suppress this warning, simply place a +% |\caption|\-|setup{hyp|\-|cap=|\x|false}| just before the |\caption| or +% |\caption|\-|of| command which is causing the warning. + Åñëè âàì ýòî ïîäõîäèò è~âû õîòèòå çàïðåòèòü ýòî ïðåäóïðåæäåíèå, çàäàéòå êîä + |\caption|\-|setup{hyp|\-|cap=|\x|false}| ïåðåä |\caption| èëè + |\captionof|, êîòîðûå ïîðîæäàþò ïðåäóïðåæäåíèå. +% If this is not ok for you, you can set a hyperlink anchor with +% |\caption|\-|setup{type=|\x\meta{float type}|}| for yourself. + Åñëè æå ýòî âàñ íå óñòðàèâàåò, âû ìîæåòå ïîïðîáîâàòü çàäàòü ãèïåðññûëêó, ñ~ïîìîùüþ + |\caption|\-|setup{type=|\x\meta{float type}|}|. + \par\See{\Ref{hyperref}} + +\Message + |Unsupported document class (or package) detected,|\\ + |usage of the caption package is not recommended.| +\Description +% Either the document class you use is unknown to \thispackage, or you +% have included a package in your document which redefines |\@make|\-|caption| +% (which is responsible for typesetting the caption internally) as well. +% This means \thispackage\ will either change the design of captions in an +% unwanted way, or it even refuses to work correctly at all. + Ëèáî êëàññ äîêóìåíòà íåèçâåñòåí äàííîìó ïàêåòó, ëèáî âû + ïîäêëþ÷èëè ïàêåò, êîòîðûé ïåðåîïðåäåëÿåò êîìàíäó |\@makecaption| + (âíóòðåííÿÿ êîìàíäà, ñîçäàþùàÿ ïîäïèñè). + Ýòî îçíà÷àåò ÷òî \thispackage\ èçìåíèò îôîðìëåíèå ïîäïèñåé â~íåæåëàòåëüíûì ñïîñîáîì, + èëè âîîáùå îòêàæåòñÿ ðàáîòàòü. + \par\See{\Ref{classes} è~\Ref{compatibility}} + +\Message + |Unused \captionsetup[|\meta{type}|].| +\Description +% You have specified options with |\caption|\-|setup[|\meta{type}|]| which are +% not used later on. +% This can be because of a typo in \meta{type}, +% or because you use a package which redefines |figure| or |table| and +% which is unknown to \thispackage, or simply because you don't have any usage +% of the environment \meta{type} after this line. +% (If you want to suppress this warning you can use |\caption|\-|setup*| +% instead of |\caption|\-|setup|.) + Âû îïðåäåëèëè îïöèè |\captionsetup[|\meta{type}|]| êîòîðûå + ïîçäíåå íå èñïîëüçîâàëèñü. + Ýòî ìîæåò ïðîèçîéòè èç-çà îïå÷àòêè â~àðãóìåíòå \meta{type}, + èëè ïîòîìó, ÷òî âû èñïîëüçóåòå ïàêåò, êîòîðûé ïåðåîïðåäåëÿåò îêðóæåíèÿ |figure| èëè |table|, + íåèçâåñòíûé äàííîìó ïàêåòó, èëè ïðîñòî âû íå èñïîëüçîâàëè îêðóæåíèÿ + \meta{type} ïîñëå çàäàííûõ íàñòðîåê.\par + (Åñëè âû õîòèòå çàïðåòèòü ýòî ïðåäóïðåæäåíèå, âû ìîæåòå çàäàòü |\captionsetup*| âìåñòî + |\captionsetup|.)\enlargethispage{\baselineskip} + \par\See{\Ref{captionsetup}} + +\Message + |Usage of the |\meta{package}| package together with the|\\ + |caption package is strongly not recommended.|\\ + |Instead of loading the |\meta{package}| package you should|\\ + |use the caption package option `tableposition=top'.| +\Description +% The package \meta{package} is dealing with caption skips as well. +% Please decide which one do you actually want to use, \thispackage\ or the +% other one, using both can lead to wrong skips above or below the caption. + Ïàêåò \meta{package} èçìåíÿåò îòáèâêè âîêðóã ïîäïèñè. + Ðåøèòå, ÷åé èíòåðôåéñ âû ïðåäïî÷ò¸òå: \thispackage\ èëè + äðóãîé ïàêåò, èñïîëüçîâàíèå îáîèõ ìîæåò çàäàòü íåâåðíûå îòáèâêè âîêðóã ïîäïèñè. + \par\See{\Ref{skips}} + +\end{Warnings} + +\pagebreak[3] +%^^A\subsection{Errors} +\subsection{Ñîîáùåíèÿ îá îøèáêàõ} + +\begin{Warnings} + +\Message + |Argument of \@caption has an extra }.| +\Or + |Paragraph ended before \@caption was complete.| +\Description +% If you want to typeset something special (like a tabular) as caption, +% you need to give an optional argument to |\caption| resp.~|\caption|\-|of| +% for the List of Figures resp.~List of Tables, too, even if you don't +% use such list. + Åñëè âû õîòèòå ñîçäàòü ÷òî-òî íåîáû÷íîå (íàïðèìåð òàáëèöó) âíóòðè ïîäïèñè, + âû äîëæíû çàäàòü äîïîëíèòåëüíûé àðãóìåíò äëÿ êîìàíäû |\caption| èëè |\captionof|, + ÷òîáû ïîìåñòèòü òåêñò â~Ñïèñîê ðèñóíêîâ èëè òàáëèö, äàæå åñëè âû íå èñïîëüçóåòå + òàêîé ñïèñîê. + \par\See{\Ref{caption}, \Ref{lists}, è~\Ref{hyperref}\,} + +\Message + |\caption outside float.| +\Description +% You have placed a |\caption| command outside a floating environment, or +% a |long|\-|table| or |wrap|\-|figure|. +% If this is what you want to, please use either +% |\caption|\-|setup{type=|\x\meta{type}|}| $+$ |\caption| or +% |\caption|\-|of|. + Âû ïîìåñòèëè êîìàíäó |\caption| çà ïðåäåëàìè îêðóæåíèÿ ôëîòà èëè + |longtable|. Åñëè âû äåëàåòå ýòî ñîçíàòåëüíî, çàäàéòå + |\captionsetup{|\x|type=|\x\meta{type}|}| $+$ |\caption| èëè |\captionof|. + \par\See{\Ref{caption}} + +\Message + |\ContinuedFloat outside float.| +\Description +% You have placed a |\Continued|\-|Float| command outside a floating +% environment. % or |long|\-|table|. + Âû ïîìåñòèëè êîìàíäó |\ContinuedFloat| âíå îêðóæåíèÿ ôëîòà. +% If this is what you want to, please use the combination +% |\caption|\-|setup{type=|\x\meta{type}|}| $+$ |\Continued|\-|Float|.\par + Åñëè âû ýòî ñäåëàëè ñîçíàòåëüíî, èñïîëüçóéòå êîìáèíàöèþ + |\captionsetup{|\x|type=|\x\meta{type}|}| $+$ |\ContinuedFloat|.\par +% Please note that |\Continued|\-|Float| inside a |long|\-|table| is not +% working, but maybe using the |long|\-|table*| environment, which +% typesets a |long|\-|table| without incrementing the |table| counter, +% if sufficient for you. + Îáðàòèòå âíèìàíèå, ÷òî èñïîëüçîâàíèå |\ContinuedFloat| âíóòðè |longtable| (ïîêà) íå ðàáîòàåò, + íî, âîçìîæíî èñïîëüçîâàíèå îêðóæåíèÿ |longtable*|, êîòîðîå ñîçäà¸ò |longtable| + áåç óâåëè÷åíèÿ íóìåðàöèè |table|, ðåøèò âàøè ïðîáëåìû. + \par\See{\Ref{ContinuedFloat} è~\Ref{longtable}} + +\Message + |Continued `|\meta{type}|' after `|\meta{type}|'.| +\Description +% Continued figures or tables are not allowed to be interrupted by a floating +% environment (or |long|\-|table|) of another type, +% e.g.~a table between a figure and a continued figure. + Ïðîäîëæàþùèåñÿ ðèñóíêè èëè òàáëèöû íå äîëæíû ïðåðûâàòüñÿ + îêðóæåíèåì äðóãîãî òèïà (èëè îêðóæåíèåì |long|\-|table|), + íàïðèìåð òàáëèöà ìåæäó ðèñóíêîì è~åãî ïðîäîëæåíèåì. + \par\See{\Ref{ContinuedFloat}} + +\Message + |For a successful cooperation of the `wrapfig' package|\\ + |with the `float' package you should load the `wrapfig'|\\ + |package *(right) after* the `float' package.| +\Description +% Please take care of the load order of packages +% if you use the \package{wrapfig} package in cooperation with the +% \package{float} package. + Áóäüòå âíèìàòåëüíû ñ~ïîðÿäêîì çàãðóçêè ïàêåòîâ, åñëè âû èñïîëüçóåòå + ïàêåò \package{wrapfig} ñîâìåñòíî ñ~ïàêåòîì + \package{float}. + \par\See{\Ref{wrapfig}} + +\Message + |For a successful cooperation of the `wrapfig' package|\\ + |with the `float' package you should use at least|\\ + |`wrapfig' version 3.6.| +\Description +% Please take care of the version of the \package{wrapfig} package +% if you use the \package{wrapfig} package in cooperation with the +% \package{float} package. + Îáðàòèòå âíèìàíèå íà âåðñèþ ïàêåòà \package{wrapfig}, êîòîðóþ âû èñïîëüçóåòå, + åñëè âû èñïîëüçóåòå ýòîò ïàêåò âìåñòå ñ~ïàêåòîì + \package{float}. + \par\See{\Ref{wrapfig}} + +\Message + |For a successful cooperation we need at least version|\\ + |`|\meta{date}|' of package |\meta{package}|, but only version|\\ + |`|\meta{old-date}|' is available.| +\Description +% \Thispackage\ does not work with such an outdated package, please update it +% to a more recent version, at least to the one requested. + \Thispackage\ íå ðàáîòàåò ñ~äàííîé âåðñèåé ïàêåòà, îáíîâèòå åãî, + êàê ìèíèìóì äî òðåáóåìîé âåðñèè. + +\Message + |Internal Error: |\meta{error message}|.| +\Description +% You should never see this error. +% Please send me an e-mail reporting this issue. + Âû íå äîëæíû ïîëó÷àòü òàêîå ñîîáùåíèå. + Ïîæàëóéñòà, ïðèøëèòå e-mail ñ~îáðàçöîì, äàþùèì ýòî ñîîáùåíèå. + +\Message + |No float type '|\meta{type}|' defined.| +\Description +% The \meta{type} you have specified in |\caption|\-|setup{type=|\x\meta{type}|}|, +% |\caption|\-|of|\marg{type}, or |\Declare|\-|Caption|\-|Sub|\-|Type| is +% not defined. +% \meta{type} should be either `\texttt{figure}' or `\texttt{table}', or +% any other floating environment defined with |\Declare|\-|Caption|\-|Type|, +% |\new|\-|float| offered by the \package{float} package\cite{float}, +% or |\Declare|\-|New|\-|Float|\-|Type| offered by the \package{floatrow} +% package\cite{floatrow}. + Òèï ôëîòà \meta{type}, êîòîðûé âû âûáðàëè â~êîìàíäàõ |\captionsetup|\x|{type=|\x\meta{type}|}|, + |\captionof|\x\marg{type} èëè |\Declare|\-|Caption|\-|SubType| íå îïðåäåë¸í. + Ôëîò \meta{type} äîëæåí áûòü ëèáî `\texttt{figure}' èëè `\texttt{table}', èëè + ëþáîå äðóãîå îêðóæåíèå îïðåäåë¸ííîå ñ~ïîìîùüþ êîìàíäû |\Declare|\-|Caption|\-|Type|, + |\newfloat|, ïðåäëàãàåìîé ïàêåòîì \package{float}\cite{float}, + èëè |\Declare|\-|NewFloat|\-|Type| ïðåäëàãàåìîé ïàêåòîì \package{floatrow}\cite{floatrow}. + +\Message + |Not allowed in longtable* environment.| +\Description +% The usage of |\caption| is not allowed inside the |long|\-|table*| environment. +% Please use either |\caption*| for a caption without label or use the regular +% |long|\-|table| environment instead. + Èñïîëüçîâàíèå êîìàíäû |\caption| íåâîçìîæíî âíóòðè îêðóæåíèÿ |long|\-|table*|. + Ëèáî èñïîëüçóéòå êîìàíäó |\caption*| äëÿ ñîçäàíèÿ ïîäïèñè, ëèáî çàìåíèòå îêðóæåíèå íà + |longtable|. + +\Message + |Not available in compatibility mode.| +\Description +% The feature required is not supported in compatibility mode. +% `compatibility mode' means that \thispackage\ has detected either an +% incompatible document class or an incompatible package which also +% extents the |\caption| command. Leaving the original extension intact, +% some features of \thispackage\ are not supported. + Òðåáóåìàÿ íàñòðîéêà íå ïîääåðæèâàåòñÿ â~ðåæèìå ñîâìåñòèìîñòè. + Òåðìèí `compatibility mode' («ðåæèì ñîâìåñòèìîñòè») îçíà÷àåò, ÷òî \thispackage\ îáíàðóæèë + íåñîâìåñòèìûé êëàññ äîêóìåíòà èëè ïàêåò, êîòîðûé ìîäèôèöèðóåò + êîìàíäó |\caption|. Îñòàâèâ îðèãèíàëüíûå íàñòðîéêè íåòðîíóòûìè, + \thispackage\ îòìåíÿåò íåêîòîðûå ñâîè íàñòðîéêè. + \par\See{\Ref{compatibility}} + +\Message + |Only one \caption can be placed in this environment.| +\Description +% Inside the environments offered by the \package{fltpage} and \package{sidecap} +% package only \emph{one} caption can be placed. (This is due implementation design.) + Âíóòðè îêðóæåíèé, ïðåäëàãàåìûõ ïàêåòàìè \package{fltpage} è~\package{sidecap} + ìîæíî ïîìåñòèòü òîëüêî îäíó ïîäïèñü. (Ýòî òðåáîâàíèÿ îôîðìëåíèÿ.) + +\Message + |Option clash for package caption.| +%\Or[but sometimes also] +\Or[íî èíîãäà òàêæå] + |Missing \begin{document}.| +\Description +% \Thispackage\ has already been loaded by some other \LaTeX\ package, +% so you can't do that again specifying different options. +% A candidate causing this could be the \package{subfig} package; if this is +% the case, please load \thispackage\ \emph{before} the \package{subfig} +% package or specify the option |caption=|\x|false| while loading the +% \package{subfig} package. +% \par\See{the \package{subfig} package\cite{subfig} documentation} + \Thispackage\ óæå çàãðóæåí äðóãèì ïàêåòîì \LaTeX'à, + è~íåëüçÿ çàãðóæàòü ïàêåò ïîâòîðíî, çàäàâ äðóãèå îïöèè. + Ïåðâîé ïðè÷èíîé âûçâàâøåé òàêîå ñîîáùåíèå ìîæåò áûòü ïàêåò \package{subfig}; + è~åñëè ýòî òàê, + çàãðóçèòå \thispackage\ \emph{äî} ïàêåòà \package{subfig} + èëè îïðåäåëèòå |caption=|\x|false| ïðè çàãðóçêå + \package{subfig}. + \par\See{äîêóìåíòàöèþ ïàêåòà \package{subfig}\cite{subfig}} + +\Message + |Paragraph ended before \caption@makecurrent was complete.| +\Or + |Paragraph ended before \caption@prepareanchor was complete.| +\Description +% If you want to typeset multi-paragraph captions, you need to give an +% optional argument to |\caption| resp.~|\caption|\-|of| for the List of +% Figures resp.~List of Tables, too, even if you don't use such list. +% \par\See{\Ref{caption}, \Ref{lists}, and \Ref{hyperref}\,} + Åñëè âàì íóæíî ñîçäàòü ïîäïèñü èç íåñêîëüêèõ àáçàöåâ, âû äîëæíû ñîçäàòü + äîïîëíèòåëüíûé àðãóìåíò â~êîìàíäàõ |\caption| èëè~|\captionof| äëÿ Ñïèñêà ðèñóíêîâ èëè + Ñïèñêà òàáëèöû, äàæå åñëè âû íå èñïîëüçóåòå ýòè ñïèñêè. + \par\See{\Ref{caption}, \Ref{lists}, è~\Ref{hyperref}\,} + +\iffalse % was removed in v3.1b +\Message + |Something is going wrong here...|\\ + |For a removal of this problem please consult the|\\ + |caption package documentation, especially the sections|\\ + |about the `float' and the `wrapfig' package.| +\Description +% Please take care of the load order of packages +% if you use the \package{wrapfig} package in cooperation with the +% \package{float} package. But maybe a different package tried to extent +% the \package{float} package in a manner which is incompatible to +% \thispackage!? +% \par\See{\Ref{float} and \Ref{wrapfig}} + Îáðàòèòå âíèìàíèå íà ïîðÿäîê çàãðóæåííûõ ïàêåòîâ, + åñëè âû èñïîëüçóåòå ïàêåò \package{wrapfig} âìåñòå ñ~ïàêåòîì + \package{float}. Íî âîçìîæíî êàêîé"=òî äðóãîé ïàêåò ïûòàåòñÿ ðàñøèðèòü íàñòðîéêè ïàêåòà + \package{float} íåèçâåñòíûì ïàêåòó \package{caption} ñïîñîáîì!? + \par\See{\Ref{float} è~\Ref{wrapfig}} +\fi + +\Message + |Something's wrong--perhaps a missing \caption|\\ + |in the last figure or table.| +\Description +% It seems that you have used a |\sub|\-|caption| command (or a different one +% which has typeset a sub-caption) without a corresponding |\caption| command. +% This is not supported. + Âîçìîæíî âû èñïîëüçîâàëè êîìàíäó |\sub|\-|caption| (èëè äðóãóþ êîìàíäó, ñîçäàþùóþ + ïîäïèñü ÷àñòè ðèñóíêà) áåç ñîîòâåòñòâóþùåé êîìàíäû |\caption|. + Ýòî íå ïîääåðæèâàåòñÿ. + +\Message + |The option `labelsep=|\meta{name}|' does not work|\\ + |with `format=hang'.| +\Or + |The option `labelsep=|\meta{name}|' does not work|\\ + |with \setcaphanging (which is set by default).| +\Description +% A caption label separator which contains a |\\| command (like +% |labelsep=|\x|newline|) can not be combined with a hanging caption format +% (like |format=|\x|hang|). +% Please select either another caption label separator +% (e.g.~|labelsep=|\x|colon|) or another caption format +% (e.g.~|format=|\x|plain|). +% \par\See{\Ref{formats} resp.~\Ref{KOMA}} + Ðàçäåëèòåëü íóìåðàöèîííîãî çàãîëîâêà è~òåêñòà ïîäïèñè, çàäàííûé êàê êîìàíäà |\\| (ò.\,å. + |labelsep=|\x|newline|) íå ìîæåò áûòü ñêîìáèíèðîâàí ñ~ôîðìàòîì ñîçäàþùèì ñòðîêó íà âåñó + (like |format=|\x|hang|). + Çàäàéòå ëèáî äðóãîé ðàçäåëèòåëü + (íàïðèìåð~|labelsep=|\x|colon|) ëèáî äðóãîé ôîðìàò ïîäïèñè + (e.g.~|format=|\x|plain|). + \par\See{\Ref{formats} èëè~\Ref{KOMA}} + +\Message + |The package option `caption=false' is obsolete.|\\ + |Please pass this option to the subfig package instead|\\ + |and do *not* load the caption package anymore.| +\Description +% You have specified the option |caption=|\x|false|. This used to be a workaround +% for not using the whole \package{caption} package (leaving the caption stuff +% offered by the document class or other packages intact), but keeping the +% \package{subfig} package working. This mechanism is obsolete and not offered +% anymore, please pass this option to the \package{subfig} package instead and +% do not load \thispackage\ anymore. +% \par\See{the \package{subfig} package\cite{subfig} documentation} + Âû çàäàëè îïöèþ |caption=|\x|false|. Ýòî èñïîëüçóåòñÿ äëÿ òîãî, + ÷òîáû íå èñïîëüçîâàòü ïàêåò \package{caption} öåëèêîì (îñòàâèâ èçìåíåíèÿ êîìàíä + ïîäïèñåé, ñäåëàííûå êëàññîì äîêóìåíòà èëè äðóãèì ïàêåòîì íåòðîíóòûìè), íî ïîçâîëÿåò ðàáîòàòü + ïàêåòó \package{subfig}. Ýòîò ìåõàíèçì óñòàðåâøèé è~áîëåå íå ïîääåðæèâàåòñÿ, + ïîýòîìó èñïîëüçóéòå ýòó îïöèþ ïðè çàãðóçêå ïàêåòà \package{subfig} è~íå çàãðóæàéòå + \thispackage\ âîâñå. + \par\See{äîêóìåíòàöèþ ïàêåòà \package{subfig}\cite{subfig}} + +\Message + |Undefined boolean value `|\meta{value}|'.| +\Description +% You tried to set a boolean option (like |singlelinecheck=| or |hypcap=|) +% with an improper value. Only |false|, |no|, |off|, |0| or |true|, |yes|, +% |on|, |1| is allowed here. + Âû ïûòàëèñü çàäàòü áóëåâ êëþ÷ (íàïðèìåð, |singlelinecheck=| èëè |hypcap=|) + ñ~íåâåðíîé îïöèåé. Òîëüêî |false|, |no|, |off|, |0| èëè |true|, |yes|, + |on|, |1| äîïóñêàþòñÿ â~îïöèÿõ ýòèõ êëþ÷åé. + +\Message + |Undefined format `|\meta{name}|'.| +\Description +% You tried to set a caption format which does not exists. +% Maybe a typo!? + Âû ïûòàåòåñü çàäàòü ôîðìàò ïîäïèñè, êîòîðûé íå ñóùåñòâóåò. + Ìîæåò áûòü ýòî îïå÷àòêà!? + \par\See{\Ref{formats}} + +\Message + |Undefined label format `|\meta{name}|'.| +\Description +% You tried to set a caption label format which does not exists. +% Maybe a typo!? + Âû ïûòàåòåñü çàãðóçèòü ôîðìàò ìåòêè, êîòîðûé íå ñóùåñòâóåò. + Ìîæåò áûòü ýòî îïå÷àòêà!? + \par\See{\Ref{formats}} + +\Message + |Undefined label separator `|\meta{name}|'.| +\Description +% You tried to set a caption label separator which does not exists. +% Maybe a typo!? + Âû ïûòàåòåñü çàäàòü ðàçäåëèòåëü, êîòîðûé íå ñóùåñòâóåò. + Ìîæåò áûòü ýòî îïå÷àòêà!? + \par\See{\Ref{formats}} + +\Message + |Undefined list format `|\meta{name}|'.| +\Description +% You tried to set a caption list-of format which does not exists. +% Maybe a typo!? + Âû ïûòàåòåñü çàäàòü ôîðìàò âûâîäà äëÿ Ñïèñêà ôëîòîâ, êîòîðûé íå ñóùåñòâóåò. + Ìîæåò áûòü ýòî îïå÷àòêà!? + \par\See{\Ref{lists}} + +\Message + |Undefined position `|\meta{name}|'.| +\Description +% You tried to set a caption position with an improper value. +% Maybe a typo!? + Âû ïûòàåòåñü çàäàòü îïöèþ ðàñïîëîæåíèÿ ïîäïèñè, êîòîðàÿ íå ñóùåñòâóåò. + Ìîæåò áûòü ýòî îïå÷àòêà!? + \par\See{\Ref{skips}} + +\Message + |Undefined style `|\meta{name}|'.| +\Description +% You tried to set a caption style which does not exists. +% Maybe a typo!? + Âû ïûòàåòåñü çàäàòü ñòèëü ïîäïèñè, êîòîðûé íå ñóùåñòâóåò. + Ìîæåò áûòü ýòî îïå÷àòêà!? + \par\See{\Ref{style}} + +\Message + |Usage of the `position' option is incompatible|\\ + |to the `|\meta{package}|' package.| +\Description +% % (ftcap,nonfloat,topcapt) +% The given package is dealing with caption skips as well. +% Please decide which one do you actually want to use: The |position=| option +% of \thispackage\ or the mechanism of the other one; using both this way +% would lead to wrong skips above or below the caption and is therefore +% not supported. + Äàííûé ïàêåò èçìåíÿåò îòáèâêè âîêðóã ïîäïèñè. + Ðåøèòå, êàêèì ïàêåòîì ÷òî âû ñîáèðàåòåñü èñïîëüçîâàòü: êëþ÷ |position=| + ïàêåòà \package{caption} èëè ìåõàíèçì äðóãîãî ïàêåòà; èñïîëüçîâàíèå îáîèõ ïàêåòîâ + ìîæåò ïîðîäèòü íåâåðíûå îòáèâêè ñâåðõó èëè ñíèçó ïîäïèñè è~ñîîòâåòñòâåííî íå ïîääåæðèâàåòñÿ. + \par\See{\Ref{skips}} + +\Message + |Undefined text format `|\meta{name}|'.| +\Description +% You tried to set a caption text format which does not exists. +% Maybe a typo!? + Âû ïûòàåòåñü çàäàòü ôîðìàò òåêñòà ïîäïèñè, êîòîðûé íå ñóùåñòâóåò. + Ìîæåò áûòü ýòî îïå÷àòêà!? + \par\See{\Ref{formats}} + +\Message + |You can't use both, the (obsolete) caption2 *and*|\\ + |the (current) caption package.| +\Description +% This error message says it all, you simply can't do that. +% Please use only \thispackage. + Ýòî ñîîáùåíèå îá îøèáêå ñêàçàëî óæå âñ¸, è~âàì ïðîñòî íåëüçÿ ýòî äåëàòü + [èñïîëüçîâàòü ïàêåòû \package{caption} è~\package{caption}2]. + Èñïîëüçóéòå òîëüêî \thispackage. + \par\See{\Ref{caption2}} + + +\end{Warnings} + +% --------------------------------------------------------------------------- % + +\clearpage +% \section{Version history} +\section{Èñòîðèÿ ñîçäàíèÿ âåðñèé} +\label{history} + +% The version $1.0$ was written in 1994 and was offering a handful of options +% to customize the look \& feel of the captions. +% Furthermore this version already supported the \package{rotating} and +% \package{subfigure} packages. +% Version $1.1$ introduced the |center|\-|last| option; +% version $1.2$ added the support of the \package{float} package. +% Version $1,3$ offered a better support of the \package{subfigure} package, +% while version $1.4$ came with the new option |nooneline|. +Âåðñèÿ $1.0$ áûëà íàïèñàíà â~1994~ãîäó è~ïðåäëàãàëà ìíîæåñòâî îïöèé +äëÿ íàñòðîéêè âûâîäà ïîäïèñåé. Êðîìå òîãî ýòà âåðñèÿ óæå ïîääåðæèâàëà ïàêåòû +\package{rotating} è~\package{subfigure}. +Âåðñèÿ $1.1$ ïðåäëîæèëà îïöèþ |center|\-|last|; +âåðñèÿ $1.2$ äîáàâèëà +ïîääåðæêó ïàêåòà \package{float}. +Âåðñèÿ $1.3$ ïðåäëîæèëà óëó÷øåííóþ ïîääåðæêó ïàêåòà \package{subfigure}, +òîãäà êàê âåðñèÿ $1.4$ âûøëà ñ~ïîääåðæêîé îïöèè |nooneline|. + +% The \package{caption2} package $2.0$ was an experimental side-version of +% the regular \package{caption} package. It was made public as beta test version +% without proper documentation in 1995 because of the strong demand for new +% features and adaptations to additional packages like the \package{longtable} +% package. +% Furthermore it offered a revised support of the \package{subfigure} package. +% (A version $2.1$ was offered as bugfix-release in 2002.) +Ïàêåò \package{caption2} âåðñèè $2.0$ áûë ýêñïåðèìåíòàëüíîé ïîáî÷íîé âåðñèåé +îñíîâíîãî ïàêåòà \package{caption}. Îí áûë îïóáëèêîâàí êàê áåòà-òåñò-âåðñèÿ +áåç ñîîòâåòñòâóþùåé äîêóìåíòàöèè â~1995~ãîäó, òàê êàê óæå íàçðåëà íåîáõîäèìîñòü +â~íîâûõ íàñòðîéêàõ äëÿ äðóãèõ ïàêåòîâ, íàïðèìåð äëÿ \package{longtable}. +Ïîìèìî ýòîãî áûëà ïðåäëîæåíà ïîääåðæêà ïàêåòà \package{subfigure}. +(Â~âåðñèè $2.1$, íàïèñàííîé â~2002~ãîäó áûëè èñïðàâëåíèÿ îøèáîê.) + +% In 2003 I finally found some time, so a new regular release $3.0$ +% of the \package{caption} package could be build in cooperation with +% Frank Mittelbach and Steven Cochran. +% It was released in December 2003 and superseded the neglected +% \package{caption2} package. +% Main parts were re-written and it provided a complete re-work of +% the user interface. +% Furthermore it supported the \package{hyperref}, \package{hypcap}, +% \package{listings}, \package{sidecap}, and \package{supertabular} packages +% additionally. +Â~2003~ãîäó ÿ âñ¸-òàêè íàø¸ë íåìíîãî âðåìåíè, äëÿ íîâîãî ðåëèçà $3.0$ +ïàêåòà \package{caption}, ñîçäàííîãî ñîâìåñòíî +ñ~Ôðàíêîì Ìèòòåëüáàõîì (Frank Mittelbach) è~Ñòèâåíîì Êîêðåéíîì (Steven Cochran). +Ýòà âåðñèÿ áûëà îïóáëèêîâàíà â~äåêàáðå 2003~ãîäà è~ñòàëà çàìåíîé +ïàêåòà \package{caption2}. +Îñíîâíûå ÷àñòè áûëè ïåðåïèñàíû, è~áûë ïðåäëîæåí íîâûé ïîëüçîâàòåëüñêèé èíòåðôåéñ. +Ïîìèìî ýòîãî ïîÿâèëàñü ïîääåðæêà äðóãèõ ïàêåòîâ \package{hyperref}, \package{hypcap}, +\package{listings}, \package{sidecap} è~\package{supertabular}. + +% While all the previous versions were designed for usage with the standard +% \LaTeX\ document classes \class{article}, \class{report}, and \class{book}, +% the current version $3.1$ released in 2007 also supports the \AmS, +% \KOMAScript, \NTG, and \SmF\ document classes, and the \class{beamer} class +% as well. +Â~òî âðåìÿ êàê ïðåäûäóùèå âåðñèè áûëè ñîçäàíû äëÿ ñòàíäàðòíûõ êëàññîâ +\LaTeX'à: \class{article}, \class{report} è~\class{book}, +òåêóùàÿ âåðñèÿ $3.1$, îïóáëèêîâàííàÿ â~2007~ãîäó ïðåäëàãàåò òàêæå ïîääåðæêó äëÿ ïàêåòîâ \AmS, +\KOMAScript, {\NTG} è~\SmF, à~òàêæå êëàññà \class{beamer}. +% Furthermore it was adapted to the \package{frenchb} Babel option, +% the \package{frenchle} \& \package{frenchpro} packages, +% and the \package{floatflt}, \package{fltpage}, \package{picinpar}, +% \package{picins}, \package{setspace}, \package{threeparttable}, +% and \package{wrapfig} packages. +Ïîìèìî ýòîãî ñîçäàíà ïîääåðæêà ê~îïöèè \package{frenchb} ïàêåòà \package{babel}, +ïàêåòàì \package{frenchle} è~\package{frenchpro}, +à~òàêæå ïàêåòàì \package{floatflt}, \package{fltpage}, \package{picinpar}, +\package{picins}, \package{setspace}, \package{threeparttable} +è~\package{wrapfig}. +% New options and commands were introduced as well, among other things +% |font+|, |figure|\-|within| \& |table|\-|within|, +% |list| \& |list|\-|format|, |max|\-|margin| \& |min|\-|margin|, +% |\caption|\-|list|\-|entry|, |\Declare|\-|Caption|\-|List|\-|Format|, and +% |\Declare|\-|Caption|\-|Type|. +Áûëè ïðåäëîæåíû íîâûå êîìàíäû è~êëþ÷è, íàïðèìåð ïîìèìî ïðî÷åãî +|font+|, |figure|\-|within| è~|table|\-|within|, +|list| è~|list|\-|format|, |max|\-|margin| è~|min|\-|margin|, +|\caption|\-|list|\-|entry|, |\Declare|\-|Caption|\-|List|\-|Format| è~% +|\Declare|\-|Caption|\-|Type|. +% Further benefits are the new compatibility check \see*{\Ref{compatibility}}, +% the new ``hypcap'' feature \see*{\Ref{hyperref}\,}, and the sub-caption +% feature \see*{\package{subcaption} package documentation}. +Â~äàëüíåéøåì áûëè äîáàâëåíû êîíòðîëü ñîâìåñòèìîñòè ñ~êëàññàìè è~ïàêåòàìè +\see*{\Ref{compatibility}}, +ïîääåðæêà îïöèè |hypcap| \see*{\Ref{hyperref}} +è~âîçìîæíîñòè ñîçäàíèÿ ïîäïèñåé ÷àñòåé ôëîòîâ +\see*{äîêóìåíòàöèþ ê~ïàêåòó \package{subcaption}}. + +\clearpage +% \section{Compatibility to older versions} +\section{Ñîâìåñòèìîñòü ñî ñòàðûìè âåðñèÿìè} + +\subsection{Ïàêåò \package{caption} v\texorpdfstring{$1.x$}{1.x}} +\label{caption1} + +% This version of \thispackage\ still supports the old options +% and commands provided by the version $1.0$ to $1.4$ of this package. +% So there shouldn't occur any problems compiling old documents, but please +% don't mix old options and commands with the new ones. This isn't supported +% and can cause ugly side effects. +Äàííàÿ âåðñèÿ ïàêåòà ïîääåðæèâàåò ñòàðûå îïöèè è~êîìàíäû +ñîçäàííûå â~âåðñèÿõ $1.0$--$1.4$ ýòîãî ïàêåòà. Ïîýòîìó íå äîëæíî âîçíèêàòü +ïðîáëåì â~êîìïèëÿöèè ñòàðûõ äîêóìåíòîâ, íî, ïîæàëóéñòà, íå ñìåøèâàéòå +ñòàðûå îïöèè è~êîìàíäû ñ~íîâûìè. Ýòî íå ïîääåðæèâàåòñÿ +è~ìîæåò äàòü íåïðèÿòíûå ïîáî÷íûå ýôôåêòû. + +% Here comes a short oversight of the obsolete options and how +% they have been replaced within this version of \thispackage: +Çäåñü äàí êðàòêèé îáçîð óñòàðåâøèõ îïöèé è~êîìàíä è~÷åì +îíè çàìåíåíû â~ñîâðåìåííîé âåðñèè ïàêåòà \package{caption}: + +\begin{center}\small +\begin{tabular}{ll} +\package{caption} \version{1.x} & \package{caption} \version{3.x}\\ +\hline +%\endhead +|normal| & |format=plain|\\ +|hang| & |format=hang|\\ +|isu| & |format=hang|\\ +|center| & |justification=centering|\\ +|centerlast| & |justification=centerlast|\\ +|nooneline| & |singlelinecheck=off|\\ +|scriptsize| & |font=scriptsize|\\ +|footnotesize| & |font=footnotesize|\\ +|small| & |font=small|\\ +|normalsize| & |font=normalsize|\\ +|large| & |font=large|\\ +|Large| & |font=Large|\\ +|up| & |labelfont=up|\\ +|it| & |labelfont=it|\\ +|sl| & |labelfont=sl|\\ +|sc| & |labelfont=sc|\\ +|md| & |labelfont=md|\\ +|bf| & |labelfont=bf|\\ +|rm| & |labelfont=rm|\\ +|sf| & |labelfont=sf|\\ +|tt| & |labelfont=tt|\\ +\end{tabular} +\end{center} + +% Beside the options for setting up the desired font there were also +% the commands |\caption|\-|size| resp.~|\caption|\-|font| and +% |\caption|\-|label|\-|font| who could be redefined with +% |\re|\-|new|\-|command| and allowed an alternate and more flexible way to +% change the font used for captions. +% This mechanism was replaced by the commands +Ïîìèìî îïöèé äëÿ íàñòðîåê íóæíîãî øðèôòà áûëè òàêæå êîìàíäû +|\caption|\-|size|, à~òàêæå |\caption|\-|font| è~|\caption|\-|label|\-|font| +êîòîðûå ìîãëè áûòü ïåðåîïðåäåëåíû ñ~ïîìîùüþ |\renewcommand| è~ïîçâîëÿëè +àëüòåðíàòèâíûé è~áîëåå ãèáêèé ñïîñîá èçìåíèòü øðèôò ïîäïèñåé. +Äàííûé ìåõàíèçì çàìåí¸í íà êîìàíäû +\begin{quote} + |\DeclareCaptionFont{|\ldots|}{|\ldots|}|\qquad è\\ + |\captionsetup{font=|\ldots|,labelfont=|\ldots|}|\qquad. +\end{quote} +\SeeUserDefined + +% Setting the margin for captions was done in \version{1.x} with +Óñòàíîâêè ïîëåé â~âåðñèè \version{1.x} çàäàâàëèñü ñ~ïîìîùüþ +\begin{quote} + |\setlength{\captionmargin}{|\ldots|}|\quad. +\end{quote} +% This was replaced by +Ýòî çàìåíåíî íà +\begin{quote} + |\captionsetup{margin=|\ldots|}|\qquad. +\end{quote} +\See{\Ref{margins}} + +% For example the old-style code +Íàïðèìåð, ñòàðûé êîä +\begin{quote} + |\usepackage[hang,bf]{caption}|\\ + |\renewcommand\captionfont{\small\sffamily}|\\ + |\setlength\captionmargin{10pt}| +\end{quote} +% will still work fine, but should be written today as +äî ñèõ ïîð ðàáîòàåò, íî ëó÷øå ïåðåïèñàòü åãî êàê +\begin{quote} + |\usepackage[format=hang,labelfont=bf,font={small,sf},|\\ + | margin=10pt]{caption}| +\end{quote} +% or +èëè +\begin{quote} + |\usepackage{caption}|\\ + |\captionsetup{format=hang,labelfont=bf,font={small,sf},|\\ + | margin=10pt}|\qquad. +\end{quote} + +% The quite exotic option |ruled| which allowed a partial usage of +% the caption settings for |ruled| floats defined with the +% \package{float} package will be emulated by this version of the +% caption package, too. +% But using this option is not recommended anymore since this +% version of \thispackage\ offers a more flexible way +% for changing the captions of these floating environments: +Òàêàÿ ýêçîòè÷åñêàÿ îïöèÿ |ruled|, êîòîðàÿ ïîçâîëÿëà ÷àñòè÷íî èñïîëüçîâàòü +íàñòðîéêè ïîäïèñè äëÿ ôëîòîâ ñ~îôîðìëåíèåì |ruled| èç ïàêåòà +\package{float}, ýìóëèðóåòñÿ è~äàííûì ïàêåòîì òîæå. +Íî èñïîëüçîâàíèå ýòîé îïöèè íå ðåêîìåíäóåòñÿ, ïîñêîëüêó äàííàÿ âåðñèÿ ïàêåòà +ïðåäëàãàåò áîëåå ãèáêèé ñïîñîá äëÿ èçìåíåíèÿ ïîäïèñåé +òàêèõ îêðóæåíèé ïëàâàþùèõ ôëîòîâ: +\begin{quote} + |\DeclareCaptionStyle{ruled}{|\ldots|}| +\end{quote} +% resp. +è, ñîîòâåòñòâåííî +\begin{quote} + |\captionsetup[ruled]{|\ldots|}|\qquad. +\end{quote} +\SeeUserDefined[, \Ref{captionsetup}, è~\Ref{float}] + +\subsection{Ïàêåò caption2 v\texorpdfstring{$2.x$}{2.x}} +\label{caption2} + +% Although they do very similar stuff, the packages \package{caption} and +% its experimental and now obsolete variant \package{caption2} have a +% very different implementation design. +% Therefore a full compatibility could not be offered. +% For that reason you will still find a file called |caption2.sty| in +% this package distribution, so old documents using the \package{caption2} +% package will still compile fine. +Õîòÿ èñïîëüçóþòñÿ îäíè è~òå æå íàñòðîéêè è~â~ïàêåòå \package{caption} +è~â~ýêñïåðèìåíòàëüíîé, íî ñåé÷àñ óñòàðåâøåé âåðñèè"=ïàêåòå +\package{caption2}, ó~ýòèõ ïàêåòîâ ñîâåðøåííî ðàçíûé ìåõàíèçì èõ çàäàíèÿ. +Ïîýòîìó ïîëíàÿ ñîâìåñòèìîñòü íåâîçìîæíà. +Ïî ýòîé ïðè÷èíå äî ñèõ ïîð ñóùåñòâóåò ïàêåò |caption2.sty| â~äàííîì +äèñòðèáóòèâå, è~ñòàðûå äîêóìåíòû, èñïîëüçóþùèå ïàêåò \package{caption2} +áóäóò êîìïèëèðîâàòüñÿ. + +% Newly created documents should use the actual version of +% \thispackage\ instead. In most cases it's sufficient to replace the command +Íîâûå äîêóìåíòû äîëæíû èñïîëüçîâàòü ñîâðåìåííûå âåðñèè ïàêåòà +\package{caption}. Â~áîëüøèíñòâå ñëó÷àåâ ìîæíî çàìåíèòü ñòðîêó +\begin{quote} + |\usepackage[...]{caption2}| +\end{quote} +% by +íà +\begin{quote} + |\usepackage[...]{caption}|\qquad. +\end{quote} +% But some options and commands will not be emulated, so you can get +% error messages afterwards. This section will hopefully help you removing +% these errors. If you have problems migrating from \package{caption2} +% to \package{caption} please don't hesitate to send me an e-mail asking +% for help. +Íî íåêîòîðûå îïöèè è~êîìàíäû íå ýìóëèðóþòñÿ, è~âû ìîæåòå +ïîëó÷èòü ñîîáùåíèÿ îá îøèáêàõ. Äàííûé ðàçäåë ïîìîæåò âàì ëèêâèäèðîâàòü +òàêèå îøèáêè. Åñëè ó~âàñ ïðîáëåìû ïî çàìåíå ïàêåòà \package{caption2} +íà \package{caption} íå ðàçäóìûâàéòå è~îòïðàâëÿéòå ìíå e-mail. + +% In addition to the obsolete options shown in the last section +% these ones will be emulated, too: +Ïîìèìî óñòàðåâøèõ îïöèé èç ïðåäûäóùåãî ðàçäåëà +ñëåäóþùèå òàêæå ýìóëèðóþòñÿ: + +\begin{center}\small +\begin{tabular}{ll} +\package{caption2} \version{2.x} & \package{caption} \version{3.x}\\ +\hline +%\endhead +|flushleft| & |justification=raggedright|\\ +|flushright| & |justification=raggedleft|\\ +|oneline| & |singlelinecheck=on|\\ +\end{tabular} +\end{center} + +% Setting the margin for captions was done in \version{2.x} with +Çàäàíèå âòÿæåê (ïîëåé) äëÿ ïîäïèñåé, ñîçäàííûõ â~\version{2.x} +\begin{quote}\leavevmode\hbox{% + |\setcaptionmargin{|\ldots|}| èëè, ñîîòâåòñòâåííî + |\setcaptionwidth{|\ldots|}|\quad. +}\end{quote} +% This was replaced by +Îíè ìîãóò áûòü çàìåíåíû íà +\begin{quote}\leavevmode\hbox{% + |\captionsetup{margin=|\ldots|}| èëè, ñîîòâåòñòâåííî + |\captionsetup{width=|\ldots|}|\quad. +}\end{quote} +\See{\Ref{margins}} + +% Setting an indention was done in \version{2.x} with +Âòÿæêà â~âåðñèè \version{2.x} çàäàâàëàñü êàê +\begin{quote} + |\captionstyle{indent}|\\ + |\setlength\captionindent{|\ldots|}|\quad. +\end{quote} +\pagebreak[3] +% This is now done with +Ñåé÷àñ ýòî çàäà¸òñÿ êàê +\nopagebreak[3] +\begin{quote} + |\captionsetup{format=plain,indention=|\ldots|}|\quad. +\end{quote} + +% The so-called single-line-check was controlled by the commands +% |\oneline|\-|captions|\-|false| (for switching the check off) and +% |\oneline|\-|captions|\-|true| (for switching the check on). +% This was replaced by +Êîíòðîëü êîðîòêîé ïîäïèñè êîíòðîëèðóåòñÿ êîìàíäàìè +|\oneline|\-|captions|\-|false| (îòêëþ÷àåò êîíòðîëü) +è~|\oneline|\-|captions|\-|true| (äëÿ âêëþ÷åíèÿ êîíòðîëÿ). +Ýòî çàìåíåíî íà +|\caption|\-|setup{single|\-|line|\-|check=|\x|off}| +% resp. +è, ñîîòâåòñòâåííî +|\caption|\-|setup{single|\-|line|\-|check=|\x|on}|. +\See{\Ref{justification}} + +% The commands +Êîìàíäû +\begin{quote} + |\captionlabeldelim|, |\captionlabelsep|, |\captionstyle|,\\ + |\defcaptionstyle|, |\newcaptionstyle|, è~|\renewcaptionstyle| +\end{quote} +% do not have a simple replacement and therefore will not be emulated +% by this version of \thispackage. (So using them will +% cause error messages.) Rewriting such code is not always easy and +% straight-ahead, but by conscientious reading of this manual you should +% be able to find appropriate options and commands instead. +íå èìåþò ïðîñòîé çàìåíû ïîýòîìó íå ýìóëèðóþòñÿ +äàííîé âåðñèåé ïàêåòà. (Èõ èñïîëüçîâàíèå âûçîâåò +ñîîáùåíèå îá îøèáêå.) Çàìåíà ýòîãî êîäà íå âñåãäà ïðîñòà, +íî äîáðîñîâåñòíî ïðî÷èòàâ äàííîå ðóêîâîäñòâî, âû ñìîæåòå íàéòè +ïîäõîäÿùèå îïöèè è~êîìàíäû çàìåíû. + +\iffalse +... (some examples) +\fi + +% The \version{2.x} option |ignore|\-|LT|\-|cap|\-|width| do not have a +% replacement, too. +% But in most cases you can simply drop using that option because +% in this version of \thispackage\ the value of |\LT|\-|cap|\-|width| +% will be ignored anyway (unless you set it to a different value than the +% default one which is |4in|). +Îïöèÿ |ignore|\-|LT|\-|cap|\-|width| âåðñèè \version{2.x} òîæå íå èìååò çàìåíû. +Íî â~áîëüøèíñòâå ñëó÷àåâ ýòó îïöèþ ìîæíî îïóñòèòü, ïîòîìó ÷òî â~äàííîé +âåðñèè ïàêåòà çíà÷åíèå |\LT|\-|cap|\-|width| +áóäåò èãíîðèðîâàòüñÿ â~ëþáîì ñëó÷àå (åñëè òîëüêî âû íå çàäàäèòå çíà÷åíèå, +îòëè÷íîå îò çàäàííîãî ïî óìîë÷àíèþ |4in|). +\See{\Ref{longtable}} + +\subsection{Ïàêåò caption v\texorpdfstring{$3.0$}{3.0}} +\label{caption3} + +%\NEWdescription{v3.1} +% \Thispackage\ \version{3.0} did not support any document classes +% other than the standard \LaTeX\ ones: \class{article}, \class{report}, +% and \class{book}. +% Therefore the default settings used to be fixed, but now \thispackage{} +% supports more classes, therefore they are now set in dependence on the +% document class used. +\Thispackage\ \version{3.0} íå ïîääåðæèâàë íèêàêèõ êëàññîâ äîêóìåíòîâ, êðîìå +ñòàíäàðòíûõ êëàññîâ \LaTeX'à: \class{article}, \class{report}, +and \class{book}. +Â~ñòàðûõ íàñòðîéêàõ âåä¸òñÿ ðàáîòà íàä îøèáêàìè, íî~òåïåðü \thispackage{} +ïîääåðæèâàåò áîëüøå êëàññîâ, ïîýòîìó íàñòðîéêè ïîäïèñåé çàâèñÿò îò èñïîëüçóåìîãî +êëàññà äîêóìåíòà. + +% For example: While in \version{3.0} the default caption +% |jus|\-|ti|\-|fi|\-|ca|\-|tion| used to be always |jus|\-|ti|\-|fied|, +% it's now still |jus|\-|ti|\-|fied| when using one of the standard document +% classes, but |ragged|\-|right| will be used as default format when used +% with the \class{beamer} document class. +Íàïðèìåð, â~òî âðåìÿ êàê â~âåðñèè $3.0$ çíà÷åíèåì êëþ÷à |justification| +ïî óìîë÷àíèþ ÿâëÿåòñÿ |justi|\-|fied|, îíî îñòàíåòñÿ |justi|\-|fied| ïðè èñïîëüçîâàíèè +ñòàíäàðòíûõ êëàññîâ äîêóìåíòîâ, íî çàìåíÿåòñÿ íà |ragged|\-|right| ïðè èñïîëüçîâàíèè +êëàññà äîêóìåíòà \class{beamer}. + +% %An easy way to select the `old' defaults---if desired---is using the option +% An easy way to select the `old' defaults is using the option +% |style=base| when loading \thispackage\ (or later on using |\caption|\-|setup|). +Ïðîñòîé ïóòü çàäàòü «ñòàðûå» çíà÷åíèÿ ïî óìîë÷àíèþ \cdash--- èñïîëüçîâàòü îïöèþ +|style=base| ïðè çàãðóçêå ïàêåòà (èëè ïîçäíåå, â~êîìàíäå |\caption|\-|setup|). + +% Another new feature is the automatic check for compatibility; if an +% incompatibility will be found, a warning message will be issued and if a strong +% incompatibility was found some features of \thispackage\ will be disabled. +Åù¸ îäíîé îñîáåííîñòüþ ñòàëà àâòîìàòè÷åñêàÿ ïðîâåðêà íà ñîâìåñòèìîñòü [êëàññà è~ïàêåòà]; åñëè +îáíàðóæèâàåòñÿ íåñîâìåñòèìîñòü, âûäà¸òñÿ ïðåäóïðåæäåíèå î~íåñîâìåñòèìîñòè íåêîòîðûõ âîçìîæíîñòåé +äàííîãî ïàêåòà ñ~êëàññîì äîêóìåíòà. +% Please note that only this check was added to \thispackage, so if you get +% such warning message, the previous versions of \thispackage\ were incompatible +% as well, but did not issued such warning, they were ``only'' having +% side-effects or causing problems. +Îáðàòèòå âíèìàíèå, ÷òî òàêîå ïðåäóïðåæäåíèå ïîÿâèëîñü òîëüêî â~òåêóùåé âåðñèè ïàêåòà, ïîýòîìó åñëè +âû ïîëó÷èëè ýòî ñîîáùåíèå ýòî îçíà÷àåò, ÷òî è~ïðåäûäóùèå âåðñèè áûëè òàêæå íåñîâìåñòèìû, +è~îíè óæå èìåëè ïîáî÷íûå ýôôåêòû è~ìîãëè ñîçäàâàòü ïðîáëåìû. +% So these warnings only say that some bad side effects or problems could +% happen, but not that they actually will happen. +% Anyway, if you use \thispackage\ in such circumstances, +% you should use it with care. +Ýòè ïðåäóïðåæäåíèÿ ãîâîðÿò, ÷òî \emph{ìîãóò} ïîÿâèòüñÿ ïðîáëåìû, íî ýòî íå çíà÷èò, ÷òî îíè +íåïðåìåííî ïîÿâÿòñÿ. +Â~ëþáîì ñëó÷àå åñëè âû èñïîëüçóåòå \thispackage\ èãíîðèðóÿ ýòî ïðåäóïðåæäåíèå, +áóäüòå îñòîðîæíû. + +\bigskip + +\begin{Note*} +% \Thispackage\ \version{3.0} offered the option |caption=|\x|false|, +% which used to be a workaround for not using the whole \package{caption} package +% (leaving the caption stuff offered by the document class or other packages +% intact), but keeping the \package{subfig} package\cite{subfig} working. +% This mechanism is obsolete and not offered anymore, please pass this option +% to the \package{subfig} package instead and do not load \thispackage\ anymore. +% %\par\See{the \package{subfig} package documentation} +Ïàêåò âåðñèè \version{3.0} ïðåäëàãàë îïöèþ |caption=false|, êîòîðàÿ âêëþ÷àëà ëèøü +÷àñòè÷íîå èñïîëüçîâàíèå âîçìîæíîñòåé ïàêåòà \package{caption} (ñîõðàíÿÿ +íàñòðîéêè êëàññà äîêóìåíòà èëè äðóãèõ ïàêåòîâ íåòðîíóòûìè), íî îñòàâëÿëà +âîçìîæíîñòü ðàáîòû ïàêåòà \package{subfig}. +Ýòîò ìåõàíèçì òåïåðü óñòàðåâøèé è~áîëüøå íå ïîääåðæèâàåòñÿ, +ïîýòîìó çàäàâàéòå, ïîæàëóéñòà, ýòó îïöèþ ïðè çàãðóçêå ïàêåòà \package{subfig}, +è~íå çàãðóæàéòå äàííûé ïàêåò âîâñå. +%\par\See{the \package{subfig} package\cite{subfig} documentation} +\end{Note*} + +% --------------------------------------------------------------------------- % + +\clearpage +\begin{thebibliography}{99} +\fontencoding{T1}%\fontfamily{ptm} +\selectfont + + \bibitem{TLC2} + Frank Mittelbach and Michel Goossens:\\ + \newblock {\em The {\LaTeX} Companion (2nd.~Ed.)},\\ + \newblock Addison-Wesley, 2004. + + \bibitem{beamer} + Till Tantau:\\ + \href{http://www.ctan.org/pkg/beamer}% + {\emph{User Guide to the Beamer Class, Version 3.07}},\\ + March 11, 2007 + + \bibitem{KOMAScript} + Markus Kohm \& Jens-Uwe-Morawski:\\ + \href{http://www.ctan.org/pkg/koma-script}% + {\emph{KOMA-Script -- a versatile \LaTeXe\ bundle}},\\ + 2007-01-09 + + \bibitem{NTG} + Victor Eijkhout:\\ + \href{http://www.ctan.org/pkg/ntgclass}% + {\emph{An introduction to the Dutch \LaTeX\ document classes}},\\ + 3 September 1989 + + \bibitem{algorithms} + Rog\'erio Brito:\\ + \href{http://www.ctan.org/pkg/algorithms}% + {\emph{Algorithms}},\\ + June 2, 2006 + +\iffalse + \bibitem{algorithm2e} + Christophe Fiorio:\\ + \href{http://www.ctan.org/pkg/algorithm2e}% + {\emph{algorithm2e.sty -- package for algorithms}},\\ + March 11, 2007 +\fi + + \bibitem{float} + Anselm Lingnau:\\ + \href{http://www.ctan.org/pkg/float}% + {\emph{An Improved Environment for Floats}},\\ + 2001/11/08 + + \bibitem{floatflt} + Mats Dahlgren:\\ + \href{http://www.ctan.org/pkg/floatflt}% + {\emph{Welcome to the floatflt package}},\\ + 1998/06/05 + + \bibitem{floatrow} + Olga Lapko:\\ + \href{http://www.ctan.org/pkg/floatrow}% + {\emph{The floatrow package documentation}},\\ + 2008/03/28 + + \bibitem{fltpage} + Sebastian Gross:\\ + \href{http://www.ctan.org/pkg/fltpage}% + {\emph{Welcome to the beta test of fltpage package!}},\\ + 1998/11/13 + + \bibitem{hyperref} + Sebastian Rahtz \& Heiko Oberdiek:\\ + \href{http://www.ctan.org/pkg/hyperref}% + {\emph{Hypertext marks in \LaTeX}},\\ + November 12, 2007 + + \bibitem{hypcap} + Heiko Oberdiek:\\ + \href{http://www.ctan.org/pkg/hypcap}% + {\emph{The hypcap package -- Adjusting anchors of captions}},\\ + 2007/04/09 + + \bibitem{listings} + Carsten Heinz \& Brooks Moses:\\ + \href{http://www.ctan.org/pkg/listings}% + {\emph{The Listings Package}},\\ + 2007/02/22 + + \bibitem{longtable} + David Carlisle:\\ + \href{http://www.ctan.org/pkg/longtable}% + {\emph{The longtable package}},\\ + 2004/02/01 + + \bibitem{picinpar} + Friedhelm Sowa:\\ + \href{http://www.ctan.org/pkg/picinpar}% + {\emph{Pictures in Paragraphs}},\\ + July 13, 1993 + + \bibitem{picins} + Joachim Bleser and Edmund Lang:\\ + \href{http://www.ctan.org/pkg/picins}% + {\emph{PicIns-Benutzerhandbuch Version 3.0}},\\ + September~1992 + + \bibitem{rotating} + Sebastian Rahtz and Leonor Barroca:\\ + \href{http://www.ctan.org/pkg/rotating}% + {\emph{A style option for rotated objects in \LaTeX}},\\ + 1997/09/26 + + \bibitem{setspace} + Erica M. S. Harris \& Geoffrey Tobin:\\ + \href{http://www.ctan.org/pkg/setspace}% + {\emph{LaTeX Document Package ``setspace''}},\\ + 1 December 2000 + + \bibitem{sidecap} + Rolf Niepraschk \& Hubert G\"a\ss lein:\\ + \href{http://www.ctan.org/pkg/sidecap}% + {\emph{The sidecap package}},\\ + 2003/06/06 + + \bibitem{subfigure} + Steven D. Cochran:\\ + \href{http://www.ctan.org/pkg/subfigure}% + {\emph{The subfigure package}},\\ + 2002/07/02 + + \bibitem{subfig} + Steven D. Cochran:\\ + \href{http://www.ctan.org/pkg/subfig}% + {\emph{The subfig package}},\\ + 2005/07/05 + + \bibitem{supertabular} + Johannes Braams and Theo Jurriens:\\ + \href{http://www.ctan.org/pkg/supertabular}% + {\emph{The supertabular environment}},\\ + 2002/07/19 + + \bibitem{threeparttable} + Donald Arseneau:\\ + \href{http://www.ctan.org/pkg/threeparttable}% + {\emph{Three part tables: title, tabular environment, notes}},\\ + 2003/06/13 + + \bibitem{wrapfig} + Donald Arseneau:\\ + \href{http://www.ctan.org/pkg/wrapfig}% + {\emph{WRAPFIG.STY ver 3.6}},\\ + 2003/01/31 + + \bibitem{xtab} + Peter Wilson:\\ + \href{http://www.ctan.org/pkg/xtab}% + {\emph{The xtab package}},\\ + 2004/05/24 + +\end{thebibliography} + +% --------------------------------------------------------------------------- % + +\end{document} diff --git a/macros/latex/contrib/caption/caption.dtx b/macros/latex/contrib/caption/caption.dtx new file mode 100644 index 0000000000..89abe25309 --- /dev/null +++ b/macros/latex/contrib/caption/caption.dtx @@ -0,0 +1,4968 @@ +% \iffalse meta-comment +% +% This is file `caption.dtx'. +% +% Copyright (C) 1994-2019 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +% +% -------------------------------------------------------------------------- +% +% 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, +% caption3.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, and newfloat.dtx, +% the derived files caption.sty, caption2.sty, caption3.sty, +% bicaption.sty, ltcaption.sty, subcaption.sty, and newfloat.sty, +% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. +% +% \fi +% \CheckSum{3694} +% +% \iffalse +%<*driver> +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesFile{caption.drv}[2011/08/06 v3.3 Implementation of the caption package] +\hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up. +%\errorcontextlines=3 +% +\documentclass{ltxdoc} +\setlength\parindent{0pt} +\setlength\parskip{\smallskipamount} +% +\makeatletter % make room for subsections like 2.16.14 in the TOC +%\newcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}} +\renewcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.7em}} +\makeatother +% +\usepackage{ifpdf} +\ifpdf + \usepackage{mathptmx,courier} + \usepackage[scaled=0.90]{helvet} + \addtolength\marginparwidth{15pt} +\fi +% +\usepackage{hypdoc} +\ifpdf\usepackage{hypdestopt}\fi +\hypersetup{pdfkeywords={LaTeX, package, caption},pdfstartpage={},pdfstartview={}} +% +\usepackage[debug]{caption}[2013/01/01] +% +\DeclareRobustCommand*\eTeX{\texorpdfstring + {\leavevmode\hbox{$\varepsilon$}-\TeX}% + {e-TeX}} +\DeclareRobustCommand*\AmS{\texorpdfstring + {{\protect\usefont{OMS}{cmsy}{m}{n}A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}% + {AMS}} +\DeclareRobustCommand*\KOMAScript{\texorpdfstring + {\textsf{K\kern.05em O\kern.05em M\kern.05em A\kern.1em-\kern.1em Script}}% + {KOMA-Script}} +\DeclareRobustCommand*\NTG{NTG} +\DeclareRobustCommand*\SmF{SMF} +% +\begin{document} + \DocInput{caption.dtx} +\end{document} +% +% \fi +% +% \newcommand*\purerm[1]{\texorpdfstring{{\upshape\mdseries\rmfamily #1}}{#1}} +% \newcommand*\puresf[1]{\texorpdfstring{{\upshape\mdseries\sffamily #1}}{#1}} +% \newcommand*\purett[1]{\texorpdfstring{{\upshape\mdseries\ttfamily #1}}{#1}} +% \let\class\puresf \let\package\puresf +% \let\env\purett \let\opt\purett +% +% \def\thispackage{the \package{caption} package} +% \def\Thispackage{The \package{caption} package} +% +% \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}} +% \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}} +% \newcommand*\version[2][]{\textit{v#2}} +% +% \newcommand*\issue[1]{GitLab~\##1} +% +% \GetFileInfo{caption.drv} +% \let\docdate\filedate +% \GetFileInfo{caption.sty} +% +% \title{The Implementation of +% \texorpdfstring{\thispackage\thanks{%^^A +% This package has version number \fileversion, last revised \filedate.}}%^^A +% {the caption package}} +% \author{Axel Sommerfeldt\\ +% \url{https://gitlab.com/axelsommerfeldt/caption}} +% \date{\docdate} +% \maketitle +% +% \begin{abstract} +% \Thispackage\ consists of two parts -- the kernel +% (|caption3.sty|) and the main package (|caption.sty|). +% +% \Thispackage\ redefines the \LaTeX\ commands +% |\caption|, |\@caption|, and |\@makecaption| and maps the latter one to +% |\caption@@make|, giving the user the possibility to control the look \& feel +% of the captions from floating environments like |figure| and |table|. +% Furthermore it does similar to the caption stuff coming from other packages +% (like the \package{longtable} or \package{supertabular} package): +% Mapping the appropriate internal commands (like |\LT@makecaption| or +% |\ST@caption|) to the ones offered by the \package{caption3} kernel. +% So you can think of \thispackage\ as a layer package, it +% simply provides adaptation layers between the caption stuff coming from +% \LaTeXe\ or packages, and the caption stuff offered by the +% \package{caption3} kernel. +% \end{abstract} +% +% \section*{User manuals} +% +% This document is describing the code implementation only. The user +% documentation can be found in +% \nopagebreak\begin{quote} +% \begin{tabular}{ll} +% \href{http://mirror.ctan.org/macros/latex/contrib/caption/caption-eng.pdf}% +% {\texttt{caption-eng.pdf}} & The English documentation \\ +% \href{http://mirror.ctan.org/macros/latex/contrib/caption/caption-rus.pdf}% +% {\texttt{caption-rus.pdf}} & The Russian documentation\footnotemark \\ +% \href{http://mirror.ctan.org/macros/latex/contrib/caption/caption-deu.pdf}% +% {\texttt{caption-deu.pdf}} & The German documentation \\ +% \end{tabular} +% \footnotetext{Thanks a lot to Olga Lapko for this translation} +% \end{quote} +% +% \StopEventually{} +% \clearpage +% \tableofcontents +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \DoNotIndex{\\,\_,\ ,\@@par} +% \DoNotIndex{\@bsphack} +% \DoNotIndex{\@car,\@cdr,\@classoptionslist,\@cons,\@currext,\@currname} +% \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs} +% \DoNotIndex{\@for,\@firstofone,\@firstoftwo} +% \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom} +% \DoNotIndex{\if@minipage\@ifnextchar,\@ifpackagelater,\@ifpackageloaded} +% \DoNotIndex{\@ifstar,\@ifundefined,\@latex@error,\@minipagefalse,\@minipagetrue} +% \DoNotIndex{\@namedef,\@nameuse} +% \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist} +% \DoNotIndex{\@removeelement,\@restorepar,\@secondoftwo,\@setminipage,\@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} +% \newcommand*\Note[2][Note]{\par{\small\emph{#1:} #2}\par} +% +% \changes{v1.0}{1994/10/27}{First release} +% \changes{v1.1}{1994/11/03}{New option \texttt{centerlast}} +% \changes{v1.2}{1994/11/28}{Support of the \package{float} package} +% \changes{v1.3}{1995/01/09}{Support of \cs{captionlabelfont} in subcaptions} +% \changes{v1.4}{1995/01/30}{New option \texttt{nooneline}} +% \changes{v1.4b}{1995/04/05}{Bugfix release} +% \changes{v3.0}{2003/12/20}{Rewritten; many new commands and features} +% \changes{v3.0d}{2004/11/28}{Split into two packages: +% \package{caption} \& \package{caption3}} +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \clearpage +% \let\subsubsection\subsection +% \let\subsection\section +% +% \iffalse +%<*package> +% \fi +% +% \subsection{Identification} +% +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{caption}[2019/09/01 v3.3d Customizing captions (AR)] +% \end{macrocode} +% +% \subsection{Loading the kernel} +% +% \begin{macrocode} +\RequirePackage{caption3}[2019/09/01] % needs v1.8d or newer +% \end{macrocode} +% +% \subsection{Check against incompatible document classes} +% +% \begin{macrocode} +\caption@ifbool{documentclass}{}{% + \caption@WarningNoLine{% + Unsupported document class (or package) detected,\MessageBreak + usage of the caption package is not recommended}% + \caption@InfoNoLine{\string\@makecaption\space=\space\meaning\@makecaption}% +} +% \end{macrocode} +% +% \subsection{Check against incompatible packages} +% +% \changes{v3.0p}{2007/04/06}{Check against obsolete \package{caption2} package added} +% \begin{macrocode} +\@ifpackageloaded{caption2}{% + \caption@Error{% + You can't use both, the (obsolete) caption2 *and*\MessageBreak + the (current) caption package}% + \endinput +}{} +% \end{macrocode} +% +% \changes{v3.1}{2007/06/15}{Check against incompatible \package{ftcap} package added} +% \changes{v3.1}{2007/06/15}{Check against incompatible \package{nonfloat} package added} +% \changes{v3.1}{2007/06/18}{Check against incompatible \package{topcapt} package added} +% \begin{macrocode} +\caption@AtBeginDocument{% + \@ifpackageloaded{ftcap}{\caption@DisablePositionOption{ftcap}}{}% + \@ifpackageloaded{nonfloat}{\caption@DisablePositionOption{nonfloat}}{}% + \@ifpackageloaded{topcapt}{\caption@DisablePositionOption{topcapt}}{}} +% \end{macrocode} +% \begin{macro}{\caption@DisablePositionOption} +% \changes{v3.1g}{2008/03/20}{\texttt{position=b} added} +% \changes{v3.1h}{2008/03/29}{% +% Name changed from \cs{caption@IncompatiblePackage} to \cs{caption@DisablePositionOption}; +% moved from package to kernel; disables the `position' option now instead of issuing a warning} +% |\caption@DisablePositionOption|\marg{package}\par +% disables the `position' option. +% \begin{macrocode} +\newcommand*\caption@DisablePositionOption[1]{% + \caption@InfoNoLine{% + `#1' package detected; setting `position=b' for compatibility reasons}% + \caption@setposition b% +% \end{macrocode} +% \begin{macrocode} + \DeclareCaptionOption{position}{% + \caption@Error{Usage of the `position' option is incompatible\MessageBreak + to the `#1' package}}} +% \end{macrocode} +% \begin{macrocode} +\@onlypreamble\caption@DisablePositionOption +% \end{macrocode} +% \end{macro} +% +% \subsection{Declaration of options} +% +% \subsubsection{Options for figure and table} +% +% \changes{v3.0a}{2004/01/09}{Options \opt{figureposition} and \opt{tableposition} added} +% \begin{macrocode} +\DeclareCaptionOption{figureposition}{% + \captionsetup*[figure]{position=#1}} +\@onlypreamble@key{caption}{figureposition} +% \end{macrocode} +% \begin{macrocode} +\DeclareCaptionOption{tableposition}{% + \captionsetup*[table]{position=#1}} +\@onlypreamble@key{caption}{tableposition} +% \end{macrocode} +% +% \changes{v3.0d}{2004/08/03}{Options \opt{figurename} and \opt{tablename} added} +% \changes{v3.1}{2007/07/04}{Options \opt{figurename} and \opt{tablename} re-written} +% \changes{v3.1f}{2007/11/18}{Option \opt{name} added} +% \begin{macrocode} +\DeclareCaptionOption{figurename}{\caption@SetName{figure}{#1}} +\@onlypreamble@key{caption}{figurename} +\DeclareCaptionOption{tablename}{\caption@SetName{table}{#1}} +\@onlypreamble@key{caption}{tablename} +% \end{macrocode} +% +% \changes{v3.1g}{2008/02/28}{Options \opt{listfigurename} and \opt{listtablename} added} +% \begin{macrocode} +\DeclareCaptionOption{listfigurename}{\caption@SetName{listfigure}{#1}} +\@onlypreamble@key{caption}{listfigurename} +\DeclareCaptionOption{listtablename}{\caption@SetName{listtable}{#1}} +\@onlypreamble@key{caption}{listtablename} +% \end{macrocode} +% +% \begin{macro}{\caption@SetName} +% \changes{v3.1}{2007/07/04}{This macro added} +% \changes{v3.1f}{2007/11/18}{After-preamble variant added} +% \changes{v3.1g}{2008/02/28}{Renamed from \cs{caption@SetFloatName} to \cs{caption@SetName}} +% \changes{v3.1i}{2008/08/02}{Bugfix: Works now without \cs{addto}, too} +% \changes{v3.2d}{2011/10/29}{Outsourced to \package{newfloat} package} +% \changes{v3.2f}{2012/01/12}{Bugfix: Uses \cs{caption@NewFloat} now} +% |\caption@SetName|\marg{float}\marg{name} +% \begin{macrocode} +\newcommand*\caption@SetName[2]{% + \caption@NewFloat{\newfloat@setname{#1}{#2}}} +\@onlypreamble\caption@SetName +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\DeclareCaptionOption{name}{\caption@setname\@captype{#1}} +% \end{macrocode} +% \begin{macro}{\caption@setname} +% |\caption@setname|\marg{float}\marg{name} +% \begin{macrocode} +\newcommand*\caption@setname[2]{% + \@namedef{#1name}{#2}} +% \end{macrocode} +% \end{macro} +% +% \changes{v3.1f}{2007/12/21}{Options \opt{figurewithin} and \opt{tablewithin} added} +% \changes{v3.1i}{2008/04/13}{Option \opt{within} added} +% \changes{v3.1l}{2010/01/09}{The \opt{within} options are now available within the document, too} +% \changes{v3.1l}{2010/01/09}{The global \opt{within} option will now affect user-defined +% floats declared with \cs{DeclareCaptionType}, too} +% +% \begin{macro}{\caption@DeclareWithinOption} +% \changes{v3.1l}{2010/01/09}{This macro and its usage added} +% |\caption@DeclareWithinOption|\marg{float} +% declares the options \meta{float}\texttt{within} and \meta{float}\texttt{without}, +% e.g. \texttt{figurewithin} and \texttt{figurewithout}. +% \begin{macrocode} +\newcommand*\caption@DeclareWithinOption[1]{% + \DeclareCaptionOption{#1within}{\caption@Within{#1}{##1}}% + \DeclareCaptionOptionNoValue{#1without}{\caption@Within{#1}{none}}} +\@onlypreamble\caption@DeclareWithinOption +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\caption@DeclareWithinOption{figure} +\caption@DeclareWithinOption{table} +% \end{macrocode} +% \begin{macrocode} +\DeclareCaptionOption{within}{% + \caption@NewFloat{\newfloatsetup{within=#1}}} +\DeclareCaptionOptionNoValue{without}{% + \caption@NewFloat{\newfloatsetup{without}}} +% \end{macrocode} +% \begin{macro}{\caption@Within} +% \changes{v3.1}{2007/12/21}{This macro added} +% \changes{v3.2d}{2011/10/29}{Outsourced to \package{newfloat} package} +% \changes{v3.2f}{2012/01/12}{Bugfix: Uses \cs{caption@NewFloat} now} +% |\caption@Within|\marg{float}\marg{value} +% \begin{macrocode} +\newcommand*\caption@Within[2]{% + \caption@NewFloat{\newfloat@setwithin{#1}{#2}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@NewFloat} +% \changes{v3.2f}{2012/01/12}{This macro added} +% |\caption@NewFloat|\marg{code} +% loads the \package{newfloat} package and executes the given code afterwards. +% Note: Since the \package{newfloat} package uses the crappy \package{keyval} +% package, too, we need to save \& restore some macros here, otherwise this +% recursion won't work properly. +% {\itshape (TODO: Re-write \package{newfloat} so it uses \package{kvoptions} instead.)} +% \begin{macrocode} +\newcommand*\caption@NewFloat[1]{% + \let\KV@prefix@ORI\KV@prefix + \let\@tempc@ORI\@tempc + \caption@ifpackageloaded{newfloat}{#1}{}% + \let\@tempc\@tempc@ORI + \let\KV@prefix\KV@prefix@ORI} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Miscellaneous options} +% +% \begin{macrocode} +\DeclareCaptionOption*{config}[caption]{% + \InputIfFileExists{#1.cfg}% + {\typeout{*** Local configuration file #1.cfg used ***}}% + {\caption@Warning{Configuration file #1.cfg not found}}} +% \end{macrocode} +% +% \begin{macro}{\caption@selectlistentry} +% \changes{v3.2}{2010/11/07}{This macro added} +% |\caption@selectlistentry|\marg{\purett{heading} or \purett{entry}} +% \begin{macrocode} +\newcommand*\caption@selectlistentry[1]{% + \caption@ifinlist{#1}{heading}{% + \let\caption@iflistheading\@firstoftwo + }{\caption@ifinlist{#1}{default,list-entry,entry}{% + \let\caption@iflistheading\@secondoftwo + }{% + \caption@Error{Undefined list-entry selection `#1'}% + }}} +% \end{macrocode} +% \end{macro} +% +% \changes{v3.3}{2012-03-25}{Option \opt{list-entry} added} +% \begin{macrocode} +\DeclareCaptionOption{list-entry}{\caption@selectlistentry{#1}} +\captionsetup{list-entry=default} +% \end{macrocode} +% +% \begin{macro}{\caption@setparboxrestore} +% \changes{v3.2}{2010/11/07}{This macro added} +% |\caption@setparboxrestore|\marg{\purett{partial} or \purett{full}} +% \begin{macrocode} +\newcommand*\caption@setparboxrestore[1]{% + \caption@ifinlist{#1}{full}{% + \caption@setfullparboxrestore + }{\caption@ifinlist{#1}{default,light,partial}{% + \let\caption@parboxrestore\@secondoftwo + }{% + \caption@Error{Undefined parboxrestore `#1'}% + }}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@setfullparboxrestore} +% \changes{v3.2}{2010/11/07}{This macro added} +% |\caption@setfullparboxrestore|\par +% This is an abbreviation for |\caption@setparboxrestore{full}|. +% \begin{macrocode} +\newcommand*\caption@setfullparboxrestore{% + \let\caption@parboxrestore\@firstoftwo} +% \end{macrocode} +% \end{macro} +% +% \changes{v3.2}{2010/11/07}{Option \opt{parboxrestore} added} +% \begin{macrocode} +\DeclareCaptionOption{parboxrestore}{\caption@setparboxrestore{#1}} +\captionsetup{parboxrestore=default} +% \end{macrocode} +% +% \changes{v3.1f}{2007/11/28}{Option \opt{@minipage=} added} +% \begin{macrocode} +\DeclareCaptionOption{@minipage}{% + \caption@ifinlist{#1}{auto,default}% + {\let\caption@if@minipage\@gobbletwo}% + {\caption@set@bool\caption@if@minipage{#1}}} +\captionsetup{@minipage=default} +% \end{macrocode} +% +% \subsubsection{caption v1.x compatibility options} +% \changes{v3.1}{2007/07/21}{Option `compatibility' added} +% \changes{v3.1}{2007/09/01}{caption v1.x compatibility options revised} +% \changes{v3.1d}{2007/10/24}{Bugfix 07-10-24 in caption v1.x$ compatibility options} +% +% \begin{macrocode} +\DeclareCaptionOption{compatibility}[1]{\caption@setbool{compatibility}{#1}} +\@onlypreamble@key{caption}{compatibility} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareCaptionOptionNoValue*{normal}{% + \caption@setformat{plain}% + \caption@setjustification{justified}} +\DeclareCaptionOptionNoValue*{isu}{% + \caption@setformat{hang}% + \caption@setjustification{justified}} +\DeclareCaptionOptionNoValue*{hang}{% + \caption@setformat{hang}% + \caption@setjustification{justified}} +\DeclareCaptionOptionNoValue*{center}{% + \caption@setformat{plain}% + \caption@setjustification{centering}} +\DeclareCaptionOptionNoValue*{centerlast}{% + \caption@setformat{plain}% + \caption@setjustification{centerlast}} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareCaptionOptionNoValue*{scriptsize}{\def\captionfont{\scriptsize}} +\DeclareCaptionOptionNoValue*{footnotesize}{\def\captionfont{\footnotesize}} +\DeclareCaptionOptionNoValue*{small}{\def\captionfont{\small}} +\DeclareCaptionOptionNoValue*{normalsize}{\def\captionfont{\normalsize}} +\DeclareCaptionOptionNoValue*{large}{\def\captionfont{\large}} +\DeclareCaptionOptionNoValue*{Large}{\def\captionfont{\Large}} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareCaptionOptionNoValue*{up}{\l@addto@macro\captionlabelfont\upshape} +\DeclareCaptionOptionNoValue*{it}{\l@addto@macro\captionlabelfont\itshape} +\DeclareCaptionOptionNoValue*{sl}{\l@addto@macro\captionlabelfont\slshape} +\DeclareCaptionOptionNoValue*{sc}{\l@addto@macro\captionlabelfont\scshape} +\DeclareCaptionOptionNoValue*{md}{\l@addto@macro\captionlabelfont\mdseries} +\DeclareCaptionOptionNoValue*{bf}{\l@addto@macro\captionlabelfont\bfseries} +\DeclareCaptionOptionNoValue*{rm}{\l@addto@macro\captionlabelfont\rmfamily} +\DeclareCaptionOptionNoValue*{sf}{\l@addto@macro\captionlabelfont\sffamily} +\DeclareCaptionOptionNoValue*{tt}{\l@addto@macro\captionlabelfont\ttfamily} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareCaptionOptionNoValue*{nooneline}{\caption@setbool{slc}{0}} +% \end{macrocode} +% +% \begin{macrocode} +\caption@setbool{ruled}{0} +\DeclareCaptionOptionNoValue*{ruled}{\caption@setbool{ruled}{1}} +% \end{macrocode} +% +% \subsubsection{caption2 v2.x compatibility options} +% \changes{v3.0h}{2005/07/08}{caption2 \version{2.x} compatibility options added} +% \changes{v3.1}{2007/09/01}{caption2 v2.x compatibility options revised} +% \changes{v3.1d}{2007/10/24}{Bugfix 07-10-24 in caption v2.x$ compatibility options} +% +% \begin{macrocode} +\DeclareCaptionOptionNoValue*{flushleft}{% + \caption@setformat{plain}% + \caption@setjustification{raggedright}} +\DeclareCaptionOptionNoValue*{flushright}{% + \caption@setformat{plain}% + \caption@setjustification{raggedleft}} +% \end{macrocode} +% \begin{macrocode} +\DeclareCaptionOptionNoValue*{oneline}{\caption@setbool{slc}{1}} +% \end{macrocode} +% \begin{macrocode} +\DeclareCaptionOptionNoValue*{ignoreLTcapwidth}{% + \caption@WarningNoLine{Obsolete option `ignoreLTcapwidth' ignored}} +% \end{macrocode} +% +% \subsubsection{Obsolete caption v3.0 options} +% \changes{v3.1}{2007/05/07}{Package option \opt{caption} marked as obsolete, +% gives error now} +% +% \begin{macrocode} +\DeclareCaptionOption*{caption}{% + \caption@setbool{temp}{#1}% + \caption@ifbool{temp}{}{% + \caption@Error{% + The package option `caption=#1' is obsolete.\MessageBreak + Please pass this option to the subfig package instead\MessageBreak + and do *not* load the caption package anymore}}} +% \end{macrocode} +% +% \subsubsection{fltpage package support options} +% +% \changes{v3.1}{2007/09/01}{Options `FPlist' \& `FPref' added} +% With these options is controlled where the list-of entry and |\ref| resp. +% |\pageref| or |\autoref| will link to. +% Defaults are |FPlist=caption| and |FPref=figure| which is inconsistent, +% but compatible to the usual behaviour of the \package{fltpage} package. +% \begin{macrocode} +\DeclareCaptionOption{FPlist}[1]{\caption@setFPoption{list}{#1}} +\DeclareCaptionOption{FPref}[1]{\caption@setFPoption{ref}{#1}} +\@onlypreamble@key{caption}{FPlist} +\@onlypreamble@key{caption}{FPref} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@setFPoption[2]{% + \edef\caption@tempa{\@car#2\@nil}% + \caption@setbool{FP#1cap}{\if c\caption@tempa 1\else 0\fi}} +\@onlypreamble\caption@setFPoption +% \end{macrocode} +% \begin{macrocode} +\captionsetup{FPlist=caption,FPref=figure} +% \end{macrocode} +% +% \subsubsection{hyperref package support options} +% +% \changes{v3.1}{2007/06/21}{Options `hypcap' \& `hypcapspace' added} +% With |hypcap=off| one can turn the \package{hypcap} support off +% (default is |on|). +% \begin{macrocode} +\DeclareCaptionOption{hypcap}[1]{\caption@setbool{hypcap}{#1}} +\DeclareCaptionOption{hypcapspace}{\def\caption@hypcapspace{#1}} +% \end{macrocode} +% \begin{macrocode} +\captionsetup{hypcap=1,hypcapspace=.5\baselineskip} +% \end{macrocode} +% +% \subsection{\AmS{} \& \SmF{} document classes support} +% \changes{v3.1}{2007/07/29}{\AmS\ \& \SmF\ document classes support added} +% +% \begin{macrocode} +\caption@ifamsclass{% + \caption@InfoNoLine{AMS or SMF document class}% +% \end{macrocode} +% \begin{macrocode} + \setlength\belowcaptionskip{0pt}% set to 12pt by AMS class +% \end{macrocode} +% \begin{macrocode} +} +% \end{macrocode} +% +% \subsection{\KOMAScript{} document classes support} +% \changes{v3.0a}{2004/01/18}{Minimum adaptation to \KOMAScript\ added} +% \changes{v3.0h}{2005/08/22}{\KOMAScript\ compatibility options added} +% \changes{v3.0i}{2005/11/17}{\KOMAScript\ compatibility commands added} +% \changes{v3.0l}{2007/02/18}{\KOMAScript\ compatibility revised} +% \changes{v3.1}{2007/03/17}{\KOMAScript\ compatibility options removed} +% \changes{v3.1}{2007/04/05}{\KOMAScript\ compatibility revised \& enhanced} +% +% \begin{macrocode} +\caption@ifkomaclass{% + \caption@InfoNoLine{KOMA-Script document class}% +% \end{macrocode} +% +% Here we emulate the caption related commands and take over the caption +% related settings from the \KOMAScript\ classes. +% +% \begin{macro}{\@tablecaptionabovetrue} +% \begin{macro}{\@tablecaptionabovefalse} +% \changes{v3.1g}{2008/03/01}{\cs{def} changed to \cs{g@addto@macro}} +% \begin{macrocode} + \g@addto@macro\@tablecaptionabovetrue{\captionsetup*[table]{position=t}} + \g@addto@macro\@tablecaptionabovefalse{\captionsetup*[table]{position=b}} +% \end{macrocode} +% \begin{macrocode} + \if@tablecaptionabove + \@tablecaptionabovetrue + \else + \@tablecaptionabovefalse + \fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@figurecaptionabovetrue} +% \begin{macro}{\@figurecaptionabovefalse} +% \changes{v3.3}{2013/02/15}{Support of \cs{@figurecaptionabovetrue} added} +% \begin{macrocode} + \caption@ifundefined\@figurecaptionabovetrue{}{% +% \end{macrocode} +% \begin{macrocode} + \g@addto@macro\@figurecaptionabovetrue{\captionsetup*[figure]{position=t}} + \g@addto@macro\@figurecaptionabovefalse{\captionsetup*[figure]{position=b}} +% \end{macrocode} +% \begin{macrocode} + \if@figurecaptionabove + \@figurecaptionabovetrue + \else + \@figurecaptionabovefalse + \fi +% \end{macrocode} +% \begin{macrocode} + }% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\onelinecaptionstrue} +% \begin{macro}{\onelinecaptionsfalse} +% \changes{v3.1g}{2008/03/01}{\cs{def} changed to \cs{g@addto@macro}} +% \begin{macrocode} + \g@addto@macro\onelinecaptionstrue{\let\caption@ifslc\@firstoftwo} + \g@addto@macro\onelinecaptionsfalse{\let\caption@ifslc\@secondoftwo} +% \end{macrocode} +% \begin{macrocode} + \ifonelinecaptions + \onelinecaptionstrue + \else + \onelinecaptionsfalse + \fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@captionabovetrue} +% \begin{macro}{\@captionabovefalse} +% \changes{v3.0j}{2006/03/21}{Bugfix 06-03-21: +% \cs{let}\cs{caption@setposition}\cs{@gobble} added} +% \changes{v3.0n}{2006/03/09}{Accidentally this got broken in \version{3.0m}, fixed} +% \changes{v3.1}{2007/03/31}{We redefine \cs{captionabovetrue/false} now +% instead of \cs{captionabove/below}} +% \changes{v3.1g}{2008/03/01}{\cs{def} changed to \cs{g@addto@macro}} +% \changes{v3.1k}{2009/10/09}{\opt{figureposition} and \opt{tableposition} will issue a warning now} +% Please note that these are stronger than the \opt{position} setting, therefore we +% override the options \opt{figureposition} and \opt{tableposition} to typeout a warning. +% \begin{macrocode} + \g@addto@macro\@captionabovetrue{\let\caption@position\@firstoftwo} + \g@addto@macro\@captionabovefalse{\let\caption@position\@secondoftwo} +% \end{macrocode} +% \begin{macrocode} + \DeclareCaptionOption{figureposition}{% + \caption@WarningNoLine{Option `figureposition=#1' has no effect\MessageBreak + when used with a KOMA script document class}} + \DeclareCaptionOption{tableposition}{% + \caption@WarningNoLine{Option `tableposition=#1' has no effect\MessageBreak + when used with a KOMA script document class}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\setcapindent} +% \begin{macrocode} + \let\caption@KOMA@setcapindent\@setcapindent + \renewcommand*\@setcapindent[1]{% + \caption@KOMA@setcapindent{#1}\caption@setcapindent} +% \end{macrocode} +% \begin{macrocode} + \let\caption@KOMA@@setcapindent\@@setcapindent + \renewcommand*\@@setcapindent[1]{% + \caption@KOMA@@setcapindent{#1}\caption@setcapindent} +% \end{macrocode} +% \begin{macrocode} + \newcommand*\caption@setcapindent{% + \captionsetup{indent=\ifdim\cap@indent<\z@\z@\else\cap@indent\fi}} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} + \caption@ifundefined\cap@indent{}{\caption@setcapindent} +% \end{macrocode} +% +% \begin{macro}{\setcapwidth} +% \changes{v3.3}{2018/12/26}{Bugfix: Missing curly braces added} +% \Note{The optional argument of \cs{setcapwidth} if not supported (yet), +% so we issue a warning if used. +% (Since this does not seem to have an negative effect when used +% by the \texttt{captionbeside} environment, we suppress the warning here.)} +% \begin{macrocode} + \expandafter\let\expandafter\caption@KOMA@setcapwidth + \csname\string\setcapwidth\endcsname + \@namedef{\string\setcapwidth}[#1]#2{% + \caption@KOMA@setcapwidth[{#1}]{#2}\caption@setcapwidth{#1}} +% \end{macrocode} +% \begin{macrocode} + \newcommand*\caption@setcapwidth[1]{% + \ifx\\#1\\\else + \caption@ifundefined\cap@margin{}{% + \def\@tempa{captionbeside}% + \ifx\@tempa\@currenvir\else\caption@Warning{% + Ignoring optional argument [#1] of \string\setcapwidth\MessageBreak}% + \fi}% + \fi + \captionsetup{width=\cap@width}} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} + \def\caption@tempa{\hsize}% + \ifx\caption@tempa\cap@width \else + \caption@setcapwidth{?} + \fi +% \end{macrocode} +% +% \begin{macro}{\setcapmargin} +% \begin{macrocode} + \expandafter\let\expandafter\caption@KOMA@setcapmargin + \csname\string\@setcapmargin\endcsname + \@namedef{\string\@setcapmargin}[#1]#2{% + \caption@KOMA@setcapmargin[{#1}]{#2}\caption@setcapmargin} +% \end{macrocode} +% \begin{macrocode} + \expandafter\let\expandafter\caption@KOMA@@setcapmargin + \csname\string\@@setcapmargin\endcsname + \@namedef{\string\@@setcapmargin}[#1]#2{% + \caption@KOMA@@setcapmargin[{#1}]{#2}\caption@setcapmargin} +% \end{macrocode} +% \begin{macrocode} + \newcommand*\caption@setcapmargin{% + \begingroup + \let\onelinecaptionsfalse\relax + \def\@twoside{0}% + \def\if@twoside{\def\@twoside{1}\iffalse}% + \cap@margin + \def\@tempa{\endgroup}% + \ifx\cap@left\hfill\else\ifx\cap@right\hfill\else + \def\hspace##1##{\@firstofone}% + \edef\@tempa{\endgroup + \noexpand\captionsetup{% + twoside=\@twoside,slc=0,% + margin={\cap@left,\cap@right}}}% + \fi\fi + \@tempa} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} + \ifx\cap@margin\relax \else + \caption@setcapmargin + \fi +% \end{macrocode} +% +% \begin{macrocode} +} +% \end{macrocode} +% +% \subsection{Processing of options} +% +% \changes{v3.0m}{2007/03/04}{Verbose option added} +% \changes{v3.1}{2007/07/02}{Verbose option removed from package} +% +% \changes{v3.1}{2007/03/17}{We do not process global options anymore} +% \begin{macrocode} +\caption@SetupOptions{caption}{\caption@setkeys{#1}{#2}} +\caption@ProcessOptions*{caption} +% \end{macrocode} +% +% \subsection{\cs{caption}, \cs{@caption}, and \cs{@makecaption}} +% +% \begin{macro}{\caption@ifflag} +% \changes{v3.3}{2011/12/28}{This switch added} +% \changes{v3.3}{2018/08/08}{Rewritten (and renamed) so a counter is used instead of a switch} +% Since we support continued floats and sub-figures it's not an easy task +% to manage the figure (and table) counter. (Especially since previous versions +% of the caption package has proven that correcting a counter locally is not a good idea.) +% +% These three switches hold the +% current status: |\caption@if|\-|flag{2}| is set if the caption was already +% typeset (so the counter doesn't need to be incremented for sub-figures), +% |\caption@if|\-|flag{4}| is set if there is already content which have +% incremented the counter (so the counter doesn't need to be incremented +% for the main caption, further sub-figures, and other stuff), and +% |\caption@if|\-|flag{1}| is set if |\Continued|\-|Float| was given. +% +% In the past three boolean switches were used to store the flags, but since some +% packages (like the \package{floatrow} and \package{tabu} package) try hard to keep +% counter changes locally under certain circumstances, it seems a good idea to make +% these flags a counter value, too. +% \begin{macrocode} +\newcounter{caption@flags} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@ifflag[1]{% + \@tempcnta\c@caption@flags + \divide\@tempcnta #1\relax + \ifodd\@tempcnta + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@clrflags} +% \changes{v3.3}{2018/08/08}{This macro added} +% \begin{macro}{\caption@clrflag} +% \changes{v3.3}{2013/04/14}{This macro added} +% \changes{v3.3}{2018/08/08}{Rewritten so a counter is used instead of a switch} +% \begin{macro}{\caption@setflag} +% \changes{v3.3}{2013/04/14}{This macro added} +% \changes{v3.3}{2018/08/08}{Rewritten so a counter is used instead of a switch} +% Furthermore we introduce the macros \cs{caption@clrflag} and \cs{caption@setflag} +% for clearing resp.~setting these flags. +% \begin{macrocode} +\newcommand*\caption@clrflags{% + \setcounter{caption@flags}\z@} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@clrflag[1]{% + \caption@ifflag{#1}{\caption@addtoflags{-#1}}{}} +\newcommand*\caption@setflag[1]{% + \caption@ifflag{#1}{}{\caption@addtoflags{#1}}} +\newcommand*\caption@addtoflags{% + \addtocounter{caption@flags}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\caption@caption} +% \changes{v3.0f}{2005/05/22}{Bugfix: \cs{ContinuedFloat} added} +% \changes{v3.0f}{2005/06/13}{Support of \cs{caption*[]} removed} +% \changes{v3.0l}{2007/01/19}{Minimal support of \textsf{combine} package added} +% \changes{v3.1}{2007/02/04}{Re-written, does not save\&use original definition anymore} +% Here comes our definition of |\caption| and |\caption*|. +% Beside the support of the starred variant this code was adapted to the +% various packages we support. +% We are using |\caption@dblarg| instead of |\@dblarg| so |\caption{}| +% (with an empty arg.) will produce a list-of entry, but |\caption[]{}| +% won't. +% \begin{macrocode} +\def\caption@caption{% + \caption@iftype + {\caption@checkgrouplevel\@empty\caption + \caption@star + {\caption@refstepcounter\@captype}% + {\caption@dblarg{\@caption\@captype}}}% + {\caption@Error{\noexpand\caption outside float}% + \caption@gobble}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@star} +% \changes{v3.1}{2007/06/24}{Renamed from \cs{caption@caption} to \cs{caption@star}} +% \changes{v3.2c}{2011/08/21}{\cs{global} removed} +% A helper macro which processes the optional |*| after |\caption|. +% \begin{macrocode} +\newcommand*\caption@star[2]{% + \@ifstar{\caption@startrue#2[]}{#1#2}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@@caption} +% \changes{v3.1}{2007/02/04}{Re-written, does not save\&use original definition anymore} +% \changes{v3.1f}{2007/11/28}{Bugfix: Handling of \texttt{@minipage} flag added} +% \changes{v3.1f}{2007/11/28}{Support of option \opt{@minipage} added} +% \changes{v3.1g}{2008/03/16}{Internal: Uses \cs{caption@prepareanchor} now} +% \changes{v3.2d}{2011/10/21}{Adapted to the \textsf{memoir} document class} +% \changes{v3.2f}{2012/01/14}{Usage of \cs{M@gettitle} moved to \cs{caption@prepareanchor}} +% \changes{v3.3}{2013/01/06}{Adapted to the \textsf{nag} package} +% As above, our version has been adapted to the packages we support. +% Additionally our code is nested by |\caption@beginex| \& +% |\caption@end| instead of |\begingroup| \& |\endgroup|. +% Furthermore we use |\caption@boxrestore| instead of |\@parboxrestore| +% so this code also works correctly inside list-based environments +% like |wide| \& |addmargin|. (This, and the fact that we use +% |\linewidth| instead of |\hsize| inside |\@makecaption|, solves +% \href{http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/2472}%^^A +% {\LaTeX\ PR \texttt{latex/2472}}.) +% \begin{macrocode} +\long\def\caption@@caption#1[#2]#3{% +% \end{macrocode} +% \begin{macrocode} + \ifcaption@star \else + \caption@prepareanchor{#1}{#2}% + \memcaptioninfo{#1}{\csname the#1\endcsname}{#2}{#3}% + \@nameuse{nag@hascaptiontrue}% + \fi +% \end{macrocode} +% \begin{macrocode} + \par + \caption@beginex{#1}{#2}{#3}% + \caption@setfloatcapt{% + \caption@boxrestore + \if@minipage + \@setminipage + \fi + \caption@normalsize + \ifcaption@star + \let\caption@makeanchor\@firstofone + \fi + \@makecaption{\csname fnum@#1\endcsname}% + {\ignorespaces\caption@makeanchor{#3}}\par + \caption@if@minipage\@minipagetrue\@minipagefalse}% + \caption@end} +% \end{macrocode} +% \textsf{memoir} document class stuff: +% \begin{macrocode} +\providecommand\M@gettitle[1]{} +\providecommand\memcaptioninfo[4]{} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@prepareanchor} +% \changes{v3.1g}{2008/03/16}{This macro added} +% \changes{v3.2f}{2012/01/14}{Usage of \cs{M@gettitle} moved from \cs{caption@@caption}} +% \begin{macrocode} +\newcommand*\caption@prepareanchor[2]{% + \caption@makecurrent{#1}{#2}% + \caption@ifhypcap\caption@@start\relax + \M@gettitle{#2}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@makecaption} +% \changes{v3.1i}{2008/05/06}{Usage of \cs{caption@rule} added} +% |\@makecaption|\marg{label}\marg{text}\par +% We do basically the same as the original code (from the standard +% \LaTeX\ document classes), but take care of the |position=| setting +% and use |\caption@@make| from the \package{caption} kernel to finally +% typeset the caption. +% \begin{macrocode} +\long\def\caption@makecaption#1#2{% + \caption@make@above + \caption@@make{#1}{#2}% + \caption@make@below} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@make@above} +% \begin{macro}{\caption@make@below} +% \changes{v3.3a}{2019/04/02}{This macro added} +% |\caption@make@above|\\ +% |\caption@make@below|\par +% Typesets the stuff above resp.~below the caption, depending on |\caption@iftop|. +% \begin{macrocode} +\newcommand*\caption@make@above{% + \caption@iftop + \caption@belowskip + {\caption@rule\caption@aboveskip}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@make@below{% + \caption@iftop + {\caption@aboveskip\caption@rule}% + \caption@belowskip} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\caption@aboveskip} +% \begin{macro}{\caption@belowskip} +% \changes{v3.3a}{2019/04/02}{This macro added} +% |\caption@aboveskip|\\ +% |\caption@belowskip|\par +% Typesets the skip above resp.~below the caption. +% \begin{macrocode} +\newcommand*\caption@aboveskip{% + \vskip\abovecaptionskip} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@belowskip{% + \vskip\belowcaptionskip} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\caption@redefine} +% \changes{v3.1k}{2009/03/30}{This macro added, it contains the patching code now} +% We only redefine |\caption| and |\@caption| if the current definitions +% are well known, so documents written in the old (\package{caption} +% package \version{1.x}) days (where |\caption| \& |\@caption| were not +% redefined by us) will still compile fine. +% For example the usage of the (now obsolete) \package{captcont} package, +% which brings its own definition of |\caption*|, was quite common these days. +% \begin{macrocode} +\newcommand*\caption@redefine{} +\g@addto@macro\caption@redefine{% +% \end{macrocode} +% +% \begin{macrocode} + \caption@setbool{incompatible}{0}% +% \end{macrocode} +% +% \begin{macrocode} + \caption@CheckCommand\caption{% + % ltfloat.dtx [2002/10/01 v1.1v LaTeX Kernel (Floats)] + \def\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside float}\@ehd + \expandafter\@gobble + \else + \refstepcounter\@captype + \expandafter\@firstofone + \fi + {\@dblarg{\@caption\@captype}}% + }}% +% \end{macrocode} +% +% \begin{macrocode} + \caption@CheckCommand\caption{% + % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau + \def\caption{ + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside figure or table}\@ehd + \expandafter\@gobble + \else + \refstepcounter\@captype + \expandafter\@firstofone + \fi + {\@dblarg{\@caption\@captype}}% + }}% +% \end{macrocode} +% +% \begin{macrocode} + \caption@CheckCommand\caption{% + % beamerbaselocalstructure.sty, Joseph Wright committed 4ac715c 2013-09-04 + \def\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside figure or table}\@ehd + \expandafter\@gobble + \else + \refstepcounter\@captype + \expandafter\@firstofone + \fi + {\@dblarg{\@caption\@captype}}% + }}% +% \end{macrocode} +% +% \begin{macrocode} + \caption@CheckCommand\caption{% + % float.sty [2001/11/08 v1.3d Float enhancements (AL)] + \long\def\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside float}\@ehd + \expandafter\@gobble + \else + \refstepcounter\@captype + \let\@tempf\@caption + \expandafter\ifx\csname @float@c@\@captype\endcsname\relax\else + \expandafter\expandafter\let + \expandafter\@tempf\csname @float@c@\@captype\endcsname + \fi + \fi + \@dblarg{\@tempf\@captype}}}% +% \end{macrocode} +% +% \begin{macrocode} + \caption@CheckCommand\caption{% + % hyperref.sty [2007/02/27 v6.75t Hypertext links for LaTeX] + % hyperref.sty [2007/04/09 v6.76a Hypertext links for LaTeX] + % hyperref.sty [2007/06/12 v6.76h Hypertext links for LaTeX] + \def\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside float}\@ehd + \expandafter\@gobble + \else + \H@refstepcounter\@captype + \@ifundefined{fst@\@captype}{% + \let\Hy@tempa\@caption + }{% + \let\Hy@tempa\Hy@float@caption + }% + \expandafter\@firstofone + \fi + {\@dblarg{\Hy@tempa\@captype}}% + }}% +% \end{macrocode} +% \begin{macrocode} + \caption@CheckCommand\caption{% + % hyperref.sty [2007/08/05 v6.76j Hypertext links for LaTeX] + \def\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside float}\@ehd + \expandafter\@gobble + \else + \H@refstepcounter\@captype + \let\Hy@tempa\@caption + \@ifundefined{float@caption}{% + }{% + \expandafter\ifx\csname @float@c@\@captype\endcsname\float@caption + \let\Hy@tempa\Hy@float@caption + \fi + }% + \expandafter\@firstofone + \fi + {\@dblarg{\Hy@tempa\@captype}}% + }}% +% \end{macrocode} +% \begin{macrocode} + \caption@CheckCommand\caption{% + % memhfixc.sty [2010/08/17 v1.15 nameref/hyperref package fixes for memoir class] + % \let\m@moldhypcaption\caption + \long\def\caption{\donemaincaptiontrue\m@moldhypcaption}}% +% \end{macrocode} +% \begin{macrocode} + \caption@IfCheckCommand{}{% + \caption@InfoNoLine{% + Incompatible package detected (regarding \string\caption).\MessageBreak + \string\caption\space=\space\meaning\caption}% + \caption@setbool{incompatible}{1}}% +% \end{macrocode} +% +% \begin{macrocode} + \caption@CheckCommand\@caption{% + % ltfloat.dtx [2002/10/01 v1.1v LaTeX Kernel (Floats)] + \long\def\@caption#1[#2]#3{% + \par + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \endgroup}}% +% \end{macrocode} +% +% \begin{macrocode} + \caption@CheckCommand\@caption{% + % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau + \long\def\@caption#1[#2]#3{% second argument ignored + \par\nobreak + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \beamer@makecaption{#1}{\ignorespaces #3}\par\nobreak + \endgroup}}% +% \end{macrocode} +% +% \begin{macrocode} + \caption@CheckCommand\@caption{% + % memhfixc.sty [2010/08/17 v1.15 nameref/hyperref package fixes for memoir class] + \long\def\@caption#1[#2]#3{% + \MNR@old@caption{#1}[{#2}]{#3}% + \def\@currentlabelname{#2}% + \M@gettitle{#2}% + }}% +% \end{macrocode} +% +% \begin{macrocode} + \caption@CheckCommand\@caption{% + % arabicore.sty [2006/01/01 v1.0 Arabi Core switching commands (may still change)] + \long\def\@caption#1[#2]#3{% + \par + \addtocontents{\csname ext@#1\endcsname}{\xstring\select@language{\main@Arabi@language}}% + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\protect\numberline{\csname the#1\endcsname}{\ignorespaces \if@rl{\textRL{#2}}\else\textLR{#2}\fi}}% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces \if@rl{\textRL{#3}}\else\textLR{#3}\fi}\par + \endgroup}}% +% \end{macrocode} +% +% \begin{macrocode} + \caption@CheckCommand\@caption{% + % rlbabel.def [2005/03/30 v2.3h Right-to-Left support from the babel system Hebrew language support from the babel system] + \long\def\@caption#1[#2]#3{% + \par + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\protect\numberline{\csname the#1\endcsname}% + {\ignorespaces #2}}% + \def\@fignm{figure} + \ifx#1\@fignm\addcontentsline{fol}{#1}% + {\protect\numberline{\csname the#1\endcsname}% + {\ignorespaces #2}}\fi% + \def\@tblnm{table} + \ifx#1\@tblnm\addcontentsline{tol}{#1}% + {\protect\numberline{\csname the#1\endcsname}% + {\ignorespaces #2}}\fi% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \endgroup}}% +% \end{macrocode} +% +% \begin{macrocode} + \caption@CheckCommand\@caption{% + % magyar.ldf [2005/03/30 v1.4j Magyar support from the babel system] + \long\def\@caption#1[#2]#3{% + \csname par\endcsname + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\protect\numberline{\csname the#1\endcsname.}{\ignorespaces #2}}% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \@makecaption{\csname fnum@#1\endcsname}% + {\ignorespaces #3}\csname par\endcsname + \endgroup}}% +% \end{macrocode} +% +% \begin{macrocode} +% \caption@CheckCommand\float@caption{% +% % float.sty [2001/11/08 v1.3d Float enhancements (AL)] +% \long\def\float@caption#1[#2]#3{% +% \addcontentsline{\@nameuse{ext@#1}}{#1}% +% {\protect\numberline{\@nameuse{the#1}}{\ignorespaces #2}} +% \global\setbox\@floatcapt\vbox\bgroup\@parboxrestore +% \normalsize\@fs@capt{\@nameuse{fnum@#1}}{\ignorespaces #3}% +% \@ifnextchar[{\float@ccon}{\egroup}}% +% \long\def\float@ccon[#1]{#1\par\egroup}}% +% \end{macrocode} +% +% \begin{macrocode} + \caption@CheckCommand\@caption{% + % hyperref.sty [2007/02/27 v6.75t Hypertext links for LaTeX] + \long\def\@caption#1[#2]#3{% + \hyper@makecurrent{\@captype}% + \def\@currentlabelname{#2}% + \par\addcontentsline{\csname ext@#1\endcsname}{#1}{% + \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}% + }% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \@makecaption{\csname fnum@#1\endcsname}{% + \ignorespaces + \ifHy@nesting + \hyper@@anchor{\@currentHref}{#3}% + \else + \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3% + \fi + }% + \par + \endgroup + }}% +% \end{macrocode} +% \begin{macrocode} + \caption@CheckCommand\@caption{% + % hyperref.sty [2007/04/09 v6.76a Hypertext links for LaTeX] + % hyperref.sty [2007/06/12 v6.76h Hypertext links for LaTeX] + % hyperref.sty [2007/08/05 v6.76j Hypertext links for LaTeX] + \long\def\@caption#1[#2]#3{% + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\let\@currentHref\hc@currentHref + \else + \hyper@makecurrent{\@captype}% + \fi + \def\@currentlabelname{#2}% + \par\addcontentsline{\csname ext@#1\endcsname}{#1}{% + \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}% + }% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\@capstartfalse + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}% + \else + \@makecaption{\csname fnum@#1\endcsname}{% + \ignorespaces + \ifHy@nesting + \hyper@@anchor{\@currentHref}{#3}% + \else + \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3% + \fi + }% + \fi + \par + \endgroup + }}% +% \end{macrocode} +% \begin{macrocode} + \caption@CheckCommand\@caption{% + % hyperref.sty [2009/11/27 v6.79k Hypertext links for LaTeX] + \long\def\@caption#1[#2]#3{% + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\let\@currentHref\hc@currentHref + \else + \hyper@makecurrent{\@captype}% + \fi + \def\@currentlabelname{#2}% + \par\addcontentsline{\csname ext@#1\endcsname}{#1}{% + \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}% + }% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\@capstartfalse + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}% + \else + \@makecaption{\csname fnum@#1\endcsname}{% + \ignorespaces + \ifHy@nesting + \expandafter\hyper@@anchor\expandafter{\@currentHref}{#3}% + \else + \Hy@raisedlink{% + \expandafter\hyper@@anchor\expandafter{\@currentHref}{\relax}% + }% + #3% + \fi + }% + \fi + \par + \endgroup + }}% +% \end{macrocode} +% \begin{macrocode} + \caption@CheckCommand\@caption{% + % hyperref.sty [2009/12/09 v6.79m Hypertext links for LaTeX] + % hyperref.sty [2009/12/28 v6.79z Hypertext links for LaTeX] + \long\def\@caption#1[#2]#3{% + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\let\@currentHref\hc@currentHref + \else + \hyper@makecurrent{\@captype}% + \fi + \@ifundefined{NR@gettitle}{% + \def\@currentlabelname{#2}% + }{% + \NR@gettitle{#2}% + }% + \par\addcontentsline{\csname ext@#1\endcsname}{#1}{% + \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}% + }% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\@capstartfalse + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}% + \else + \@makecaption{\csname fnum@#1\endcsname}{% + \ignorespaces + \ifHy@nesting + \expandafter\hyper@@anchor\expandafter{\@currentHref}{#3}% + \else + \Hy@raisedlink{% + \expandafter\hyper@@anchor\expandafter{% + \@currentHref + }{\relax}% + }% + #3% + \fi + }% + \fi + \par + \endgroup + }}% +% \end{macrocode} +% +% \begin{macrocode} + \caption@CheckCommand\@caption{% + % nameref.sty [2006/12/27 v2.28 Cross-referencing by name of section] + \long\def\@caption#1[#2]{% + \def\@currentlabelname{#2}% + \NR@@caption{#1}[{#2}]% + }}% +% \end{macrocode} +% \begin{macrocode} + \caption@CheckCommand\@caption{% + % nameref.sty [2009/11/27 v2.32 Cross-referencing by name of section] + \long\def\@caption#1[#2]{% + \NR@gettitle{#2}% + \NR@@caption{#1}[{#2}]% + }}% +% \end{macrocode} +% +% \begin{macrocode} + \caption@CheckCommand\@caption{% + % subfigure.sty [2002/07/30 v2.1.4 subfigure package] + \long\def\@caption#1[#2]#3{% + \@ifundefined{if#1topcap}% + {\subfig@oldcaption{#1}[{#2}]{#3}}% + {\@nameuse{if#1topcap}% + \@listsubcaptions{#1}% + \subfig@oldcaption{#1}[{#2}]{#3}% + \else + \subfig@oldcaption{#1}[{#2}]{#3}% + \@listsubcaptions{#1}% + \fi}}}% +% \end{macrocode} +% +% \begin{macrocode} + \caption@CheckCommand\@caption{% + % subfig.sty [2005/06/28 ver: 1.3 subfig package] + \def\@caption{\caption@}% +% \long\def\caption@#1[#2]#3{% +% \@ifundefined{caption@setfloattype}% +% \caption@settype +% \caption@setfloattype +% \@captype +% \sf@ifpositiontop{% +% \@listsubcaptions{#1}% +% \sf@old@caption{#1}[{#2}]{#3}% +% }{% +% \sf@old@caption{#1}[{#2}]{#3}% +% \@listsubcaptions{#1}% +% }}% + }% +% \end{macrocode} +% +% \begin{macrocode} + \caption@CheckCommand\@caption{% + % chkfloat.sty [2012/08/19 v0.1 chkfloat: check for moved floats] + \def\@caption#1[#2]#3{\chkfloat@caption{#1}[#2]{#3}% + \addtocontents{fof}{\protect\chkfloat@{\thepage}{\chkfloat@page}{\csname fnum@#1\endcsname: #2}}% + }}% +% \end{macrocode} +% \begin{macrocode} + \caption@CheckCommand\@caption{% + % chkfloat.sty [20??/??/?? v0.? chkfloat: check for moved floats] + \def\@caption#1[#2]#3{\chkfloat@caption{#1}[{#2}]{#3}% + \chkfloat@addcontentsline{#1}{#2}% + }}% +% \end{macrocode} +% +% \begin{macrocode} + \caption@IfCheckCommand{}{% + \caption@InfoNoLine{% + Incompatible package detected (regarding \string\@caption).\MessageBreak + \string\@caption\space=\space\meaning\@caption}% + \caption@setbool{incompatible}{1}}% +% \end{macrocode} +% +% The option |compatibility=| will override the compatibility mode. +% \begin{macrocode} + \caption@ifundefined\caption@ifcompatibility + {\let\caption@ifcompatibility\caption@ifincompatible + \let\caption@tempa\caption@WarningNoLine}% + {\let\caption@tempa\@gobble}% suppress warning +% \end{macrocode} +% +% \begin{macrocode} + \caption@ifcompatibility{% +% \end{macrocode} +% +% \begin{macrocode} + \caption@tempa{% + \noexpand\caption will not be redefined since it's already\MessageBreak + redefined by a document class or package which is\MessageBreak + unknown to the caption package}% +% \end{macrocode} +% +% \begin{macrocode} + \renewcommand*\caption@redefine{}% +% \end{macrocode} +% +% |\ContinuedFloat| is not supported in compatibility mode. +% \begin{macrocode} + \renewcommand*\caption@ContinuedFloatX[1]{% + \caption@Error{Not available in compatibility mode}}% +% \end{macrocode} +% +% |\caption@start| is not supported in compatibility mode. +% \begin{macrocode} + \caption@AtBeginDocument*{% + \let\caption@start\relax + \caption@ifundefined\caption@ORI@capstart{}{% + \caption@Debug{% + Restore hypcap definition of \string\capstart\@gobble}% + \let\capstart\caption@ORI@capstart}% + }% +% \end{macrocode} +% +% \begin{macro}{\caption@star} +% We redefine |\caption@star| here so it does not make any harm. +% \begin{macrocode} + \renewcommand*\caption@star[2]{#1#2}% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} + }{% +% \end{macrocode} +% +% \begin{macrocode} + \caption@ifincompatible{% + \caption@WarningNoLine{% + Forced redefinition of \noexpand\caption since the\MessageBreak + unsupported(!) package option `compatibility=false'\MessageBreak + was given}% + }{}% +% \end{macrocode} +% +% \begin{macro}{\caption} +% \begin{macro}{\@caption} +% \begin{macrocode} + \renewcommand*\caption@redefine{% + \let\caption\caption@caption + \let\@caption\caption@@caption}% + \caption@redefine +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macrocode} + }% +% \end{macrocode} +% \begin{macrocode} + \caption@AtBeginDocument*{% + \let\caption@ORI@capstart\@undefined}% +% \end{macrocode} +% +% \begin{macro}{\@xfloat} +% \changes{v3.1}{2007/05/09}{This re-definition added} +% \changes{v3.1b}{2007/09/22}{Will now be redefined in compatibility mode, too} +% We redefine |\@xfloat| so inside floating environments our +% type-specific options will be used, a \package{hyperref} +% anchor will be set etc. +% \begin{macrocode} + \let\caption@ORI@xfloat\@xfloat + \def\@xfloat#1[#2]{% + \caption@ORI@xfloat{#1}[#2]% + \caption@settype{#1}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +} +% \end{macrocode} +% \end{macro} +% +% Some packages (like the \package{hyperref} package for example) redefines +% |\caption| and |\@caption|, too. +% So we have to use |\AtBeginDocument| here, so we can make sure +% our definition is the one which will be valid at last. +% \begin{macrocode} +\caption@AtBeginDocument{\caption@redefine} +% \end{macrocode} +% +% \begin{macro}{\@makecaption} +% \begin{macrocode} +\let\@makecaption\caption@makecaption +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\phantomcaption} +% \changes{v3.2}{2010/10/31}{Bugfix 10-09-01b: This macro added} +% |\phantomcaption|\par +% Use this one for figures with subcaptions but without main caption. +% \begin{macrocode} +\newcommand\phantomcaption{% + \caption@iftype + {\caption@refstepcounter\@captype}% + {\caption@Error{\noexpand\phantomcaption outside float}}}% +% \end{macrocode} +% \end{macro} +% +% \subsection{\cs{captionof}} +% +% \changes{v3.0d}{2004/08/03}{Option \opt{type=} added} +% \changes{v3.1}{2007/06/25}{Option \opt{type*=} added} +% \changes{v3.1f}{2007/11/16}{Option \opt{subtype} \& \opt{subtype*} added} +% \changes{v3.2}{2010/10/24}{Bugfix 10-10-17: Option \opt{type=} uses \cs{setcaptiontype} instead of \cs{caption@settype} now} +% +% \begin{macrocode} +\caption@AtBeginDocument{% +% \end{macrocode} +% \begin{macrocode} + \DeclareCaptionOption{type}{\setcaptiontype{#1}}% + \DeclareCaptionOption{type*}{\setcaptiontype*{#1}}% +% \end{macrocode} +% \begin{macrocode} + \DeclareCaptionOptionNoValue{subtype}{\setcaptionsubtype\relax}% + \DeclareCaptionOptionNoValue{subtype*}{\setcaptionsubtype*}% +% \end{macrocode} +% \begin{macrocode} +} +% \end{macrocode} +% +% \emph{Important Note:} +% Like |\captionof| the option |type=| should only be used inside a +% group, box, or environment and does not check if the argument is a valid +% floating environment or not. +% +% \begin{macro}{\setcaptiontype} +% \changes{v3.2}{2010/10/24}{This macro added} +% Like |\captionsetup{type=xxx}|, but also works if \cs{captionsetup} was redefined. +% \begin{macrocode} +\newcommand\setcaptiontype{% + \caption@boxrestore@mini + \caption@settype} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\setcaptionsubtype} +% \changes{v3.2a}{2011/08/15}{This macro added} +% Same, but sets the sub-type. +% \begin{macrocode} +\newcommand\setcaptionsubtype{% + \caption@iftype + \caption@setsubtype + {\caption@Error{\noexpand\setcaptionsubtype outside float}}}% +% \end{macrocode} +% \begin{macrocode} +\newcommand\caption@setsubtype{% + \@ifstar + {\caption@@settype{sub}*{sub\@captype}}% + {\caption@@settype{sub}{sub\@captype}}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@settype} +% \changes{v3.1}{2007/05/09}{This macro added} +% \changes{v3.1b}{2007/09/22}{Usage of \cs{caption@xlabel} added} +% \changes{v3.1d}{2007/10/23}{Error message for \cs{caption@checkgrouplevel} revised} +% \changes{v3.1f}{2007/11/16}{\cs{caption@setsubtype} added} +% \changes{v3.1f}{2007/12/03}{Crappy \cs{caption@iftypewarning} replaced} +% \changes{v3.1g}{2008/01/12}{Usage of \cs{ifcaptionsetup@star} added} +% \changes{v3.2}{2010/10/26}{Error message moved from here to \cs{caption@refstepcounter}} +% \changes{v3.3}{2011/12/28}{Resetting of \cs{ifcaption@caption} and \cs{ifcaption@subcaption} added} +% |\caption@settype*|\marg{type}\par +% sets |\@captype| and executes the options associated with it +% (using |\caption@set|\-|options|). +% Furthermore we check |\current|\-|group|\-|level| (if avail), +% redefine |\@currentlabel| so a |\label| before |\caption| will result +% in a hint instead of a wrong reference, and +% use the macro |\caption@|(|sub|)|type|\-|hook| (which will be used by our +% \package{float} package support).\par +% The non-starred version sets a \package{hyperref} anchor additionally +% (if |hypcap=|\-|true| and the \package{hypcap} package is not loaded). +% \begin{macrocode} +\newcommand*\caption@settype{% + \caption@clrflags + \caption@set@type} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@set@type{% + \caption@@settype{}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@@settype[1]{% + \caption@teststar{\caption@@@settype{#1}}\@firstoftwo\@secondoftwo} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@@@settype[3]{% +% #1 = "" or "sub" +% #2 = \@firstoftwo in star form, \@secondoftwo otherwise +% #3 = , e.g. "figure" or "table" + \caption@Debug{#1type=#3}% + \caption@checkgrouplevel{#1}{% + \captionsetup{#1type#2*\@empty=...}#2{ or + \@backslashchar#1captionof}{}}% +% \end{macrocode} +% \begin{macrocode} + \edef\caption@tempa{#3}% + \expandafter\ifx\csname @#1captype\endcsname\caption@tempa \else + \ifcaptionsetup@star\else\@nameuse{caption@#1type@warning}\fi + \fi + \expandafter\let\csname @#1captype\endcsname\caption@tempa +% \end{macrocode} +% \begin{macrocode} + \@nameuse{caption@#1typehook}% +% \end{macrocode} +% \begin{macrocode} + \caption@setoptions{#3}% + \ifx\caption@opt\relax + \@nameundef{caption@#1type@warning}% + \else + \@namedef{caption@#1type@warning}{\caption@Warning{% + The #1caption type was already set to + `\csname @#1captype\endcsname'\MessageBreak}}% + \fi +% \end{macrocode} +% \begin{macrocode} + #2{}{% + \let\@currentlabel\caption@undefinedlabel +% \let\@currentHlabel\@undefined + \ifx\caption@x@label\@undefined + \let\caption@x@label\label + \let\label\caption@xlabel + \fi + \caption@start}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@typehook} +% Hook which will be used inside |\caption@set|\-|type|. +% It will be extended later on, e.g.~by our \package{float} package +% support. +% \begin{macrocode} +\newcommand*\caption@typehook{} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@iftype} +% \changes{v3.1}{2007/04/11}{This macro and its usage added} +% Since we often need to check if |\@captype| is defined (means: we +% are inside a floating environment) this helper macro was introduced. +% \begin{macrocode} +\newcommand*\caption@iftype{% + \caption@ifundefined\@captype\@secondoftwo\@firstoftwo} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@checkgrouplevel} +% \changes{v3.1}{2007/07/15}{This macro and its usage added} +% \changes{v3.1f}{2007/11/28}{Error changed to warning (compatibility)} +% \changes{v3.3}{2013/04/21}{Uses \cs{caption@ifeTeX} now} +% Checks if |\captionsetup{type=|\ldots|}| or |\caption| is done +% inside a group or not -- in the latter case a warning message will +% be issued. (needs \eTeX) +% \begin{macrocode} +\caption@ifeTeX{% + \newcommand*\caption@checkgrouplevel[2]{% + \@ifundefined{#1caption@grouplevel}{% + \caption@ifundefined\caption@grouplevel{\let\caption@grouplevel\z@}{}% + \ifnum\currentgrouplevel>\caption@grouplevel\relax + \expandafter\edef\csname #1caption@grouplevel\endcsname{% + \the\currentgrouplevel}% + \else + \caption@Warning{\string#2\MessageBreak outside box or environment}% + \fi + }{}}% +}{% + \let\caption@checkgrouplevel\@gobbletwo +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@undefinedlabel} +% \changes{v3.1}{2007/07/03}{This macro and its usage added} +% \changes{v3.1b}{2007/09/22}{Contents changed to \texttt{??}} +% \changes{v3.1i}{2008/04/13}{Contents changed to \cs{caption@xref}(\ldots)} +% \changes{v3.1k}{2009/03/30}{Bugfix 08-12-08: \cs{caption@xref} is robust now} +% \changes{v3.2c}{2011/09/13}{Text changed from `before' to `without proper'} +% \changes{v3.3}{2016/02/21}{Text changed from `without proper \cs{caption}' to `without proper reference'} +% This label will be used for |\currentlabel| inside (floating) environments +% as default. (see above) +% \iffalse\Note{All commands used have to be robust here.}\fi +% \begin{macrocode} +\newcommand*\caption@undefinedlabel{% + \protect\caption@xref{\caption@labelname}{\on@line}} +% \end{macrocode} +% \begin{macrocode} +\DeclareRobustCommand*\caption@xref[2]{% + \caption@WarningNoLine{\noexpand\label without proper reference#2}% + \@setref\relax\@undefined{#1}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@labelname{??} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\caption@xlabel} +% \changes{v3.1b}{2007/09/22}{This macro and its usage added} +% \changes{v3.1f}{2007/11/11}{Revised} +% \changes{v3.1i}{2008/04/13}{Bugfix: \cs{pageref} should always work now} +% \changes{v3.2c}{2011/08/19}{Works with optional arguments now, too} +% The new code of |\label| inside floating environments. +% |\label| will be redefined using |\caption@withoptargs|, so +% |#1| are the optional arguments (if any), and +% |#2| is the mandatory argument here. +% \begin{macrocode} +\newcommand*\caption@xlabel{% + \caption@withoptargs\caption@@xlabel} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@@xlabel[2]{% + \caption@@@xlabel + \def\caption@labelname{#2}% + \caption@x@label#1{#2}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@@@xlabel{% + \global\let\caption@@@xlabel\@empty + \@bsphack + \protected@write\@auxout{}% + {\string\providecommand*\string\caption@xref[2]{% + \string\@setref\string\relax\string\@undefined{\string##1}}}% + \@esphack} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\captionof} +% \changes{v3.1}{2007/05/09}{Uses \cs{caption@settype} instead of \cs{def}\cs{@captype}} +% \changes{v3.1c}{2007/09/22}{Bugfix: Redefinition of \cs{caption@setfloatcapt} removed} +% \changes{v3.1e}{2007/10/30}{Better compatibility: Will be defined with \cs{AtBeginDocument} now} +% \changes{v3.2}{2010/10/24}{Bugfix 10-10-17: Uses \cs{setcaptiontype} instead of \cs{caption@settype} now} +% |\captionof|\marg{type}\oarg{lst\_entry}\marg{heading}\\ +% |\captionof*|\oarg{lst\_entry}\marg{heading}\par +% \Note{This will be defined with \cs{AtBeginDocument} so +% \cs{usepackage}\csmarg{caption,capt-of} will still work. +% (Compatibility to \version{1.x})} +% \begin{macrocode} +\caption@AtBeginDocument{% + \def\captionof{\caption@teststar\caption@of{\caption*}\caption}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@of[2]{\setcaptiontype*{#2}#1} +% \end{macrocode} +% \end{macro} +% +% \subsection{\cs{captionlistentry}} +% +% \begin{macro}{\captionlistentry} +% \changes{v3.1}{2007/07/28}{This macro added} +% \changes{v3.1f}{2007/11/16}{Bugfix 07-11-09: `space hack' added} +% \changes{v3.1g}{2008/01/20}{Starred variant added} +% \changes{v3.1l}{2010/01/09}{Adapted to current version of nameref package} +% |\captionlistentry|\oarg{float type}\marg{list entry}\\ +% |\captionlistentry*|\oarg{float type}\marg{list entry} +% \begin{macrocode} +\newcommand*\captionlistentry{% + \caption@teststar\@captionlistentry\@firstoftwo\@secondoftwo} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\@captionlistentry[1]{% + \@testopt{\caption@listentry{#1}}\@captype} +% \end{macrocode} +% \begin{macrocode} +\def\caption@listentry#1[#2]#3{% + \@bsphack + #1{\caption@gettitle{#3}}% + {\caption@refstepcounter{#2}% + \caption@makecurrent{#2}{#3}}% + \caption@addcontentsline{#2}{#3}% + \@esphack} +% \end{macrocode} +% \end{macro} +% +% \subsection{\cs{captionbox}} +% +% \begin{macro}{\captionbox} +% \changes{v3.2}{2010/12/17}{This macro added} +% \changes{v3.2a}{2011/08/16}{\cs{captionsetup} replaces with \cs{captionbox@settype} and \cs{caption@setposition}} +% \changes{v3.3}{2012/04/09}{Adapted to revised version of \cs{caption@withoptargs}} +% \changes{v3.3}{2017/03/19}{When used with fixed witdh the content will not be hboxed anymore} +% \changes{v3.3c}{2019/09/01}{Adapted so it could be used by \cs{subfloat} offered by \package{subcaption}} +% A |\parbox| with contents and caption, separated by an invisible |\hrule|. +% \begin{macrocode} +\newcommand*\captionbox{% + \caption@withoptargs{\caption@ibox\@gobble}} +% \end{macrocode} +% \begin{macrocode} +\newcommand\caption@ibox[3]{% + \kernel@ifnextchar[%] + {\caption@iibox{#1}{#2}{#3}}% + {\caption@iibox@{#1}{#2}{#3}}} +% \end{macrocode} +% \begin{macrocode} +\long\def\caption@iibox#1#2#3[#4]{% + \@testopt{\caption@iiibox{#1}{#2}{#3}[{#4}]}\captionbox@hj@default} +% \end{macrocode} +% \begin{macrocode} +\long\def\caption@iibox@#1#2#3#4{% + \setbox\@tempboxa\hbox{#4}% + \caption@iiibox{#1}{#2}{#3}[\wd\@tempboxa][\captionbox@hj@default]{\unhbox\@tempboxa}} +% \end{macrocode} +% \begin{macrocode} +\long\def\caption@iiibox#1{% + \caption@iiiibox{#1}\vbox\vtop} +% \end{macrocode} +% \begin{macrocode} +\long\def\caption@iiiibox#1#2#3#4#5[#6][#7]#8{% + \begingroup + #1*% set \caption@position + \caption@iftop{% + \endgroup + \parbox[t]{#6}{% + #1\relax + \caption@setposition t% + #2{\caption#4{#5}}% + \captionbox@hrule + \csname caption@hj@#7\endcsname + #8}% + }{% + \endgroup + \parbox[b]{#6}{% + #1\relax + \caption@setposition b% + \csname caption@hj@#7\endcsname + #8% + \captionbox@hrule + #3{\caption#4{#5}}}% + }} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\captionbox@hj@default{c} +\newcommand*\captionbox@hrule{\hrule\@height\z@\relax} +% \end{macrocode} +% \begin{macrocode} +\providecommand*\caption@hj@c{\centering} +\providecommand*\caption@hj@l{\raggedright} +\providecommand*\caption@hj@r{\raggedleft} +\providecommand*\caption@hj@s{} +% \end{macrocode} +% \end{macro} +% +% \subsection{\cs{ContinuedFloat}} +% +% \begin{macro}{\ContinuedFloat} +% \changes{v3.0i}{2005/11/12}{Optional argument added} +% \changes{v3.0g}{2005/06/28}{Bugfix: \cs{newcounter} replaced by \cs{newcount}} +% \changes{v3.1}{2007/07/02}{Format of \package{hyperref} extension changed} +% \changes{v3.1}{2007/07/07}{\cs{caption@setoptions} added} +% \changes{v3.1g}{2008/01/29}{Starred variant added} +% \changes{v3.2f}{2011/12/17}{Undocumented optional argument removed} +% \changes{v3.3}{2011/12/28}{Uses \cs{ifcaption@ContinuedFloat} now} +% \changes{v3.3}{2013/05/01}{Usage of \cs{caption@restorecounters} added} +% \changes{v3.3}{2013/12/16}{Bugfix: Does not use \cs{caption@ContinuedFloat} anymore since this breaks \cs{ContinuedFloat} offered by the \package{subfig} package} +% |\ContinuedFloat|\\ +% |\ContinuedFloat*|\par +% This mainly sets the appropriate flag, increments the +% continuation counter, and executes the given options. +% Furthermore we set |\caption@reset|\-|Continued|\-|Float| to |\@gobble| so the +% continuation counter will not be reset to zero inside |\caption@ref|\-|step|\-|counter|.\par +% When the \package{hyperref} package is used we have the problem +% that the usage of |\Continued|\-|Float| will create duplicate +% hyper links -- |\@current|\-|Href| will be the same for the main float and +% the continued ones. So we have to make sure unique labels and references +% will be created each time. We do this by extending |\the|\-|H|\-|figure| and +% |\the|\-|H|\-|table|, so for continued floats the scheme +% \begin{quote}\meta{type}|.|\meta{type \#}|\alph{|\meta{continued \#}|}|\end{quote} +% will be used instead of +% \begin{quote}\meta{type}|.|\meta{type \#}\quad\quad.\end{quote} +% \par{\small(This implementation follows an idea from Steven Douglas Cochran.)} +% \Note{This does not help if the \package{hyperref} package option +% \texttt{naturalnames=true} is set.} +% \begin{macrocode} +\def\ContinuedFloat{% + \caption@iftype + {\caption@ContinuedFloatX\@captype}% + {\caption@Error{\noexpand\ContinuedFloat outside float}}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@ContinuedFloatX[1]{% + \@ifstar + {\caption@@refstepcounter\@captype + \caption@@ContinuedFloat{#1}}% + {\caption@Continued@Float{#1}}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@Continued@Float[1]{% + \edef\caption@tempa{#1}% + \ifx\caption@tempa\caption@CFtype + \caption@restorecounters + \caption@@ContinuedFloat{#1}% + \else + \caption@Error{Continued `#1' after `\caption@CFtype'}% + \fi} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@@ContinuedFloat{% + \caption@setflag1% ContinuedFloat + \caption@@@ContinuedFloat} +\newcommand*\caption@@@ContinuedFloat{% + \stepcounter{ContinuedFloat}% + \caption@@@@ContinuedFloat} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@@@@ContinuedFloat[1]{% + \caption@setoptions{ContinuedFloat}% + \caption@setoptions{continued#1}% + \expandafter\l@addto@macro\csname the#1\endcsname\theContinuedFloat + \@ifundefined{theH#1}{}{% + \expandafter\l@addto@macro\csname theH#1\endcsname{% + \@alph\c@ContinuedFloat}}% + \let\caption@@@@ContinuedFloat\@gobble} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@CFtype{??} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\theContinuedFloat} +% This one is preset to \cs{@empty}, so usually the continuation counter is not +% included in the caption label or references. +% \begin{macrocode} +\newcounter{ContinuedFloat} +\let\theContinuedFloat\@empty +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@ContinuedFloat} +% \changes{v3.0f}{2005/06/11}{This macro added} +% \changes{v3.3}{2013/12/16}{Bugfix: Revised and defined with \cs{def} instead of \cs{newcommand}} +% |\caption@ContinuedFloat|\marg{type}\par +% This one is used by \cs{ContinuedFloat} offered by the \package{subfig} package. +% \begin{macrocode} +\def\caption@ContinuedFloat{% + \let\caption@resetContinuedFloat\@gobble + \caption@@@ContinuedFloat} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@resetContinuedFloat} +% \changes{v3.2f}{2011/12/17}{Redefinition of \cs{ContinuedFloat} added} +% |\caption@resetContinuedFloat|\marg{type}\par +% If a continuation counter is defined, we reset it. +% (This one will be called inside |\@caption|.) +% \begin{macrocode} +\newcommand*\caption@resetContinuedFloat[1]{% + \xdef\caption@CFtype{#1}% + \@stpelt{ContinuedFloat}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\donemaincaptionfalse} +% Since the \class{memoir} document class resets the sub-caption +% counter at |\@float|, right after |\done|\-|main|\-|caption|\-|false|, +% we save all sub-caption counters at |\done|\-|main|\-|caption|\-|false| +% so we can restore them using |\caption@restore|\-|counters| +% inside |\Continued|\-|Float|. +% \begin{macrocode} +\caption@ifundefined\donemaincaptionfalse{}{% + \g@addto@macro\donemaincaptionfalse\caption@savesubcounters} +% \end{macrocode} +% \end{macro} +% +% \subsection{Internal helpers} +% +% \begin{macro}{\caption@refstepcounter} +% \changes{v3.1}{2007/07/28}{This macro added} +% \changes{v3.2}{2010/10/26}{Error message moved from \cs{caption@@@settype} to here} +% \changes{v3.2c}{2011/09/04}{Support of \cs{donemaincaptiontrue} from \textsf{memoir} document class added} +% \changes{v3.3}{2011/12/28}{Usage of \cs{ifcaption@caption}, \cs{ifcaption@subcaption}, and \cs{ifcaption@ContinuedFloat} added} +% Increments the float (i.e. |figure| or |table|) counter, +% resets the continuation counter, and redefines itself to |\@gobble|. +% \begin{macrocode} +\newcommand*\caption@refstepcounter[1]{% + \@ifundefined{c@#1}% + {\caption@Error{No float type '#1' defined}}% + {\caption@ref@stepcounter{#1}% +% \end{macrocode} +% Set flag if this part of the figure (or table) contains a caption now. +% (If |\caption@if|\-|top| is not set, |\caption| is at the bottom of this part, +% therefore ending this part, so we set the flag to |false| in this case.) +% \begin{macrocode} + \caption@fixposition + \caption@iftop\caption@setflag\caption@clrflag2% caption +% \end{macrocode} +% This part does not contain content (like sub-figures) yet, +% so we set |\if|\-|caption@sub|\-|caption| to |false|. +% \begin{macrocode} + \caption@clrflag4% subcaption +% \end{macrocode} +% Support of the \textsf{memoir} document class. +% \begin{macrocode} + \@nameuse{donemaincaptiontrue}}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@ref@stepcounter{% + \caption@ifflag1{% ContinuedFloat + \let\caption@tempa\caption@@refcounter + \caption@clrflag1% ContinuedFloat + }{% + \let\caption@tempa\caption@@refstepcounter + \caption@ifflag2{}{% caption + \caption@ifflag4{% subcaption +% Counter was already incremented by content, so we suppress \stepcounter{#1} here + \let\caption@tempa\caption@@refcounter + }{}% + }% + }% + \caption@tempa} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@@refcounter[1]{% + \let\caption@stepcounter@ORI\stepcounter + \def\stepcounter##1{% + \def\caption@tempa{#1}% + \def\caption@tempb{##1}% + \ifx\caption@tempa\caption@tempb \else + \caption@stepcounter@ORI{##1}% + \fi}% + \caption@@@refstepcounter{#1}% + \let\stepcounter\caption@stepcounter@ORI} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@@refstepcounter[1]{% + \caption@prepare@stepcounter{#1}{ref}% + \caption@@@refstepcounter{#1}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@@stepcounter[1]{% + \caption@prepare@stepcounter{#1}{}% + \caption@@@stepcounter{#1}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@prepare@stepcounter[2]{% + \caption@addsubcontentslines{#2stepcounter}% + \caption@resetContinuedFloat{#1}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@@@refstepcounter{\refstepcounter} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@@@stepcounter{\stepcounter} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@dblarg} +% \changes{v3.1}{2007/02/05}{This macro added} +% \changes{v3.1f}{2007/12/06}{Bugfix 07-12-06: Changed so it works without \cs{kernel@ifnextchar} +% (which was introduced in \LaTeXe\ 2004/01/23), too} +% \changes{v3.3}{2012/03/25}{Support of option \opt{list-entry} added} +% A |\relax| was added compared to |\@dblarg| so |\caption{}| will be +% expanded to |\caption[\relax]{}| (and not to |\caption[]{}|). +% Furthermore support for option \opt{list-entry} was added. +% \begin{macrocode} +\@ifundefined{kernel@ifnextchar}{\let\kernel@ifnextchar\@ifnextchar}{} +% \end{macrocode} +% \begin{macrocode} +\newcommand\caption@dblarg[1]{% + \kernel@ifnextchar[{\caption@ydblarg{#1}}{\caption@xdblarg{#1}}} +% \end{macrocode} +% \begin{macrocode} +\newcommand\caption@xdblarg[2]{% + #1[{#2\relax}]{#2}} +% \end{macrocode} +% \begin{macrocode} +\long\def\caption@ydblarg#1[#2]#3{% + \caption@iflistheading{#1[{#3}]{#3}}{#1[{#2}]{#3}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@begin} +% \changes{v3.0a}{2004/01/23}{\cs{caption@settype} changed to \cs{caption@setfloattype}} +% \changes{v3.0e}{2005/04/12}{Check for default label format added} +% \changes{v3.0f}{2005/06/11}{Usage of \cs{caption@resetContinuedFloat} added} +% \changes{v3.1}{2007/05/09}{Usage of \cs{caption@setfloattype} \& +% \cs{caption@resetContinuedFloat} removed} +% \changes{v3.3}{2011/12/29}{Usage of \cs{caption@fixedposition} removed} +% Our handling of |\caption| will always be surrounded by +% |\caption@begin| (or |\caption@beginex|) and |\caption@end|.\par +% |\caption@begin|\marg{type} performs these tasks: +% \begin{enumerate} +% \item[1.] Override the |position=| setting, if necessary. +% (for example if set to |auto| or used inside a |supertabular|) +% \item[2.] Start a new group. +% \item[3.] Define |\fnum@|\meta{type} if the caption label format is set +% to non-default. +% \end{enumerate} +% \begin{macrocode} +\newcommand*\caption@begin[1]{% + \caption@fixposition + \begingroup + \caption@setfnum{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@beginex} +% \changes{v3.0b}{2004/05/16}{Support of \opt{listof=} added} +% \changes{v3.0l}{2007/02/04}{Takes now 3 args instead of 2, check for empty heading added} +% \changes{v3.1}{2007/07/01}{Makes lst-entry now instead of redefining \cs{addcontentsline}} +% \changes{v3.2}{2010/10/26}{Bugfix 09-05-15: Setting of \cs{lst@@caption} added} +% |\caption@beginex|\marg{type}\marg{list entry}\marg{heading}\par +% performs the same tasks as |\caption@begin| and additionally: +% \begin{enumerate} +% \item[4.] Set |\lst@@caption|, so |\fnum@lstlisting| will include a numbering. +% \item[5.] Make an entry in the list-of-whatever. +% \item[6.] Set |\caption@ifempty| according argument \meta{heading}. +% \end{enumerate} +% \begin{macrocode} +\newcommand\caption@beginex[3]{% + \caption@begin{#1}% + \let\lst@@caption\relax + \caption@addcontentsline{#1}{#2}% + \caption@ifempty{#3}{}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@end} +% \changes{v3.3}{2011/12/29}{Usage of \cs{caption@fixedposition} removed} +% |\caption@end| closes the group. +% \begin{macrocode} +\newcommand*\caption@end{% + \endgroup} +% \end{macrocode} +% \end{macro} +% +% \changes{v3.0a}{2004/01/23}{% +% Internal hooks \cs{caption@@begin} \& \cs{caption@@end} added} +% \changes{v3.0h}{2005/10/06}{% +% Internal hooks \cs{caption@@begin} \& \cs{caption@@end} removed} +% +% \begin{macro}{\caption@setfnum} +% \changes{v3.1}{2007/03/10}{This macro added} +% |\caption@setfnum|\marg{type}\\ +% redefines |\fnum@|\meta{type} according the caption label format +% set with |labelformat=|. But if |labelformat=default| is set, +% |\fnum@|\meta{type} will not be overwritten by us. +% \begin{macrocode} +\newcommand*\caption@setfnum[1]{% + \@ifundefined{fnum@#1}{\iftrue}{\ifx\caption@lfmt\caption@lfmt@default\else}% + \@namedef{fnum@#1}{\caption@fnum{#1}}% + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@boxrestore} +% \changes{v3.1}{2007/03/03}{This macro and its usage added} +% \changes{v3.1b}{2007/09/17}{Bugfix: Redefinition of CR added} +% \changes{v3.2}{2010/11/07}{Support of option \opt{parboxrestore} added} +% The original code (from |latex/base/ltboxes.dtx|): +% \begin{verbatim} +% \def\@parboxrestore{\@arrayparboxrestore\let\\\@normalcr} +% \def\@arrayparboxrestore{% +% \let\if@nobreak\iffalse +% \let\if@noskipsec\iffalse +% \let\par\@@par +% \let\-\@dischyph +% \let\'\@acci\let\`\@accii\let\=\@acciii +% \parindent\z@ \parskip\z@skip +% \everypar{}% +% \linewidth\hsize +% \@totalleftmargin\z@ +% \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip +% \parfillskip\@flushglue \lineskip\normallineskip +% \baselineskip\normalbaselineskip +% \sloppy} +% \end{verbatim}%^^A +% This one will be used by |\@caption| instead of |\@parboxrestore|. +% \begin{macrocode} +\newcommand*\caption@boxrestore{% + \caption@parboxrestore{\@parboxrestore}{% + \let\if@nobreak\iffalse + \let\if@noskipsec\iffalse + \let\par\@@par +% \let\-\@dischyph +% \let\'\@acci\let\`\@accii\let\=\@acciii + \parindent\z@ \parskip\z@skip + \everypar{}% +% \linewidth\hsize +% \@totalleftmargin\z@ + \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip + \parfillskip\@flushglue \lineskip\normallineskip + \baselineskip\normalbaselineskip + \sloppy + \let\\\@normalcr + }} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@boxrestore@mini} +% \changes{v3.2}{2010/10/24}{This macro added} +% Resets \cs{par} so the very first \cs{par} in \cs{@caption} behaves quite the same as in floating environments. +% Will be used by \cs{setcaptiontype}. +% \begin{macrocode} +\newcommand\caption@boxrestore@mini{% + \let\par\@@par + \parindent\z@ \parskip\z@skip + \sloppy} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@normalsize} +% \changes{v3.1}{2007/05/05}{This macro and its usage added} +% This one will be used by |\@caption| instead of |\normalsize|.\par +% Its code is equivalent to +% \begin{quote} +% |\caption@font{normal}%| +% \end{quote} +% but executes faster (since the starred form of |\caption@font| +% does not use |\setkeys| internally). +% \begin{macrocode} +\newcommand*\caption@normalsize{% + \caption@font*{\KV@caption@fnt@normal\@unused}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@setfloatcapt} +% Needed for support of the \package{float} package, where the caption will +% not be typeset directly, but catched in a |\vbox| called |\@floatcapt| +% instead. +% \begin{macrocode} +\let\caption@setfloatcapt\@firstofone +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@makecurrent} +% This one is needed for support of the \package{nameref} and \package{hyperref} package. +% \changes{v3.2f}{2012/01/14}{Bugfix: Usage of \cs{caption@gettitle} added} +% \begin{macrocode} +\newcommand*\caption@makecurrent[1]{\caption@gettitle} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@makeanchor} +% \begin{macro}{\caption@start} +% \begin{macro}{\caption@@start} +% \begin{macro}{\caption@freezeHref} +% \begin{macro}{\caption@defrostHref} +% All these are needed for support of the \package{hyperref} package. +% \begin{macrocode} +\let\caption@makeanchor\@firstofone +\let\caption@start\relax +\let\caption@@start\relax +\let\caption@freezeHref\relax +\let\caption@defrostHref\relax +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\caption@gettitle} +% \changes{v3.1}{2007/05/05}{This macro and its usage added} +% This one is needed for support of the \package{nameref} package. +% \begin{macrocode} +\newcommand\caption@gettitle[1]{% + \caption@ifundefined\NR@gettitle + {\def\@currentlabelname{#1}}% + {\NR@gettitle{#1}}} +% \end{macrocode} +% \end{macro} +% +% \subsection{Support for sub-captions} +% \changes{v3.1f}{2007/11/16}{Support for sub-captions added} +% +% \begin{macro}{\caption@DeclareSubType} +% |\caption@DeclareSub| initializes the usage of \cs{caption} +% in sub-floats. +% \begin{macrocode} +\def\caption@DeclareSubType sub#1\@nil{% + \caption@Debug{Initializing subtype for `#1'\@gobble}% + \@namedef{caption@beginsub#1}{\caption@beginsubfloat{#1}}} +\@onlypreamble\caption@DeclareSubType +% \end{macrocode} +% \end{macro} +% +% Initialize the sub-captions defined with \cs{DeclareCaptionSubType}\ldots +% \begin{macrocode} +\caption@For*{subtypelist}{\caption@DeclareSubType sub#1\@nil} +% \end{macrocode} +% +% Initialize the sub-captions defined with \cs{newsubfloat}\cite{subfig}\ldots +% \begin{macrocode} +\caption@AtBeginDocument*{% + \caption@ifundefined\sf@counterlist{}{% + \@for\sf@temp:=\sf@counterlist\do{% + \expandafter\caption@DeclareSubType\sf@temp\@nil}}} +% \end{macrocode} +% +% \begin{macro}{\caption@subtypehook} +% \changes{v3.1g}{2008/03/20}{Redefinition of \cs{caption@setlist} added} +% \changes{v3.1k}{2009/10/09}{Bugfix 09-08-12b: \cs{@makecaption} will now be restored here, too} +% \changes{v3.2}{2011/06/26}{Uses \cs{caption@@addcontentsline} instead of \cs{addcontentsline} now} +% \changes{v3.2a}{2011/08/17}{Redefinition of \cs{phantomcaption} added} +% \changes{v3.2a}{2011/08/17}{Usage of \cs{caption@warmup} added} +% \changes{v3.2c}{2011/09/30}{Bugfix 11-09-26: Usage of \cs{if@subfloatrow} added} +% \changes{v3.3}{2011/12/28}{Bugfix 11-12-16: \cs{caption@l@stepcounter} replaced by \cs{stepcounter}} +% \changes{v3.3}{2012/03/15}{Usage of \cs{caption@setbox} added} +% \changes{v3.3}{2013/05/01}{Redefinition of \cs{caption@settype} added} +% \changes{v3.3}{2013/06/17}{Missing redefinition of \cs{captionlistentry} added} +% \changes{v3.3}{2018/09/06}{Adapted to the \package{chkfloat} package} +% Hook, will be used inside \cs{caption@setsubtype}.\par +% (Note: If we are inside an |sub|\-|float|\-|row| environment we have to keep +% the |\@make|\-|caption| code of the \package{floatrow} package intact.) +% \begin{macrocode} +\newcommand*\caption@subtypehook{% + \ifx\caption\caption@subcaption \else + \caption@warmup +% \end{macrocode} +% \begin{macrocode} + \caption@ifflag2{}{% caption +% no \caption in this part of the (floating) environment yet + \let\caption@add@contentsline\caption@addsubcontentsline + \let\caption@addsubcontentslines\@gobble + \caption@ifflag4{}{% subcaption +% no \subcaption in this part of the (floating) environment yet + \caption@ifflag1{% ContinuedFloat + \caption@clrflag1% + }{% + \caption@@stepcounter\@captype + }% + \caption@setflag4% subcaption + }% + }% +% \end{macrocode} +% \begin{macrocode} + \c@ContinuedFloat=0\relax + \let\caption@setfloatcapt\@firstofone + \let\caption@chkfloat\@gobbletwo +% \end{macrocode} +% \begin{macrocode} + \caption@setbox{none}% + \caption@clearmargin + \caption@iflist{}{\let\caption@setlist\@gobble}% + \caption@setoptions{sub}% + \caption@setoptions{subfloat}% for subfig-package compatibility +% \end{macrocode} +% \begin{macrocode} +% redefine \setcaptiontype + \def\caption@settype{\caption@withoptargs\caption@sub@settype}% + \def\caption@sub@settype##1##2{% + \def\caption@tempa{##2}% + \ifx\caption@tempa\@captype +%%% \caption@setsubtype##1\relax + \else + \caption@Error{##2 inside \@subcaptype}% + \fi}% +% \end{macrocode} +% \begin{macrocode} +% redefine \caption + \let\caption\caption@subcaption + \let\phantomcaption\caption@subphantom + \let\captionlistentry\caption@sublistentry +% \let\@captype\@subcaptype + \let\caption@refstepcounter\caption@@@refstepcounter +% \end{macrocode} +% \begin{macrocode} +% restore \@makecaption + \if@subfloatrow + \caption@Debug{Keeping \string\@makecaption}% + \else + \let\@makecaption\caption@makecaption + \fi + \fi}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\if@subfloatrow} +% \changes{v3.2c}{2011/09/30}{This macro added} +% This macro tests if we are inside an |sub|\-|float|\-|row| or |sub|\-|float|\-|row*| environment. +% \begin{macrocode} +\caption@AtBeginDocument{% + \caption@ifundefined\@subfloatrowtrue + {\newif\if@subfloatrow + \caption@ifundefined\subfloatrow{}% + {\caption@Debug{Patching subfloatrow environment}% + \g@addto@macro\capsubrowsettings{\@subfloatrowtrue}% + \g@addto@macro\killfloatstyle{% + \ifx\c@FRobj\c@FRsobj\@subfloatrowtrue\fi}}}% + {\caption@Debug{\string\if@subfloatrow is already defined}}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@subcaption} +% Makes a sub-caption. +% \begin{macrocode} +\newcommand*\caption@subcaption{% + \caption@checkgrouplevel{sub}\subcaption + \caption@star + {\caption@refstepcounter\@subcaptype}% + {\caption@dblarg{\@caption\@subcaptype}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@subphantom} +% \changes{v3.2a}{2011/08/17}{This macro added} +% Same as |\phantomcaption|, but for sub-captions. +% \begin{macrocode} +\newcommand*\caption@subphantom{% + \caption@checkgrouplevel{sub}\phantomsubcaption + \caption@refstepcounter\@subcaptype} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@sublistentry} +% \changes{v3.3}{2013/06/17}{This macro added} +% Same as |\captionlistentry|, but for sub-captions. +% \begin{macrocode} +\newcommand*\caption@sublistentry{% + \caption@teststar\@subcaptionlistentry\@firstoftwo\@secondoftwo} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\@subcaptionlistentry[1]{% + \@testopt{\caption@listentry{#1}}\@subcaptype} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{caption@clearsubcontentslines} +% Clear pending sub-caption list entries. +% \begin{macrocode} +\newcommand*\caption@clearsubcontentslines{% + \global\let\caption@subcontentslines\@empty} +% \end{macrocode} +% \begin{macrocode} +\caption@clearsubcontentslines +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@addsubcontentsline} +% \changes{v3.1i}{2008/08/02}{Bugfix 08-07-28: +% \cs{label}, \cs{index}, and \cs{glossary} are allowed inside the list entry now} +% \changes{v3.2}{2011/06/26}{Uses \cs{caption@@addcontentsline} instead of \cs{addcontentsline} now} +% \changes{v3.2c}{2011/08/19}{Uses \cs{caption@gobble} instead of \cs{@gobble} now} +% \changes{v3.3}{2012/01/15}{Debug message added} +% \changes{v3.3}{2013/03/10}{A single \cs{protect} replaced by \cs{noexpand}} +% Add a pending sub-caption list entry. +% \begin{macrocode} +\newcommand*\caption@addsubcontentsline[4]{% + \caption@Debug{\string\caption@addsubcontentsline{#1}{#2}}% + \begingroup + \let\label\caption@gobble + \let\index\caption@gobble + \let\glossary\caption@gobble + \protected@edef\@tempa{\endgroup + \noexpand\g@addto@macro\noexpand\caption@subcontentslines{% + \noexpand\@namedef{the#2}{\csname the#2\endcsname}% + \ifx\@currentHref\@undefined \else + \noexpand\def\noexpand\@currentHref{\@currentHref}% + \fi + \noexpand\caption@@@addcontentsline{#1}{#2}{#3}{#4}}}% + \@tempa} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\flushsubcaptionlistentries} +% \changes{v3.3}{2012/01/15}{Renamed from \cs{caption@addsubcontentslines} to \cs{flushsubcaptionlistentries}} +% \changes{v3.3}{2013/03/10}{Bugfix: Missing redefinition of \cs{caption@addsubcontentslines} added} +% Writes pending sub-caption list entries. +% \begin{macrocode} +\newcommand*\flushsubcaptionlistentries{% + \caption@addsubcontentslines{user}} +% \end{macrocode} +% \begin{macrocode} +\renewcommand*\caption@addsubcontentslines[1]{% + \caption@Debug{\string\flushsubcaptionlistentries (#1)}% + \begingroup + \caption@subcontentslines + \endgroup + \caption@clearsubcontentslines} +% \end{macrocode} +% We need to patch \cs{chapter} otherwise a vertical gap will be inserted into +% the list prior pending sub-caption list entries. +% We do this |\At|\-|Begin|\-|Document| so packages like \package{newfloat} +% will not complain about an unknown document class. +% \begin{macrocode} +\AtBeginDocument{\caption@ifundefined\chapter{}{% + \let\caption@chapter@ORI\chapter + \def\chapter{% + \caption@addsubcontentslines{chapter}\caption@chapter@ORI}}} +% \end{macrocode} +% Same for \cs{appendix}. +% \begin{macrocode} +\AtBeginDocument{\caption@ifundefined\appendix{}{% + \let\caption@appendix@ORI\appendix + \def\appendix{% + \caption@addsubcontentslines{appendix}\caption@appendix@ORI}}} +% \end{macrocode} +% Flush the list of pending sub-caption list entries at the end of the document. +% \begin{macrocode} +\AtEndDocument{% + \caption@addsubcontentslines{AtEndDocument}} +% \end{macrocode} +% \end{macro} +% +% +% \subsection{Document class \& Babel package support} +% +% \subsubsection{The \AmS{} \& \SmF{} classes} +% \changes{v3.1}{2007/07/29}{\AmS\ \& \SmF\ classes support added} +% +% \begin{macrocode} +\caption@ifundefined\smf@makecaption{}{\let\smf@makecaption\@makecaption} +% \end{macrocode} +% +% \subsubsection{The beamer class} +% \changes{v3.1}{2007/03/10}{beamer class support added} +% +% \begin{macrocode} +\@ifclassloaded{beamer}{% + \caption@InfoNoLine{beamer document class}% +% \end{macrocode} +% +% \begin{macro}{\figure} +% \changes{v3.1f}{2007/12/17}{This re-definition for \class{beamer} document class added} +% \changes{v3.3d}{2019/09/01}{This re-definition for \class{beamer} document class revised} +% We redefine |figure| so our type-specific options will be used etc. +% \begin{macrocode} + \let\caption@ORI@figure\figure + \def\figure{\caption@settype{figure}\caption@ORI@figure} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\table} +% \changes{v3.1f}{2007/12/17}{This re-definition for \class{beamer} document class added} +% \changes{v3.3d}{2019/09/01}{This re-definition for \class{beamer} document class revised} +% We redefine |table| so our type-specific options will be used etc. +% \begin{macrocode} + \let\caption@ORI@table\figure + \def\table{\caption@settype{table}\caption@ORI@table} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +}{} +% \end{macrocode} +% +% \subsubsection{The \KOMAScript{} classes} +% +% \KOMAScript\ contains the code +% |\AtBeginDocument{\let\scr@caption\caption}| +% so we need to update |\scr@caption| here, too. +% +% \begin{macrocode} +\caption@ifundefined\scr@caption{}{% + \caption@AtBeginDocument{\let\scr@caption\caption}} +% \end{macrocode} +% +% \subsubsection{The frenchb Babel option} +% \changes{v3.1}{2006/05/14}{Adaptation to \package{frenchb} added} +% +% Suppress +% ``Package |frenchb.ldf| Warning: The definition of |\@makecaption| has been +% changed, frenchb will NOT customize it.'' +% (but only if we emulate this customization) +% \begin{macrocode} +\@nameuse{caption@frenchb}\@nameundef{caption@frenchb} +% \end{macrocode} +% +% \subsubsection{The frenchle/pro package} +% \changes{v3.0h}{2005/10/03}{Adaptation to \package{frenchle/pro} added} +% +% \begin{macrocode} +\caption@AtBeginDocument{\caption@ifundefined\frenchTeXmods{}{% + \caption@InfoNoLine{frenchle/pro package is loaded}% +% \end{macrocode} +% +% \begin{macrocode} + \let\captionfont@ORI\captionfont + \let\captionlabelfont@ORI\captionlabelfont + \let\@makecaption@ORI\@makecaption +% \end{macrocode} + +% If |\GOfrench| is defined as |\relax| all the re-definitions regarding +% captions have already been done, so we can do our patches immediately. +% Otherwise we must add our stuff to |\GOfrench|. +% \begin{macrocode} + \caption@ifundefined\GOfrench + {\let\caption@tempa\@firstofone}% + {\def\caption@tempa{\g@addto@macro\GOfrench}}% + \caption@tempa{% +% \end{macrocode} +% +% \begin{macrocode} + \let\captionfont\captionfont@ORI + \let\captionfont@ORI\@undefined + \let\captionlabelfont\captionlabelfont@ORI + \let\captionlabelfont@ORI\@undefined + \let\@makecaption\@makecaption@ORI + \let\@makecaption@ORI\@undefined +% \end{macrocode} +% +% \begin{macro}{\@cnORI} +% We update the definition of |\@cnORI| so it actually reflects +% our definition of |\caption|. +% \begin{macrocode} + \let\@cnORI\caption +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@tablescaption} +% The \package{frenchle/pro} package sets |\caption| to |\@tablescaption| at +% |\begin{table}| for special treatment of footnotes. +% Therefore we have to patch |\@tablescaption| so |\caption*| will work +% inside the |table| environment. +% \begin{macrocode} + \let\caption@tcORI\@tablescaption + \def\@tablescaption{\caption@star\relax\caption@tcORI}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\f@ffrench} +% \begin{macro}{\f@tfrench} +% |\f@ffrench| and |\f@tfrench| reflect |\fnum@figure| and |\fnum@table| +% when used in French mode. These contain additional code which typesets +% the caption separator |\captionseparator| instead of the usual colon. +% Because this breaks with our |\@makecaption| code we have to remove +% this additional code here. +% \begin{macrocode} + \let\@eatDP\@undefined + \let\caption@tempa\@empty + \ifx\f@ffrench\fnum@figure + \l@addto@macro\caption@tempa{\let\fnum@figure\f@ffrench}% + \fi + \ifx\f@tfrench\fnum@table + \l@addto@macro\caption@tempa{\let\fnum@table\f@tfrench}% + \fi + \def\f@ffrench{\ifx\listoffigures\relax\else\figurename~\thefigure\fi}% + \def\f@tfrench{\ifx\listoftables\relax\else\tablename~\thetable\fi}% + \caption@tempa +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macrocode} + }% +}} +% \end{macrocode} +% +% \subsubsection{The hungarian and magyar Babel option} +% \changes{v3.2}{2009/03/29}{\package{magyar} package support added} +% \changes{v3.3}{2018/08/26}{\package{magyar} package support revised} +% +% \begin{macrocode} +\def\caption@tempa#1{% + \@ifpackagewith{babel}{#1}{% + \caption@InfoNoLine{#1 babel option is loaded}% + \expandafter\addto\csname extras#1\endcsname{% + % reverse changes made by magyar.ldf + \let\@makecaption\caption@makecaption + \babel@save\@makecaption + \caption@redefine + \babel@save\@caption}% + }{}} +% \end{macrocode} +% \begin{macrocode} +\caption@tempa{hungarian}% +\caption@tempa{magyar}% +% \end{macrocode} +% +% \subsection{Package support} +% \changes{v3.1}{2007/04/11}{Package options `float', `longtable' etc. +% are not supported anymore, removed} +% +% \begin{macro}{\caption@IfPackageLoaded} +% \changes{v3.0f}{2005/05/29}{3rd argument \meta{code} added, +% so no extra check is needed} +% \changes{v3.1}{2007/07/04}{Re-written \& renamed from \cs{caption@ifpackage} +% to \cs{caption@IfPackageLoaded}} +% \changes{v3.3}{2018/12/26}{Bugfix: Missing curly braces added} +% |\caption@IfPackageLoaded|\marg{package}\oarg{version}\marg{true}\marg{false}\par +% Some kind of combination of |\@ifpackageloaded| and |\@ifpackagelater|. +% If the \meta{package} is not loaded yet, the check will be (re-)done +% |\AtBeginDocument|, so the \meta{package} could be loaded later on, too. +% \begin{macrocode} +\newcommand\caption@IfPackageLoaded[1]{% + \@testopt{\caption@@IfPackageLoaded{#1}}{}} +\@onlypreamble\caption@IfPackageLoaded +% \end{macrocode} +% \begin{macrocode} +\long\def\caption@@IfPackageLoaded#1[#2]#3#4{% + \@ifpackageloaded{#1}\@firstofone{% + \caption@Debug{#1 package is not loaded (yet)\@gobble}% + \caption@AtBeginDocument}{% + \caption@If@Package@Loaded{#1}[{#2}]{#3}{#4}}} +\@onlypreamble\caption@@IfPackageLoaded +% \end{macrocode} +% \begin{macrocode} +\long\def\caption@If@Package@Loaded#1[#2]{% + \@ifpackageloaded{#1}{% + \caption@InfoNoLine{#1 package is loaded}% + \@ifpackagelater{#1}{#2}\@firstoftwo{% + \caption@Error{% + For a successful cooperation we need at least version\MessageBreak + `#2' of package #1,\MessageBreak + but only version\MessageBreak + `\csname ver@#1.\@pkgextension\endcsname'\MessageBreak + is available}% + \@secondoftwo}% + }{\@secondoftwo}} +\@onlypreamble\caption@If@Package@Loaded +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@clearmargin} +% \changes{v3.1}{2007/05/05}{This macro and its usage added} +% This macro will be used by some package support stuff where the usual +% margin setting is not welcome, e.g. in the \package{sidecap} package. +% \begin{macrocode} +\newcommand*\caption@clearmargin{% + \setcaptionmargin\z@ + \let\caption@minmargin\@undefined} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\caption@setbool{needfreeze}{0} +\caption@AtBeginDocument*{% + \caption@ifneedfreeze{% +% \end{macrocode} +% +% \begin{macro}{\caption@freezetype} +% \changes{v3.3}{2013/05/01}{This macro added} +% |\caption@freezetype|\marg{type}\par +% Used by the \package{fltpage} \& \package{sidecap} package support. +% \begin{macrocode} + \newcommand*\caption@freezetype[1]{% + \caption@settype*{#1}% + \captionsetup*[sub]{hypcap=true}% Note: This is just a (q&d) workaround! + \caption@freeze}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@freeze} +% \changes{v3.1}{2007/07/22}{This macro added} +% \changes{v3.1c}{2007/10/06}{\cs{caption} \& \cs{@caption} revised for enhanced compatibility} +% \changes{v3.1c}{2007/10/06}{Bugfix: Made \cs{@caption} long} +% \changes{v3.1f}{2007/11/16}{Uses `space hack' instead of \cs{ignorespaces} now} +% \changes{v3.1g}{2008/01/29}{Starred variants of \cs{ContinuedFloat} and \cs{captionsetup} added} +% \changes{v3.2}{2010/10/26}{Bugfix 10-09-01a: Uses \cs{ignorespaces} instead of `space hack' again} +% \changes{v3.2a}{2011/08/17}{Starred variant of \cs{caption@freeze} removed} +% \changes{v3.2b}{2011/08/18}{Redefines \cs{caption@setup} instead of \cs{captionsetup} now} +% \changes{v3.2b}{2011/08/18}{Redefinition of \cs{label} revised} +% \changes{v3.2c}{2011/08/21}{Revised} +% \changes{v3.3}{2013/01/06}{Adapted to new switch \cs{caption@caption} etc.} +% |\caption@freeze|\par +% Used by the \package{bicaption} package. +% \begin{macrocode} + \newcommand*\caption@freeze{% + \let\caption@frozen@ContinuedFloat\ContinuedFloat + \def\ContinuedFloat{% + \caption@@freeze{\caption@@@@ContinuedFloat\@captype}% + \caption@frozen@ContinuedFloat}% +% \end{macrocode} +% \begin{macrocode} + \let\caption@frozen@setup\caption@setup + \def\caption@setup##1{% + \caption@@freeze{\caption@setup{##1}}% + \caption@frozen@setup{##1}}% +% \end{macrocode} +% \begin{macrocode} + \let\caption@frozen@caption\caption + \def\caption{% + \def\caption{% + \caption@Error{% + Only one \noexpand\caption can be placed in this environment}% + \caption@gobble}% + \@ifstar + {\caption@SC@caption*}% + {\let\@currentlabel\caption@SClabel + \caption@withoptargs\caption@SC@caption}}% + \long\def\caption@SC@caption##1##2{% + \caption@@freeze{\caption##1{##2}}% + \ignorespaces}% +% \end{macrocode} +% \begin{macrocode} + \let\caption@frozen@label\label + \def\label{% + \caption@withoptargs\caption@SC@label}% + \def\caption@SC@label##1##2{% + \ifx\@currentlabel\caption@SClabel + \@bsphack + \caption@freeze@label{##1}{##2}% + \@esphack + \else + \caption@frozen@label##1{##2}% + \fi}% + \def\caption@SClabel{\caption@undefinedlabel}% + \def\caption@freeze@label##1##2{% + \caption@@freeze{\label##1{##2}}}% +% \end{macrocode} +% \begin{macrocode} + \global\let\caption@frozen@content\@empty + \long\def\caption@@freeze{% + \g@addto@macro\caption@frozen@content}% +% \end{macrocode} +% \begin{macrocode} + \def\caption@warmup{% + \let\ContinuedFloat\caption@frozen@ContinuedFloat + \let\caption@setup\caption@frozen@setup + \let\caption\caption@frozen@caption + \let\label\caption@frozen@label}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@prepare@defrost} +% \changes{v3.3}{2013/01/06}{This macro added} +% Prevent resetting the caption flags +% \begin{macrocode} + \newcommand*\caption@prepare@defrost{% + \let\caption@settype\caption@set@type} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@defrost} +% \changes{v3.1}{2007/07/22}{This macro added} +% \changes{v3.1g}{2008/01/30}{\cs{caption@defrost@setup} added} +% \changes{v3.2c}{2011/08/21}{Adapted to changes of \cs{caption@freeze}} +% \changes{v3.2c}{2011/08/21}{\cs{caption@defrost@setup} removed} +% |\caption@defrost| +% \begin{macrocode} + \newcommand*\caption@defrost{% + \ifx\caption@frozen@caption\@undefined + \caption@frozen@content + \else + \caption@Error{Internal Error:\MessageBreak + \noexpand\caption@defrost in same group as \string\caption@freeze}% + \fi}% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} + }{}% + \caption@undefbool{needfreeze}} +% \end{macrocode} +% +% \begin{macro}{\caption@warmup} +% \changes{v3.2a}{2011/08/17}{This macro added} +% |\caption@warmup| +% \begin{macrocode} +\let\caption@warmup\relax +% \end{macrocode} +% \end{macro} +% +% \subsubsection{The chkfloat package} +% \changes{v3.3}{2018/09/06}{Support of the \package{chkfloat} package added} +% +% \begin{macrocode} +\caption@IfPackageLoaded{chkfloat}[2012/08/19 v0.1]{% +% \end{macrocode} +% +% \begin{macro}{\caption@chkfloat} +% \changes{v3.3}{2018/09/06}{This macro added} +% \begin{macrocode} + \caption@ifundefined\chkfloat@addcontentsline{% + \renewcommand\caption@chkfloat[2]{% + \caption@ifundefined\chkfloat@page{}{% + \addtocontents{fof}{\protect\chkfloat@{\thepage}{\chkfloat@page}{\csname fnum@#1\endcsname: #2}}}}% + }{% + \renewcommand\caption@chkfloat{\chkfloat@addcontentsline}% + }% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} + }{}% +% \end{macrocode} +% +% \subsubsection{The float package} +% \changes{v3.0f}{2005/05/31}{\package{float} package support rewritten and improved} +% \iffalse +% (This is a more straight-ahead implementation, but it only works with v1.3 +% now, so v1.2 is no longer supported. The old code including documentation +% can be found in caption-30f-050530.zip) +% \fi +% +% The \package{float} package usually do not use the \LaTeX\ kernel command +% |\@caption| to typeset the caption but |\float@caption| instead. +% (|\@caption| will only be used if the float is re-styled with +% |\restylefloat*|.) +% +% The main two things |\float@caption| is doing different are: +% \begin{itemize} +% \item The caption will be typeset inside a |\savebox| called |\@floatcapt| +% so it can be placed above or below the float contents afterwards. +% \item |\@makecaption| will not be used to finally typeset the caption. +% Instead |\@fs@capt| will be used which definition is part of the float +% style. +% (Note that |\@fs@capt| will not typeset any vertical space above or below +% the caption; instead this space will be typeset by the float style code +% itself.) +% \end{itemize} +% +% \begin{macrocode} +\caption@IfPackageLoaded{float}[2001/11/08 v1.3d]{% + \@ifpackageloaded{floatrow}{% + \caption@If@Package@Loaded{floatrow}[2007/08/24 v0.2a]{}{}% + }{% +% \end{macrocode} +% +% \begin{macro}{\@float@setevery} +% \changes{v3.1k}{2009/10/09}{Bugfix 08-12-05: \cs{color@begin/endgroup} added +% to redefinition of \cs{caption@setfloatcapt}} +% |\@float@setevery|\marg{float type} is provided by the \package{float} +% package; it's called every time a floating environment defined with +% |\newfloat| or |\restylefloat| begins. +% We use this hook to do some adaptations and to setup the proper caption +% style (if defined) and additional settings declared with +% |\captionsetup|\oarg{float style}. +% \begin{macrocode} + \let\caption@ORI@float@setevery\@float@setevery + \def\@float@setevery#1{% + \float@ifcaption{#1}{% +% \end{macrocode} +% +% First of all we set the caption position to it's proper value by +% converting |\@fs@iftopcapt| (which is part of a float style and +% controls where the caption will be typeset, above or below the float +% contents) to our |position=| setting. +% Since the spacing above and below the caption will be done by the float +% style and \emph{not} by us this sounds quite useless. But in fact it isn't, +% since some packages based on \thispackage\ (like the \package{subfig} +% package) could have an interest for this information and therefore use the +% |\caption@iftop| macro we provide in our kernel. Furthermore we need this +% information for ourself in |\captionof| which uses |\@makecaption| to +% finally typeset the caption with skips. +% \begin{macrocode} + \caption@setposition{\@fs@iftopcapt t\else b\fi}% +% \end{macrocode} +% +% Afterward we redefine |\caption@setfloatcapt| (which will be used inside +% |\@caption|) so the caption will be set inside the box |\@floatcapt|, +% without extra vertical space. +% \begin{macrocode} + \renewcommand\caption@setfloatcapt[1]{% + \let\@makecaption\caption@@make + \global\setbox\@floatcapt\vbox{% + \color@begingroup ##1\color@endgroup}}% +% \end{macrocode} +% +% To allow different caption styles for different float styles we also +% determine the current float style (e.g. `ruled') and select +% a caption style (and additional settings) with the same name, if defined. +% \begin{macrocode} + \float@getstyle\float@style{#1}% + \caption@setstyle*\float@style + \caption@setoptions\float@style +% \end{macrocode} +% +% \begin{macrocode} + }{}% + \caption@freezeHref % will be defrosted in \float@makebox + \caption@ORI@float@setevery{#1}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\float@makebox} +% \changes{v3.3}{2013/01/06}{Corrects wrong load order hyperref-float now} +% \changes{v3.3}{2013/02/03}{Correction of wrong load order hyperref-float revised} +% Redefine |\float@makebox| (only if we are not operating in compatibility mode). +% \begin{macrocode} + \caption@AtBeginDocument{\caption@ifcompatibility{}{% +% \end{macrocode} +% If it was redefined by the \package{hyperref} package, +% we need to build on the original definition (and not on the redefined one). +% \begin{macrocode} + \caption@ifundefined\HyOrg@float@makebox + {\let\caption@ORI@float@makebox\float@makebox}% + {\let\caption@ORI@float@makebox\HyOrg@float@makebox}% + \renewcommand\float@makebox[1]{% + \caption@ORI@float@makebox{#1\relax \caption@defrostHref}}% +% \end{macrocode} +% \begin{macrocode} + }}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@typehook} +% \changes{v3.1}{2007/07/08}{float package hook added} +% \LaTeX\ and almost every other packages use +% |\|\meta{type}|name| +% to provide a macro for the type resp.~environment name -- for example +% the command |\figurename| will usually contain the name of the floating +% environment |figure|: +% \begin{quote} +% |\newcommand\figurename{Figure}| +% \end{quote} +% But the \package{float} package doesn't follow this common naming +% convention: +% For floats defined with |\newfloat| it uses |\fname@|\meta{type} instead, +% which breaks with our code (and with |\autoref| and some other things as +% well). +% So we have to map the \package{float} package name to the common one here.\par +% \Note{If the float was not defined with \cs{newfloat} but with +% \cs{restylefloat} instead, \cs{fname@}\meta{type} is not defined.} +% \begin{macrocode} + \g@addto@macro\caption@typehook{% + \expandafter\ifx\csname #1name\endcsname\relax + \expandafter\let\csname #1name\expandafter\endcsname + \csname fname@#1\endcsname + \fi}% +% \end{macrocode} +% \end{macro} +% +% \changes{v3.0f}{2005/06/26}{Skips of \env{plaintop} and \env{boxed} floats corrected} +% \begin{macro}{\fs@plaintop} +% \begin{macro}{\fs@boxed} +% Since the float styles |plaintop| and |boxed| don't use |\abovecaptionskip| +% which could be set with |skip=| (|plaintop| uses |\belowcaptionskip| instead of +% |\abovecaptionskip|, and |boxed| uses a fixed space of |2pt|) +% we patch the according float style macros here to change this. +% \begin{macrocode} + \g@addto@macro\fs@plaintop{\def\@fs@mid{\vspace\abovecaptionskip\relax}}% + \g@addto@macro\fs@boxed{\def\@fs@mid{\kern\abovecaptionskip\relax}}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\float@getstyle} +% \changes{v3.1}{2007/06/10}{This macro added} +% |\float@getstyle|\marg{cmd}\marg{type}\par +% Determining the float style is not so easy because the only hint +% provided by the \package{float} package is the macro +% |\fst@|\meta{float type} which points to the macro which represents the +% float style. So for example after +% \begin{quote} +% |\floatstyle{ruled}|\\ +% |\newfloat{Program}{tbp}{lop}| +% \end{quote} +% |\fst@Program| will be defined as +% \begin{quote} +% |\def\fst@Program{\fs@ruled}|\quad. +% \end{quote}\par +% So here is what we do: We make the first level expansion of +% |\fst@|\meta{float type} a string so we can gobble the first four tokens +% (= |\fs@|), so only the the name of the float style is left.\par +% \emph{TODO:} We need to convert the catcodes here. +% \begin{macrocode} + \providecommand*\float@getstyle[2]{% + \edef#1{% + \noexpand\expandafter\noexpand\@gobblefour\noexpand\string + \expandafter\expandafter\expandafter\noexpand + \csname fst@#2\endcsname}% + \edef#1{#1}% + \caption@Debug{floatstyle{#2} = `#1'}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\float@ifcaption} +% \changes{v3.1}{2007/06/23}{This macro added} +% |\float@ifcaption|\marg{type}\marg{if-clause}\marg{else-clause}\par +% Here we determine if the user has used |\newfloat| resp.~|\restylefloat|, +% or |\restylefloat*|. +% This is quite easy: If |\@float@c@|\meta{captype} is the same as +% |\float@caption|, the user has used |\newfloat| or |\restylefloat|, +% otherwise we assume he has used |\restylefloat*|. +% (This test will fail if some package re-defines |\float@caption|, +% so we have to assume that there is no one.) +% \begin{macrocode} + \providecommand*\float@ifcaption[1]{% + \expandafter\ifx\csname @float@c@#1\endcsname\float@caption + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi}% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +}}{% + \providecommand*\float@ifcaption[1]{\@secondoftwo}% +% \clearcaptionsetup{boxed}% used by the floatrow package? +} +% \end{macrocode} +% +% The skip between `boxed' floats and their caption defaults to |2pt|. +% +% \begin{macrocode} +\captionsetup[boxed]{skip=2pt} % do not issue a warning when not used +% \end{macrocode} +% +% \changes{v3.0f}{2005/05/26}{\opt{strut=0} added to caption style \opt{ruled}} +% \changes{v3.0f}{2005/05/27}{Option \opt{ruled} fixed} +% To emulate the `ruled' definition of |\@fs@capt| we provide a caption style +% `ruled' with appropriate options. But if the package option |ruled| was +% specified, we setup some caption parameters to emulate the behavior +% of \thispackage\ \version{1.x} option |ruled| instead, i.e., +% the current caption settings will be used, but without margin and without +% `single-line-check'. +% \begin{macrocode} +\caption@ifbool{ruled}{% + \captionsetup[ruled]{margin=0pt,minmargin=0,slc=0}% +}{% + \DeclareCaptionStyle{ruled}{labelfont=bf,labelsep=space,strut=0}% +} +\caption@undefbool{ruled} +% \end{macrocode} +% +% \subsubsection{The floatflt package} +% \changes{v3.1}{2007/06/10}{Support of the \package{floatflt} package added} +% +% \begin{macrocode} +\caption@IfPackageLoaded{floatflt}[1996/02/27 v1.3]{% +% \end{macrocode} +% +% \begin{macro}{\floatingfigure} +% We patch |\floatingfigure| so |\caption@floatflt| will be used. +% \begin{macrocode} + \let\caption@ORI@floatingfigure\floatingfigure + \def\floatingfigure{% + \caption@floatflt{figure}% + \caption@ORI@floatingfigure}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\floatingtable} +% Same with |\floatingtable|\ldots +% \begin{macrocode} + \let\caption@ORI@floatingtable\floatingtable + \def\floatingtable{% + \caption@floatflt{table}% +% \caption@setautoposition b% + \caption@ORI@floatingtable}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@floatflt} +% \changes{v3.1c}{2007/10/06}{Bugfix: \cs{caption@clearmargin} added} +% Here we do two things: +% \begin{enumerate} +% \item We use |\caption@set|\-|options{|\-|floating|\meta{type}|}| so +% |\caption|\-|setup[|\-|floating|\meta{type}|]{|\ldots|}| is supported. +% \item |\line|\-|width| must be set correctly. +% Usually this is done by |\@par|\-|box|\-|restore| inside |\@caption|, +% but since we use |\@caption@box|\-|restore| we have to map this to +% |\@par|\-|box|\-|restore| instead. +% \end{enumerate} +% \begin{macrocode} + \newcommand*\caption@floatflt[1]{% + \caption@settype{#1}% + \caption@clearmargin + \caption@setfullparboxrestore + \caption@setoptions{floating#1}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +}{} +% \end{macrocode} +% +% \subsubsection{The fltpage package} +% \changes{v3.1}{2007/07/22}{Support of the \package{fltpage} package added} +% +% \begin{macrocode} +\caption@IfPackageLoaded{fltpage}[1998/10/29 v.0.3]{% + \caption@setbool{needfreeze}{1}% +% \end{macrocode} +% +% \begin{macro}{\FP@positionLabel} +% \changes{v3.2c}{2011/08/28}{This redefinition added} +% Original code: +% \begin{verbatim} +% \newcommand{\FP@positionLabel}{% +% FP\@captype-\number\value{FP@\@captype C}-pos} +% \end{verbatim}%^^A +% \begin{macrocode} + \renewcommand\FP@positionLabel{% + FP\FP@captype-\number\value{FP@\FP@captype C}-pos}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\FP@helpNote} +% Original code: +% \begin{verbatim} +% \newcommand{\FP@helpNote}[2]{% +% \typeout{FP#1 is inserted on page \pageref{#2}!}}% +% \end{verbatim}%^^A +% \begin{macrocode} + \renewcommand\FP@helpNote[2]{% + \begingroup % save \caption@thepage + \caption@pageref{#2}% + \typeout{FP#1 is inserted on page \caption@thepage!}% + \endgroup}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\FP@floatBegin} +% \changes{v3.1f}{2007/11/16}{Uses `space hack' instead of \cs{ignorespaces} now} +% \changes{v3.1k}{2009/10/09}{Bugfix 09-09-11: Missing \cs{ignorespaces} added} +% \changes{v3.2c}{2011/08/28}{Adapted to current version of \cs{caption@freeze}} +% \changes{v3.2f}{2012/02/19}{Bugfix 12-02-16: \texttt{minipage} environment added} +% \changes{v3.3}{2013/05/01}{Usage of \cs{caption@freeze} replaced by \cs{caption@freezetype}} +% Original code: +% \begin{verbatim} +% \newcommand{\FP@floatBegin}[1]{% +% \gdef\@captype{#1}% +% \global\let\FP@savedCaptionCommand\caption% +% \global\let\FP@savedLabelCommand\label% +% \ifthenelse{\equal{\@captype}{figure}} +% {\global\let\old@Fnum\fnum@figure}% +% {\global\let\old@Fnum\fnum@table}% +% \let\FP@LabelText\@empty% +% \let\FP@CaptionText\@empty% +% \let\FP@optionalCaptionText\@empty% +% \renewcommand\label[1]{\gdef\FP@LabelText{##1}}% +% \renewcommand\caption[2][]{% +% \gdef\FP@optionalCaptionText{##1}\gdef\FP@CaptionText{##2}}% +% \begin{lrbox}{\FP@floatCorpusBOX}% +% }% +% \end{verbatim}%^^A +% \begin{macrocode} + \renewcommand*\FP@floatBegin[1]{% + \def\FP@captype{#1}% + \begin{lrbox}{\FP@floatCorpusBOX}% + \minipage\hsize % changes from LR mode to vertical mode + \caption@freezetype{#1}% + \ignorespaces}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\FP@floatEnd} +% \changes{v3.1g}{2008/01/30}{Some minor bugfixes} +% \changes{v3.2c}{2011/08/28}{Adapted to current version of \cs{caption@freeze}} +% \changes{v3.2f}{2012/02/19}{Bugfix 12-02-16: \texttt{minipage} environment added} +% Original code: +% \begin{verbatim} +% \newcommand{\FP@floatEnd}{% +% \end{lrbox}% +% \global\setbox\FP@floatCorpusBOX=\box\FP@floatCorpusBOX +% \stepcounter{FP@\@captype C}% +% \FP@savedLabelCommand{\FP@positionLabel}% +% \FP@helpNote{\@captype}{\FP@positionLabel}% +% \FP@float +% {\FP@positionLabel}% location label test +% {\begin{\@captype}[p!] +% \usebox{\FP@floatCorpusBOX}% +% \refstepcounter{\@captype}% +% \ifthenelse{\equal{\FP@LabelText}{\@empty}} +% {}{\FP@savedLabelCommand{\expandafter\protect\FP@LabelText}}% +% \end{\@captype}} +% {\addtocounter{\@captype}{-1}} +% {\begin{\@captype}[b!]% +% \ifthenelse{\equal{\FP@guide}{\@empty}}% +% {}{\ifthenelse{\equal{\@captype}{figure}}% +% {\renewcommand{\fnum@figure}{\old@Fnum\ {\FP@guide}}}% +% {\renewcommand{\fnum@table}{\old@Fnum\ {\FP@guide}}}}% +% \setlength{\abovecaptionskip}{2pt plus2pt minus 1pt} % length above caption +% \setlength{\belowcaptionskip}{2pt plus2pt minus 1pt} % length above caption +% \FP@separatorCaption% +% \ifthenelse{\equal{\FP@optionalCaptionText}{\@empty}}% +% {\FP@savedCaptionCommand{\expandafter\protect\FP@CaptionText}}% +% {\FP@savedCaptionCommand[\expandafter\protect\FP@optionalCaptionText]% +% {\expandafter\protect\FP@CaptionText}}% +% \end{\@captype}}% +% }% +% \end{verbatim}%^^A +% \begin{macrocode} + \renewcommand*\FP@floatEnd{% + \endminipage + \end{lrbox}% +% \end{macrocode} +% \begin{macrocode} + \stepcounter{FP@\FP@captype C}% + \caption@label\FP@positionLabel + \FP@helpNote\FP@captype\FP@positionLabel +% \end{macrocode} +% \begin{macrocode} + \FP@float + {\FP@positionLabel}% location label test + {\caption@prepare@defrost + \begin\FP@captype[p!]% + \usebox\FP@floatCorpusBOX + \end\FP@captype}% + {\@ifundefined{theH\FP@captype}{}{% + \expandafter\l@addto@macro\csname theH\FP@captype\endcsname{.FP}}}% + {\caption@prepare@defrost + \begin\FP@captype[b!]% + \let\FP@savedSetfnumCommand\caption@setfnum + \def\caption@setfnum##1{% + \FP@savedSetfnumCommand{##1}% + \ifx\FP@guide\@empty \else + \expandafter\l@addto@macro\csname fnum@##1\endcsname{\ {\FP@guide}}% + \fi}% + \setlength\abovecaptionskip{2pt plus 2pt minus 1pt}% length above caption + \setlength\belowcaptionskip{2pt plus 2pt minus 1pt}% length below caption + \caption@setoptions{FP\@captype}% + \FP@separatorCaption + \caption@defrost + \end\FP@captype}% + }% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +}{% + \let\caption@ifFPlistcap\@undefined + \let\caption@ifFPrefcap\@undefined +} +% \end{macrocode} +% +% \subsubsection{The hyperref package} +% \changes{v3.0f}{2005/06/11}{Support of the \package{hyperref} package added} +% \changes{v3.1}{2007/03/09}{Usage of \cs{hyper@makecurrent} instead of +% \cs{theHfigure} as indicator for \package{hyperref} package} +% \changes{v3.2}{2011/07/30}{Test if \package{hyperref} has stopped early revised} +% \changes{v3.2c}{2011/08/24}{Test if \package{hyperref} has stopped early adapted to current version of \package{hyperref} package: Usage of \cs{IfHyperBoolean} added} +% +% \begin{macrocode} +\caption@IfPackageLoaded{hyperref}[2003/11/30 v6.74m]{% + % Test if hyperref has stopped early + \caption@ifundefined\IfHyperBoolean{% + \caption@set@bool\caption@ifhyp@stoppedearly0% + \caption@ifundefined\H@refstepcounter + {\caption@set@bool\caption@ifhyp@stoppedearly1}{% + \caption@ifundefined\hyper@makecurrent + {\caption@set@bool\caption@ifhyp@stoppedearly1}{% + \caption@ifundefined\measuring@true + {\caption@set@bool\caption@ifhyp@stoppedearly1}{}}}% + }{% + \def\caption@ifhyp@stoppedearly{\IfHyperBoolean{stoppedearly}}% + }% + \caption@ifhyp@stoppedearly{% hyperref has stopped early + \caption@InfoNoLine{% + Hyperref support is turned off\MessageBreak + because hyperref has stopped early}% + }{% + \g@addto@macro\caption@prepareslc{\measuring@true}% +% \end{macrocode} +% +% \begin{macro}{\caption@@@refstepcounter} +% We redefine |\caption@@refstepcounter| so |\H@refstepcounter| will be used +% instead of |\refstepcounter| inside |\caption| \& |\captionlistentry|. +% \begin{macrocode} + \renewcommand*\caption@@@refstepcounter{\H@refstepcounter}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@makecurrent} +% \changes{v3.1l}{2010/01/09}{Adapted to current version of nameref package} +% We redefine |\caption@makecurrent| so a \package{hyperref} label +% will be defined inside |\@caption|. +% \Note{Will be redefined by \cs{caption@start}.} +% \begin{macrocode} + \renewcommand*\caption@makecurrent[2]{% + \caption@makecurrentHref{#1}% + \caption@Debug{hyperref current=\@currentHref}% + \caption@gettitle{#2}}% +% \end{macrocode} +% \begin{macrocode} + \newcommand*\caption@makecurrentHref{\hyper@makecurrent}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@makeanchor} +% \changes{v3.1l}{2010/01/09}{Adapted to the current hyperref package} +% We redefine |\caption@makeanchor| so a \package{hyperref} anchor +% will be set inside |\@caption|. +% \Note{Will be redefined by \cs{caption@start}.} +% \begin{macrocode} + \renewcommand\caption@makeanchor[1]{% + \caption@Debug{hyperref anchor: \@currentHref}% + % If we cannot have nesting, the anchor is empty. + \ifHy@nesting + \expandafter\hyper@@anchor\expandafter{\@currentHref}{#1}% + \else + \Hy@raisedlink{% + \expandafter\hyper@@anchor\expandafter{\@currentHref}{\relax}% + }#1% + \fi}% +% \end{macrocode} +% \begin{macrocode} + \g@addto@macro\caption@prepareslc{\let\caption@makeanchor\@firstofone}% +% \end{macrocode} +% \end{macro} +% +% \paragraph{The hypcap option} +% +% \begin{macro}{\if@capstart} +% Like the \package{hypcap} package we define the switch |\if@capstart|, too. +% \begin{macrocode} + \newif\if@capstart +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@start} +% \changes{v3.0l}{2007/02/20}{% +% \cs{caption@currentHref} renamed to \cs{hc@currentHref}} +% \changes{v3.1}{2007/06/21}{% +% This macro renamed from \cs{capstart} to \cs{caption@start} and revised} +% While the \package{hypcap} package defines a macro called |\capstart| +% our variant is called |\caption@start| and is controlled by the option +% |hypcap=||false|/|true|. +% \begin{macrocode} + \def\caption@start{\caption@ifhypcap\caption@start@\relax}% + \def\caption@start@{% +% \end{macrocode} +% Generate the \package{hyperref} label and set the \package{hyperref} anchor, +% usually (if |hypcap=false|) both is done inside |\@caption|. +% \begin{macrocode} + \caption@makestart\@captype + \caption@startanchor\@currentHref +% \end{macrocode} +% Prevent |\@caption| from generating a new \package{hyperref} label, +% use the label we save in |\hc@currentHref| instead. +% (We also support the |@capstart| flag from the \package{hypcap} package.) +% \begin{macrocode} + \global\@capstarttrue + \let\hc@currentHref\@currentHref + \def\caption@makecurrentHref##1{% + \global\@capstartfalse + \global\let\@currentHref\hc@currentHref}% +% \end{macrocode} +% Prevent |\@caption| from generating a \package{hyperref} anchor since this +% has already been done. +% \begin{macrocode} + \let\caption@makeanchor\@firstofone +% \end{macrocode} +% \begin{macrocode} + }% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@makestart} +% \changes{v3.1c}{2007/09/30}{\cs{@currentHref} will be extended by \texttt{caption} +% instead of \texttt{xxx} now} +% |\caption@makestart|\marg{type} +% defines a \package{hyperref} anchor inside |\caption@start|.\par +% Since we offer |\ContinuedFloat| the float counter can change between +% `now' and |\caption|, i.e., we simply don't know the figure or table counter +% yet and therefore we are not able to generate the `right' \package{hyperref} +% label. +% Two different solutions of this problem came into my mind: +% \begin{enumerate} +% \item I could use the aux file for this purpose.\par +% -or- +% \item I set |hypertexnames=false| locally. +% Furthermore I use |#1.caption.|\meta{counter} (instead of |#1.|\meta{counter}) +% as naming scheme for |\@currentHref| to avoid conflicts with other hyper +% links which are generated with |hypertexnames=true|. +% \end{enumerate} +% The first idea has the advantage that the `right' anchor name will be +% generated, but one needs an additional \LaTeX\ run if figures or tables +% will be inserted or removed.\par +% The second idea has the advantage that it's very easy to implement, but +% has some side-effects, e.g. the anchor names don't follow the figure or +% table label names anymore.\par +% Since I'm lazy I implemented the second idea, maybe I will revise this +% later on. +% \begin{macrocode} + \newcommand*\caption@makestart[1]{% + \begingroup + \Hy@hypertexnamesfalse +% \gdef\@currentHlabel{}% + \hyper@makecurrent{#1.caption}% + \endgroup + \caption@Debug{hypcap start=\@currentHref}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@startanchor} +% \changes{v3.1b}{2007/09/17}{Bugfix 06-09-17: We use \cs{caption@anchor} instead of \cs{hyper@@anchor}} +% \changes{v3.1g}{2008/03/16}{Warning about TeX mode replaced with debug info} +% |\caption@startanchor|\marg{Href} +% sets a \package{hyperref} anchor inside |\caption@start|.\par +% This code was taken from the \package{hypcap} package\cite{hypcap} and adapted. +% \Note{Since \cs{hyper@@anchor}\marg{Href}\csmarg{\string\relax} can cause +% a change from vertical mode to horizontal mode (design flaw in +% \package{hyperref} package!?), and since the workaround +% \cs{let}\cs{leavevmode}\cs{relax} which can be found in the +% \package{hypcap} package is not always sufficient +% (for example with ``Direct pdfmark support'' and \texttt{breaklinks=true}), +% we use \cs{caption@anchor} instead of \cs{hyper@@anchor} here.} +% \begin{macrocode} + \newcommand*\caption@startanchor[1]{% + \ifvmode\begingroup + \caption@Debug{hypcap anchor: #1 (vertical mode)}% + \@tempdima\prevdepth + \nointerlineskip + \vspace*{-\caption@hypcapspace}% + \caption@anchor{#1}% + \vspace*{\caption@hypcapspace}% + \prevdepth\@tempdima + \endgroup\else + \caption@Debug{hypcap anchor: #1 (horizontal mode)}% + \caption@anchor{#1}% + \fi}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@anchor} +% \changes{v3.1c}{2007/10/17}{Workaround 07-10-17: We use \cs{caption@raisedlink} instead of \cs{Hy@raisedlink} now} +% |\caption@anchor|\marg{Href} sets a \package{hyperref} anchor. +% \begin{macrocode} + \newcommand*\caption@anchor[1]{% + \ifmeasuring@ \else + \caption@raisedlink{\hyper@anchorstart{#1}\hyper@anchorend}% + \fi}% +% \end{macrocode} +% \Note{Since \cs{Hy@raisedlink} change \cs{@tempdima} we surrounded it by \cs{ifvmode}, +% suppressing ``\texttt{LaTeX Warning: Float too large for page by 1.0pt}'' in \texttt{sideways} floats. +% (This is not necessary since \package{hyperref} \version{6.77}.)} +% \begin{macrocode} + \ifx\HyperRaiseLinkLength\@tempdima + \def\caption@raisedlink#1{\ifvmode#1\else\Hy@raisedlink{#1}\fi}% + \else + \let\caption@raisedlink\Hy@raisedlink + \fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@@start} +% Will be used by |\caption@freezeHref|. Apart from that we issue a warning +% if we expect a saved \package{hyperref} label coming from |\caption@start|, +% but there isn't any. +% \begin{macrocode} + \def\caption@@start{% + \caption@ifundefined\hc@currentHref{% + \caption@Warning{% + The option `hypcap=true' will be ignored for this\MessageBreak + particular \string\caption}}{}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@freezeHref} +% Suppress |\caption@start| from generating a \package{hyperref} label and +% setting a \package{hyperref} anchor. Instead if |\@caption| generates a +% \package{hyperref} label, it will be stored in |\caption@currentHref|. +% Furthermore we need to redefine |\caption@setfloatcapt| so no +% \package{hyperref} anchor will be placed in |\@caption|. +% \iffalse +% (Since |\caption@setfloatcapt| will be set to |\@firstofone| inside +% |\subcaption| there is no need to add its restauration to +% |\caption@subtypehook|.) +% \fi +% \begin{macrocode} + \def\caption@freezeHref{% + \let\caption@ORI@start\caption@start + \def\caption@start{\let\caption@start\caption@ORI@start}% +% \end{macrocode} +% \begin{macrocode} +% \let\caption@ORI@@start\caption@@start +% \l@addto@macro\caption@subtypehook{% +% \let\caption@@start\caption@ORI@@start}% +% \end{macrocode} +% \begin{macrocode} + \global\let\caption@currentHref\@undefined + \def\caption@@start{\global\let\caption@currentHref\@currentHref}% +% \end{macrocode} +% \begin{macrocode} + \let\caption@ORI@setfloatcapt\caption@setfloatcapt + \renewcommand*\caption@setfloatcapt{% + \ifx\caption@currentHref\@undefined \else + \let\caption@makeanchor\@firstofone + \fi + \caption@ORI@setfloatcapt}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@defrostHref} +% If there is a freezed |\@currentHref|, we set the \package{hyperref} +% anchor here. +% \begin{macrocode} + \def\caption@defrostHref{% + \ifx\caption@currentHref\@undefined \else + \caption@startanchor\caption@currentHref + \global\let\caption@currentHref\@undefined + \fi}% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} + }}{} +% \end{macrocode} +% +% \subsubsection{The hypcap package} +% \changes{v3.0f}{2005/06/22}{Support of the \package{hypcap} package added} +% \changes{v3.0l}{2007/02/20}{Adapted to \package{hypcap} \version{1.6}} +% \changes{v3.1e}{2007/11/04}{\package{hypcap} support adapted to \package{hyperref} \version{6.77}} +% +% \begin{macrocode} +\caption@IfPackageLoaded{hypcap}{% v1.0 + \ifx\caption@start\relax \else % hyperref hasn't stopped early +% \end{macrocode} +% +% If the \package{hypcap} package was loaded, we give up our own +% hyperlink placement algorithm and give the control over the placement +% to the \package{hypcap} package instead. +% +% \begin{macro}{\capstart} +% \changes{v3.1k}{2009/10/09}{Support of \cs{ifcapstart} (\package{hypcap} package \version{1.10}) added} +% We do this simply by mapping |\capstart| to |\caption@start@|, +% although our code does not behave exactly like the original one: +% The original |\capstart| has an effect on the next |\caption| +% only but our version affects \emph{all} |\caption|s in the same +% environment, at least unless a new |\capstart| will be placed. +% \begin{macrocode} + \let\caption@ORI@capstart\capstart % save for compatibility mode + \caption@ifundefined\capstarttrue % check for v1.10 of hypcap package + {\def\capstart{\caption@start@}}% + {\def\capstart{\ifcapstart\caption@start@\fi}}% + \let\caption@start\relax + \let\caption@@start\relax +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@hypcapspace} +% Furthermore we map our |\caption@hypcapspace| to |\hypcapspace| +% offered by the \package{hypcap} package. +% \begin{macrocode} + \caption@set@bool\caption@ifhypcap 1% + \renewcommand*\caption@hypcapspace{\hypcapspace}% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} + \fi}{} +% \end{macrocode} +% +% \subsubsection{The listings package} +% \changes{v3.0b}{2004/05/16}{Support of the \package{listings} package added} +% +% \begin{macrocode} +\caption@IfPackageLoaded{listings}[2004/02/13 v1.2]{% +% \end{macrocode} +% +% \begin{macro}{\lst@MakeCaption} +% \changes{v3.1g}{2008/01/20}{Bugfix: Skips are handled correctly now} +% \changes{v3.1k}{2008/03/29}{Bugfix 08-10-16-dctt: \texttt{rule=0} added} +% \changes{v3.2}{2010/10/26}{Bugfix 10-07-20a: Set \cs{hsize} to \cs{linewidth}, if necessary} +% To support the \package{listings} package we need to redefine +% |\lst@MakeCaption| so the original stuff is nested with +% |\caption@begin| and |\caption@end| etc. +% \Note{This macro is always called twice (with `t' resp. `b' as +% parameter), therefore we need an extra group here.} +% \begin{macrocode} + \let\caption@ORI@lst@MakeCaption\lst@MakeCaption + \def\lst@MakeCaption#1{% #1 is `t' or `b' + \begingroup +% \end{macrocode} +% Workaround for bug in \package{listings} package: +% If |\hsize| seems not to be set correctly, we set it to |\linewidth|. +% \changes{v3.3}{2018/04/30}{Bugfix from Ulrike Fischer applied, see also \url{https://github.com/axelsommerfeldt/caption/issues/1}} +% \begin{macrocode} + \@tempdima\linewidth + \advance\@tempdima\lst@xleftmargin + \advance\@tempdima\lst@xrightmargin + \ifdim\hsize>\@tempdima + \hsize\@tempdima + \fi +% \end{macrocode} +% First of all, we set |position=#1| and if it was set to `top', +% we swap the skips so the default behavior of the \package{listings} package +% will not be changed. (Note that the \package{listings} package has set its +% own |\abovecaptionskip| \& |\belowcaptionskip| values prior to calling +% \cs{lst@MakeCaption}.) +% \begin{macrocode} + \caption@setposition{#1}% + \caption@iftop{% + \@tempdima\belowcaptionskip + \belowcaptionskip\abovecaptionskip + \abovecaptionskip\@tempdima}{}% +% \end{macrocode} +% Workaround for issue with wrong skips (FIXME: should be examined further) +% \begin{macrocode} + \caption@setup{rule=0}% +% \end{macrocode} +% Afterwards we set the local `lstlisting' options. +% \begin{macrocode} + \caption@setoptions{lstlisting}% +% \end{macrocode} +% If the |position=| is now set to |auto|, we take over the |captionpos=| +% setting from the \package{listings} package. +% \begin{macrocode} + \caption@setautoposition{#1}% +% \end{macrocode} +% At the end we do similar stuff as in our \cs{@caption} code. +% \begin{macrocode} + \caption@begin{lstlisting}% + \caption@ORI@lst@MakeCaption{#1}% + \caption@end +% \end{macrocode} +% \begin{macrocode} + \endgroup}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\lst@makecaption} +% \begin{macro}{\lst@maketitle} +% Wrapper macros for typesetting the |caption=| resp. |title=| value. +% \begin{macrocode} + \def\lst@makecaption{\caption@starfalse\@makecaption}% + \def\lst@maketitle{\caption@startrue\@makecaption\@empty}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\ext@lstlisting} +% \changes{v3.1}{2007/03/03}{This macro added} +% Since the \package{listings} package do not define |\ext@lstlisting| +% but we needed it when |\captionof{lstlisting}| will be done by the end user, +% we define it here. +% \begin{macrocode} + \providecommand*\ext@lstlisting{lol}% +% \end{macrocode} +% \end{macro} +% +% \changes{v3.1a}{2007/07/13}{Bugfix 07-09-13: \cs{lst@@caption} will not be re-defined anymore} +% +% \begin{macrocode} +}{} +% \end{macrocode} +% +% \subsubsection{The longtable package} +% +% \begin{macro}{\LTcaptype} +% \changes{v3.1}{2007/07/06}{This macro and its support added} +% |\LTcaptype| is preset to |table|. +% \begin{macrocode} +\providecommand*\LTcaptype{table} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\caption@IfPackageLoaded{longtable}[1995/05/24 v3.14]{% +% \end{macrocode} +% \begin{macrocode} + \RequirePackage{ltcaption}[2018/08/26]% + \let\LT@@makecaption\@undefined +% \end{macrocode} +% +% \begin{macro}{\LT@array} +% \changes{v3.1}{2007/07/22}{This redefinition added} +% \changes{v3.1a}{2007/09/14}{Bugfix 07-09-14: Redefinition of \cs{@captionabovetrue} \& \cs{@captionabovefalse} added} +% \changes{v3.1a}{2007/09/16}{Bugfix: This redefinition will always be done \cs{AtBeginDocument}} +% \changes{v3.1g}{2008/01/20}{Bugfix in \cs{captionlistentry}: Table counter will not be incremented anymore, \cs{nameref} works} +% \changes{v3.3}{2016/01/31}{Support for \cs{bicaption} added} +% \changes{v3.3}{2018/10/05}{Definition of \cs{captionlistentry} fixed} +% We redefine |\LT@array| here to get |\captionsetup|\marg{options} +% working inside |longtable|s. +% \Note{Since the \package{hyperref} package patches \cs{LT@array} as well +% and since this only works with the original definition of \cs{LT@array}, +% we have to do this after the \package{hyperref} package, +% i.e.~\cs{AtBeginDocument}.} +% \begin{macrocode} + \caption@AtBeginDocument{% + \let\caption@ORI@LT@array\LT@array + \renewcommand*\LT@array{% +% \end{macrocode} +% |\captionsetup| for longtable: +% \begin{macrocode} + \global\let\caption@opt@@longtable\@undefined + \def\captionsetup{% + \noalign\bgroup + \@ifstar\@captionsetup\@captionsetup}% gobble * + \def\@captionsetup##1{\LT@captionsetup{##1}\egroup}% + \def\LT@captionsetup##1{% + \captionsetup@startrue\caption@setup@options[@longtable]{##1}% + \global\let\caption@opt@@longtable\caption@opt@@longtable}% +% \end{macrocode} +% |\captionabove| \& |\captionbelow| for longtable: (\KOMAScript\ document class) +% \begin{macrocode} + \def\@captionabovetrue{\LT@captionsetup{position=t}}% + \def\@captionabovefalse{\LT@captionsetup{position=b}}% +% \end{macrocode} +% |\captionlistentry| for longtable: +% \begin{macrocode} + \def\captionlistentry{% + \noalign\bgroup + \@ifstar{\egroup\LT@listentry\LTcaptype}% gobble * + {\egroup\LT@listentry\LTcaptype}}% +% \end{macrocode} +% |\ContinuedFloat| for longtable:\\ +% {\small(Commented out, since it's not deeply tested and quite useless anyway)} +% \Note{\package{hyperref} versions $<$ v6.76j uses $2\times$ \cs{hyper@makecurrent}} +% \begin{macrocode} +% \caption@ifhypcap{% +% \let\caption@ORI@hyper@makecurrent\hyper@makecurrent +% \def\hyper@makecurrent##1{% +% \let\hyper@makecurrent\caption@ORI@hyper@makecurrent +% \caption@makestart{##1}% +%% \let\Hy@LT@currentHlabel\@currentHlabel +% \let\Hy@LT@currentHref\@currentHref +% \def\hyper@makecurrent####1{% +%% \let\@currentHlabel\Hy@LT@currentHlabel +% \let\@currentHref\Hy@LT@currentHref}}% +% \let\caption@ORI@ContinuedFloat\ContinuedFloat +% \def\ContinuedFloat{\noalign{% +% \gdef\caption@setContinuedFloat{% +% \let\caption@resetContinuedFloat\@gobble}% +% \def\caption@setoptions####1{% +% \g@addto@macro\caption@setContinuedFloat{% +% \caption@setoptions{####1}}}% +% \let\@captype\LTcaptype +% \caption@ORI@ContinuedFloat}}% +% }{% +% \def\ContinuedFloat{\noalign{% +% \caption@Error{% +% \noexpand\ContinuedFloat inside longtables\MessageBreak +% is only available with `hypcap=true'}}}% +% }% +% \global\let\caption@setContinuedFloat\@empty + \def\ContinuedFloat{\noalign{% + \caption@Error{\noexpand\ContinuedFloat outside float}}}% +% \end{macrocode} +% |\bicaption| for longtable: +% \begin{macrocode} + \let\bicaption\LT@bicaption +% \end{macrocode} +% +% \begin{macrocode} + \caption@ORI@LT@array}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\LT@capti@n} +% \changes{v3.3}{2016/02/01}{This re-definition added} +% The original implementation: +% \begin{verbatim} +% \def\LT@capti@n{% +% \@ifstar +% {\egroup\LT@c@ption\@gobble[]}% +% {\egroup\@xdblarg{\LT@c@ption\@firstofone}}} +% \end{verbatim}%^^A +% Our implementation uses |\caption@xdblarg| instead of |\@xdblarg|: +% \begin{macrocode} + \def\LT@capti@n{% + \@ifstar + {\egroup\LT@c@ption\@gobble[]}% + {\egroup\caption@xdblarg{\LT@c@ption\@firstofone}}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\LT@makecaption} +% \changes{v3.0d}{2004/08/10}{% +% Bugfix 04-08-04: \cs{abovecaptionskip} \& \cs{belowcaptionskip} will be used now} +% \changes{v3.0e}{2005/05/05}{% +% Bugfix: \cs{captionsetup[longtable]} overrides \cs{LTcapwidth} now} +% \changes{v3.0h}{2005/10/07}{\cs{caption@LT@make} introduced} +% \changes{v3.3}{2016/02/01}{Support for \cs{bicaption} via \cs{caption@LT@setup} added} +% \changes{v3.3a}{2019/04/02}{Work-around for problem with \package{floatrow} added} +% |\LT@makecaption|\marg{cmd}\marg{label}\marg{text}\par +% \smallskip +% The original definition: +% \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 definition: +% \begin{macrocode} + \renewcommand\LT@makecaption[3]{% + \caption@LT@make{% + \caption@LT@settype\LTcaptype +% \end{macrocode} +% +% |\caption@LT@setup| is re-defined inside the \package{bicaption} package +% and contains the preparation of typesetting of the bilingual caption. +% \begin{macrocode} + \caption@LT@setup +% \end{macrocode} +% +% \iffalse +% The default |position=| setting for longtables is |top|. +% (This emulates the standard behavior of the \package{longtable} package +% which has no skip above the caption but a skip below it.) +% \fi +% +% |position=auto| is a bad idea for longtables, but we do our very best. +% This works quite well for captions inside the longtable contents, but +% not for captions inside the longtable (end)foot. +% \Note{This should be `top' if unclear!} +% \begin{macrocode} + \caption@setautoposition{\ifcase\LT@rows t\else b\fi}% +% \end{macrocode} +% +% We set |\ifcaption@star| according the 1st argument. +% \begin{macrocode} + \caption@startrue#1\caption@starfalse +% \end{macrocode} +% +% \begin{macrocode} + \caption@prepare@stepcounter\LTcaptype{LT}% +% \end{macrocode} +% +% \changes{v3.1}{2007/05/05}{\cs{caption@normalsize} added} +% \begin{macrocode} + \caption@begin\LTcaptype + \caption@normalsize +% \end{macrocode} +% +% The following skip has the purpose to correct the height of the +% |\parbox[t]|. Usually it's the height of the very first line, but +% because of our extra skips (|\abovecaptionskip| and |\belowcaptionskip|) +% it's always |0pt|.\par +% (A different idea would be typesetting the first skip outside the longtable +% column with |\noalign{\vskip|\ldots|}|, but this means we have to move +% |\caption@begin| to some other place because it does not work in tabular +% mode. And at the moment I have no idea on how to do this in an elegant +% way\ldots) +% \begin{macrocode} + \vskip-\ht\strutbox +% \end{macrocode} +% +% Work-around for problem with \package{floatrow}: +% The |\belowcaptionskip| disturbs the environment in which the caption is actually typeset (by creating extra, unwanted space), +% so we supress this skip if the \package{floatrow} package is loaded. +% (This fixes \issue{50}) +% \begin{macrocode} + \caption@ifundefined\FBifcaptop{}{% + \let\caption@belowskip\@empty}% +% \end{macrocode} +% +% The following code should look familiar. We do our skips and use +% |\caption@@make| to typeset the caption itself. +% \begin{macrocode} + \caption@make@above + \caption@@make{#2}{#3}\endgraf + \caption@make@below + \caption@end}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\LT@listentry} +% \changes{v3.3}{2018/08/26}{This macro added} +% \changes{v3.3}{2018/10/05}{Bugfix: \cs{ignorespaces} added} +% \changes{v3.3}{2018/12/26}{Bugfix: Missing curly braces added} +% \begin{macrocode} + \renewcommand*\LT@listentry[2]{% + \begingroup + \caption@LT@settype{#1}% + \caption@listentry\@firstoftwo[{#1}]{#2}% + \endgroup\ignorespaces}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@LT@settype} +% \changes{v3.3}{2018/08/26}{This macro added} +% \changes{v3.3}{2018/10/05}{Uses argument no. 1 instead of \cs{LTcaptype}} +% \begin{macrocode} + \newcommand*\caption@LT@settype[1]{% + \caption@settype*{#1}% +% \end{macrocode} +% If |\LTcapwidth| is not set to its default value |4in| we assume +% that it shall overwrite our own setting. +% (But |\captionsetup[longtable]{width=|\ldots|}| will overwrite |\LTcapwidth|.) +% \begin{macrocode} + \ifdim\LTcapwidth=4in \else + \setcaptionwidth\LTcapwidth + \fi +% \end{macrocode} +% \begin{macrocode} + \caption@setoptions{longtable}% +% \caption@setContinuedFloat +% \end{macrocode} +% Finally set options applied by |\captionsetup| inside the longtable. +% \begin{macrocode} + \caption@setoptions{@longtable}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +}{} +% \end{macrocode} +% +% \begin{macro}{\caption@LT@setup} +% \changes{v3.3}{2016/02/01}{This macro added} +% Hook for stuff which prepares the typesetting of the \package{longtable} caption. +% \begin{macrocode} +\providecommand*\caption@LT@setup{} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{The picinpar package} +% \changes{v3.1}{2007/06/13}{Support of the \package{picinpar} package added} +% +% \begin{macrocode} +\caption@IfPackageLoaded{picinpar}{% +% \end{macrocode} +% +% \begin{macro}{\figwindow} +% \begin{macro}{\tabwindow} +% The \package{picinpar} package comes with its own caption code +% (|\wincaption|, |\@wincaption|, |\@makewincaption|, \ldots) +% so we redefine |\figwindow| \& |\tabwindow| to use |\caption| instead. +% \begin{macrocode} + \long\def\figwindow[#1,#2,#3,#4] {% + \caption@window{figure}% + \caption@setoptions{figwindow}% + \begin{window}[#1,#2,{#3},\caption@wincaption{#4}] }% +% \end{macrocode} +% \begin{macrocode} + \long\def\tabwindow[#1,#2,#3,#4] {% + \caption@window{table}% + \caption@setoptions{tabwindow}% + \begin{window}[#1,#2,{#3},\caption@wincaption{#4}] }% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\caption@window} +% \changes{v3.1c}{2007/10/06}{Bugfix: \cs{caption@clearmargin} added} +% Beside calling |\caption@settype| we redefine |\caption@boxrestore| +% (as in \package{floatflt} \& \package{picins} package support) +% and |\@makecaption| (as in \package{float} package support) here. +% \begin{macrocode} + \newcommand*\caption@window[1]{% + \let\@makecaption\caption@@make + \caption@setautoposition b% + \caption@settype{#1}% + \caption@clearmargin + \caption@setfullparboxrestore}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@wincaption} +% \changes{v3.1d}{2007/10/25}{Missing \% added} +% \changes{v3.3}{2013/04/14}{\cs{caption@ContinuedFloattrue} added} +% \changes{v3.3}{2018/10/06}{\cs{caption@ContinuedFloattrue} replaced by \cs{caption@setflag1}} +% This one finally typesets the caption using |\caption|. +% \begin{macrocode} + \newcommand\caption@wincaption[1]{% +% \end{macrocode} +% This will be done twice for every |figwindow| \& |tabwindow| caption -- +% on the first run |\picwd| is |0pt|, on the second run |\picwd| is |\hsize|. +% \begin{macrocode} + \ifdim\picwd=\z@ + \let\caption@makecurrent\@gobbletwo + \let\caption@@start\relax + \caption@prepareslc + \else + \caption@setflag1% + \fi +% \end{macrocode} +% The argument |#1| could contain simply the caption text +% (e.g.~|A figure caption|), but it could also contain an optional argument, +% the \meta{lst\_entry} +% (e.g.~|[An| |entry| |to| |the| |LOF]||{A| |figure| |caption}|). +% Therefore we have to test if |#1| begins with~|[| or not; furthermore we +% support a starred variant -- as in |\caption*| -- so we test for~|*|, too. +% \begin{macrocode} + \edef\@tempa{\expandafter\noexpand\@car#1\@nil}% + \if\@tempa*% + \let\@tempa\@firstofone + \else\if\@tempa[%] + \let\@tempa\@firstofone + \else + \let\@tempa\@empty + \fi\fi + \expandafter\caption\@tempa{#1}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +}{} +% \end{macrocode} +% +% \subsubsection{The picins package} +% \changes{v3.0j}{2006/01/26}{Support of the \package{picins} package added} +% +% \begin{macro}{\piccaptiontype} +% |\piccaptiontype|\marg{type}\par +% We offer this macro for changing the \meta{type} of the caption, so the user +% doesn't have to redefine |\@captype|, as proposed in the \package{picins} +% documentation. +% \Note{We define this macro here so it can be used in the +% preamble of the document, even when \thispackage\ was loaded prior to the +% \package{picins} package.} +% \begin{macrocode} +\newcommand*\piccaptiontype[1]{\def\@piccaptype{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\caption@IfPackageLoaded{picins}{% +% \end{macrocode} +% +% Initial set |\@piccaptype| and undefine |\@captype| which was set to +% |figure| by the \package{picins} package. +% \begin{macrocode} + \caption@ifundefined\@piccaptype{% + \caption@iftype{% + \let\@piccaptype\@captype + }{% + \def\@piccaptype{figure}% + }% + }{}% + \let\@captype\@undefined +% \end{macrocode} +% +% \begin{macro}{\piccaption} +% The original code: +% \begin{verbatim} +% \def\piccaption{\@ifnextchar [{\@piccaption}{\@piccaption[]}} +% \end{verbatim}%^^A +% Our code uses |\caption@star| so |\piccaption*| works, +% and |\caption@dblarg| so |\piccaption{}| works correctly. +% \begin{macrocode} + \def\piccaption{\caption@star\relax{\caption@dblarg\@piccaption}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\make@piccaption} +% \changes{v3.1}{2007/12/06}{Bugfix: \cs{caption@clearmargin} will always be used now} +% The original code: +% \begin{verbatim} +% \def\make@piccaption{% +% [...] +% \setbox\@TEXT=\vbox{\hsize\hsiz@\caption[\sh@rtf@rm]{\capti@nt@xt}}% +% } +% \end{verbatim}%^^A +% In our code we have to correct several things: +% \begin{enumerate} +% \item |\@captype| must be defined, since we have removed the global +% definition. +% \item We use |\caption@setoptions{parpic}| so +% |\captionsetup[parpic]{|\ldots|}| is supported. +% \item |\linewidth| must be set correctly. +% Usually this is done by |\@parboxrestore| inside |\@caption|, +% but since we use |\@caption@boxrestore| we have to map this to +% |\@parboxrestore| instead. +% \item The two arguments of |\caption| (|\sh@rtf@rm| \& |\capti@nt@xt|) +% should be expanded on first level so |\caption[]{|\ldots|}| and +% |\caption[|\ldots|]{}| work correctly. +% \end{enumerate} +% \begin{macrocode} + \let\caption@ORI@make@piccaption\make@piccaption + \def\make@piccaption{% + \let\caption@ORI\caption +% \end{macrocode} +% \begin{macrocode} + \long\def\caption[##1]##2{% + \caption@freezeHref % will be defrosted in \ivparpic + \caption@settype\@piccaptype +% \ifnum\c@piccaptionpos>2\relax + \caption@clearmargin +% \else +% \captionwidth\z@ % do not use "width=" setting +% \fi + \caption@setfullparboxrestore + \caption@setoptions{parpic}% + \caption@setautoposition b% +% \end{macrocode} +% \begin{macrocode} + \expandafter\expandafter\expandafter\caption@ORI + \expandafter\expandafter\expandafter[% + \expandafter\expandafter\expandafter{% + \expandafter##1\expandafter}\expandafter]\expandafter{##2}}% +% \end{macrocode} +% {\footnotesize\begin{quote} +% \leavevmode\llap{-or-\quad}%^^A +% |\begingroup|\\ +% | \toks0\expandafter{##1}| |\toks2\expandafter{##2}|\\ +% | \edef\x{\endgroup|\\ +% | \noexpand\caption@ORI[{\the\toks0}]{\the\toks2}}|\\ +% | \x| +% \end{quote} +% \begin{quote} +% \leavevmode\llap{-or-\quad}%^^A +% |\edef\x{%|\\ +% | \noexpand\caption@ORI[{\unexpanded\expandafter{##1}}]%|\\ +% | {\unexpanded\expandafter{##2}}}|\\ +% |\-| +% \end{quote}} +% \begin{macrocode} + \caption@ORI@make@piccaption + \let\caption\caption@ORI}% +% \end{macrocode} +% \end{macro} +% + +% \begin{macro}{\ivparpic} +% \changes{v3.3}{2018/12/26}{Bugfix: Missing curly braces added} +% We need to set our \package{hyperref} anchor here. +% Not bullet-proof since we have to redefine |\noindent| here! +% \begin{macrocode} + \let\caption@ORI@ivparpic\ivparpic + \def\ivparpic(#1,#2)(#3,#4)[#5][#6]#7{% + \let\caption@ORI@noindent\noindent + \def\noindent{% + \caption@defrostHref + \let\noindent\caption@ORI@noindent + \noindent}% + \caption@ORI@ivparpic(#1,#2)(#3,#4)[{#5}][{#6}]{#7}% + \let\noindent\caption@ORI@noindent}% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +}{% + \let\piccaptiontype\@undefined +} +% \end{macrocode} +% +% \subsubsection{The rotating package} +% +% \begin{macrocode} +\caption@IfPackageLoaded{rotating}[1995/08/22 v2.10]{% +% \end{macrocode} +% +% \begin{macro}{\rotcaption} +% \changes{v3.0c}{2004/07/16}{Bugfix: Check for \cs{caption@star} removed} +% \changes{v3.0i}{2005/12/07}{Rewritten, works with \package{hyperref} now} +% Make |\rotcaption*| work. +% \begin{macrocode} + \def\rotcaption{\let\@makecaption\@makerotcaption\caption}% +% \let\@rotcaption\@undefined +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\rotcaptionof} +% \changes{v3.0i}{2005/12/07}{New} +% Make |\rotcaptionof(*)| work. +% \begin{macrocode} + \def\rotcaptionof{% + \caption@teststar\caption@of{\rotcaption*}\rotcaption}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@makerotcaption} +% \changes{v3.0i}{2005/12/06}{Rewritten, should finally work proper now} +% \changes{v3.0m}{2007/03/04}{Uses \cs{caption@parbox} instead of \cs{caption@start/endbox} now} +% \changes{v3.3}{2012/12/26}{Rewritten (again)} +% Original (bugfixed) code: +% \begin{verbatim} +% \long\def\@makerotcaption#1#2{% +% \setbox\@tempboxa\hbox{#1: #2}% +% \ifdim \wd\@tempboxa > .8\vsize +% \rotatebox{90}{% +% \begin{minipage}{.8\textheight}#1: #2\end{minipage}% +% }%\par % <== \par removed (AR) +% \else% +% \rotatebox{90}{\box\@tempboxa}% +% \fi +% \nobreak\hspace{12pt}% <== \nobreak added (AR) +% } +% \end{verbatim}%^^A +% Our version emulates this behavior, but if |width=| is set, +% the rotated caption is always typeset as |\parbox|. +% (Note that |margin=| is not supported here.) +% \begin{macrocode} + \long\def\@makerotcaption#1#2{% + \rotatebox{90}{% + \ifdim\captionwidth=\z@ + \setcaptionwidth{.8\vsize}% + \l@addto@macro\caption@singleline{% + \caption@setup{parbox=none}}% + \fi + \let\caption@calcmargin\relax + \caption@@make{#1}{#2}}% + \nobreak\hspace{12pt}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +}{} +% \end{macrocode} +% +% \subsubsection{The sidecap package} +% +% \begin{macrocode} +\caption@IfPackageLoaded{sidecap}[2003/06/06 v1.6f]{% + \caption@setbool{needfreeze}{1}% +% \end{macrocode} +% +% \begin{macro}{\SC@zfloat} +% \changes{v3.0b}{2004/05/16}{Local definition of \cs{captionsetup} added} +% \changes{v3.0c}{2004/07/16}{Bugfix 04-07-15: Check for \cs{caption@star} removed} +% \changes{v3.1c}{2007/10/06}{\cs{caption} will be saved \& restored now} +% \changes{v3.2a}{2011/08/17}{Bugfix: Uses \cs{caption@freeze} instead of \cs{caption@freeze*} now} +% \changes{v3.3}{2013/05/01}{Usage of \cs{caption@freeze} replaced by \cs{caption@freezetype}} +% This macro will be called at the start of the environment, here is a good +% opportunity to do some adaptations to |\caption| and |\captionsetup|. +% \begin{macrocode} + \let\caption@ORI@SC@zfloat\SC@zfloat + \def\SC@zfloat#1#2#3[#4]{% +% \end{macrocode} +% First we use the original definition, but restore \cs{caption} and \cs{label} +% so \cs{caption@freeze} and \cs{caption@warmup} will work correctly. +% \begin{macrocode} + \caption@ORI@SC@zfloat{#1}{#2}{#3}[#4]% + \SC@RestoreCommands +% \end{macrocode} +% Since the sidecap package uses our |\caption| code outside the +% environment the regular |\captionsetup| will not work. +% So we need a special version here which saves the given argument list +% which will be executed later on. +% Furthermore we need to make |\caption*| work. +% \begin{macrocode} + \caption@freezetype{#2}% +% \end{macrocode} +% The sidecap package uses |\ifx\label\SC@label| to test if it is just inside a +% |SC|\-|figure| or not. So we redefine |\SC@label| here so this test will still work. +% \begin{macrocode} + \let\SC@label\label}% +% \end{macrocode} +% \begin{macrocode} + \providecommand*\SC@RestoreCommands{% + \let\caption=\SC@orig@caption \let\label=\SC@orig@label}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\endSC@FLOAT} +% \changes{v3.0i}{2006/01/12}{\cs{@listdepth}\cs{z@} added} +% \changes{v3.1}{2007/05/05}{Call of \cs{caption@setoptions}\arg{SCfloat} added} +% This macro will be called at the end of the environment, here we need to +% setup our stuff before the \package{sidecap} package actually typesets +% its caption. +% \begin{macrocode} + \let\caption@ORI@endSC@FLOAT\endSC@FLOAT + \def\endSC@FLOAT{% +% \end{macrocode} +% Before we can typeset the caption we need to set the margin to zero +% because any extra margin would only be disturbing here.\par +% (We don't need to take care about the caption position because +% the sidecap package set both |\abovecaptionskip| and |\belowcaptionskip| +% to a skip of zero anyway.)\par +% Furthermore |\SC@justify| will override the caption justification, if set. +% The usage of |\SC@justify| differs from version to version of the +% \package{sidecap} package:\par +% \begin{tabular}{ll} +% Version 1.4: & |\SC@justify| is not defined\\ +% Version 1.5: & |\SC@justify| is |\relax| when not set\\ +% Version 1.6: & |\SC@justify| is |\@empty| when not set\\ +% \end{tabular} +% \begin{macrocode} + \def\caption@setSC@justify{% + \caption@clearmargin + \ifx\SC@justify\@empty \else + \let\caption@hj\SC@justify + \let\SC@justify\@empty + \fi}% +% \end{macrocode} +% Make the original definition of |\endSC@FLOAT| to use our caption +% stuff instead of its own. +% \Note{At this point the \package{sidecap} definition of \cs{caption} is valid, +% not the regular one!} +% \begin{macrocode} + \let\caption\SC@orig@caption + \def\SC@orig@caption[##1]##2{% + \caption@setSC@justify +%%% \caption@setoptions{SC}% + \caption@setoptions{SC\@captype}% + \caption@defrost}% +% \end{macrocode} +% Finally we call the original definition of |\endSC@FLOAT|. +% \begin{macrocode} + \caption@setSC@justify % for compatibility mode + \caption@prepare@defrost + \caption@ORI@endSC@FLOAT}% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +}{} +% \end{macrocode} +% +% \subsubsection{The subfigure package} +% \changes{v3.1}{2007/04/06}{subfigure package support added} +% +% \begin{macrocode} +\caption@IfPackageLoaded{subfigure}[2002/01/23 v2.1]{% +% \end{macrocode} +% +% \begin{macro}{\sf@ifpositiontop} +% \changes{v3.1a}{2007/09/15}{Bugfix 07-09-15: Check for \cs{@captype} added} +% If the \package{subfigure} package is loaded, we map |\sf@ifpositiontop| +% to |\iffiguretopcap| resp. |\iftabletopcap|, so the \package{subfigure} +% \version{2.1} options \opt{figbotcap} etc. will still work. +% \begin{macrocode} + \def\sf@ifpositiontop{% + \ifx\@captype\@undefined + \expandafter\@gobbletwo + \else\ifx\@captype\relax + \expandafter\expandafter\expandafter\@gobbletwo + \else + \expandafter\expandafter\expandafter\sf@if@position@top + \fi\fi} +% \end{macrocode} +% \begin{macrocode} + \def\sf@if@position@top{% + \@ifundefined{if\@captype topcap}% + {\@gobbletwo}% + {\@nameuse{if\@captype topcap}% + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi}} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +}{} +% \end{macrocode} +% +% \subsubsection{The supertabular and xtab packages} +% +% \begin{macrocode} +\caption@IfPackageLoaded{supertabular}[2002/07/19 v4.1e]{% +% \end{macrocode} +% +% \begin{macro}{\tablecaption} +% \changes{v3.0e}{2005/05/05}{Made \cs{topcaption*} and \cs{bottomcaption*} work} +% \changes{v3.1h}{2008/04/01}{Bugfix: Star variant does not increment table counter anymore} +% Make |\topcaption*| and |\bottomcaption*| work. +% \begin{macrocode} + \renewcommand*\tablecaption{% + \caption@star + {\refstepcounter{table}}% + {\caption@dblarg{\@xtablecaption}}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@xtablecaption} +% \changes{v3.1h}{2008/04/01}{Made \cs{nameref} \& \cs{autoref} work} +% \changes{v3.1l}{2010/01/09}{Adapted to current version of nameref package} +% \changes{v3.3}{2018/12/26}{Bugfix: Missing curly braces added} +% Make |\nameref| and |\autoref| work. +% \begin{macrocode} + \let\caption@ORI@xtablecaption\@xtablecaption + \long\def\@xtablecaption[#1]#2{% + \caption@gettitle{#2}% + \caption@ORI@xtablecaption[{#1}]{#2}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ST@caption} +% \changes{v3.0a}{2004/01/23}{Bugfix: Missing \cs{par} added} +% \changes{v3.1h}{2008/04/01}{Bugfix: \cs{@currentlabelname} will be set now} +% The original code: +% \begin{verbatim} +% \long\def\ST@caption#1[#2]#3{\par% +% \addcontentsline{\csname ext@#1\endcsname}{#1}% +% {\protect\numberline{% +% \csname the#1\endcsname}{\ignorespaces #2}} +% \begingroup +% \@parboxrestore +% \normalsize +% \if@topcaption \vskip -10\p@ \fi +% \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par +% \if@topcaption \vskip 10\p@ \fi +% \endgroup} +% \end{verbatim}%^^A +% \begin{macrocode} + \long\def\ST@caption#1[#2]#3{\par% + \caption@settype*{#1}% + \caption@setoptions{supertabular}% +% \end{macrocode} +% The |position=| setting will be overwritten by the +% \package{supertabular} package: If |\topcaption| was used, +% the position will be |top| automatically, |bottom| otherwise. +% \begin{macrocode} + \def\caption@fixposition{% + \caption@setposition{\if@topcaption t\else b\fi}}% +% \end{macrocode} +% \begin{macrocode} + \caption@beginex{#1}{#2}{#3}% + \caption@boxrestore + \caption@normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \caption@end}% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +}{} +% \end{macrocode} +% +% \changes{v3.1h}{2008/04/01}{Support of the xtab package added} +% \begin{macrocode} +\caption@IfPackageLoaded{xtab}[2000/04/09 v2.3]{% +% \end{macrocode} +% +% \begin{macro}{\tablecaption} +% Make |\topcaption*| and |\bottomcaption*| work. +% \begin{macrocode} + \renewcommand*\tablecaption{% + \caption@star + {\refstepcounter{table}}% + {\caption@dblarg{\@xtablecaption}}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@xtablecaption} +% \changes{v3.1l}{2010/01/09}{Adapted to current version of nameref package} +% \changes{v3.3}{2018/12/26}{Bugfix: Missing curly braces added} +% Make |\nameref| and |\autoref| work. +% \begin{macrocode} + \let\caption@ORI@xtablecaption\@xtablecaption + \long\def\@xtablecaption[#1]#2{% + \caption@gettitle{#2}% + \caption@ORI@xtablecaption[{#1}]{#2}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ST@caption} +% The original code: +% \begin{verbatim} +% \long\def\ST@caption#1[#2]#3{\par% +% \@initisotab +% \addcontentsline{\csname ext@#1\endcsname}{#1}% +% {\protect\numberline{% +% \csname the#1\endcsname}{\ignorespaces #2}}% +% \begingroup +% \@parboxrestore +% \normalsize +% %% \if@topcaption \vskip -10\p@ \fi +% \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par +% %% \if@topcaption \vskip 10\p@ \fi +% \endgroup +% \global\advance\ST@pageleft -\PWSTcapht +% \ST@trace\tw@{Added caption. Space left for xtabular: \the\ST@pageleft}} +% \end{verbatim}%^^A +% \begin{macrocode} + \long\def\ST@caption#1[#2]#3{\par% + \caption@settype*{#1}% + \caption@setoptions{xtabular}% +% \end{macrocode} +% \begin{macrocode} + \def\caption@fixposition{% + \caption@setposition{\if@topcaption t\else b\fi}}% +% \end{macrocode} +% \begin{macrocode} + \@initisotab + \caption@beginex{#1}{#2}{#3}% + \caption@boxrestore + \caption@normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \caption@end + \global\advance\ST@pageleft -\PWSTcapht + \ST@trace\tw@{Added caption. Space left for xtabular: \the\ST@pageleft}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +}{} +% \end{macrocode} +% +% \subsubsection{The threeparttable package} +% \changes{v3.1}{2007/05/08}{Support of the \package{threeparttable} package added} +% +% \begin{macrocode} +\caption@IfPackageLoaded{threeparttable}[2003/06/13 v3.0]{% +% \end{macrocode} +% +% \begin{macro}{\threeparttable} +% \changes{v3.3}{2016/01/31}{Bugfix: \cs{@captype} will be used if already defined} +% Unfortunately |\@captype| is not set when |\TPT@common| will be used, +% so we have to redefine |\threeparttable| and |\measuredfigure| instead. +% \begin{macrocode} + \let\caption@ORI@threeparttable\threeparttable + \renewcommand*\threeparttable{% + \caption@settype{\@ifundefined{@captype}{table}{\@captype}}% +%%% \caption@setposition a% ? + \caption@clearmargin + \caption@setoptions{threeparttable}% + \caption@ORI@threeparttable}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\measuredfigure} +% \changes{v3.3}{2016/01/31}{Bugfix: \cs{@captype} will be used if already defined} +% Same here\ldots +% \begin{macrocode} + \let\caption@ORI@measuredfigure\measuredfigure + \renewcommand*\measuredfigure{% + \caption@settype{\@ifundefined{@captype}{figure}{\@captype}}% +%%% \caption@setposition a% ? + \caption@clearmargin + \caption@setoptions{measuredfigure}% + \caption@ORI@measuredfigure}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\TPT@caption} +% The original code: +% \begin{verbatim} +% \def\TPT@caption#1[#2]#3{\gdef\TPT@docapt +% {\par\global\let\TPT@docapt\@undefined \TPT@LA@caption{#1}[{#2}]% +% {\strut\ignorespaces#3\ifhmode\unskip\@finalstrut\strutbox\fi}}% +% \ifx\TPT@hsize\@empty \let\label\TPT@gatherlabel \abovecaptionskip\z@skip +% \else \TPT@docapt \fi \ignorespaces} +% \end{verbatim}%^^A +% \begin{macrocode} + \def\TPT@caption#1[#2]#3{% + \gdef\TPT@docapt{% + \global\let\TPT@docapt\@undefined + \caption@setautoposition\caption@TPT@position + \TPT@LA@caption{#1}[{#2}]{#3}}% + \ifx\TPT@hsize\@empty + \let\label\TPT@gatherlabel % Bug: does not work for measuredfigures + \gdef\caption@TPT@position{t}% + \g@addto@macro\TPT@docapt\caption@TPT@eatvskip + \else + \def\caption@TPT@position{b}% + \TPT@docapt + \fi + \ignorespaces}% +% \end{macrocode} +% \begin{macrocode} + %\newcommand*\caption@TPT@eatvskip{\vskip-.2\baselineskip}% + \def\caption@TPT@eatvskip#1\vskip{#1\@tempdima=}% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +}{} +% \end{macrocode} +% +% \subsubsection{The wrapfig package} +% \changes{v3.1}{2007/05/05}{Support of the \package{wrapfig} package added} +% \changes{v3.2d}{2011/11/02}{Support of the \package{wrapfig} package rewritten} +% +% \begin{macrocode} +\caption@IfPackageLoaded{wrapfig}[2003/01/31 v3.6]{% +% \end{macrocode} +% +% \begin{macro}{\wrapfloat} +% \changes{v3.2d}{2011/11/02}{Redefinition of this macro added} +% First of all we make the \package{wrapfig} package independent from the package +% load order regarding the \package{float} package. +% Since the usage of |\@float@set|\-|every| is missing in the code of the \package{wrapfig} +% package (it should be in the redefinition of |\float@re|\-|style|, right after +% |\@nameuse{fst@#1}|), we don't use it here, too, +% especially since |\wrap|\-|float| will usually not be used when used with re-styled floats. +% \begin{macrocode} + \renewcommand*\wrapfloat[1]{% + \def\@captype{#1}% + \@ifundefined{fst@#1}{}{% + \@nameuse{fst@#1}% +% \@float@setevery{#1}% + \def\WF@floatstyhook{\let\@currbox\WF@box + \global\setbox\WF@box\float@makebox{\wd\WF@box}}}% + \@ifnextchar[\WF@wr{\WF@wr[]}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\WF@rapt} +% \changes{v3.2d}{2011/11/02}{Usage of \cs{WF@captionstyhook} added} +% Original code: +% \begin{verbatim} +% \def\WF@rapt[#1]#2{% final two args: #1 = overhang, #2 = width, +% \gdef\WF@ovh{#1}% hold overhang for later, when \width is known +% \global\setbox\WF@box\vtop\bgroup \setlength\hsize{#2}% +% \ifdim\hsize>\z@ \@parboxrestore \else +% \setbox\z@\hbox\bgroup \let\wf@@caption\caption \let\caption\wf@caption +% \ignorespaces \fi} +% \end{verbatim}%^^A +% Our code has |\WF@captionstyhook| in addition: +% \begin{macrocode} + \def\WF@rapt[#1]#2{% final two args: #1 = overhang, #2 = width, + \gdef\WF@ovh{#1}% hold overhang for later, when \width is known + \global\setbox\WF@box\vtop\bgroup \setlength\hsize{#2}% + \expandafter\WF@captionstyhook\expandafter{\@captype}% <= new + \ifdim\hsize>\z@ \@parboxrestore \else + \setbox\z@\hbox\bgroup \let\wf@@caption\caption \let\caption\wf@caption + \ignorespaces \fi}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\WF@captionstyhook} +% \changes{v3.2d}{2011/11/02}{This macro added} +% \changes{v3.2e}{2011/11/10}{Bugfix 11-11-09: float package support fixed} +% We place our \package{hyperref} anchor here, apply the `wrap' options etc. +% Since the usage of |\@float@set|\-|every| is missing in the \package{wrapfig} +% package we will catch it up here for making the necessary adaptions to the +% \package{float} package. +% \begin{macrocode} + \def\WF@captionstyhook#1{% + \let\@captype\@undefined + \@ifundefined{fst@#1}{}{\@float@setevery{#1}}% + \caption@settype{#1}% + \caption@clearmargin +%%% \caption@setoptions{wrap}% + \caption@setoptions{wrap#1}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +}{} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \clearpage +% \begin{thebibliography}{99} +% \bibitem{beamer} +% Till Tantau:\\ +% \href{http://www.ctan.org/pkg/beamer}% +% {\emph{The beamer class, User Guide for version 3.25}},\\ +% December 26, 2012 +% +% \bibitem{KOMAScript} +% Markus Kohm \& Jens-Uwe-Morawski:\\ +% \href{http://www.ctan.org/pkg/koma-script}% +% {\emph{KOMA-Script -- a versatile \LaTeXe\ bundle}},\\ +% 2012-07-22 +% +% \bibitem{NTG} +% Victor Eijkhout:\\ +% \href{http://www.ctan.org/pkg/ntgclass}% +% {\emph{An introduction to the Dutch \LaTeX\ document classes}},\\ +% 3 September 1989 +% +% \bibitem{float} +% Anselm Lingnau:\\ +% \href{http://www.ctan.org/pkg/float}% +% {\emph{An Improved Environment for Floats}},\\ +% 2001/11/08 +% +% \bibitem{floatflt} +% Mats Dahlgren:\\ +% \href{http://www.ctan.org/pkg/floatflt}% +% {\emph{Welcome to the floatflt package}},\\ +% 1998/06/05 +% +% \bibitem{floatrow} +% Olga Lapko:\\ +% \href{http://www.ctan.org/pkg/floatrow}% +% {\emph{The floatrow package documentation}},\\ +% 2009/08/02 +% +% \bibitem{fltpage} +% Sebastian Gross:\\ +% \href{http://www.ctan.org/pkg/fltpage}% +% {\emph{Welcome to the beta test of fltpage package!}},\\ +% 1998/11/13 +% +% \bibitem{hyperref} +% Sebastian Rahtz \& Heiko Oberdiek:\\ +% \href{http://www.ctan.org/pkg/hyperref}% +% {\emph{Hypertext marks in \LaTeX: a manual for hyperref}},\\ +% November 2012 +% +% \bibitem{hypcap} +% Heiko Oberdiek:\\ +% \href{http://www.ctan.org/pkg/oberdiek}% +% {\emph{The hypcap package -- Adjusting anchors of captions}},\\ +% 2011/02/16 +% +% \bibitem{listings} +% Carsten Heinz \& Brooks Moses:\\ +% \href{http://www.ctan.org/pkg/listings}% +% {\emph{The Listings Package}},\\ +% 2007/02/22 +% +% \bibitem{longtable} +% David Carlisle:\\ +% \href{http://www.ctan.org/pkg/longtable}% +% {\emph{The longtable package}},\\ +% 2004/02/01 +% +% \bibitem{picinpar} +% Friedhelm Sowa:\\ +% \href{http://www.ctan.org/pkg/picinpar}% +% {\emph{Pictures in Paragraphs}},\\ +% July 13, 1993 +% +% \bibitem{picins} +% Joachim Bleser and Edmund Lang:\\ +% \href{http://www.ctan.org/pkg/picins}% +% {\emph{PicIns-Benutzerhandbuch Version 3.0}},\\ +% September~1992 +% +% \bibitem{rotating} +% Sebastian Rahtz and Leonor Barroca:\\ +% \href{http://www.ctan.org/pkg/rotating}% +% {\emph{A style option for rotated objects in \LaTeX}},\\ +% 1997/09/26 +% +% \bibitem{sidecap} +% Rolf Niepraschk \& Hubert G\"a\ss lein:\\ +% \href{http://www.ctan.org/pkg/sidecap}% +% {\emph{The sidecap package}},\\ +% 2003/06/06 +% +% \bibitem{subfigure} +% Steven D. Cochran:\\ +% \href{http://www.ctan.org/pkg/subfigure}% +% {\emph{The subfigure package}},\\ +% 2005/03/15 +% +% \bibitem{subfig} +% Steven D. Cochran:\\ +% \href{http://www.ctan.org/pkg/subfig}% +% {\emph{The subfig package}},\\ +% 2005/07/05 +% +% \bibitem{supertabular} +% Johannes Braams and Theo Jurriens:\\ +% \href{http://www.ctan.org/pkg/supertabular}% +% {\emph{The supertabular environment}},\\ +% 2004/02/20 +% +% \bibitem{threeparttable} +% Donald Arseneau:\\ +% \href{http://www.ctan.org/pkg/threeparttable}% +% {\emph{Three part tables: title, tabular environment, notes}},\\ +% March 5, 2010 +% +% \bibitem{wrapfig} +% Donald Arseneau:\\ +% \href{http://www.ctan.org/pkg/wrapfig}% +% {\emph{WRAPFIG.STY ver 3.6}},\\ +% Jan 31, 2003 +% +% \bibitem{xtab} +% Peter Wilson:\\ +% \href{http://www.ctan.org/pkg/xtab}% +% {\emph{The xtab package}},\\ +% 2011/07/31 +% \end{thebibliography} +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \clearpage +% \Finale +% +\endinput diff --git a/macros/latex/contrib/caption/caption.ins b/macros/latex/contrib/caption/caption.ins new file mode 100644 index 0000000000..21368b1850 --- /dev/null +++ b/macros/latex/contrib/caption/caption.ins @@ -0,0 +1,63 @@ +\def\batchfile{caption.ins} +\input docstrip + +\askforoverwritefalse +\keepsilent + +\preamble + +Copyright (C) 1994-2019 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) + +https://gitlab.com/axelsommerfeldt/caption + +-------------------------------------------------------------------------- + +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 + CHANGELOG, README, SUMMARY, caption.ins, + caption.dtx, caption2.dtx, caption3.dtx, + bicaption.dtx, ltcaption.dtx, subcaption.dtx, + newfloat.dtx, and totalcount.dtx +the derived files + caption.sty, caption2.sty, caption3.sty, + bicaption.sty, ltcaption.sty, subcaption.sty, + newfloat.sty, and totalcount.sty +and the user manuals + caption-deu.tex, caption-eng.tex, and caption-rus.tex. + +\endpreamble + +\generate{\file{caption.sty}{\from{caption.dtx}{package}}} +\generate{\file{caption2.sty}{\from{caption2.dtx}{package}}} +\generate{\file{caption3.sty}{\from{caption3.dtx}{package}}} +\generate{\file{bicaption.sty}{\from{bicaption.dtx}{package}}} +\generate{\file{ltcaption.sty}{\from{ltcaption.dtx}{package}}} +\generate{\file{subcaption.sty}{\from{subcaption.dtx}{package}}} +\generate{\file{newfloat.sty}{\from{newfloat.dtx}{package}}} +\generate{\file{totalcount.sty}{\from{totalcount.dtx}{package}}} + +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the files} +\Msg{* `caption.sty', `caption2.sty', 'caption3.sty',} +\Msg{* `bicaption.sty', `ltcaption.sty', `subcaption.sty',} +\Msg{* `newfloat.sty', and `totalcount.sty'} +\Msg{* into a directory searched by TeX.} +\Msg{*} +\Msg{* To produce the documentation run the file} +\Msg{* `caption-eng.tex' (English version) or `caption-rus.tex'} +\Msg{* (Russian version) or `caption-deu.tex' (German version)} +\Msg{* through LaTeX.} +\Msg{*} +\Msg{***********************************************************} diff --git a/macros/latex/contrib/caption/caption2.dtx b/macros/latex/contrib/caption/caption2.dtx new file mode 100644 index 0000000000..345fff610c --- /dev/null +++ b/macros/latex/contrib/caption/caption2.dtx @@ -0,0 +1,1384 @@ +% \iffalse meta-comment +% +% This is file `caption2.dtx'. +% +% Copyright (C) 1994-2015 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +% +% -------------------------------------------------------------------------- +% +% 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, +% caption3.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, and newfloat.dtx, +% the derived files caption.sty, caption2.sty, caption3.sty, +% bicaption.sty, ltcaption.sty, subcaption.sty, and newfloat.sty, +% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. +% +% \fi +% \CheckSum{853} +% +% \iffalse +%<*driver> +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesFile{caption2.drv}% + [2007/11/28 v2.2 Documentated code of the (obsolete) caption2 package] +\hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up. +%\errorcontextlines=3 +% +\documentclass{ltxdoc} +\setlength\parindent{0pt} +\setlength\parskip{\smallskipamount} +% +\usepackage{ifpdf} +\ifpdf + \usepackage{mathptmx,courier} + \usepackage[scaled=0.90]{helvet} +% \addtolength\marginparwidth{15pt} +\fi +% +\usepackage{hypdoc} +\ifpdf\usepackage{hypdestopt}\fi +\hypersetup{pdfkeywords={LaTeX, package, caption2},pdfstartpage={},pdfstartview={}} +% +\usepackage{caption2}[2008/07/01] +% +%<+driver>\OnlyDescription +% +\begin{document} + \DocInput{caption2.dtx} +\end{document} +% +% \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\def\thispackage{\package{caption2}} +% \let\env\purett \let\opt\purett +% +% \GetFileInfo{caption2.drv} +% \let\docdate\filedate +% \let\docversion\fileversion +% \GetFileInfo{caption2.sty} +% +% \title{The (obsolete) \texorpdfstring{\package{caption2} package\thanks{%^^A +% This package has version number \docversion.}}%^^A +% {caption2 package}} +% \author{Axel Sommerfeldt\\ +% \url{https://gitlab.com/axelsommerfeldt/caption}} +% \date{\docdate} +% \maketitle +% +% \changes{v2.0}{1995/10/09}{New experimental version: Many new commands and features} +% \changes{v2.0}{1995/10/09}{Support of the longtable package added} +% \changes{v2.1}{2002/02/26}{Adapted to version 2.1 of the subfigure package} +% \changes{v2.1a}{2003/11/12}{Some minor bug fixes and improved compatibility to v2.0} +% \changes{v2.1b}{2004/04/16}{Some minor bug fixes and improved compatibility to v2.0} +% \changes{v2.1c}{2004/05/10}{Some minor bug fixes and improved compatibility to v2.0} +% \changes{v2.1d}{2005/10/03}{Some superfluous brackets removed; warning added} +% \changes{v2.2}{2007/04/06}{Uses the caption3 kernel now} +% +% \providecommand\LaTeXcomp{The \LaTeX{} Companion} +% +% \section*{THIS PACKAGE IS OBSOLETE!} +% +% The \package{caption2} package used to be an experimental side-version of +% the regular \package{caption} package. It was made public as beta test version +% without documentation in 1995 because of the strong demand for new features and +% adaptations to other packages like the \package{longtable} and +% \package{subfigure} one. +% +% But within the next years I found no time to reintegrate some of the +% well-tried features into the regular \package{caption} package. So I +% decided to release a version $2.1$ of the \package{caption2} package in 2002 +% instead, which included some minor bug fixes and adaptations to the new +% version $2.1$ of the \package{subfigure} package. Furthermore I started +% to write a documentation for this package, but unfortunately did not get +% very far with this\ldots +% +% In 2003 I finally found some (more) time, so a new regular release $3.0$ +% of the \package{caption} package could be build in cooperation with +% Frank Mittelbach and Steven Cochran. +% It was released in December 2003 and superseded the neglected +% \package{caption2} package. +% +% {\small (In parallel, Steven Cochran released the \package{subfig} package which +% superseded the \package{subfigure} package.)} +% +% So please don't use this package for new documents. It's old, it's obsolete +% and it starts to begin smell bad! +% Please ignore all hints in books or other documents which try to tell you +% that the \package{caption2} package should be used instead of the +% \package{caption} package -- these hints are outdated since December 2003. +% +% \vfill +% \bigskip +% \pagebreak[4] +% +% \section*{How to migrate to the regular \package{caption} package?} +% +% Usually replacing \package{caption2} by \package{caption} is sufficient +% because the \package{caption} package emulates most of the options and +% commands offered by the \package{caption2} package. +% If you get some errors or wired results afterwards, please take a closer +% look at the \package{caption} package documentation which will hopefully +% help you clearing these problems. You will also find a section called +% `Compatibility to older versions' there which should help you with the +% migration process. +% If all this should fail you can write me an e-mail asking for help. +% +% \section*{What will happen to this package?} +% +% The \package{caption2} package is still some kind of supported, that means +% it will be part of future releases of the \package{caption} package bundle, +% and bugs will still be fixed so existing documents using this package will +% still compile. +% But it will \emph{not} be enhanced in the future. +% +% This means migrating to the actual \package{caption} package should not be +% necessary for old documents -- they should still compile fine as they are. +% If not, please don't hesitate to write me an e-mail asking for +% maintainance. +% +% \StopEventually{} +% +% \DoNotIndex{\\,\_,\ ,\@@par} +% \DoNotIndex{\@bsphack} +% \DoNotIndex{\@car,\@cdr,\@classoptionslist,\@cons,\@currext,\@currname} +% \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs} +% \DoNotIndex{\@for,\@firstofone,\@firstoftwo} +% \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom} +% \DoNotIndex{\@ifnextchar,\@ifstar,\@ifundefined,\@latex@error} +% \DoNotIndex{\@namedef,\@nameuse} +% \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist} +% \DoNotIndex{\@removeelement,\@restorepar,\@secondoftwo,\@setpar} +% \DoNotIndex{\@tempa,\@tempboxa,\@tempdima,\@tempb,\@tempc} +% \DoNotIndex{\@undefined,\@unprocessedoptions,\@unusedoptionlist} +% \DoNotIndex{\p@,\z@} +% \DoNotIndex{\active,\addtocounter,\addtolength,\advance} +% \DoNotIndex{\baselineskip,\begin,\begingroup,\bfseries,\bgroup,\box} +% \DoNotIndex{\catcode,\centering,\changes,\csname,\def,\divide,\do,\downarrow} +% \DoNotIndex{\edef,\egroup,\else,\empty,\end,\endcsname,\endgraf,\endgroup,\expandafter} +% \DoNotIndex{\fi,\footnotesize,\global} +% \DoNotIndex{\hangindent,\hbox,\hfil,\hsize,\hskip,\hspace,\hss} +% \DoNotIndex{\if,\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,\nobreakspace,\noexpand,\noindent,\numberline} +% \DoNotIndex{\normalsize,\or,\par,\parbox,\parfillskip} +% \DoNotIndex{\parindent,\parskip,\prevdepth,\protect,\protected@edef,\providecommand} +% \DoNotIndex{\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{\undefined,\unvbox,\uparrow,\upshape,\usebox,\usepackage} +% \DoNotIndex{\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{\ProcessOptions,\ProvidesPackage} +% +% \clearpage +% +% \section{The Implementation} +% \iffalse +%<*package> +% \fi +% +% \subsection{Identificaton} +% +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{caption2}[2015/09/15 v2.2d Customising captions (AR)] +% \end{macrocode} +% +% \changes{v2.2b}{2007/06/15}{Made obsolete warning even more annoying} +% \begin{macrocode} +\PackageWarning{caption2}{% + ****************************************************\MessageBreak + THIS PACKAGE IS OBSOLETE:\MessageBreak + This package attempts to provide an `caption2'\MessageBreak + package v2.0/2.1 author environment so that OLD\MessageBreak + documents can be successfully processed. It should\MessageBreak + NOT be used for NEW documents! New documents should\MessageBreak + use the regular `caption' package v3.x instead.\MessageBreak + ****************************************************\@gobbletwo}% +% \end{macrocode} +% +% \subsection{Loading the caption3 kernel} +% +% \begin{macrocode} +\RequirePackage{caption3}[2007/09/01] % needs v3.1 or newer +% \end{macrocode} +% +% \subsection{Check against the regular caption package} +% \changes{v2.2}{2007/04/06}{Check against regular \package{caption} package added} +% \changes{v2.2a}{2007/04/11}{Bugfix: Usage of \cs{caption@error} replaced by \cs{PackageError}} +% +% \begin{macrocode} +\@ifpackageloaded{caption}{% + \PackageError{caption2}{% + You can't use both, the (current) caption *and*\MessageBreak + the (obsolete) caption2 package}\caption@eh + \endinput +}{} +% \end{macrocode} +% +% \subsection{Preliminary declarations} +% +% \begin{macro}{\captionlabeldelim} +% \begin{macro}{\captionlabelsep} +% \cs{captionlabeldelim} \& \cs{captionlabelsep} will hold the iterim +% space between caption label and text. +% (\cs{captionlabeldelim} will be typeset within \cs{captionlabelfont}, +% \cs{captionlabelsep} not.) +% \begin{macrocode} +\newcommand*\captionlabeldelim{} +\newcommand*\captionlabelsep{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\ifcaptionwidth} +% Either \cs{captionmargin} (with specifies an extra margin) or \cs{captionwidth} +% (with specifies an explicit width) can be set, therefore we need the flag \cs{ifcaptionwidth} +% to determine with parameter we should pay attention to. +% \begin{macrocode} +\newcommand*\ifcaptionwidth{\ifdim\captionwidth>\z@} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\captionindent} +% \changes{v2.2b}{2007/08/12}{Re-added since the \package{caption3} kernel uses \cs{caption@indent} now} +% \cs{captionindent} will be used in caption style \texttt{indent} and specifies the indention +% after the first line. +% \begin{macrocode} +\let\captionindent\caption@indent +% \end{macrocode} +% \end{macro} +% +% \changes{v2.1}{2002/02/20}{New ifs \cs{ifcaptionlabel} and \cs{ifignoreLTcapwidth}} +% +% \begin{macro}{\ifcaptionlabel} +% If \cs{ifcaptionlabel} is not set the caption label should be suppressed; +% we need this flag to support the \cs{caption*} command. +% \changes{v2.2}{2007/04/06}{New definition, based on \cs{ifcaption@star}} +% \begin{macrocode} +\def\ifcaptionlabel{% + \ifcaption@star + \@tempswafalse + \else + \@tempswatrue + \fi + \if@tempswa} +\def\captionlabeltrue{\caption@starfalse} +\def\captionlabelfalse{\caption@startrue} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ifonelinecaptions} +% If \cs{ifonelinecaptions} is set we support the \LaTeX\ base style 'one line captions', +% that means the caption will be typeset centered if it fits to one line. +% \changes{v2.2}{2007/04/06}{New definition, based on \cs{caption@ifslc}} +% \begin{macrocode} +\def\ifonelinecaptions{% + \caption@ifslc{\@tempswatrue}{\@tempswafalse}% + \if@tempswa} +\def\onelinecaptionstrue{\caption@setbool{slc}{1}} +\def\onelinecaptionsfalse{\caption@setbool{slc}{0}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ifignoreLTcapwidth} +% If \cs{ifignoreLTcapwidth} is set we ignore the \cs{LTcapwidth} of \textsf{longtable}. +% \begin{macrocode} +\newif\ifignoreLTcapwidth +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\normalcaptionparams} +% \cs{normalcaptionparams} resets all caption related parameters to it's normal default values. +% \cs{captionfont} will be set to \cs{captionsize} so setting the obsolete \cs{captionsize} will still work. +% Same story with \cs{captiondelim} and the obsolete \cs{captionlabeldelim}. +% \changes{v2.1}{2002/01/29}{New command \cs{normalcaptionparams}} +% \begin{macrocode} +\newcommand*\normalcaptionparams{% + \let\captionsize\@empty + \renewcommand*\captionfont{\captionsize}% + \let\captionlabelfont\@empty + \renewcommand*\captionlabeldelim{:}% + \renewcommand*\captionlabelsep{\space}% + \setcaptionmargin\z@ + \setlength\captionindent\z@ + \onelinecaptionstrue} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\defcaptionstyle} +% \begin{macro}{\newcaptionstyle} +% \begin{macro}{\renewcaptionstyle} +% These macros will define a new caption style. \cs{newcaptionstyle} and \cs{renewcaptionstyle} +% will additionally check if the caption style already exists or not. +% \begin{macrocode} +\newcommand*\defcaptionstyle[1]{% + \@namedef{caption@@#1}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\newcaptionstyle[1]{% + \expandafter\ifx\csname caption@@#1\endcsname\relax + \expandafter\defcaptionstyle + \else + \PackageError{caption2}{Caption style `#1' already defined}{\caption@eh}% + \expandafter\@gobbletwo + \fi + {#1}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\renewcaptionstyle[1]{% + \expandafter\ifx\csname caption@@#1\endcsname\relax + \PackageError{caption2}{Caption style `#1' undefined}{\caption@eh}% + \expandafter\@gobbletwo + \else + \expandafter\defcaptionstyle + \fi + {#1}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\dummycaptionstyle} +% This macro will also define a new caption style, but a one which is based on the +% actual set caption style. Therefore you can't set a caption style made with this +% command with \cs{captionstyle} -- we check this to avoid an endless recursion. +% \begin{macrocode} +\newcommand*\dummycaptionstyle[2]{% + \defcaptionstyle{#1}{% + \expandafter\ifx\csname caption@@\caption@style\expandafter\endcsname% + \csname caption@@#1\endcsname + \PackageError{caption2}{You can't use the caption style `#1' directy}{% + The caption style `#1' is only a dummy and does not really exists.% + \MessageBreak You have to redefine it (with \protect\renewcaptionstyle) + before you can select\MessageBreak it with \protect\captionstyle. + \space\caption@eh}% + \else + #2\usecaptionstyle\caption@style + \fi}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\captionstyle} +% \cs{captionstyle} sets the actual caption style. It includes a check if the given caption +% style is defined or not. +% \begin{macrocode} +\newcommand*\captionstyle[1]{% + \expandafter\ifx\csname caption@@#1\endcsname\relax + \PackageError{caption2}{Undefined caption style `#1'}{\caption@eh}% + \else + \def\caption@style{#1}% + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{style `normal'} +% \begin{macro}{style `center'} +% \begin{macro}{style `centerlast'} +% \begin{macro}{style `flushleft'} +% \begin{macro}{style `flushright'} +% \begin{macro}{style `hang'} +% \begin{macro}{style `indent'} +% The predefined caption styles `normal', `center', `flushleft', `flushright', `centerlast', +% `hang', `hang+X', and `indent'. Because they are quite similar they all are based on the macro +% \cs{caption@make}. +% \begin{macrocode} +\newcaptionstyle{normal}{\caption@make{normal}} +\newcaptionstyle{center}{\caption@make{center}} +\newcaptionstyle{centerlast}{\caption@make{centerlast}} +\newcaptionstyle{flushleft}{\caption@make{flushleft}} +\newcaptionstyle{flushright}{\caption@make{flushright}} +\newcaptionstyle{hang}{\caption@make{hang}} +\newcaptionstyle{hang+center}{\caption@make{hang@center}} +\newcaptionstyle{hang+centerlast}{\caption@make{hang@centerlast}} +\newcaptionstyle{hang+flushleft}{\caption@make{hang@flushleft}} +\newcaptionstyle{indent}{\caption@make{indent}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\caption@makecaption} +% Our predefined caption styles. \cs{caption@makecaption} takes the style +% name as parameter, it does the common stuff and calls a macro +% (build out of the style name) to do the uncommon stuff if neccessary. +% \changes{v2.1}{2002/02/26}{Renamed from \cs{caption@make} to \cs{caption@makecaption}} +% \changes{v2.1b}{2004/04/16}{We offer and use \cs{caption@make}, again} +% \changes{v2.1c}{2004/05/10}{Bugfix: Extra \cs{par} added} +% \begin{macrocode} +\newcommand*\caption@makecaption[1]{% + \usecaptionmargin + \ifcaptionlabel + \def\caption@label{% + {\captionlabelfont\captionlabel\captionlabeldelim}\captionlabelsep}% + \else + \let\caption@label\@empty + \fi + \captionfont + \onelinecaption + {\caption@label\captiontext}% + {\parbox[b]\captionlinewidth{\strut\@nameuse{caption@@@#1}\par}\par}} +% \end{macrocode} +% \end{macro} +% +% \changes{v2.1}{2002/02/26}{Removed all extra parboxes from caption styles} +% \changes{v2.1a}{2003/11/12}{\ldots and put the parbox into \cs{caption@makecaption} instead} +% +% \begin{macro}{\caption@@@normal} +% The `normal' caption style. Just typeset caption (label \& text) as paragraph. +% \begin{macrocode} +\newcommand*\caption@@@normal{% + \caption@label\captiontext} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@@@center} +% The `center' caption style. Typeset the caption centered within a parbox. +% \begin{macrocode} +\newcommand*\caption@@@center{% + \centering\caption@label\captiontext}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@@@centerlast} +% The `centerlast' caption style. +% The idea how to do this was taken from Br\"uggemann-Klein\cite{Anne}, +% it is also mentioned in Kopka\cite[p227]{Kopka-E}. +% \begin{macrocode} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@@@centerlast{% + \centerlast\caption@label\captiontext} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@@@flushleft} +% The `flushleft' caption style. Typeset the caption raggedright within a parbox. +% \begin{macrocode} +\newcommand*\caption@@@flushleft{% + \raggedright\caption@label\captiontext}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@@@flushright} +% The `flushright' caption style. Typeset the caption raggedleft within a parbox. +% \begin{macrocode} +\newcommand*\caption@@@flushright{% + \raggedleft\caption@label\captiontext}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@@@hang} +% \begin{macro}{\caption@hangplus} +% The `hang' caption style. +% This code was taken from \LaTeXcomp\cite[p155]{A-W:GMS94} and modified. +% \begin{macrocode} +\newcommand*\caption@@@hang{% + \sbox\@tempboxa{\caption@label}% + \hangindent\wd\@tempboxa\noindent + \usebox\@tempboxa\caption@hangplus\captiontext} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@hangplus{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\caption@@@hang@center} +% The `hang+flushleft' caption style. +% \begin{macrocode} +\newcommand*\caption@@@hang@center{% + \let\caption@hangplus\centering\caption@@@hang} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@@@hang@centerlast} +% The `hang+flushleft' caption style. +% \begin{macrocode} +\newcommand*\caption@@@hang@centerlast{% + \let\caption@hangplus\centerlast\caption@@@hang} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@@@hang@flushleft} +% The `hang+flushleft' caption style. +% \begin{macrocode} +\newcommand*\caption@@@hang@flushleft{% + \let\caption@hangplus\raggedright\caption@@@hang} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@@@indent} +% The `indent' caption style. Is is quite like the `hang' style but the +% indention is given as \cs{captionindent}. +% \begin{macrocode} +\newcommand*\caption@@@indent{% + \hangindent\captionindent\noindent + \caption@label\captiontext} +% \end{macrocode} +% \end{macro} +% +% \subsection{Declaration of options} +% +% \begin{macro}{normal} +% \begin{macro}{center} +% \begin{macro}{centerlast,anne} +% \begin{macro}{flushleft} +% \begin{macro}{flushright} +% \begin{macro}{hang,isu} +% \begin{macro}{indent} +% These options will set the caption style. +% (`normal' is the default one.) +% +% The options `anne' and `isu' are for +% backward compatibility only. +% \begin{macrocode} +\DeclareOption{normal}{\captionstyle{normal}} +\DeclareOption{center}{\captionstyle{center}} +\DeclareOption{centerlast}{\captionstyle{centerlast}} +\DeclareOption{flushleft}{\captionstyle{flushleft}} +\DeclareOption{flushright}{\captionstyle{flushright}} +\DeclareOption{anne}{\ExecuteOptions{centerlast}} +\DeclareOption{hang}{\captionstyle{hang}} +\DeclareOption{hang+center}{\captionstyle{hang+center}} +\DeclareOption{hang+centerlast}{\captionstyle{hang+centerlast}} +\DeclareOption{hang+flushleft}{\captionstyle{hang+flushleft}} +\DeclareOption{isu}{\ExecuteOptions{hang}} +\DeclareOption{indent}{\captionstyle{indent}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{scriptsize} +% \begin{macro}{footnotesize} +% \begin{macro}{small} +% \begin{macro}{normalsize} +% \begin{macro}{large,Large} +% These options will set the caption size. We use \cs{g@addto@macro} so more that one +% option can be set. +% \begin{macrocode} +\DeclareOption{scriptsize}{\g@addto@macro\captionsize\scriptsize} +\DeclareOption{footnotesize}{\g@addto@macro\captionsize\footnotesize} +\DeclareOption{small}{\g@addto@macro\captionsize\small} +\DeclareOption{normalsize}{\g@addto@macro\captionsize\normalsize} +\DeclareOption{large}{\g@addto@macro\captionsize\large} +\DeclareOption{Large}{\g@addto@macro\captionsize\Large} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{up,it,sl,sc} +% \begin{macro}{md,bf} +% \begin{macro}{rm,sf,tt} +% These options will set the caption label. +% \begin{macrocode} +\DeclareOption{up}{\g@addto@macro\captionlabelfont\upshape} +\DeclareOption{it}{\g@addto@macro\captionlabelfont\itshape} +\DeclareOption{sl}{\g@addto@macro\captionlabelfont\slshape} +\DeclareOption{sc}{\g@addto@macro\captionlabelfont\scshape} +\DeclareOption{md}{\g@addto@macro\captionlabelfont\mdseries} +\DeclareOption{bf}{\g@addto@macro\captionlabelfont\bfseries} +\DeclareOption{rm}{\g@addto@macro\captionlabelfont\rmfamily} +\DeclareOption{sf}{\g@addto@macro\captionlabelfont\sffamily} +\DeclareOption{tt}{\g@addto@macro\captionlabelfont\ttfamily} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{oneline} +% \begin{macro}{nooneline} +% These options will set the `oneline' flag. +% (`oneline' is the default.) +% \begin{macrocode} +\DeclareOption{oneline}{\onelinecaptionstrue} +\DeclareOption{nooneline}{\onelinecaptionsfalse} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\caption@setpackage} +% A helper macro, a value of 1 within parameter \#2 will activate the support +% of the package given in parameter \#1, a value of 0 will deactivate it. +% \begin{macrocode} +\newcommand*\caption@setpackage[1]{\@namedef{caption@pkt@#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{float} +% \begin{macro}{longtable} +% \begin{macro}{subfigure} +% \changes{v2.1}{2002/02/19}{New options for interaction with other packages} +% These options will enable or suppress the support of the packages +% \textsf{float}, \textsf{longtable}, and \textsf{subfigure}. +% \begin{macrocode} +\DeclareOption{float}{% + \caption@twozerofalse\caption@setpackage{float}{1}} +\DeclareOption{longtable}{% + \caption@twozerofalse\caption@setpackage{longtable}{1}} +\DeclareOption{subfigure}{% + \caption@twozerofalse\caption@setpackage{subfigure}{1}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{none} +% \begin{macro}{all} +% These options will enable or suppress the support of all the above packages. +% \begin{macrocode} +\DeclareOption{none}{\caption@twozerofalse + \caption@setpackage{float}{0}\caption@setpackage{longtable}{0}% + \caption@setpackage{subfigure}{0}} +\DeclareOption{all}{\ExecuteOptions{float,longtable,subfigure}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{ruled} +% \begin{macro}{boxed} +% The option `ruled' introduced in \textsf{caption} v1.2 is obsolete now, but +% we will still support it. The option `boxed' was introduced in version 2.0 +% and is obsolete now, too. +% \begin{macrocode} +\newif\ifcaption@ruled +\DeclareOption{ruled}{\caption@ruledtrue} +\DeclareOption{boxed}{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{ignoreLTcapwidth} +% This option will make the caption code ignore the setting of \cs{LTcapwidth} +% and use the setting of \cs{setcaptionmargin} or \cs{setcaptionwidth} instead. +% \begin{macrocode} +\DeclareOption{ignoreLTcapwidth}{\ignoreLTcapwidthtrue} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{debug} +% This option will put additional debug information in the log file. +% \begin{macrocode} +\DeclareOption{debug}{\captionsetup{debug}} +% \end{macrocode} +% \end{macro} +% +% \subsection{Execution of options} +% +% Now we set the default values and start processing the options. +% (If \cs{caption@twozero} is set to true (default) we will emulate the package +% load algorithm of \textsf{caption} v2.0: If the package is already loaded +% patch it, otherwise do nothing.) +% \changes{v2.1}{2002/02/19}{\cs{ProcessOptions} changed to \cs{ProcessOptions*}} +% \begin{macrocode} +\newif\ifcaption@twozero +\normalcaptionparams +\ExecuteOptions{none,normal} +\caption@twozerotrue +\ProcessOptions* +\ifcaption@twozero + \PackageInfo{caption2}{Running in caption2 v2.0 compatibility mode} +\fi +% \end{macrocode} +% +% \subsection{More declarations} +% +% \begin{macro}{\captionof} +% \begin{macro}{\captionof*} +% \cs{captionof} resp.\ \cs{captionof*} will just set \cs{@captype} and do the normal +% \cs{caption} resp.\ \cs{caption*}, so we can also typeset captions outside floating +% environments. +% \changes{v2.1}{2002/02/19}{New commands \cs{captionof} and \cs{captionof*}} +% \begin{macrocode} +\def\captionof{\@ifstar{\caption@of{\caption*}}{\caption@of\caption}} +\newcommand*\caption@of[2]{\def\@captype{#2}#1} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\abovecaptionskip} +% \begin{macro}{\belowcaptionskip} +% Not all document classes define \cs{abovecaptionskip} and \cs{belowcaptionskip} +% (like \textsf{ucthesis}), so we do it here if not already done. +% \changes{v2.1}{2002/02/19}{\cs{abovecaptionskip} and \cs{belowcaptionskip} will be defined if neccessary} +% \begin{macrocode} +\caption@ifundefined\abovecaptionskip{% + \newlength\abovecaptionskip\setlength\abovecaptionskip{10\p@}}{} +\caption@ifundefined\belowcaptionskip{% + \newlength\belowcaptionskip\setlength\belowcaptionskip{0\p@}}{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\captionlinewidth} +% \changes{v2.1}{2002/02/26}{Renamed from \cs{realcaptionwidth} to \cs{captionlinewidth}} +% \changes{v2.1a}{2003/11/12}{We offer \cs{realcaptionwidth}, again} +% \begin{macro}{\captionlabel} +% \begin{macro}{\captiontext} +% These values are only set and used within the caption code itself. +% \cs{captionlinewidth} will be set to the given vertical space for the caption, +% normally this is \cs{linewidth}. (This value was called \cs{realcaptionwidth} +% within \thispackage\ \mbox{2.0}, so we will offer this, too.) +% +% \cs{captionlabel} and \cs{captiontext} will be set to the caption label +% resp.\ the caption text. +% (Because \cs{captionlabel} and \cs{captiontext} will be locally defined with +% \cs{def} we do not need to define them here.) +% \begin{macrocode} +\newdimen\captionlinewidth +\newdimen\realcaptionwidth +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\usecaptionmargin} +% A helper macro for caption style authors: +% It calculates \cs{leftskip} and \cs{rightskip} out of +% \cs{captionlinewidth} and \cs{captionmargin} resp.\ \cs{captionwidth}. +% Also \cs{captionlinewidth} will be corrected to the appropriate value. +% \begin{macrocode} +\newcommand*\usecaptionmargin{% + \ifcaptionwidth + \leftskip\captionlinewidth + \advance\leftskip by -\captionwidth + \divide\leftskip by 2 + \rightskip\leftskip + \captionlinewidth\captionwidth + \else + \leftskip\captionmargin + \rightskip\captionmargin + \advance\captionlinewidth by -2\captionmargin + \fi + \realcaptionwidth\captionlinewidth} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\onelinecaption} +% This macro definition helps setting captions the \LaTeX\ base classes way: +% If \cs{ifonelinecaptions} is set and the 1st argument fits within \cs{captionlinewidth}, +% we typeset it centered -- otherway we typeset the 2nd argument. +% (We use the savebox \cs{@tempboxa} as helper for this.) +% \begin{macrocode} +\newcommand\onelinecaption[1]{% + \let\next\@firstofone + \ifonelinecaptions + \sbox\@tempboxa{#1}% + \ifdim\wd\@tempboxa >\captionlinewidth + \else + \def\next{{\centering\usebox\@tempboxa\par}\@gobble}% + \fi + \fi\next} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\usecaptionstyle} +% First we check if we are inside a caption -- if \cs{captiontext} is undefined we are not. +% If we are we call the appropriate caption definition. +% +% \changes{v2.1b}{2004/04/16}{Missing percent added (and extra space removed)} +% \changes{v2.2}{2007/04/06}{\cs{let}\cs{caption@make}\cs{caption@makecaption} added} +% \begin{macrocode} +\newcommand*\usecaptionstyle[1]{% + \caption@ifundefined\captiontext{% + \PackageError{caption2}{You can't use \protect#1 + in normal text}{The usage of \protect#1 is only + allowed inside code declared with\MessageBreak \protect\defcaptionstyle, + \protect\newcaptionstyle \space or \protect\renewcaptionstyle. + \space\caption@eh} + }{% + \@ifundefined{caption@@#1}% + {\PackageError{caption2}{Caption style `#1' undefined}{\caption@eh}}% + {\let\caption@make\caption@makecaption + \@nameuse{caption@@#1}}% + }} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@makecaption} +% This is the heart of the \thispackage\ package -- the redefinition of the +% core caption code. It was taken from the \LaTeXe\ standard classes and modified. +% It's very easy -- apart from using \cs{abovecaptionskip} and \cs{belowcaptionskip} +% we just set \cs{captionlinewidth}, \cs{captionlabel} and \cs{captiontext} +% to its appropriate values and using the code of the actual caption style via +% \cs{usecaptionstyle}. +% \begin{macrocode} +\renewcommand\@makecaption[2]{% + \vskip\abovecaptionskip + \captionlinewidth\hsize + \realcaptionwidth\hsize + \def\captionlabel{#1}% + \def\captiontext{#2}% + \usecaptionstyle\caption@style + \vskip\belowcaptionskip} +% \end{macrocode} +% \end{macro} +% +% \subsection{Support of other packages} +% +% \begin{macro}{\caption@ifpackage} +% This macro will execute the code needed to support the package +% named within argument \#1. The parameter \#2 is the command +% which shows if the package is loaded -- it is defined, it is +% already loaded, otherwise not. The parameter \#3 contains code +% which will be executed if no support is required -- this is for +% cleanup purposes. The final parameter \#4 contains the code itself. +% \changes{v2.1c}{2004/05/09}{Compatibility warning removed} +% \begin{macrocode} +\newcommand*\caption@ifpackage[3]{% + \if1\@nameuse{caption@pkt@#1}% + \@ifundefined{#2}% + {\let\next\AtBeginDocument}% + {\let\next\@firstofone}% + \else\ifcaption@twozero + \@ifundefined{#2}% + {#3\let\next\@gobble}% + {\let\next\@firstofone}% + \else + #3\let\next\@gobble + \fi\fi + \expandafter\let\csname caption@pkt@#1\endcsname\undefined + \caption@ifdebug{% + \ifx\next\@gobble\PackageInfo{caption2}{#1 => gobble}% + \else\ifx\next\@firstofone\PackageInfo{caption2}{#1 => firstofone}% + \else\ifx\next\AtBeginDocument\PackageInfo{caption2}{#1 => AtBeginDocument}% + \fi\fi\fi}{}% + \next} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Support of the float package} +% +% \begin{macrocode} +\caption@ifpackage{float}{floatc@plain}{}{% + \ifx\floatc@plain\relax + \PackageWarning{caption2}{% + Option `float' was set but there is no float package loaded} + \else + \PackageInfo{caption2}{float package v1.2 (or newer) detected} +% \end{macrocode} +% +% \begin{macro}{\caption@floatc} +% First we define a helper macro to typeset the caption via \cs{usecaptionstyle}, +% the 1st parameter is the caption style name, +% the 2nd and 3rd are the caption label and text. +% +% \textsf{caption2} has the goal not to modify the output just by +% loading it (without options), therefore we have to be tricky here to +% support \cs{@fs@cfont} which is in fact the same as our \cs{captionlabelfont}. +% So we test if a \cs{captionlabelfont} has been set by the user -- if not +% \cs{@fs@cfont} will be used, otherwise \cs{captionlabelfont}. +% +% \changes{v2.1b}{2004/03/19}{\cs{realcaptionwidth}$=$\cs{hsize} was missing here} +% \begin{macrocode} + \newcommand\caption@floatc[3]{% + \ifx\captionlabelfont\@empty + \let\captionlabelfont\@fs@cfont + \fi + \captionlinewidth\hsize + \realcaptionwidth\hsize + \def\captionlabel{#2}% + \def\captiontext{#3}% + \usecaptionstyle{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\floatc@plain} +% Now we can redefine the caption code of the \textsf{float} package. +% Here we redefine \cs{floatc@plain} to use our caption code, so +% \texttt{plain} and \texttt{boxed} float types will use the actual +% caption style set by the user. +% \begin{macrocode} + \renewcommand*\floatc@plain{\caption@floatc{\caption@style}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\floatc@ruled} +% The support of the \texttt{ruled} float type is a little +% more complex. First we define a caption style `ruled' so the end-user +% can change this caption style afterwards. If the (obsolete) option +% `ruled' is set, we define it in a \textsf{caption} v1.x compatible way, +% otherwise we define it in a \textsf{float} compatible way. +% +% Then we redefine \cs{floatc@ruled} so the caption style `ruled' will +% be used. +% \begin{macrocode} + \ifcaption@ruled + \dummycaptionstyle{ruled}{\onelinecaptionsfalse\setcaptionmargin{\z@}}% + \else + \newcaptionstyle{ruled}{% + \ifcaptionlabel + {\@fs@cfont\captionlabel}\space% + \fi\captiontext\par}% + \fi +% \end{macrocode} +% \begin{macrocode} + \renewcommand*\floatc@ruled{\caption@floatc{ruled}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@of} +% Typesetting captions outside floats is not so easy with redefined floats, +% because +% \begin{itemize} +% \item The caption code of the \textsf{float} package needs not only +% \cs{@captype} defined, but \cs{@fs@capt} (the command which will typeset the +% caption itself) either. +% \item The caption is only saved within a \cs{vbox}, so the \textsf{float} +% package can typeset the caption later at it's float style specific place +% (that means at top or at the bottom of the float). +% \end{itemize} +% +% Here is the new code: First we check if it's a restyled float by checking if +% \cs{fst@} is defined. If yes, we use this command (it will define +% \cs{@fs@capt}). +% Then we execute \cs{@float@setevery}, if it exists (that means we are +% dealing with the \textsf{float} package 1.3 or newer here). +% Now comes the basic trick: +% We redefine the caption typesetting command \cs{@fs@capt}, so it will close +% the \cs{vbox}, typeset the caption outside the vbox and finally start the +% group again so the original \cs{@fs@capt} is happy with closing the group. +% +% \begin{macrocode} + \renewcommand*\caption@of[2]{\def\@captype{#2}% + \@ifundefined{fst@#2}{}{% + \@nameuse{fst@#2}% + \caption@ifundefined\@float@setevery{}{\@float@setevery{#2}}% + \let\caption@fs@capt\@fs@capt + \let\@fs@capt\caption@of@float}% + #1} +% \end{macrocode} +% +% \begin{macrocode} + \newcommand\caption@of@float[2]{\egroup + \vskip\abovecaptionskip + \normalsize\caption@fs@capt{#1}{#2}% + \vskip\belowcaptionskip + \bgroup}% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} + \fi} +% \end{macrocode} +% +% \subsubsection{Support of the longtable package} +% +% \begin{macrocode} +\caption@ifpackage{longtable}{LT@makecaption}{}{% + \ifx\LT@makecaption\relax + \PackageWarning{caption2}{% + Option `longtable' was set but there is no longtable package loaded} + \else + \PackageInfo{caption2}{longtable package v3.15 (or newer) detected} +% \end{macrocode} +% +% \begin{macro}{\LT@makecaption} +% David Carlisle was so kind to introduce a macro called +% \cs{LT@makecaption} in version 3.15 of the \textsf{longtable} +% package which typeset the caption and can be easily redefined. +% +% This is the original definition: +% \begin{quote} +% |\def\LT@makecaption#1#2#3{%|\\ +% | \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\LTcapwidth{%|\\ +% | |$\langle$\textit{typeset} |#1{#2: }#3| \textit{as caption}$\rangle$\\ +% | \endgraf\vskip\baselineskip}%|\\ +% | \hss}}}| +% \end{quote} +% +% So we do here: +% First we define a new (dummy) caption style `longtable', +% than we redefine \cs{LT@makecaption} so this style will be used. +% (Remember: |#1| is |\@gobble| in star form of |\caption|, +% and |\@firstofone| otherwise.) +% \begin{macrocode} + \dummycaptionstyle{longtable}{} +% \end{macrocode} +% \begin{macrocode} + \renewcommand\LT@makecaption[3]{% + \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\hsize{% + \ifignoreLTcapwidth + \else + \setcaptionwidth\LTcapwidth + \fi + \captionlinewidth\hsize + \realcaptionwidth\hsize + \captionlabelfalse#1\captionlabeltrue + \def\captionlabel{#2}% + \def\captiontext{#3}% + \usecaptionstyle{longtable}% + \endgraf\vskip\baselineskip}% + \hss}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} + \fi} +% \end{macrocode} +% +% \subsubsection{Support of the subfigure package} +% +% Some of the following code will not work within \cs{if}, +% because of the (yet) undefined \cs{if}\textit{xxx}s. So we simply define +% the critical code within the helper commands \cs{setsubcapstyle} +% and \cs{caption@makesubcaption} already here. +% +% \begin{macro}{\setsubcapstyle} +% This sets the subcaptionstyle to a appropriate value. +% +% If \cs{ifsubcapraggedright} is undefined (it was introduced +% into v2.1 of the \textsf{subfigure} package) we define it first. +% \begin{macrocode} +\newcommand*\setsubcapstyle{% + \caption@ifundefined\subcapraggedrightfalse{% + \newif\ifsubcapraggedright}{}% + \ifsubcaphang + \ifsubcapcenter + \subcapstyle{hang+center}% + \else\ifsubcapcenterlast + \subcapstyle{hang+centerlast}% + \else\ifsubcapraggedright + \subcapstyle{hang+flushleft}% + \else + \subcapstyle{hang}% + \fi\fi\fi + \else\ifsubcapcenter + \subcapstyle{center}% + \else\ifsubcapcenterlast + \subcapstyle{centerlast}% + \else\ifsubcapraggedright + \subcapstyle{flushleft}% + \else + \subcapstyle{normal}% + \fi\fi\fi\fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@makesubcaption} +% \changes{v2.2c}{2008/07/01}{Bugfix: Usage of \cs{ifcaptionwidth} removed} +% This will typeset the subcaption. +% We just set all our \cs{caption}\textit{xxx} values to +% the values of \cs{subcap}\textit{xxx} and typeset the +% caption like \textsf{subfigure} within a \cs{hbox}, +% but with the help of \cs{usecaptionstyle}. +% +% But this is not as easy as it seems. We typeset the caption like this: +% \begin{quote} +% |\captionfont|\\ +% | {\capionlabelfont\captionlabel\captionlabeldelim}%|\\ +% |\captionlabelsep\captiontext| +% \end{quote} +% Within \textsf{subfigure} 2.0 the caption will be set quite similar to: +% \begin{quote} +% |\subcapsize|\\ +% | {\subcaplabelfont\captionlabel}%|\\ +% |\space\captiontext| +% \end{quote} +% But within \textsf{subfigure} 2.1 this has changed to: +% \begin{quote} +% |\subcapsize|\\ +% | {\subcaplabelfont\captionlabel}%|\\ +% |\hskip\subfiglabelskip|\\ +% | {\subcapfont\captiontext}}| +% \end{quote} +% So we have to be tricky here: We set \cs{captionlabelfont} to \cs{normalfont} plus +% \cs{subcapsize} \& \cs{subcaplabelfont}, so the font setting in \cs{captionfont} +% will not affect the caption label in subfigure captions. +% +% Note that \cs{hfil} has changed to \cs{hss} from subfigure 2.0 to 2.1, +% so we use \cs{caption@subfig@hss} instead. (We will define this later on.) +% \begin{macrocode} +\newcommand\caption@makesubcaption[2]{% + \renewcommand*\captionfont{\subcapsize\subcapfont}% + \renewcommand*\captionlabelfont{\normalfont\subcapsize\subcaplabelfont}% + \let\captionlabeldelim\subcaplabeldelim + \let\captionlabelsep\subcaplabelsep + \ifsubfigcapwidth + \setcaptionwidth\subfigcapwidth + \else + \setcaptionmargin\subfigcapmargin + \fi + \setlength\captionmargin\subfigcapmargin + \setlength\captionwidth\subfigcapwidth + \captionindent\subcapindent + \ifsubcapnooneline + \onelinecaptionsfalse + \else + \onelinecaptionstrue + \fi + \hbox to\@tempdima{% + \caption@subfig@hss\parbox[t]\@tempdima{% + \captionlinewidth\@tempdima + \realcaptionwidth\@tempdima + \captionlabeltrue + \def\captionlabel{#1}% + \def\captiontext{\ignorespaces #2}% + \usecaptionstyle\caption@substyle}% + \caption@subfig@hss}} +% \end{macrocode} +% \end{macro} +% +% If the subfigure support is not needed, we throw +% the helper macros in the garbage can. +% +% \begin{macrocode} +\caption@ifpackage{subfigure}{@makesubfigurecaption}{% + \let\setsubcapstyle\undefined + \let\caption@makesubcaption\undefined}{% + \ifx\@makesubfigurecaption\relax + \PackageWarning{caption2}{% + Option `subfigure' was set but there is no subfigure package loaded} + \let\setsubcapstyle\undefined + \let\caption@makesubcaption\undefined + \else +% \end{macrocode} +% +% Some stuff has changed from version 2.0 to 2.1 of the +% \textsf{subfigure} package, so we make a branch here. +% If \cs{subcapfont} is undefined we assume v2.0, +% otherwise we assume v2.1 or newer. +% +% \begin{macrocode} + \ifx\subcapfont\undefined + \PackageInfo{caption2}{subfigure package v2.0 detected} +% \end{macrocode} +% +% \begin{macro}{\subcapfont} +% We define \cs{subcapfont} here so we can use it later +% in common code for \textsf{subfigure} v2.0 and v2.1 (or newer). +% \begin{macrocode} + \let\subcapfont\@empty +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\subfigcapwidth} +% \begin{macro}{\setsubcapmargin} +% \begin{macro}{\setsubcapwidth} +% Analogous to \cs{captionwidth}, \cs{setcaptionmargin}, and +% \cs{setcaptionwidth} we define \cs{subfigcapwidth}, +% \cs{setsubcapmargin}, and \cs{setsubcapwidth}. +% +% Note: \cs{subfigcapmargin} is a command in v2.0 of \textsf{subfigure}. +% So we make \cs{subfigcapwidth} a command, too. +% \begin{macrocode} + \newcommand*\subfigcapwidth{\z@} + \newcommand*\setsubcapmargin{% + \subfigcapwidthfalse + \renewcommand*\subfigcapmargin} + \newcommand*\setsubcapwidth{% + \subfigcapwidthtrue + \renewcommand*\subfigcapwidth} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\subcaplabelsep} +% Analogous to \cs{captionlabelsep} we define \cs{subcaplabelsep}. +% \begin{macrocode} + \newcommand*\subcaplabelsep{\space} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@subfig@hss} +% This will be uses within the caption code itself. +% \begin{macrocode} + \let\caption@subfig@hss\hfil +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} + \else + \PackageInfo{caption2}{subfigure package v2.1 (or newer) detected} +% \end{macrocode} +% +% \begin{macro}{\subfigcapwidth} +% \begin{macro}{\setsubcapmargin} +% \begin{macro}{\setsubcapwidth} +% Analogous to \cs{captionwidth}, \cs{setcaptionmargin}, and +% \cs{setcaptionwidth} we define \cs{subfigcapwidth}, +% \cs{setsubcapmargin}, and \cs{setsubcapwidth}. +% +% Note: \cs{subfigcapmargin} is a length in v2.1 of \textsf{subfigure}. +% So we make \cs{subfigcapwidth} a length, too. +% \begin{macrocode} + \newdimen\subfigcapwidth + \newcommand*\setsubcapmargin{% + \subfigcapwidthfalse + \setlength\subfigcapmargin} + \newcommand*\setsubcapwidth{% + \subfigcapwidthtrue + \setlength\subfigcapwidth} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\subcaplabelsep} +% Analogous to \cs{captionlabelsep} we define \cs{subcaplabelsep}. +% \begin{macrocode} + \newcommand*\subcaplabelsep{\hskip\subfiglabelskip} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@subfig@hss} +% This will be uses within the caption code itself. +% \begin{macrocode} + \let\caption@subfig@hss\hss +% \end{macrocode} +% +% \end{macro} +% \begin{macrocode} + \fi +% \end{macrocode} +% +% Here starts the common code for \textsf{subfigure} v2.0 and v2.1. +% +% \begin{macro}{\ifsubfigcapwidth} +% \begin{macro}{\subcapindent} +% \begin{macro}{\subcaplabeldelim} +% Analogous to \cs{ifcaptionwidth}, \cs{captionindent} \& \cs{captionlabeldelim} +% we define \cs{ifsubfigcapwidth}, \cs{subcapindent} \& \cs{subcaplabeldelim} +% \begin{macrocode} + \newif\ifsubfigcapwidth + \newdimen\subcapindent + \newcommand*\subcaplabeldelim{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\subcapstyle} +% Analogous to \cs{captionstyle} we define \cs{subcapstyle} +% and set it (via \cs{setsubcapstyle}) to a appropriate value. +% \begin{macrocode} + \newcommand*\subcapstyle[1]{% + \expandafter\ifx\csname caption@@#1\endcsname\relax + \PackageError{caption2}{Undefined caption style `#1'}{\caption@eh}% + \else + \def\caption@substyle{#1}% + \fi} + \setsubcapstyle +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@thesubfigure} +% \begin{macro}{\@thesubtable} +% The \textsf{subfigure} package makes use of \cs{subcaplabelfont} and +% \cs{subfiglabelskip} within its \cs{@thesub}\textit{xxx} macros. +% This is totally in contrast to the way the \textsf{caption2} package +% handle these settings. So we redefine the \cs{@thesub}\textit{xxx} +% to be just the plain label and nothing else. +% +% \begin{macrocode} + \renewcommand*\@thesubfigure{\thesubfigure} + \renewcommand*\@thesubtable{\thesubtable} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@makesubfigurecaption} +% \begin{macro}{\@makesubtablecaption} +% Now we are ready to redefine \cs{@makesubfigurecaption}. +% \begin{macrocode} + \let\@makesubfigurecaption\caption@makesubcaption + \let\@makesubtablecaption\caption@makesubcaption +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macrocode} + \fi} +% \end{macrocode} +% +% That's all folks! +% +% \begin{macrocode} +\let\caption@ifpackage\undefined +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% \clearpage +% \begin{thebibliography}{9} +% \bibitem{float} +% Anselm Lingnau: +% \href{http://www.ctan.org/pkg/float}% +% {\emph{An Improved Environment for Floats}}, +% 2001/11/08 +% +% \bibitem{longtable} +% David Carlisle: +% \href{http://www.ctan.org/pkg/longtable}% +% {\emph{The longtable package}}, +% 2000/10/22 +% +% \bibitem{rotating} +% Sebastian Rahtz and Leonor Barroca: +% \href{http://www.ctan.org/pkg/rotating}% +% {\emph{A style option for rotated objects in \LaTeX}},\\ +% 1997/09/26 +% +% \bibitem{subfigure} +% Steven D. Cochran: +% \href{http://www.ctan.org/pkg/subfigure}% +% {\emph{The subfigure package}}, +% 2002/02/14 +% +% \bibitem{A-W:GMS94} +% Michel Goossens, Frank Mittelbach and Alexander Samarin: +% \newblock \textsl{The {\LaTeX} Companion}, +% \newblock Addison-Wesley, Reading, Massachusetts, 1994. +% +% \bibitem{Anne} +% Anne Br\"uggemann-Klein: +% \textsl{Einf\"uhrung in die Dokumentverarbeitung}, +% B.G. Teubner, Stuttgart, 1989 +% +% \bibitem{Kopka-E} +% Helmut Kopka: +% \textsl{\LaTeX -- Erweiterungsm\"oglichkeiten}, +% 3. \"uberarbeitete Auf\/lage, Addison-Wesley, Bonn, 1991 +% \end{thebibliography} +% +% \Finale +% +\endinput diff --git a/macros/latex/contrib/caption/caption3.dtx b/macros/latex/contrib/caption/caption3.dtx new file mode 100644 index 0000000000..bdffdcc66a --- /dev/null +++ b/macros/latex/contrib/caption/caption3.dtx @@ -0,0 +1,4176 @@ +% \iffalse meta-comment +% +% This is file `caption3.dtx'. +% +% Copyright (C) 1994-2019 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +% +% -------------------------------------------------------------------------- +% +% 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, +% caption3.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, and newfloat.dtx, +% the derived files caption.sty, caption2.sty, caption3.sty, +% bicaption.sty, ltcaption.sty, subcaption.sty, and newfloat.sty, +% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. +% +% \fi +% \CheckSum{3961} +% +% \iffalse +%<*driver> +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesFile{caption3.drv}[2015/09/15 v1.8 Implementation of the caption kernel] +\hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up. +%\errorcontextlines=3 +% +\documentclass{ltxdoc} +\setlength\parindent{0pt} +\setlength\parskip{\smallskipamount} +% +%\let\ORIsubsection\subsection +%\def\subsection{\clearpage\ORIsubsection} +% +\makeatletter % make room for subsections like 2.16.14 in the TOC +%\newcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}} +\renewcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.7em}} +\makeatother +% +\usepackage{ifpdf} +\ifpdf + \usepackage{mathptmx,courier} + \usepackage[scaled=0.90]{helvet} + \addtolength\marginparwidth{15pt} +\fi +% +\usepackage{hypdoc} +\ifpdf\usepackage{hypdestopt}\fi +\hypersetup{pdfkeywords={LaTeX, package, caption},pdfstartpage={},pdfstartview={}} +% +\usepackage[debug]{caption3}[2018/05/01] +% +\DeclareRobustCommand*\eTeX{\texorpdfstring + {\leavevmode\hbox{$\varepsilon$}-\TeX}% + {e-TeX}} +\DeclareRobustCommand*\AmS{\texorpdfstring + {{\protect\usefont{OMS}{cmsy}{m}{n}A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}% + {AMS}} +\DeclareRobustCommand*\KOMAScript{\texorpdfstring + {\textsf{K\kern.05em O\kern.05em M\kern.05em A\kern.1em-\kern.1em Script}}% + {KOMA-Script}} +\DeclareRobustCommand*\NTG{NTG} +\DeclareRobustCommand*\SmF{SMF} +% +\begin{document} + \DocInput{caption3.dtx} +\end{document} +% +% \fi +% +% \newcommand*\purerm[1]{{\upshape\mdseries\rmfamily #1}} +% \newcommand*\puresf[1]{{\upshape\mdseries\sffamily #1}} +% \newcommand*\purett[1]{{\upshape\mdseries\ttfamily #1}} +% \let\class\puresf \let\package\puresf +% \let\env\purett \let\opt\purett +% +% \def\thispackage{the \package{caption} kernel} +% \def\Thispackage{The \package{caption} kernel} +% +% \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}} +% \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}} +% \newcommand*\version[2][]{\textit{v#2}} +% +% \GetFileInfo{caption3.drv} +% \let\docdate\filedate +% \GetFileInfo{caption3.sty} +% +% \title{The Implementation of +% \texorpdfstring{\thispackage\thanks{%^^A +% This package has version number \fileversion, last revised \filedate.}}%^^A +% {the caption kernel}} +% \author{Axel Sommerfeldt\\ +% \url{https://gitlab.com/axelsommerfeldt/caption}} +% \date{\docdate} +% \maketitle +% +% \begin{abstract} +% \Thispackage\ consists of two parts -- the kernel +% (|caption3.sty|) and the main package (|caption.sty|). +% +% The kernel provides all the user commands and internal macros which are +% necessary for typesetting captions and setting parameters regarding these. +% While the standard \LaTeX\ document classes provide an internal command +% called |\@makecaption| and no options to control its behavior (except the +% vertical skips above and below the caption itself), we provide similar +% commands called |\caption@make| and |\caption@@make|, but with a lot of +% options which can be selected with |\captionsetup|. +% Loading the kernel part do not change the output of a \LaTeX\ document +% -- it just provides functionality which can be used by \LaTeXe\ packages +% which typesets captions, for example the \package{caption} and +% \package{subfig} packages. +% \end{abstract} +% +% \StopEventually{} +% \clearpage +% \tableofcontents +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \DoNotIndex{\\,\_,\ ,\@@par} +% \DoNotIndex{\@bsphack} +% \DoNotIndex{\@car,\@cdr,\@classoptionslist,\@cons,\@currext,\@currname} +% \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs} +% \DoNotIndex{\@for,\@firstofone,\@firstoftwo} +% \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom} +% \DoNotIndex{\if@minipage\@ifnextchar,\@ifpackagelater,\@ifpackageloaded} +% \DoNotIndex{\@ifstar,\@ifundefined,\@latex@error,\@minipagefalse,\@minipagetrue} +% \DoNotIndex{\@namedef,\@nameuse} +% \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist} +% \DoNotIndex{\@removeelement,\@restorepar,\@secondoftwo,\@setminipage,\@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} +% \newcommand*\Note[2][Note]{\par{\small\emph{#1:} #2}\par} +% +% \changes{v1.0}{2003/12/20}{Rewritten; many new commands and features} +% \changes{v1.0c}{2004/11/28}{Split into two packages: +% \package{caption} \& \package{caption3}} +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \clearpage +% \let\subsubsection\subsection +% \let\subsection\section +% +% \iffalse +%<*package> +% \fi +% +% \subsection{Identification} +% +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{caption3}[2019/09/01 v1.8d caption3 kernel (AR)] +% \end{macrocode} +% +% \subsection{Workaround for bug in package \package{arabtex}} +% \package{arabtex} re-defines \cs{@gobble} as not-long so the packages of the +% \package{caption} package bundle are doomed to fail. +% Since this fatal bug won't be fixed in \package{arabtex} but we are dependent on a +% proper definition of \cs{@gobble}, \cs{@firstofone}, \cs{@firstoftwo}, \cs{@secondoftwo} +% and so on we fix this here. (Sigh!) +% \begin{macrocode} +\providecommand\caption@FixArabTeX{% + \def\caption@tempa##1{}% + \ifx\caption@tempa\@gobble + \PackageInfo{caption3}{Fixing ArabTeX}% + \long\def\@gobble##1{}% + \fi} +% \end{macrocode} +% Do the fix now and at |\begin{document}|, in case \package{arabtex} will be loaded after \package{caption}. +% \begin{macrocode} +\caption@FixArabTeX +\AtBeginDocument{% + \caption@FixArabTeX + \let\caption@FixArabTeX\@undefined} +% \end{macrocode} +% +% \subsection{Generic helpers} +% +% \begin{macro}{\@nameundef} +% This is the opposite to |\@namedef| which is offered by the \LaTeX\ kernel. +% We use it to remove the definition of some commands and keyval options after +% |\begin{document}| (to save \TeX\ memory) and to remove caption options defined +% with |\captionsetup|\oarg{type}. +% \begin{macrocode} +\providecommand*\@nameundef[1]{% + \expandafter\let\csname #1\endcsname\@undefined} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\l@addto@macro} +% \changes{v1.5}{2013/04/26}{Revised} +% The \LaTeXe\ kernel offers the internal helper macro |\g@addto@macro| which +% globally adds tokens to existing macros, like in |\AtBeginDocument|. +% This is the same but it works local, not global. +% \begin{macrocode} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname currentgrouplevel\endcsname\relax + \PackageInfo{caption3}{TeX engine: TeX} + \let\caption@ifeTeX\@secondoftwo + \providecommand\l@addto@macro[2]{% + \begingroup + \toks@\expandafter{#1#2}% + \xdef\caption@addto@temp{\the\toks@}% + \endgroup + \let#1\caption@addto@temp} +\else + \PackageInfo{caption3}{TeX engine: e-TeX} + \let\caption@ifeTeX\@firstoftwo + \providecommand\l@addto@macro[2]{% + \edef#1{\unexpanded\expandafter{#1#2}}} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bothIfFirst} +% \begin{macro}{\bothIfSecond} +% |\bothIfFirst| tests if the first argument is not empty, |\bothIfSecond| +% tests if the second argument is not empty. If yes both arguments get +% typeset, otherwise none of them. +% \begin{macrocode} +\def\bothIfFirst#1#2{% + \protected@edef\caption@tempa{#1}% + \ifx\caption@tempa\@empty \else + #1#2% + \fi} +% \end{macrocode} +% \begin{macrocode} +\def\bothIfSecond#1#2{% + \protected@edef\caption@tempa{#2}% + \ifx\caption@tempa\@empty \else + #1#2% + \fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\caption@ifundefined} +% \changes{v1.3a}{2011/08/12}{This macro added} +% \changes{v1.3b}{2011/08/18}{Made expandable} +% Similar to \cs{@ifundefined} offered by the \LaTeX kernel, but does +% not define the undefined macro as \cs{relax}. +% \begin{macrocode} +\newcommand*\caption@ifundefined[1]{% + \ifx#1\@undefined + \expandafter\@firstoftwo + \else\ifx#1\relax + \expandafter\expandafter\expandafter\@firstoftwo + \else + \expandafter\expandafter\expandafter\@secondoftwo + \fi\fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@ifinlist} +% \changes{v1.1}{2007/07/29}{Rewritten} +% This helper macro checks if the first argument is in the comma separated +% list which is offered as second argument. So for example +% \begin{quote} +% |\caption@ifinlist{frank}{axel,frank,olga,steven}{yes}{no}| +% \end{quote} +% would expand to |yes|. +% \begin{macrocode} +\newcommand*\caption@ifinlist{% + \@expandtwoargs\caption@@ifinlist} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@@ifinlist[2]{% + \begingroup + \def\@tempa##1,#1,##2\@nil{% + \endgroup + \ifx\relax##2\relax + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi}% + \@tempa,#2,#1,\@nil}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@ifin@list} +% \changes{v1.1}{2007/08/12}{This macro added} +% |\caption@ifin@list|\marg{cmd}\marg{list entry}\marg{yes}\marg{no} +% \begin{macrocode} +\newcommand*\caption@ifin@list[2]{% + \caption@ifempty@list#1% + {\@secondoftwo}% + {\@expandtwoargs\caption@@ifinlist{#2}{#1}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@g@addto@list} +% \changes{v1.1}{2007/07/29}{This macro added} +% |\caption@g@addto@list|\marg{cmd}\marg{list entry} +% \begin{macrocode} +\newcommand*\caption@g@addto@list[2]{% + \caption@ifempty@list#1{\gdef#1{#2}}{\g@addto@macro#1{,#2}}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\caption@l@addto@list} +% \changes{v1.1}{2007/07/29}{This macro added} +% |\caption@l@addto@list|\marg{cmd}\marg{list entry} +% \begin{macrocode} +\newcommand*\caption@l@addto@list[2]{% + \caption@ifempty@list#1{\def#1{#2}}{\l@addto@macro#1{,#2}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@g@removefrom@list} +% \changes{v1.1}{2007/07/29}{This macro added} +% |\caption@g@removefrom@list|\marg{cmd}\marg{list entry} +% \begin{macrocode} +\newcommand*\caption@g@removefrom@list[2]{% + \caption@l@removefrom@list#1{#2}% + \global\let#1#1} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\caption@l@removefrom@list} +% \changes{v1.1}{2007/07/29}{This macro added} +% |\caption@l@removefrom@list|\marg{cmd}\marg{list entry}\par +% \Note[Caveat]{\meta{cmd} will be expanded during this process since +% \cs{@removeelement} is using \cs{edef} to build the new list!} +% \begin{macrocode} +\newcommand*\caption@l@removefrom@list[2]{% + \caption@ifempty@list#1{}{\@expandtwoargs\@removeelement{#2}#1#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@for@list} +% \changes{v1.1}{2007/07/29}{This macro added} +% |\caption@for@list|\marg{cmd}\marg{code with \#1} +% \begin{macrocode} +\newcommand*\caption@for@list[2]{% + \caption@ifempty@list#1{}{% + \def\caption@tempb##1{#2}% + \@for\caption@tempa:=#1\do{% + \expandafter\caption@tempb\expandafter{\caption@tempa}}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@ifempty@list} +% \changes{v1.1}{2007/07/29}{This macro added} +% |\caption@ifempty@list|\marg{cmd}\marg{true}\marg{false} +% \begin{macrocode} +\newcommand*\caption@ifempty@list[1]{% + \ifx#1\@undefined + \expandafter\@firstoftwo + \else\ifx#1\relax + \expandafter\expandafter\expandafter\@firstoftwo + \else\ifx#1\@empty + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\@firstoftwo + \else + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\@secondoftwo + \fi\fi\fi} +% \end{macrocode} +% \end{macro} +% +% \pagebreak[3] +% \begin{macro}{\caption@setbool} +% \begin{macro}{\caption@set@bool} +% \changes{v1.1}{2007/04/05}{\cs{caption@set@bool}\marg{cmd}\marg{value} added} +% \begin{macro}{\caption@ifbool} +% \begin{macro}{\caption@undefbool} +% For setting and testing boolean options we offer these three helper macros: +% \begin{quote} +% |\caption@setbool|\marg{name}\marg{value}\\ +% | |(with |value = false/true/no/yes/off/on/0/1|)\\ +% |\caption@ifbool|\marg{name}\marg{if-clause}\marg{else-clause}\\ +% |\caption@undefbool|\marg{name} +% \end{quote} +% \begin{macrocode} +\newcommand*\caption@setbool[1]{% + \expandafter\caption@set@bool\csname caption@if#1\endcsname} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@set@bool[2]{% + \caption@ifinlist{#2}{1,true,yes,on}{% + \let#1\@firstoftwo + }{\caption@ifinlist{#2}{0,false,no,off}{% + \let#1\@secondoftwo + }{% + \caption@Error{Undefined boolean value `#2'}% + }}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@ifbool[1]{\@nameuse{caption@if#1}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@undefbool[1]{\@nameundef{caption@if#1}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\caption@teststar} +% \changes{v1.1}{2007/05/08}{This macro and its usage added} +% \changes{v1.1e}{2007/10/28}{\cs{caption@teststar@} added} +% |\caption@teststar|\marg{cmd}\marg{star arg}\marg{non-star arg}\\ +% |\caption@teststar@|\marg{cmd}\marg{star arg}\marg{non-star arg} +% \begin{macrocode} +\newcommand*\caption@teststar[3]{\@ifstar{#1{#2}}{#1{#3}}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@teststar@[3]{% + \@ifstar{#1{#2}}{\caption@ifatletter{#1{#2}}{#1{#3}}}} +\AtBeginDocument{\let\caption@teststar@\caption@teststar} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@ifatletter{% + \ifnum\the\catcode`\@=11 + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\AtBeginDocument{\let\caption@ifatletter\@secondoftwo} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@withoptargs} +% \changes{v1.1}{2007/08/12}{This macro added} +% \changes{v1.5}{2012/04/09}{This macro revised} +% |\caption@withoptargs|\marg{cmd} +% \begin{macrocode} +\newcommand*\caption@withoptargs[1]{% + \@ifstar + {\def\caption@tempa{*}\caption@@withoptargs{#1}}% + {\def\caption@tempa{}\caption@@withoptargs{#1}}} +% \end{macrocode} +% \begin{macrocode} +\def\caption@@withoptargs#1{% + \@ifnextchar[%] + {\caption@@@withoptargs{#1}}% + {\caption@@@@withoptargs{#1}}} +% \end{macrocode} +% \begin{macrocode} +\def\caption@@@withoptargs#1[#2]{% + \l@addto@macro\caption@tempa{[{#2}]}% + \caption@@withoptargs{#1}} +% \end{macrocode} +% \begin{macrocode} +\def\caption@@@@withoptargs#1{% + \def\caption@tempb{#1}% + \expandafter\caption@tempb\expandafter{\caption@tempa}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@gobble} +% \changes{v1.4}{2011/08/19}{This macro added} +% |\caption@gobble*|\oarg{arg}\oarg{\ldots}\marg{arg}\par +% Same as |\@gobble|, but gobbles optional arguments as well. +% \begin{macrocode} +\DeclareRobustCommand*\caption@gobble{% + \caption@withoptargs\@gobbletwo} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@CheckCommand} +% \changes{v1.1}{2007/04/10}{This macro added} +% \begin{macro}{\caption@IfCheckCommand} +% \changes{v1.1}{2007/04/10}{This macro added} +% \changes{v1.2b}{2008/08/02}{Revised so \cs{next} is no longer used} +% \changes{v1.5}{2012/08/25}{Bugfix: Uses \cs{caption@tempa} instead of \cs{@tempa}} +% |\caption@CheckCommand|\marg{macro}\marg{definition of macro}\par +% checks if a command already exists, with the same definition. +% It can be used more-than-once to check if one of multiple definitions will +% finally match. +% (It redefines itself later on to |\@gobbletwo| if the two commands match +% fine, making further checks harmless.)\par +% |\caption@IfCheckCommand|\marg{true}\marg{false}\par +% will execute the \meta{true} code if one match was finally given, +% the \meta{false} code otherwise. +% (It simply checks if |\caption@CheckCommand| is |\@gobbletwo| and +% restores the starting definition of |\caption@CheckCommand|.) +% \begin{macrocode} +\newcommand\caption@DoCheckCommand[2]{% + \begingroup + \let\caption@tempa#1% + #2% + \ifx\caption@tempa#1% + \endgroup + \let\caption@CheckCommand\@gobbletwo + \else + \endgroup + \fi} +\@onlypreamble\caption@DoCheckCommand +% \end{macrocode} +% \begin{macrocode} +\let\caption@CheckCommand\caption@DoCheckCommand +\@onlypreamble\caption@CheckCommand +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@IfCheckCommand{% + \ifx\caption@CheckCommand\@gobbletwo + \let\caption@CheckCommand\caption@DoCheckCommand + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\@onlypreamble\caption@IfCheckCommand +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\caption@AtBeginDocument} +% \changes{v1.1}{2007/04/13}{This macro and its usage added} +% \changes{v1.2e}{2010/01/09}{Adapted to the combine document class} +% |\caption@AtBeginDocument*|\marg{code}\\ +% Same as |\AtBeginDocument| but the execution of code +% will be surrounded by two |\PackageInfo|s. +% The starred variant causes the code to be executed after all code +% specified using the non-starred variant. +% \begin{macrocode} +\let\caption@begindocumenthook\@empty +\let\caption@@begindocumenthook\@empty +% \end{macrocode} +% \begin{macrocode} +\def\caption@AtBeginDocument{% + \caption@teststar\g@addto@macro + \caption@@begindocumenthook\caption@begindocumenthook} +%\@onlypreamble\caption@AtBeginDocument +% \end{macrocode} +% \begin{macrocode} +\AtBeginDocument{% + \caption@InfoNoLine{Begin \noexpand\AtBeginDocument code}% +% \end{macrocode} +% \begin{macrocode} + \def\caption@AtBeginDocument{% + \@ifstar{\g@addto@macro\caption@@begindocumenthook}\@firstofone}% + \caption@begindocumenthook + \let\caption@begindocumenthook\relax +% \end{macrocode} +% \begin{macrocode} + \def\caption@AtBeginDocument{% + \@ifstar\@firstofone\@firstofone}% + \caption@@begindocumenthook + \let\caption@@begindocumenthook\relax +% \end{macrocode} +% \begin{macrocode} + \caption@InfoNoLine{End \noexpand\AtBeginDocument code}} +% \end{macrocode} +% \end{macro} +% +% \subsection{Information, Warnings, and Errors} +% +% \begin{macro}{\caption@Info} +% \changes{v1.3}{2010/10/25}{Moved from package to kernel} +% |\caption@Info|\marg{message} +% \begin{macrocode} +\newcommand*\caption@Info[1]{% + \PackageInfo{caption}{#1}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\caption@InfoNoLine} +% \changes{v1.3}{2010/10/25}{Moved from package to kernel} +% |\caption@InfoNoLine|\marg{message}\\ +% \Note{The \cs{@gobble} at the end of the 2nd argument of +% \cs{PackageInfo} suppresses the line number info. +% See TLC2\cite{TLC2}, A.4.7, p885 for details.} +% \begin{macrocode} +\newcommand*\caption@InfoNoLine[1]{% + \caption@Info{#1\@gobble}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@Warning} +% \changes{v1.1c}{2007/10/14}{This macro added, will now be used for warnings} +% |\caption@Warning|\marg{message} +% \begin{macrocode} +\newcommand*\caption@Warning[1]{% + \caption@WarningNoLine{#1\on@line}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\caption@WarningNoLine} +% \changes{v1.1c}{2007/10/14}{This macro added, will now be used for warnings} +% |\caption@WarningNoLine|\marg{message} +% \begin{macrocode} +\newcommand*\caption@WarningNoLine[1]{% + \PackageWarning{caption}{#1.^^J\caption@wh\@gobbletwo}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@wh{% + See the caption package documentation for explanation.} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@Error} +% \changes{v1.0j}{2007/01/20}{This macro added, will now be used for errors} +% \changes{v1.0o}{2007/04/11}{Renamed from \cs{caption@error} to \cs{caption@Error}} +% \changes{v1.1b}{2007/09/18}{Usage of \cs{caption@Package} removed} +% |\caption@Error|\marg{message} +% \begin{macrocode} +\newcommand*\caption@Error[1]{% + \PackageError{caption}{#1}\caption@eh} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@eh{% + If you do not understand this error, please take a closer look\MessageBreak + at the documentation of the `caption' package, especially the\MessageBreak + section about errors.\MessageBreak\@ehc} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@KV@err} +% \changes{v1.1b}{2007/09/18}{This macro added} +% \begin{macrocode} +\let\caption@KV@err\caption@Error +% \end{macrocode} +% \end{macro} +% +% \subsection{Using the keyval package} +% +% We need the \package{keyval} package for option handling, so we load it here. +% \begin{macrocode} +\RequirePackage{keyval}[1997/11/10] +% \end{macrocode} +% +% \begin{macro}{\undefine@key} +% |\undefine@key|\marg{family}\marg{key}\par +% This helper macro is the opposite of |\define@key|, it removes a keyval +% definition. +% \begin{macrocode} +\providecommand*\undefine@key[2]{% + \@nameundef{KV@#1@#2}\@nameundef{KV@#1@#2@default}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@onlypreamble@key} +% \changes{v1.1}{2007/07/22}{This macro added} +% \changes{v1.1e}{2007/11/01}{\cs{KV@err} will be used now instead of \cs{@notprerr}} +% |\onlypreamble@key|\marg{family}\marg{key}\par +% Analogous to |\@onlypreamble| from \LaTeXe. +% \begin{macrocode} +\providecommand*\@preamble@keys{} +\providecommand*\@onlypreamble@key[2]{\@cons\@preamble@keys{{#1}{#2}}} +\@onlypreamble\@onlypreamble@key +\@onlypreamble\@preamble@keys +% \end{macrocode} +% \begin{macrocode} +\providecommand*\@notprerr@key[1]{\KV@err{Can be used only in preamble}} +% \end{macrocode} +% \begin{macrocode} +\caption@AtBeginDocument*{% + \def\@elt#1#2{\expandafter\let\csname KV@#1@#2\endcsname\@notprerr@key}% + \@preamble@keys + \let\@elt\relax} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DeclareCaptionOption} +% |\DeclareCaptionOption|\marg{option}\oarg{default value}\marg{code}\\ +% |\DeclareCaptionOption*|\marg{option}\oarg{default value}\marg{code}\par +% We declare our options using these commands (instead of using +% |\DeclareOption| offered by \LaTeXe), so the keyval package is used. +% The starred form makes the option available during the lifetime of the +% current package only, so they can be used with |\usepackage|, but +% \emph{not} with |\captionsetup| later on. +% \begin{macrocode} +\newcommand*\DeclareCaptionOption{% + \caption@teststar\caption@declareoption\AtEndOfPackage\@gobble} +\@onlypreamble\DeclareCaptionOption +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@declareoption[2]{% + #1{\undefine@key{caption}{#2}}\caption@declare@option{#2}} +\@onlypreamble\caption@declareoption +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@declare@option{% + \define@key{caption}} +%% no \@onlypreamble\caption@declare@option, will be used by \captionsetup +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DeclareCaptionOptionNoValue} +% \changes{v1.1c}{2007/10/06}{This macro added} +% |\DeclareCaptionOptionNoValue|\marg{option}\marg{code}\\ +% |\DeclareCaptionOptionNoValue*|\marg{option}\marg{code}\par +% Same as \cs{DeclareCaptionOption} but issues an error if a value is given. +% \begin{macrocode} +\newcommand*\DeclareCaptionOptionNoValue{% + \caption@teststar\caption@declareoption@novalue\AtEndOfPackage\@gobble} +\@onlypreamble\DeclareCaptionOptionNoValue +% \end{macrocode} +% \begin{macrocode} +\newcommand\caption@declareoption@novalue[3]{% + \caption@declareoption{#1}{#2}[\KV@err]{% + \caption@option@novalue{#2}{##1}{#3}}} +\@onlypreamble\caption@declareoption@novalue +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@option@novalue[2]{% + \ifx\KV@err#2% + \expandafter\@firstofone + \else + \KV@err{No value allowed for #1}% + \expandafter\@gobble + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ifcaptionsetup@star} +% \changes{v1.2a}{2008/01/12}{This macro added} +% If the starred form of |\captionsetup| is used, this will be set to |true|. +% (It will be reset to |false| at the end of |\caption@setkeys|.) +% \begin{macrocode} +\newif\ifcaptionsetup@star +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\captionsetup} +% \changes{v1.0a}{2004/01/17}{Bugfix: Missing \% added} +% \changes{v1.1}{2007/07/22}{Starred-variant added} +% \changes{v1.1e}{2007/07/27}{Inside packages the starred variant will be used automatically} +% \changes{v1.2}{2007/11/16}{Bugfix 07-11-09: `space hack' added} +% \changes{v1.2a}{2008/01/12}{\cs{ifcaptionsetup@star} will be set now} +% \changes{v1.5}{2012/04/09}{Support of multiple optional arguments added} +% |\captionsetup|\oarg{type}\ldots\marg{keyval-list of options}\\ +% |\captionsetup*|\oarg{type}\ldots\marg{keyval-list of options}\par +% If the optional argument `type' is specified, we simply save or append +% the option list, otherwise we `execute' it with |\setkeys|. +% (The non-starred variant issues a warning if \meta{keyval-list of options} +% is not used later on.) +% \Note{The starred variant will be used inside packages automatically.} +% \begin{macrocode} +\newcommand*\captionsetup{% + \caption@teststar@\@captionsetup\@gobble\@firstofone} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\@captionsetup[1]{% + \captionsetup@startrue#1\captionsetup@starfalse + \@ifnextchar[\caption@setup@options\caption@setup} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@setup{\caption@setkeys{caption}} +% \end{macrocode} +% \begin{macrocode} +\def\caption@setup@options[#1]{% + \@ifnextchar[% + {\caption@stepthecounter + \caption@withoptargs{\@expandtwoargs + \caption@setup@options@i{#1}{@\caption@thecounter}}}% + {\caption@setup@options@{#1}}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@setup@options@i[4]{% + \caption@setup@options@{#1}{#2}% + \caption@declare@option{#2}[]{\captionsetup#3{#4}}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@setup@options@[2]{% + \@bsphack + \ifcaptionsetup@star\captionsetup@starfalse\else\caption@addtooptlist{#1}\fi + \expandafter\caption@l@addto@list\csname caption@opt@#1\endcsname{#2}% + \@esphack} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\clearcaptionsetup} +% \changes{v1.1}{2007/07/29}{Optional argument added} +% \changes{v1.1}{2007/08/17}{Starred variant added} +% \changes{v1.1e}{2007/07/27}{Inside packages the starred variant will be used automatically} +% \changes{v1.2}{2007/11/16}{Bugfix 07-11-09: `space hack' added} +% |\clearcaptionsetup|\oarg{option}\marg{type}\\ +% |\clearcaptionsetup*|\oarg{option}\marg{type}\par +% This removes the saved option list associated with \meta{type}. +% If \meta{option} is given, only this option will be removed from the list. +% (The starred variant does not issue warnings.) +% \Note{The starred variant will be used inside packages automatically.} +% \begin{macrocode} +\newcommand*\clearcaptionsetup{% + \caption@teststar@\@clearcaptionsetup\@gobble\@firstofone} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\@clearcaptionsetup[1]{% + \let\caption@tempa#1% + \@testopt\@@clearcaptionsetup{}} +% \end{macrocode} +% \begin{macrocode} +\def\@@clearcaptionsetup[#1]#2{% + \@bsphack + \expandafter\caption@ifempty@list\csname caption@opt@#2\endcsname + {\caption@tempa{\caption@Warning{Option list `#2' undefined}}}% + {\ifx,#1,% + \caption@clearsetup{#2}% + \else + \caption@@removefromsetup{#1}{#2}% + \fi}% + \@esphack} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@clearsetup[1]{% + \caption@removefromoptlist{#1}% + \@nameundef{caption@opt@#1}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@removefromsetup{% + \let\caption@tempa\@gobble + \caption@@removefromsetup} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@@removefromsetup[2]{% + \expandafter\let\expandafter\@tempa\csname caption@opt@#2\endcsname + \expandafter\let\csname caption@opt@#2\endcsname\@undefined + \def\@tempb##1=##2\@nil{##1}% + \edef\@tempc{#1}% + \@for\@tempa:=\@tempa\do{% + \edef\@tempd{\expandafter\@tempb\@tempa=\@nil}% + \ifx\@tempd\@tempc + \let\caption@tempa\@gobble + \else + \expandafter\expandafter\expandafter\caption@l@addto@list + \expandafter\csname caption@opt@#2\expandafter\endcsname + \expandafter{\@tempa}% + \fi}% + \expandafter\caption@ifempty@list\csname caption@opt@#2\endcsname + {\caption@removefromoptlist{#2}}{}% + \caption@tempa{\caption@Warning{% + Option `#1' was not in list `#2'}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\showcaptionsetup} +% \changes{v1.0d}{2005/05/03}{Optimized for memory usage} +% \changes{v1.1}{2007/07/29}{Bugfix: Does not expand option list anymore} +% \changes{v1.2}{2007/11/16}{Bugfix 07-11-09: `space hack' added} +% |\showcaptionsetup|\oarg{package}\marg{type}\par +% This comes for debugging issues: It shows the saved option list which +% is associated with \meta{type}. +% \begin{macrocode} +\newcommand*\showcaptionsetup[2][\@firstofone]{% + \@bsphack + \GenericWarning{}{% + #1 Caption Info: Option list on `#2'\MessageBreak + #1 Caption Data: \@ifundefined{caption@opt@#2}{% + -none-% + }{% + {\expandafter\expandafter\expandafter\strip@prefix + \expandafter\meaning\csname caption@opt@#2\endcsname}% + }}% + \@esphack} +% \end{macrocode} +% \end{macro} +% +% \changes{v1.1}{2007/07/02}{Option \opt{options=} added} +% \changes{v1.3}{2010/09/05}{Option \opt{options*=} added} +% \changes{v1.4b}{2012/01/12}{Option \opt{options*=} removed} +% \begin{macrocode} +\DeclareCaptionOption{options}{\caption@setoptions{#1}} +% \end{macrocode} +% +% \begin{macro}{\caption@setoptions} +% \changes{v1.0g}{2006/01/03}{Optional argument added} +% \changes{v1.0h}{2006/01/26}{Revised} +% \changes{v1.0j}{2007/01/30}{Optional argument removed} +% \changes{v1.1}{2007/04/11}{Usage of \cs{clearcaptionsetup} added} +% \changes{v1.1}{2007/05/09}{Renamed from \cs{caption@settype} to \cs{caption@setoptions}} +% \changes{v1.2}{2007/12/03}{Definition of \cs{caption@iftypewarning} removed} +% \changes{v1.3}{2010/09/05}{Starred variant added} +% \changes{v1.4b}{2012/01/12}{Starred variant removed} +% |\caption@setoptions|\marg{type or environment or\ldots}\par +% Caption options which have been saved with |\captionsetup|\oarg{type} can +% be executed by using this command. +% It simply executes the saved option list (and clears it afterwards), +% if there is any. +% \iffalse +% (The starred variant do not clear the option list.) +% \fi +% \begin{macrocode} +\newcommand*\caption@setoptions[1]{% + \caption@Debug{options=#1}% + \expandafter\let\expandafter\caption@opt\csname caption@opt@#1\endcsname + \ifx\caption@opt\relax \else + \caption@xsetup\caption@opt + \caption@clearsetup{#1}% + \fi} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@xsetup[1]{\expandafter\caption@setup\expandafter{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@addtooptlist} +% \changes{v1.1}{2007/07/22}{This macro added} +% \begin{macro}{\caption@removefromoptlist} +% \changes{v1.1}{2007/07/22}{This macro added} +% \changes{v1.2c}{2008/08/24}{Fatal typo corrected} +% |\caption@addtooptlist|\marg{type}\\ +% |\caption@removefromoptlist|\marg{type}\par +% Adds or removes an \meta{type} to the list of unused caption options. +% Note that the catcodes of \meta{type} are sanitized here so removing +% \meta{type} from the list do not fail when the \package{float} package +% is used (since |\float@getstyle| gives a result which tokens have catcode +% 12 $=$ ``other''). +% \begin{macrocode} +\newcommand*\caption@addtooptlist[1]{% + \@ifundefined{caption@opt@#1@lineno}{% + \caption@dooptlist\caption@g@addto@list{#1}% + \expandafter\xdef\csname caption@opt@#1@lineno\endcsname{\the\inputlineno}% + }{}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@removefromoptlist[1]{% + \caption@dooptlist\caption@g@removefrom@list{#1}% + \global\expandafter\let\csname caption@opt@#1@lineno\endcsname\@undefined} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@dooptlist[2]{% + \begingroup + \edef\@tempa{#2}\@onelevel@sanitize\@tempa + \expandafter#1\expandafter\caption@optlist\expandafter{\@tempa}% + \endgroup} +% \end{macrocode} +% \begin{macrocode} +\AtEndDocument{% + \caption@for@list\caption@optlist{% + \caption@WarningNoLine{% + Unused \string\captionsetup[#1] + on input line \csname caption@opt@#1@lineno\endcsname}}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\caption@setkeys} +% \changes{v1.0g}{2006/01/03}{This macro added} +% \changes{v1.0j}{2007/01/20}{Bugfix: Usage of \cs{caption@keydepth} added} +% \changes{v1.0j}{2007/01/30}{Optional argument added} +% \changes{v1.0n}{2007/04/08}{\cs{caption@keydepth} is now a command instead of a counter} +% \changes{v1.1b}{2007/09/18}{Usage of \cs{caption@Package} removed, we use \cs{caption@KV@err} instead} +% \changes{v1.2}{2007/11/16}{Bugfix 07-11-09: `space hack' added} +% \changes{v1.2a}{2008/01/12}{\cs{captionsetup@starfalse} added} +% \changes{v1.2d}{2009/09/30}{Bugfix 09-09-29: Missing error handler will be defined automatically} +% \changes{v1.4}{2011/08/24}{Redefinition of \cs{XKV@err} added} +% |\caption@setkeys|\oarg{package}\marg{family}\marg{key-values}\par +% This one simply calls |\setkeys|\marg{family}\marg{key-values} +% but lets the error messages not refer to the \package{keyval} package, +% but to the \meta{package} package instead. +% \begin{macrocode} +\newcommand*\caption@setkeys{\@dblarg\caption@@setkeys} +% \end{macrocode} +% \begin{macrocode} +\long\def\caption@@setkeys[#1]#2#3{% + \@bsphack +% \end{macrocode} +% \begin{macrocode} + \expandafter\let\csname ORI@KV@err\caption@keydepth\endcsname\KV@err + \expandafter\let\csname ORI@KV@errx\caption@keydepth\endcsname\KV@errx + \expandafter\let\csname ORI@XKV@err\caption@keydepth\endcsname\XKV@err + \edef\caption@keydepth{\caption@keydepth i}% +% \end{macrocode} +% \begin{macrocode} + \expandafter\let\expandafter\KV@err\csname #1@KV@err\endcsname + \ifx\KV@err\relax + \def\KV@err##1{\PackageError{#1}{##1}{% + See the #1 package documentation for explanation.}}% + \fi + \def\KV@errx{\KV@err}% + \def\XKV@err{\let\@tempa\XKV@tkey\KV@err}% +% \end{macrocode} +% \begin{macrocode} + \caption@Debug{\protect\setkeys{#2}{#3}}% + \setkeys{#2}{#3}% +% \end{macrocode} +% \begin{macrocode} + \edef\caption@keydepth{\expandafter\@gobble\caption@keydepth}% + \expandafter\let\expandafter\KV@err\csname ORI@KV@err\caption@keydepth\endcsname + \expandafter\let\expandafter\KV@errx\csname ORI@KV@errx\caption@keydepth\endcsname + \expandafter\let\expandafter\XKV@err\csname ORI@XKV@err\caption@keydepth\endcsname +% \end{macrocode} +% \begin{macrocode} + \ifx\caption@keydepth\@empty \captionsetup@starfalse \fi +% \end{macrocode} +% \begin{macrocode} + \@esphack} +% \end{macrocode} +% \begin{macrocode} +\let\caption@keydepth\@empty +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@ExecuteOptions} +% \changes{v1.1}{2007/07/15}{This macro added} +% \changes{v1.3}{2010/09/04}{Depends on package now} +% |\caption@ExecuteOptions|\marg{package}\marg{key-values}\par +% We execute our options using the keyval interface, so we use this one +% instead of |\ExecuteOptions| offered by \LaTeXe. +% \begin{macrocode} +\newcommand*\caption@ExecuteOptions[2]{% + \expandafter\@expandtwoargs\csname caption@setkeys@#1\endcsname{#1}{#2}}% +\@onlypreamble\caption@ExecuteOptions +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@ProcessOptions} +% \changes{v1.0a}{2004/01/23}{Bugfix, see +% \purett{news:400D360C.9678329F@gmx.net} for details} +% \changes{v1.0g}{2006/01/03}{Improvement, uses \cs{caption@setkeys} +% instead of \cs{setkeys}} +% \changes{v1.0h}{2006/02/23}{Bugfix, now processes only those global +% options which have a default value} +% \changes{v1.0j}{2007/01/30}{\cs{ProcessOptionsWithKV} renamed to +% \cs{caption@ProcessOptions} and moved from the package to the kernel} +% \changes{v1.1}{2007/04/17}{Star variant added} +% |\caption@ProcessOptions*|\marg{package}\par +% We process our options using the keyval package, so we use this one +% instead of |\ProcessOptions| offered by \LaTeXe. +% The starred variant do not process the global options. +% (This code was taken from the \package{hyperref} package\cite{hyperref} +% \version{6.74} and improved.) +% \begin{macrocode} +\newcommand*\caption@ProcessOptions{% + \caption@teststar\caption@@ProcessOptions\@gobble\@firstofone} +\@onlypreamble\caption@ProcessOptions +% \end{macrocode} +% \begin{macrocode} +\newcommand\caption@@ProcessOptions[2]{% + \let\@tempc\relax + \let\caption@tempa\@empty + #1{% \@firstofone -or- \@gobble + \@for\CurrentOption:=\@classoptionslist\do{% + \@ifundefined{KV@#2@\CurrentOption}{}{% + \@ifundefined{KV@#2@\CurrentOption @default}{% + \PackageInfo{#2}{Global option `\CurrentOption' ignored}% + }{% + \PackageInfo{#2}{Global option `\CurrentOption' processed}% + \edef\caption@tempa{\caption@tempa\CurrentOption,}% + \@expandtwoargs\@removeelement\CurrentOption + \@unusedoptionlist\@unusedoptionlist + }% + }% + }% + \let\CurrentOption\@empty + }% + \caption@ExecuteOptions{#2}{\caption@tempa\@ptionlist{\@currname.\@currext}}% + \AtEndOfPackage{\let\@unprocessedoptions\relax}} +\@onlypreamble\caption@@ProcessOptions +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@SetupOptions} +% \changes{v1.3}{2010/09/04}{This macro added} +% |\caption@SetupOptions|\marg{package}\marg{code}\par +% After calling this macro |\caption@ExecuteOptions| and +% |\usepackage|\oarg{options}\marg{package} +% will both be mapped to \meta{code} with \meta{package} and \meta{options} +% as arguments |#1| and |#2|. (This helps avoiding ``Option clash'' errors.) +% \begin{macrocode} +\newcommand*\caption@packagelist{} +\@onlypreamble\caption@packagelist +% \end{macrocode} +% \begin{macrocode} +\newcommand\caption@SetupOptions[2]{% + \@namedef{caption@setkeys@#1}##1##2{#2}% + \expandafter\@onlypreamble\csname caption@setkeys@#1\endcsname + \@cons\caption@packagelist{{#1}}} +\@onlypreamble\caption@SetupOptions +% \end{macrocode} +% \begin{macrocode} +\let\caption@onefilewithoptions\@onefilewithoptions +\def\@onefilewithoptions#1[#2]{% + \begingroup + \def\@tempa{% + \endgroup + \caption@onefilewithoptions{#1}[{#2}]}% + \def\@tempb{#1}% + \def\@elt##1{% + \def\@tempc{##1}% + \ifx\@tempb\@tempc + \def\@tempa{% + \endgroup + \caption@ExecuteOptions{#1}{#2}% + \caption@onefilewithoptions{#1}[]}% + \fi} + \caption@packagelist + \@tempa} +\@onlypreamble\caption@onefilewithoptions +% \end{macrocode} +% \end{macro} +% +% \subsection{Margin resp. width} +% \changes{v1.0n}{2007/04/01}{\cs{captionmarginx} renamed to \cs{captionmargin@}} +% \changes{v1.0n}{2007/04/03}{Option `twoside' added} +% \changes{v1.1}{2007/08/11}{Options `margin*', `minmargin', and `maxmargin' added} +% \changes{v1.2}{2007/11/10}{Option `oneside' added} +% +% \begin{macro}{\captionmargin} +% \begin{macro}{\captionwidth} +% |\captionmargin| and |\captionwidth| contain the extra margin +% resp. the total width used for captions. Please never set these values in +% a direct way, they are just accessible in user documents to provide +% compatibility to \version{1.x}.\par +% Note that we can only set one value at a time, `margin' \emph{or} `width'. +% If |\captionwidth| is not zero we will take this value afterwards, +% otherwise |\captionmargin| and |\captionmargin@|. +% \begin{macrocode} +\newdimen\captionmargin +\newdimen\captionmargin@ +\newdimen\captionwidth +\newdimen\caption@tempdima +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macrocode} +\DeclareCaptionOption{margin}{\setcaptionmargin{#1}} +\DeclareCaptionOption{margin*}{\setcaptionmargin*{#1}} +\DeclareCaptionOption{width}{\setcaptionwidth{#1}} +\DeclareCaptionOption{width*}{\setcaptionwidth*{#1}} +% \end{macrocode} +% \begin{macrocode} +\DeclareCaptionOption{calcmargin}{\caption@setcalcmargin{#1}} +\DeclareCaptionOption{calcmargin*}{\caption@setcalcmargin*{#1}} +\DeclareCaptionOption{calcwidth}{\caption@setcalcwidth{#1}} +\DeclareCaptionOption{calcwidth*}{\caption@setcalcwidth*{#1}} +% \end{macrocode} +% \begin{macrocode} +\DeclareCaptionOption{twoside}[1]{\caption@set@bool\caption@iftwoside{#1}} +\DeclareCaptionOptionNoValue{oneside}{\caption@set@bool\caption@iftwoside0} +% \end{macrocode} +% \begin{macrocode} +\DeclareCaptionOption{minmargin}{\caption@setoptcmd\caption@minmargin{#1}} +\DeclareCaptionOption{maxmargin}{\caption@setoptcmd\caption@maxmargin{#1}} +% \end{macrocode} +% +% \begin{macro}{\setcaptionmargin} +% \changes{v1.0f}{2005/10/24}{Renamed from \cs{caption@setmargin} to \cs{setcaptionmargin}} +% \changes{v1.0f}{2005/10/24}{\cs{setcaptionmargin} enhanced so it can take +% left+right margin} +% \changes{v1.1}{2007/08/11}{Starred variant added} +% \changes{v1.1}{2007/08/12}{\cs{setlength}\cs{captionmargin} \& +% \cs{setlength}\cs{captionmargin@} swapped so +% `\texttt{margin*=}\cs{captionmargin}' works in singleline options} +% \changes{v1.3}{2010/11/07}{Support for option \opt{calcmargin} added} +% |\setcaptionmargin|\marg{amount}\\ +% |\setcaptionmargin*|\marg{amount}\par +% Please never use this in user documents, it's just there to +% provide compatibility to the \package{caption2} package. +% \begin{macrocode} +\newcommand*\setcaptionmargin{% + \caption@resetcalcmargin + \caption@setmargin} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@setmargin{% + \caption@teststar\caption@@setmargin\@gobble\@firstofone} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@@setmargin[2]{% + #1{\captionwidth\z@}% + \caption@@@setmargin#2,#2,\@nil} +% \end{macrocode} +% \begin{macrocode} +\def\caption@@@setmargin#1,#2,#3\@nil{% + \setlength\captionmargin@{#2}% + \setlength\captionmargin{#1}% + \addtolength\captionmargin@{-\captionmargin}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\setcaptionwidth} +% \changes{v1.0f}{2005/10/24}{Renamed from \cs{caption@setwidth} to \cs{setcaptionwidth}} +% \changes{v1.3}{2010/11/07}{Starred variant added} +% \changes{v1.3}{2010/11/07}{Support for option \opt{calcwidth} added} +% |\setcaptionwidth|\marg{amount}\\ +% |\setcaptionwidth*|\marg{amount}\par +% Please never use this in user documents, it's just there to +% provide compatibility to the \package{caption2} package. +% \begin{macrocode} +\newcommand*\setcaptionwidth{% + \caption@resetcalcmargin + \caption@setwidth} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@setwidth{% + \caption@teststar\caption@@setwidth\@gobble\@firstofone} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@@setwidth[2]{% + #1{\captionmargin\z@\captionmargin@\z@}% + \setlength\captionwidth{#2}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@resetcalcmargin} +% \changes{v1.3}{2010/11/07}{This macro added} +% \begin{macrocode} +\newcommand*\caption@resetcalcmargin{% + \let\caption@calcmargin@hook\@empty} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@setcalcmargin} +% \changes{v1.3}{2010/11/07}{This macro added} +% \begin{macrocode} +\newcommand*\caption@setcalcmargin{% + \caption@teststar{\caption@@setcalcmargin\caption@setmargin}% + \@secondoftwo\@firstoftwo} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@@setcalcmargin[3]{% + #2{\caption@resetcalcmargin + \l@addto@macro\caption@calcmargin@hook{#1{#3}}}% + {\l@addto@macro\caption@calcmargin@hook{#1*{#3}}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@setcalcwidth} +% \changes{v1.3}{2010/11/07}{This macro added} +% \begin{macrocode} +\newcommand*\caption@setcalcwidth{% + \caption@teststar{\caption@@setcalcmargin\caption@setwidth}% + \@secondoftwo\@firstoftwo} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@counter} +% \changes{v1.0n}{2007/04/03}{This counter added} +% \changes{v1.1e}{2007/10/28}{Renamed to \cs{caption@thecounter}; \cs{caption@stepcounter} added} +% \changes{v1.5}{2012/04/09}{\cs{caption@stepcounter} renamed to \cs{caption@stepthecounter}} +% Internal counter. At the moment it will be used inside +% |\caption@ifoddpage| only. +% \begin{macrocode} +\newcommand*\caption@thecounter{0} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@stepthecounter{% + \@tempcnta\caption@thecounter + \advance\@tempcnta\@ne + \xdef\caption@thecounter{\the\@tempcnta}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@newlabel} +% \changes{v1.0n}{2007/04/03}{This macro added} +% This command is a modified version of |\newlabel| from \LaTeX2e. +% It will be written to the \texttt{.aux} file to +% pass label information from one run to another. +% (We use it inside |\caption@ifoddpage| and |\caption@ragged|.) +% \begin{macrocode} +\newcommand*\caption@newlabel{\@newl@bel{caption@r}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@thepage} +% \changes{v1.0n}{2007/04/03}{This macro added} +% This command is a modified version of |\thepage| from \LaTeX2e. +% It will be used inside |\caption@ifoddpage| only. +% \begin{macrocode} +\newcommand*\caption@thepage{\the\c@page} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@label} +% \changes{v1.1}{2007/09/01}{This macro added} +% \changes{v1.2}{2007/12/03}{Definition of \cs{caption@newlabel} in AUX file added} +% This command is a modified version of |\label| from \LaTeX2e. +% It will be used inside |\caption@ifoddpage| and |\FP@helpNote|. +% \begin{macrocode} +\newcommand*\caption@label[1]{% + \caption@@label + \protected@write\@auxout{\let\caption@thepage\relax}% + {\string\caption@newlabel{#1}{\caption@thepage}}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@@label{% + \global\let\caption@@label\relax + \protected@write\@auxout{}% + {\string\providecommand*\string\caption@newlabel[2]{}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@pageref} +% \changes{v1.1}{2007/09/01}{This macro added} +% \changes{v1.2d}{2009/10/09}{Uses \cs{@latex@warning} instead of \cs{caption@Warning} now} +% This command is a modified version of |\pageref| from \LaTeX2e. +% It will be used inside |\caption@ifoddpage| and |\FP@helpNote|. +% \begin{macrocode} +\newcommand*\caption@pageref[1]{% + \expandafter\ifx\csname caption@r@#1\endcsname\relax + \G@refundefinedtrue % => 'There are undefined references.' + \@latex@warning{Reference `#1' on page \thepage \space undefined}% + \else + \expandafter\let\expandafter\caption@thepage\csname caption@r@#1\endcsname + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@ifoddpage} +% \changes{v1.0n}{2007/04/03}{This macro added} +% \changes{v1.1e}{2007/10/28}{Incrementation of counter moved to \cs{caption@@make}} +% At the moment this macro uses an own label\ldots ref mechanism, +% but an alternative implementation method would be using the +% \package{refcount} package\cite{refcount} and |\ifodd\getpagerefnumber{|\ldots|}|. +% \Note{This macro re-defines itself so the \texttt{.aux} file will +% only be used once per group.} +% \begin{macrocode} +\newcommand*\caption@ifoddpage{% + \caption@iftwoside{% + \caption@label\caption@thecounter + \caption@pageref\caption@thecounter + \ifodd\caption@thepage + \let\caption@ifoddpage\@firstoftwo + \else + \let\caption@ifoddpage\@secondoftwo + \fi + }{\let\caption@ifoddpage\@firstoftwo}% +% \end{macrocode} +% \begin{macrocode} + \caption@ifoddpage} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@setoptcmd} +% \changes{v1.1}{2007/08/11}{This macro added} +% |\caption@setoptcmd|\marg{cmd}\marg{off -or- value} +% \begin{macrocode} +\newcommand*\caption@setoptcmd[2]{% + \caption@ifinlist{#2}{0,false,no,off}{\let#1\@undefined}{\def#1{#2}}} +% \end{macrocode} +% \end{macro} +% +% \subsection{Indentions} +% +% \begin{macro}{\caption@indent} +% \changes{v1.1}{2007/07/29}{Renamed from \cs{captionindent} to \cs{caption@indent}} +% \begin{macro}{\caption@parindent} +% \begin{macro}{\caption@hangindent} +% These are the indentions we support. +% \begin{macrocode} +\newdimen\caption@indent +\newdimen\caption@parindent +\newdimen\caption@hangindent +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \changes{v1.0b}{2004/05/16}{Defaults added for options \opt{parindent=} +% and \opt{hangindent=}} +% \changes{v1.0f}{2005/08/22}{Option \opt{parskip=}: \cs{AtBeginCaption} +% replaced by \cs{caption@@par}} +% \changes{v1.0f}{2005/08/22}{Undocumented defaults for \opt{parindent=}, +% \opt{hangindent=}, and \opt{parskip=} removed} +% \begin{macrocode} +\DeclareCaptionOption{indent}[\leftmargini]{% obsolete! + \setlength\caption@indent{#1}} +\DeclareCaptionOption{indention}[\leftmargini]{% + \setlength\caption@indent{#1}} +\DeclareCaptionOption{parindent}{% + \setlength\caption@parindent{#1}} +\DeclareCaptionOption{hangindent}{% + \setlength\caption@hangindent{#1}} +\DeclareCaptionOption{parskip}{% + \l@addto@macro\caption@@par{\setlength\parskip{#1}}} +% \end{macrocode} +% +% \changes{v1.0f}{2005/08/22}{Increased compatibility to KOMA-Script: +% A special version of options `parindent' and `parskip' added} +% \changes{v1.0g}{2006/01/03}{Bugfix 06-01-03: KOMA-Script variants of +% `parskip' and `parindent' options revised and moved into caption kernel} +% \changes{v1.0h}{2006/02/23}{KOMA-Script variants of `parskip' and +% `parindent' are obsolete now, removed} +% \changes{v1.0m}{2007/03/30}{KOMA-Script variants of `parskip' and +% `parindent' re-added, since they still collide with the current +% version of the subfig package (Sigh!)} +% +% There is an option clash between the \KOMAScript\ document classes +% and the \package{caption} kernel, both define the options |parindent| and +% |parskip| but with different meaning. +% Furthermore the ones defined by the \package{caption} kernel take a +% value as parameter but the \KOMAScript\ ones do not. +% So we need special versions of the options |parindent| and |parskip| here +% which determine if a value is given (and therefore should be treated as +% our option) or not (and therefore should be ignored by us).\footnote{%^^A +% This problem was completely solved due a change of \cs{caption@ProcessOptions} +% in \thispackage\ \version{1.0h}, but we still need this workaround since +% these options would otherwise still collide with the current version $1.3$ +% of the \package{subfig} package (Sigh!)} +% \begin{macrocode} +\providecommand*\caption@ifkomaclass{% + \caption@ifundefined\scr@caption\@gobble\@firstofone} +\@onlypreamble\caption@ifkomaclass +% \end{macrocode} +% \begin{macrocode} +\caption@ifkomaclass{% +% \end{macrocode} +% \begin{macrocode} + \let\caption@KV@parindent\KV@caption@parindent + \DeclareCaptionOption{parindent}[]{% + \ifx,#1,% + \caption@Debug{Option `parindent' ignored}% + \else + \caption@KV@parindent{#1}% + \fi}% +% \end{macrocode} +% \begin{macrocode} + \let\caption@KV@parskip\KV@caption@parskip + \DeclareCaptionOption{parskip}[]{% + \ifx,#1,% + \caption@Debug{Option `parskip' ignored}% + \else + \caption@KV@parskip{#1}% + \fi}% +% \end{macrocode} +% \begin{macrocode} +} +% \end{macrocode} +% +% \subsection{Styles} +% +% \begin{macro}{\DeclareCaptionStyle} +% \changes{v1.0a}{2004/01/17}{Pass through argument \#3 so extra spaces +% between arguments do make any harm} +% |\DeclareCaptionStyle|\marg{name}\oarg{single-line-list-of-KV}\marg{list-of-KV} +% \begin{macrocode} +\newcommand*\DeclareCaptionStyle[1]{% + \@testopt{\caption@declarestyle{#1}}{}} +\@onlypreamble\DeclareCaptionStyle +% \end{macrocode} +% \begin{macrocode} +\def\caption@declarestyle#1[#2]#3{% + \global\@namedef{caption@sls@#1}{#2}% + \global\@namedef{caption@sty@#1}{#3}} +\@onlypreamble\caption@declarestyle +% \end{macrocode} +% \end{macro} +% +% \changes{v1.2a}{2008/01/20}{Option \opt{style*=} added} +% \begin{macrocode} +\DeclareCaptionOption{style}{\caption@setstyle{#1}} +\DeclareCaptionOption{style*}{\caption@setstyle*{#1}} +% \end{macrocode} +% +% \begin{macro}{\caption@setstyle} +% \changes{v1.0e}{2005/06/01}{Starred variant added} +% \changes{v1.1}{2007/07/29}{Recursive style definitions should work now} +% \changes{v1.1d}{2007/10/23}{`SingleLine' renamed to `singleline' for consistency} +% \changes{v1.2}{2007/12/03}{Definition of \cs{caption@iftypewarning} removed} +% |\caption@setstyle|\marg{name}\\ +% |\caption@setstyle*|\marg{name}\par +% Selecting a caption style means saving the additional +% \meta{single-line-list-of-KV} (this will be done by |\caption@sls|), +% resetting the caption options to the base ones (this will be done using +% |\caption@resetstyle|) and executing the \meta{list-of-KV} options +% (this will be done using |\caption@setup|).\par +% The starred version will give no error message if the given style is not +% defined. +% \begin{macrocode} +\newcommand*\caption@setstyle{% + \caption@teststar\caption@@setstyle\@gobble\@firstofone} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@@setstyle[2]{% + \@ifundefined{caption@sty@#2}% + {#1{\caption@Error{Undefined style `#2'}}}% + {\expandafter\let\expandafter\caption@sty\csname caption@sty@#2\endcsname + \ifx\caption@setstyle@flag\@undefined + \let\caption@setstyle@flag\relax + \caption@resetstyle + \caption@xsetup\caption@sty + \let\caption@setstyle@flag\@undefined + \else + \caption@xsetup\caption@sty + \fi + \expandafter\let\expandafter\caption@sls\csname caption@sls@#2\endcsname + \expandafter\caption@l@addto@list\expandafter\caption@opt@singleline + \expandafter{\caption@sls}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@resetstyle} +% \changes{v1.1}{2007/02/04}{% +% This macro renamed from \cs{caption@setdefault} to \cs{caption@resetstyle}} +% \changes{v1.1d}{2007/10/23}{`SingleLine' renamed to `singleline' for consistency} +% \changes{v1.2}{2007/11/17}{Usage of \opt{size=} added} +% \changes{v1.2b}{2008/05/06}{Usage of \opt{rule} added} +% \changes{v1.5}{2012/03/15}{\opt{box=parbox} added} +% \changes{v1.6}{2013/05/01}{\opt{box=none} added, \opt{box=parbox} changed to \opt{parbox=parbox}} +% This resets (nearly) all caption options to the base ones. +% \emph{Note that this does not touch the skips and the positioning!} +% \begin{macrocode} +\newcommand*\caption@resetstyle{% + \caption@setup{% + box=none,boxcolor=white,parbox=parbox,% + format=plain,labelformat=default,labelsep=colon,textformat=simple,% + justification=justified,font=,size=,labelfont=,textfont=,% + margin=0pt,minmargin=0,maxmargin=0,% + indent=0pt,parindent=0pt,hangindent=0pt,% + slc,rule,strut}% + \caption@clearsetup{singleline}} +% \end{macrocode} +% \end{macro} +% +% \changes{v1.0c}{2005/02/12}{\opt{indent=0pt} added to caption style \opt{default}} +% \changes{v1.1}{2007/02/04}{Caption style `default' renamed to `base', and a new `default' added} +% \changes{v1.1}{2007/03/31}{\opt{format=plain} added to caption style \opt{default}} +% \changes{v1.1c}{2007/10/14}{\opt{format=plain} removed from caption style \opt{default}} +% \changes{v1.5}{2012/03/15}{\opt{box=default} added to caption style \opt{default}} +% Currently there are two pre-defined styles, called `base' \& `default'. +% The first one is a perfect match to the behavior of |\@makecaption| offered +% by the standard \LaTeX\ document classes (and was called `default' in +% \thispackage\ \version{1.0}), the second one matches the document +% class actually used. +% \begin{macrocode} +\DeclareCaptionStyle{base}[indent=0pt,justification=centering]{} +\DeclareCaptionStyle{default}[indent=0pt,justification=centering]{% + box=default,format=default,labelsep=default,textformat=default,% + justification=default,font=default,labelfont=default,textfont=default} +% \end{macrocode} +% +% \changes{v1.2b}{2008/05/06}{Option \opt{slc=} added} +% \begin{macrocode} +\DeclareCaptionOption{singlelinecheck}[1]{\caption@set@bool\caption@ifslc{#1}} +\DeclareCaptionOption{slc}[1]{\KV@caption@singlelinecheck{#1}} +% \end{macrocode} +% +% \subsection{Boxes} +% +% \begin{macro}{\DeclareCaptionBox} +% \changes{v1.5}{2012/03/15}{This macro added} +% |\DeclareCaptionBox|\marg{name}\marg{code with \#1 and \#2} +% \begin{macrocode} +\newcommand*\DeclareCaptionBox[2]{% + \global\long\@namedef{caption@box@#1}##1##2{#2}} +\@onlypreamble\DeclareCaptionBox +% \end{macrocode} +% \end{macro} +% +% \changes{v1.5}{2012/03/15}{Option \opt{box=} added} +% \changes{v1.6}{2013/05/01}{Option \opt{parbox=} added} +% \begin{macrocode} +\DeclareCaptionOption{box}{\caption@setbox{#1}} +\DeclareCaptionOption{parbox}{\caption@set@box\caption@parbox{#1}} +% \end{macrocode} +% +% \begin{macro}{\caption@setbox} +% |\caption@setbox|\marg{name}\par +% Selecting a caption box simply means saving the code (in |\caption@box|). +% \begin{macrocode} +\newcommand*\caption@setbox{% + \caption@set@box\caption@box} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@set@box[2]{% + \@ifundefined{caption@box@#2}% + {\caption@Error{Undefined box `#2'}}% + {\expandafter\let\expandafter#1\csname caption@box@#2\endcsname}} +% \end{macrocode} +% \end{macro} +% +% There are four pre-defined boxes, called `empty', `none', +% `parbox', and `colorbox'. +% \changes{v1.0i}{2006/05/13}{We define \cs{captionbox} instead of +% \cs{caption@start/endbox}} +% \changes{v1.0l}{2006/03/09}{Bugfix 07-03-09: \cs{captionbox} changed from +% \cs{parbox-t} to \cs{parbox-b}} +% \changes{v1.2}{2007/11/11}{\cs{captionbox} renamed to \cs{caption@parbox}} +% \changes{v1.5}{2012/03/15}{\cs{caption@parbox} adapted to \cs{DeclareCaptionBox}} +% \changes{v1.6}{2013/05/02}{Option \opt{boxsep=} added} +% \begin{macrocode} +\DeclareCaptionBox{empty}{} +\DeclareCaptionBox{none}{#2} +\DeclareCaptionBox{parbox}{\parbox[b]{#1}{#2}} +%\DeclareCaptionBox{colorbox}{% +% \colorbox{\caption@boxcolor}{\caption@box@parbox{\dimexpr #1-2\fboxsep}{#2}}} +\DeclareCaptionBox{colorbox}{\colorbox{\caption@boxcolor}{% + \setlength\caption@tempdima{#1}% + \addtolength\caption@tempdima{-2\fboxsep}% + \linewidth=\caption@tempdima\hsize=\caption@tempdima + #2}} +\DeclareCaptionOption{boxcolor}{\def\caption@boxcolor{#1}} +\DeclareCaptionOption{boxsep}{\setlength\fboxsep{#1}} +% \end{macrocode} +% +% `default' usually maps to `none`. +% \begin{macrocode} +\def\caption@box@default{\caption@box@none} +% \end{macrocode} +% +% \subsection{Formats} +% +% \begin{macro}{\DeclareCaptionFormat} +% \changes{v1.0a}{2004/01/17}{Pass through argument \#3 so extra spaces +% between arguments do make any harm} +% \changes{v1.0c}{2005/02/09}{Starred variant added} +% \changes{v1.1c}{2007/10/15}{Optional argument added} +% |\DeclareCaptionFormat|\marg{name}\marg{code with \#1, \#2, and \#3}\\ +% |\DeclareCaptionFormat*|\marg{name}\marg{code with \#1, \#2, and \#3}\par +% The starred form causes the code being typeset in vertical (instead of +% horizontal) mode, but does not support the |indention=| option. +% \begin{macrocode} +\newcommand*\DeclareCaptionFormat{% + \caption@teststar\caption@declareformat\@gobble\@firstofone} +\@onlypreamble\DeclareCaptionFormat +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@declareformat[2]{% + \@dblarg{\caption@@declareformat#1{#2}}} +\@onlypreamble\caption@declareformat +% \end{macrocode} +% \begin{macrocode} +\long\def\caption@@declareformat#1#2[#3]#4{% + \global\expandafter\let\csname caption@ifh@#2\endcsname#1% + \global\long\@namedef{caption@slfmt@#2}##1##2##3{#3}% + \global\long\@namedef{caption@fmt@#2}##1##2##3{#4}} +\@onlypreamble\caption@@declareformat +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\DeclareCaptionOption{format}{\caption@setformat{#1}} +% \end{macrocode} +% +% \begin{macro}{\caption@setformat} +% |\caption@setformat|\marg{name}\par +% Selecting a caption format simply means saving the code (in |\caption@fmt|) +% and if the code should be used in horizontal or vertical mode (|\caption@ifh|). +% \begin{macrocode} +\newcommand*\caption@setformat[1]{% + \@ifundefined{caption@fmt@#1}% + {\caption@Error{Undefined format `#1'}}% + {\expandafter\let\expandafter\caption@ifh\csname caption@ifh@#1\endcsname + \expandafter\let\expandafter\caption@slfmt\csname caption@slfmt@#1\endcsname + \expandafter\let\expandafter\caption@fmt\csname caption@fmt@#1\endcsname}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DeclareCaptionDefaultFormat} +% \changes{v1.2a}{2008/01/31}{This macro added} +% \begin{macrocode} +\newcommand*\DeclareCaptionDefaultFormat[1]{% + \expandafter\def\expandafter\caption@fmt@default\expandafter + {\csname caption@fmt@#1\endcsname}% + \expandafter\def\expandafter\caption@slfmt@default\expandafter + {\csname caption@slfmt@#1\endcsname}% + \expandafter\def\expandafter\caption@ifh@default\expandafter + {\csname caption@ifh@#1\endcsname}} +\@onlypreamble\DeclareCaptionDefaultFormat +% \end{macrocode} +% \end{macro} +% +% \changes{v1.0a}{2004/01/23}{% +% Caption format \opt{default} renamed to \opt{normal}} +% \changes{v1.0e}{2005/05/12}{% +% Caption format \opt{normal} renamed to \opt{@normal}} +% \changes{v1.0f}{2005/08/25}{% +% Caption format \opt{@normal} renamed to \opt{plain} and documented} +% \changes{v1.1c}{2007/10/14}{% +% Single-line variant of caption format \opt{hang} added} +% There are two pre-defined formats, called `plain' and `hang'. +% \begin{macrocode} +\DeclareCaptionFormat{plain}{#1#2#3\par} +% \end{macrocode} +% \begin{macrocode} +\DeclareCaptionFormat{hang}[#1#2#3\par]{% + \caption@ifin@list\caption@lsepcrlist\caption@lsepname + {\caption@Error{% + The option `labelsep=\caption@lsepname' does not work\MessageBreak + with `format=hang'}}% + {\@hangfrom{#1#2}% + \advance\caption@parindent\hangindent + \advance\caption@hangindent\hangindent + \caption@@par#3\par}} +% \end{macrocode} +% +% \changes{v1.0a}{2004/01/23}{Caption format \opt{default} linked to \opt{plain}} +% \changes{v1.0d}{2005/04/28}{Bugfix 05-04-28: Missing \cs{caption@ifh@default} added} +% `default' usually maps to `plain'. +% \begin{macrocode} +\DeclareCaptionDefaultFormat{plain} +% \end{macrocode} +% +% \subsection{Label formats} +% +% \begin{macro}{\DeclareCaptionLabelFormat} +% \changes{v1.0a}{2004/01/17}{% +% Pass through argument \#2 so extra spaces between arguments do make any harm} +% |\DeclareCaptionLabelFormat|\marg{name}\marg{code with \#1 and \#2} +% \begin{macrocode} +\newcommand*\DeclareCaptionLabelFormat[2]{% + \global\@namedef{caption@lfmt@#1}##1##2{#2}} +\@onlypreamble\DeclareCaptionLabelFormat +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\DeclareCaptionOption{labelformat}{\caption@setlabelformat{#1}} +% \end{macrocode} +% +% \begin{macro}{\caption@setlabelformat} +% |\caption@setlabelformat|\marg{name}\par +% Selecting a caption label format simply means saving the code (in |\caption@lfmt|). +% \begin{macrocode} +\newcommand*\caption@setlabelformat[1]{% + \@ifundefined{caption@lfmt@#1}% + {\caption@Error{Undefined label format `#1'}}% + {\expandafter\let\expandafter\caption@lfmt\csname caption@lfmt@#1\endcsname}} +% \end{macrocode} +% \end{macro} +% +% \changes{v1.2}{2007/12/16}{Caption label format \opt{brace} added} +% \changes{v1.7}{2015/09/16}{Caption label format \opt{autodot} added} +% \changes{v1.7}{2016/05/22}{Caption label format \opt{autodot} fixed} +% \changes{v1.8}{2016/05/22}{Caption label format \opt{unnumbered} added} +% There are six pre-defined label formats, called `empty', `simple', +% `parens', `brace', `autodot', and `unnumbered'. +% \begin{macrocode} +\DeclareCaptionLabelFormat{empty}{} +\DeclareCaptionLabelFormat{simple}{\bothIfFirst{#1}{\nobreakspace}#2} +\DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{\nobreakspace}(#2)} +\DeclareCaptionLabelFormat{brace}{\bothIfFirst{#1}{\nobreakspace}#2)} +\DeclareCaptionLabelFormat{autodot}{\bothIfFirst{#1}{\nobreakspace}#2\autodot} +\DeclareCaptionLabelFormat{unnumbered}{#1} +% \end{macrocode} +% +% `default' usually maps to `simple'. +% \begin{macrocode} +\def\caption@lfmt@default{\caption@lfmt@simple} +% \end{macrocode} +% +% \subsection{Label separators} +% +% \begin{macro}{\DeclareCaptionLabelSeparator} +% \changes{v1.0a}{2004/01/17}{Pass through argument \#2 so extra spaces +% between arguments do make any harm} +% \changes{v1.0f}{2005/08/25}{Starred variant added} +% \changes{v1.1}{2007/07/13}{Test for CR added} +% \changes{v1.3}{2011/08/06}{Test for CR revised} +% |\DeclareCaptionLabelSeparator|\marg{name}\marg{code}\\ +% |\DeclareCaptionLabelSeparator*|\marg{name}\marg{code}\par +% The starred form causes the label separator to be typeset \emph{without} using |\captionlabelfont|. +% \begin{macrocode} +\newcommand\DeclareCaptionLabelSeparator{% + \caption@teststar\caption@declarelabelseparator\@gobble\@firstofone} +\@onlypreamble\DeclareCaptionLabelSeparator +% \end{macrocode} +% \begin{macrocode} +\newcommand\caption@declarelabelseparator[3]{% + \global\@namedef{caption@iflf@#2}{#1}% + \global\long\@namedef{caption@lsep@#2}{#3}% + \caption@@declarelabelseparator{#2}#3\\\@nil} +\@onlypreamble\caption@declarelabelseparator +% \end{macrocode} +% \begin{macrocode} +\long\def\caption@@declarelabelseparator#1#2\\#3\@nil{% + \def\@tempa{#3}\ifx\@tempa\@empty \else + \caption@g@addto@list\caption@lsepcrlist{#1}% + \fi} +\@onlypreamble\caption@@declarelabelseparator +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\DeclareCaptionOption{labelsep}{\caption@setlabelseparator{#1}} +\DeclareCaptionOption{labelseparator}{\caption@setlabelseparator{#1}} +% \end{macrocode} +% +% \begin{macro}{\caption@setlabelseparator} +% |\caption@setlabelseparator|\marg{name}\par +% Selecting a caption label separator simply means saving the code (in |\caption@lsep|). +% \begin{macrocode} +\newcommand*\caption@setlabelseparator[1]{% + \@ifundefined{caption@lsep@#1}% + {\caption@Error{Undefined label separator `#1'}}% + {\edef\caption@lsepname{#1}% + \expandafter\let\expandafter\caption@iflf\csname caption@iflf@#1\endcsname + \expandafter\let\expandafter\caption@lsep\csname caption@lsep@#1\endcsname}} +% \end{macrocode} +% \end{macro} +% +% \changes{v1.0e}{2005/06/11}{Bugfix 05-03-23: Caption label separator +% \opt{newline} implementation changed from \cs{newline} to \cs{\textbackslash}} +% \changes{v1.0f}{2005/08/24}{Caption label separator \opt{endash} added} +% There are seven pre-defined label separators, called `none', `colon', `period', `space', +% `quad', `newline', and `endash'. +% \begin{macrocode} +\DeclareCaptionLabelSeparator{none}{} +\DeclareCaptionLabelSeparator{colon}{: } +\DeclareCaptionLabelSeparator{period}{. } +\DeclareCaptionLabelSeparator{space}{ } +\DeclareCaptionLabelSeparator*{quad}{\quad} +\DeclareCaptionLabelSeparator*{newline}{\\} +\DeclareCaptionLabelSeparator*{endash}{\space\textendash\space} +% \end{macrocode} +% +% \begin{macro}{\caption@setdefaultlabelsep} +% \changes{v1.2d}{2009/03/29}{This macro added} +% \begin{macrocode} +\newcommand*\caption@setdefaultlabelsep[1]{% + \ifx\caption@lsep\caption@lsep@default + \caption@set@default@labelsep{#1}% + \caption@setlabelseparator{default}% + \else + \caption@set@default@labelsep{#1}% + \fi} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@set@default@labelsep[1]{% + \def\caption@lsep@default{\@nameuse{caption@lsep@#1}}% + \def\caption@iflf@default{\@nameuse{caption@iflf@#1}}} +% \end{macrocode} +% \end{macro} +% +% `default' usually maps to `colon'. +% \begin{macrocode} +\caption@set@default@labelsep{colon} +% \end{macrocode} +% +% \subsection{Text formats} +% +% \begin{macro}{\DeclareCaptionTextFormat} +% \changes{v1.0j}{2007/02/18}{This macro added} +% |\DeclareCaptionTextFormat|\marg{name}\marg{code with \#1} +% \begin{macrocode} +\newcommand*\DeclareCaptionTextFormat[2]{% + \global\long\@namedef{caption@tfmt@#1}##1{#2}} +\@onlypreamble\DeclareCaptionTextFormat +% \end{macrocode} +% \end{macro} +% +% \changes{v1.0c}{2005/02/12}{Option \opt{strut=} added} +% \begin{macrocode} +\DeclareCaptionOption{textformat}{\caption@settextformat{#1}} +\DeclareCaptionOption{strut}[1]{\caption@set@bool\caption@ifstrut{#1}} +% \end{macrocode} +% +% \begin{macro}{\caption@settextformat} +% \changes{v1.0j}{2007/02/18}{This macro added} +% |\caption@settextformat|\marg{name}\par +% Selecting a caption text format simply means saving the code (in |\caption@tfmt|). +% \begin{macrocode} +\newcommand*\caption@settextformat[1]{% + \@ifundefined{caption@tfmt@#1}% + {\caption@Error{Undefined text format `#1'}}% + {\expandafter\let\expandafter\caption@tfmt\csname caption@tfmt@#1\endcsname}} +% \end{macrocode} +% \end{macro} +% +% There are three pre-defined text formats, called `empty', `simple' and `period'. +% \changes{v1.4}{2011/10/05}{Pre-defined text format `empty' added} +% \changes{v1.7}{2015/09/16}{The text format `empty' now takes care of the \cs{label}} +% \begin{macrocode} +\DeclareCaptionTextFormat{empty}{% + \caption@get@label#1\caption@makeanchor{}\@nil + \caption@thelabel + \global\let\caption@thelabel\relax} +\long\def\caption@get@label#1\caption@makeanchor#2#3\@nil{% + \def\caption@tempa{#2}% + \ifx\caption@tempa\@empty + \caption@getlabel#1\label{}\@nil + \else + \caption@getlabel#2\label{}\@nil + \fi} +% \end{macrocode} +% \begin{macrocode} +\DeclareCaptionTextFormat{simple}{#1} +\DeclareCaptionTextFormat{period}{#1.} +% \end{macrocode} +% +% `default' usually maps to `simple'. +% \begin{macrocode} +\def\caption@tfmt@default{\caption@tfmt@simple} +% \end{macrocode} +% +% \begin{macro}{\caption@getlabel} +% \changes{v1.0}{2011/09/03}{\cs{label} can have optional arguments now} +% \changes{v1.7}{2015/09/16}{Moved from \package{bicaption} package to \package{caption3}} +% \changes{v1.8d}{2019/09/01}{Bugfix: Global definition of \cs{caption@thelabel} added} +% Gets the label command out of the (first) caption text and stores it to |\caption@thelabel|. +% \begin{macrocode} +\long\def\caption@getlabel#1\label#2#3\@nil{% + \def\@tempa{#2}% + \ifx\@tempa\@empty + \let\caption@thelabel\relax + \else + \def\@tempb{*}% + \ifx\@tempa\@tempb + \def\caption@thelabel{\label*}% + \caption@@getlabel#3\@nil + \else + \def\caption@thelabel{\label}% + \caption@@getlabel{#2}#3\@nil + \fi + \fi} +% \end{macrocode} +% \begin{macrocode} +\long\def\caption@@getlabel#1#2\@nil{% + \def\@tempa{#1}% + \def\@tempb{[}% + \ifx\@tempa\@tempb + \caption@@@getlabel#1#2\@nil + \else + \l@addto@macro\caption@thelabel{{#1}}% + \fi} +% \end{macrocode} +% \begin{macrocode} +\long\def\caption@@@getlabel[#1]#2\@nil{% + \l@addto@macro\caption@thelabel{[{#1}]}% + \caption@@getlabel#2\@nil} +% \end{macrocode} +% \begin{macrocode} +\let\caption@thelabel\relax +% \end{macrocode} +% \end{macro} +% +% \subsection{Fonts} +% +% \begin{macro}{\DeclareCaptionFont} +% \changes{v1.0a}{2004/01/22}{% +% Bugfix: Multi token arguments are allowed now} +% \changes{v1.1}{2007/05/07}{% +% Internal: Uses \cs{caption@fnt} instead of \cs{caption@temp} now} +% |\DeclareCaptionFont|\marg{name}\marg{code} +% \begin{macrocode} +\newcommand*\DeclareCaptionFont[2]{% + \define@key{caption@fnt}{#1}[]{\l@addto@macro\caption@fnt{#2}}} +\@onlypreamble\DeclareCaptionFont +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DeclareCaptionDefaultFont} +% \changes{v1.1}{2006/05/14}{This macro added} +% \changes{v1.2a}{2008/01/31}{Renamed from \cs{DeclareDefaultCaptionFont} to \cs{DeclareCaptionDefaultFont}} +% |\DeclareCaptionDefaultFont|\marg{name}\marg{code} +% \begin{macrocode} +\newcommand*\DeclareCaptionDefaultFont[2]{% + \global\@namedef{caption#1@default}{#2}} +\@onlypreamble\DeclareCaptionDefaultFont +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\DeclareCaptionOption{font}{\caption@setfont{font}{#1}} +\DeclareCaptionOption{font+}{\caption@addtofont{font}{#1}} +\DeclareCaptionDefaultFont{font}{} +% \end{macrocode} +% \begin{macrocode} +\DeclareCaptionOption{labelfont}{\caption@setfont{labelfont}{#1}} +\DeclareCaptionOption{labelfont+}{\caption@addtofont{labelfont}{#1}} +\DeclareCaptionDefaultFont{labelfont}{} +% \end{macrocode} +% \begin{macrocode} +\DeclareCaptionOption{textfont}{\caption@setfont{textfont}{#1}} +\DeclareCaptionOption{textfont+}{\caption@addtofont{textfont}{#1}} +\DeclareCaptionDefaultFont{textfont}{} +% \end{macrocode} +% +% \begin{macro}{\caption@setfont} +% \changes{v1.0j}{2007/01/30}{Usage of \cs{caption@setkeys} with optional argument} +% \changes{v1.1}{2006/05/14}{Support of \cs{DeclareDefaultCaptionFont} added} +% |\caption@setfont|\marg{name}\marg{keyval-list of names}\par +% Selecting a caption font means saving all the code snippets +% in |\caption|\meta{name}. +% \begin{macrocode} +\newcommand*\caption@setfont[1]{% + \expandafter\let\csname caption#1\endcsname\@empty + \caption@addtofont{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@addtofont} +% \changes{v1.2}{2007/11/17}{This macro added} +% |\caption@addtofont|\marg{name}\marg{keyval-list of names}\par +% Like |\caption@setfont|, but adds the code snippets to |\caption|\meta{name}.\par +% Because we use |\setkeys| recursive here we need to do this inside an +% extra group. +% \begin{macrocode} +\newcommand*\caption@addtofont[2]{% + \begingroup + \expandafter\let\expandafter\caption@fnt\csname caption#1\endcsname + \define@key{caption@fnt}{default}[]{% + \l@addto@macro\caption@fnt{\csname caption#1@default\endcsname}}% + \caption@setkeys[caption]{caption@fnt}{#2}% + \global\let\caption@tempa\caption@fnt + \endgroup + \expandafter\let\csname caption#1\endcsname\caption@tempa} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@font} +% \changes{v1.1}{2007/05/07}{This macro added} +% |\caption@font|\marg{keyval-list of names}\\ +% |\caption@font*|\marg{keyval-code}\par +% Sets the given font, e.g.~|\caption@font{small,it}| +% is equivalent to |\small\itshape|. +% \begin{macrocode} +\newcommand*\caption@font{% + \caption@teststar\caption@@font\@firstofone + {\caption@setkeys[caption]{caption@fnt}}} +\newcommand*\caption@@font[2]{% + \begingroup + \def\caption@fnt{\endgroup}% + #1{#2}% + \caption@fnt} +% \end{macrocode} +% \end{macro} +% +% These are the pre-defined font code snippets. +% +% \changes{v1.1}{2007/05/07}{Color font support added} +% \begin{macrocode} +\DeclareCaptionFont{normalcolor}{\normalcolor} +\DeclareCaptionFont{color}{\color{#1}} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareCaptionFont{normalfont}{\normalfont} +\DeclareCaptionFont{up}{\upshape} +\DeclareCaptionFont{it}{\itshape} +\DeclareCaptionFont{sl}{\slshape} +\DeclareCaptionFont{sc}{\scshape} +\DeclareCaptionFont{md}{\mdseries} +\DeclareCaptionFont{bf}{\bfseries} +\DeclareCaptionFont{rm}{\rmfamily} +\DeclareCaptionFont{sf}{\sffamily} +\DeclareCaptionFont{tt}{\ttfamily} +% \end{macrocode} +% +% \changes{v1.7}{2018/05/01}{Missing font sizes \texttt{tiny}, \texttt{LARGE}, \texttt{huge}, and \texttt{Huge} added} +% \begin{macrocode} +\DeclareCaptionFont{tiny}{\tiny} +\DeclareCaptionFont{scriptsize}{\scriptsize} +\DeclareCaptionFont{footnotesize}{\footnotesize} +\DeclareCaptionFont{small}{\small} +\DeclareCaptionFont{normalsize}{\normalsize} +\DeclareCaptionFont{large}{\large} +\DeclareCaptionFont{Large}{\Large} +\DeclareCaptionFont{LARGE}{\LARGE} +\DeclareCaptionFont{huge}{\huge} +\DeclareCaptionFont{Huge}{\Huge} +% \end{macrocode} +% +% \changes{v1.8}{2018/05/01}{Font size \texttt{smaller} added} +% \begin{macrocode} +\newcommand\caption@smaller{% + \ifx\@currsize\tiny + \relax + \else\ifx\@currsize\scriptsize + \tiny + \else\ifx\@currsize\footnotesize + \scriptsize + \else\ifx\@currsize\small + \footnotesize + \else\ifx\@currsize\normalsize + \small + \else\ifx\@currsize\large + \normalsize + \else\ifx\@currsize\Large + \large + \else\ifx\@currsize\LARGE + \Large + \else\ifx\@currsize\huge + \LARGE + \else\ifx\@currsize\Huge + \huge + \else + \caption@Warning{% + Cannot determine current font size.\MessageBreak + Try setting it with `size=' explicitly}% + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} +\DeclareCaptionFont{smaller}{\caption@smaller} +% \end{macrocode} +% +% \changes{v1.8}{2018/05/02}{Font size \texttt{larger} added} +% \begin{macrocode} +\newcommand\caption@larger{% + \ifx\@currsize\tiny + \scriptsize + \else\ifx\@currsize\scriptsize + \footnotesize + \else\ifx\@currsize\footnotesize + \small + \else\ifx\@currsize\small + \normalsize + \else\ifx\@currsize\normalsize + \large + \else\ifx\@currsize\large + \Large + \else\ifx\@currsize\Large + \LARGE + \else\ifx\@currsize\LARGE + \huge + \else\ifx\@currsize\huge + \Huge + \else\ifx\@currsize\Huge + \relax + \else + \caption@Warning{% + Cannot determine current font size.\MessageBreak + Try setting it with `size=' explicitly}% + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} +\DeclareCaptionFont{larger}{\caption@larger} +% \end{macrocode} +% +% \changes{v1.3}{2011/01/01}{\package{sansmath} package support added} +% \begin{macrocode} +\DeclareCaptionFont{sansmath}{\sansmath} +% \end{macrocode} +% +% \changes{v1.0n}{2007/04/02}{\package{setspace} package support added} +% \changes{v1.2d}{2009/10/09}{Bugfix 09-05-18: \package{setspace} package support revised} +% \begin{macrocode} +\DeclareCaptionFont{singlespacing}{% + \caption@ifundefined\setspace@singlespace{}{% + \setstretch\setspace@singlespace}}% normally 1 +\DeclareCaptionFont{onehalfspacing}{\onehalfspacing} +\DeclareCaptionFont{doublespacing}{\doublespacing} +\DeclareCaptionFont{stretch}{\setstretch{#1}} +% \end{macrocode} +% +% \begin{macrocode} +%\DeclareCaptionFont{normal}{% +% \caption@font{normalcolor,normalfont,normalsize,singlespacing} +\DeclareCaptionFont{normal}{% + \caption@font*{% + \KV@caption@fnt@normalcolor\@unused + \KV@caption@fnt@normalfont\@unused + \KV@caption@fnt@normalsize\@unused + \KV@caption@fnt@singlespacing\@unused}} +% \end{macrocode} +% +% \changes{v1.0a}{2004/01/23}{Option \opt{size=} now sets \cs{captionsize} instead of \cs{captionfont}} +% The old versions \version{1.x} of \thispackage\ offered this +% command to setup the font size used for captions. We still do +% so old documents will work fine. +% \begin{macrocode} +\DeclareCaptionOption{size}{\caption@setfont{size}{#1}} +\DeclareCaptionDefaultFont{size}{} +% \end{macrocode} +% +% \subsection{Justifications} +% +% \begin{macro}{\DeclareCaptionJustification} +% \changes{v1.0a}{2004/01/17}{Pass through argument \#2 so extra spaces +% between arguments do make any harm} +% \changes{v1.1}{2007/07/03}{Mapped to \cs{DeclareCaptionFont}} +% |\DeclareCaptionJustification|\marg{name}\marg{code} +% \begin{macrocode} +\newcommand*\DeclareCaptionJustification[2]{% + \global\@namedef{caption@hj@#1}{#2}% for compatibility to v1.0 + \DeclareCaptionFont{#1}{#2}} +\@onlypreamble\DeclareCaptionJustification +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DeclareCaptionDefaultJustification} +% \changes{v1.1}{2007/07/03}{This macro added} +% \changes{v1.2a}{2008/01/31}{Renamed from \cs{DeclareDefaultCaptionJustification} to \cs{DeclareCaptionDefaultJustification}} +% |\DeclareCaptionDefaultJustification|\marg{code} +% \begin{macrocode} +\newcommand*\DeclareCaptionDefaultJustification[1]{% + \global\@namedef{caption@hj@default}{#1}% for compatibility to v1.0 + \DeclareCaptionDefaultFont{@hj}{#1}} +\@onlypreamble\DeclareCaptionDefaultJustification +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\DeclareCaptionOption{justification}{\caption@setjustification{#1}} +\DeclareCaptionDefaultJustification{} +% \end{macrocode} +% +% \begin{macro}{\caption@setjustification} +% \changes{v1.1}{2007/07/03}{Mapped to \cs{caption@setfont}} +% |\caption@setjustification|\marg{name}\par +% Selecting a caption justification simply means saving the code (in |\caption@hj|). +% \begin{macrocode} +\newcommand*\caption@setjustification{\caption@setfont{@hj}} +% \end{macrocode} +% \end{macro} +% +% These are the pre-defined justification code snippets. +% \begin{macrocode} +\DeclareCaptionJustification{justified}{} +\DeclareCaptionJustification{centering}{\centering} +\DeclareCaptionJustification{centerfirst}{\centerfirst} +\DeclareCaptionJustification{centerlast}{\centerlast} +\DeclareCaptionJustification{raggedleft}{\raggedleft} +\DeclareCaptionJustification{raggedright}{\raggedright} +% \end{macrocode} +% +% \begin{macro}{\centerfirst} +% \changes{v1.0j}{2007/01/21}{Bugfix: Usage of \cs{@centercr} added (Thanks to Olga!)} +% \changes{v1.0j}{2007/01/21}{This macro renamed from \cs{caption@centerfirst} to \cs{centerfirst}} +% Please blame Frank Mittelbach for the code of |\centerfirst| |:-)| +% \begin{macrocode} +\providecommand\centerfirst{% + \let\\\@centercr + \edef\caption@normaladjust{% + \leftskip\the\leftskip + \rightskip\the\rightskip + \parfillskip\the\parfillskip\relax}% + \leftskip\z@\@plus -1fil% + \rightskip\z@\@plus 1fil% + \parfillskip\z@skip + \noindent\hskip\z@\@plus 2fil% + \@setpar{\@@par\@restorepar\caption@normaladjust}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\centerlast} +% \changes{v1.0j}{2007/01/21}{Bugfix: Usage of \cs{@centercr} added (Thanks to Olga!)} +% \changes{v1.0j}{2007/01/21}{This macro renamed from \cs{caption@centerlast} to \cs{centerlast}} +% This is based on code from Anne Br\"uggemann-Klein\cite{Anne} +% \begin{macrocode} +\providecommand\centerlast{% + \let\\\@centercr + \leftskip\z@\@plus 1fil% + \rightskip\z@\@plus -1fil% + \parfillskip\z@\@plus 2fil\relax} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{The ragged2e package} +% \changes{v1.0b}{2004/05/16}{Improved \package{ragged2e} package support} +% +% We also support the upper-case commands offered by the \package{ragged2e} +% package. +% Note that these just map to their lower-case variants if the +% \package{ragged2e} package is not available. +% \begin{macrocode} +\DeclareCaptionJustification{Centering}{% + \caption@ragged\Centering\centering} +\DeclareCaptionJustification{RaggedLeft}{% + \caption@ragged\RaggedLeft\raggedleft} +\DeclareCaptionJustification{RaggedRight}{% + \caption@ragged\RaggedRight\raggedright} +% \end{macrocode} +% +% \begin{macro}{\caption@ragged} +% \changes{v1.0n}{2007/04/07}{The `ragged2e' package will now only been +% loaded when needed} +% \changes{v1.0o}{2007/04/11}{Bugfix: Usage of \cs{caption@Info} replaced +% by \cs{caption@Debug}} +% \changes{v1.1}{2007/04/16}{A different warning will be given on first \LaTeX\ run} +% \changes{v1.4f}{2012/01/12}{Uses \cs{caption@IfPackageLoaded} now} +% |\caption@ragged|\marg{yes-code}\marg{no-code} +% executes the \meta{yes-code} if the \package{ragged2e} package is loaded +% and \meta{no-code} if not. Additionally it tries to load the \package{ragged2e} +% package. +% \begin{macrocode} +\newcommand*\caption@ragged{\caption@ifpackageloaded{ragged2e}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@ifpackageloaded} +% \changes{v1.4f}{2012/01/12}{This macro added} +% |\caption@ifpackageloaded|\marg{package}\marg{yes-code}\marg{no-code} +% executes the \meta{yes-code} if the given package is loaded +% and \meta{no-code} if not. Additionally it tries to load the package. +% \begin{macrocode} +\newcommand*\caption@ifpackageloaded[1]{% + \@ifundefined{caption@ifpkg@#1}% + {\caption@RequirePackage{#1}% + \caption@pkg@true{#1}}% + {}% + \caption@ifpkg{#1}} +% \end{macrocode} +% \begin{macrocode} +\AtBeginDocument{\renewcommand*\caption@ifpackageloaded[1]{% + \@ifundefined{caption@ifpkg@#1}% + {\caption@addto@pkg@list{#1}% + \caption@pkg@false{#1}% + \caption@Warning{% + `#1' support has been changed.\MessageBreak + Rerun to get captions right}}% + {}% + \caption@ifpkg{#1}}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@ifpkg[1]{% + \csname caption@ifpkg@#1\endcsname} +\newcommand*\caption@pkg@true[1]{% + \global\expandafter\let\csname caption@ifpkg@#1\endcsname\@firstoftwo} +\newcommand*\caption@pkg@false[1]{% + \global\expandafter\let\csname caption@ifpkg@#1\endcsname\@secondoftwo} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@pkg@list{} +\newcommand*\caption@addto@pkg@list[1]{% + \protected@write\@auxout{}{% + \string\@cons\string\caption@pkg@list{{#1}}}} +% \end{macrocode} +% \begin{macrocode} +\AtBeginDocument{% + \def\caption@tempa{\endgroup}% + \begingroup + \def\@elt#1{% + \g@addto@macro\caption@tempa{% + \caption@RequirePackage{#1}% + \@namedef{caption@ifpkg@#1}{% + \caption@addto@pkg@list{#1}% + \caption@pkg@true{#1}% + \caption@ifpkg{#1}}}}% + \caption@pkg@list + \caption@tempa} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@RequirePackage[1]{% + \caption@Info{We need package `#1'}% + \RequirePackage{#1}} +\@onlypreamble\caption@RequirePackage +% \end{macrocode} +% \end{macro} +% +% \subsection{Vertical spaces before and after captions} +% +% \begin{macro}{\abovecaptionskip} +% \begin{macro}{\belowcaptionskip} +% Usually these skips are defined within the document class, but some +% document classes don't do so. +% \begin{macrocode} +\caption@ifundefined\abovecaptionskip{% + \newlength\abovecaptionskip\setlength\abovecaptionskip{10\p@}}{} +\caption@ifundefined\belowcaptionskip{% + \newlength\belowcaptionskip\setlength\belowcaptionskip{0\p@}}{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \changes{v1.0c}{2005/02/12}{Option \opt{skip=} added} +% \begin{macrocode} +\DeclareCaptionOption{aboveskip}{\setlength\abovecaptionskip{#1}} +\DeclareCaptionOption{belowskip}{\setlength\belowcaptionskip{#1}} +\DeclareCaptionOption{skip}{\setlength\abovecaptionskip{#1}} +% \end{macrocode} +% +% \begin{macro}{\caption@rule} +% \changes{v1.2b}{2008/05/06}{This macro added} +% |\caption@rule|\par +% Draws an invisible rule to adjust the ``skip'' setting. +% \begin{macrocode} +\newcommand*\caption@rule{\caption@ifrule\caption@hrule\relax} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@hrule{\hrule\@height\z@} +% \end{macrocode} +% \end{macro} +% +% \changes{v1.2b}{2008/05/06}{Option \opt{rule=} added} +% \begin{macrocode} +\DeclareCaptionOption{rule}[1]{\caption@set@bool\caption@ifrule{#1}} +% \end{macrocode} +% +% \subsection{Positioning} +% +% These macros handle the right position of the caption. +% Note that the position is actually \emph{not} controlled by the +% \package{caption3} kernel options, but by the user (or a specific package +% like the \package{float} package) instead. +% The user can put the |\caption| command wherever he likes! So this stuff +% is only to give us a \emph{hint} where to put the right skips, the user +% usually has to take care for himself that this hint actually matches the +% right position. +% +% \begin{macrocode} +\DeclareCaptionOption{position}{\caption@setposition{#1}} +% \end{macrocode} +% +% \begin{macro}{\caption@setposition} +% \changes{v1.0a}{2004/01/22}{Now the positions \opt{t}, \opt{above}, \opt{b}, +% \opt{below}, and \opt{a} are allowed, too} +% \changes{v1.0c}{2004/08/10}{Usage of \cs{caption@defaultpos} added} +% |\caption@setposition|\marg{position}\par +% Selecting the caption position means that we put |\caption@position| to +% the right value. \emph{Please do \textbf{not} use the internal macro +% \cs{caption@position} in your own package or document, but use the wrapper +% macro \cs{caption@iftop} instead.} +% \begin{macrocode} +\newcommand*\caption@setposition[1]{% + \caption@ifinlist{#1}{d,default}{% + \let\caption@position\caption@defaultpos + }{\caption@ifinlist{#1}{t,top,above}{% + \let\caption@position\@firstoftwo + }{\caption@ifinlist{#1}{b,bottom,below}{% + \let\caption@position\@secondoftwo + }{\caption@ifinlist{#1}{a,auto}{% + \let\caption@position\@undefined + }{% + \caption@Error{Undefined position `#1'}% + }}}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@defaultpos} +% \changes{v1.1}{2007/05/08}{Default position changed from `bottom' to `auto'} +% The default `position' is `auto', this means that \thispackage\ will try +% to guess the current position of the caption. +% (But in many cases, for example in |longtable|s, this is doomed to fail!)\par +% The setting `bottom' correspondents to the |\@makecaption| implementation +% in the standard \LaTeX\ document classes, but `auto' should give better +% results in most cases. +% \begin{macrocode} +%\caption@setdefaultpos{a}% default = auto +\let\caption@defaultpos\@undefined +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@iftop} +% \changes{v1.0a}{2004/01/23}{Split into \cs{caption@iftop} \& \cs{caption@fixposition}} +% \changes{v1.0c}{2005/02/12}{Adapted to \cs{caption@defaultpos}} +% \changes{v1.1}{2007/05/08}{Position will be fixed to `bottom' if `auto'} +% |\caption@iftop|\marg{true-code}\marg{false-code}\par +% (If the |position=| is set to |auto| we assume a |bottom| position here.) +% \begin{macrocode} +\newcommand*\caption@iftop{% + \ifx\caption@position\@undefined + \let\caption@position\@secondoftwo +% = \caption@setposition b% + \fi + \caption@position} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@fixposition} +% \changes{v1.0b}{2004/05/16}{% +% Split into \cs{caption@fixposition} & \cs{caption@autoposition}} +% |\caption@fixposition|\par +% This macro checks if the `position' is set to `auto'. +% If yes, |\caption@autoposition| will be called to +% set |\caption@position| to a proper value we can actually use. +% \begin{macrocode} +\newcommand*\caption@fixposition{% + \ifx\caption@position\@undefined + \caption@autoposition + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@autoposition} +% \changes{v1.0a}{2004/01/23}{\cs{ifvmode} added} +% |\caption@autoposition|\par +% We guess the current position of the caption by checking |\prevdepth|.\par +% A different solution would be setting the |\spacefactor| to something +% not much less than 1000 (for example 994) in |\caption@start| and +% checking this value here by |\ifnum\spacefactor=994|. +% (It's implemented in the \package{threeparttable} +% package\cite{threeparttable} this way.)\par +% Another idea would be checking |\@ifminipage|, but since some packages +% typeset the caption within a simple |\vbox| this does not seem to be a +% good one. +% \begin{macrocode} +\newcommand*\caption@autoposition{% + \ifvmode + \edef\caption@tempa{\the\prevdepth}% + \caption@Debug{\protect\prevdepth=\caption@tempa}% + \ifdim\prevdepth>-\p@ + \let\caption@position\@secondoftwo + \else + \let\caption@position\@firstoftwo + \fi +% = \caption@setposition{\ifdim\prevdepth>-\p@ b\else t\fi}% + \else + \caption@Debug{no \protect\prevdepth}% + \let\caption@position\@secondoftwo +% = \caption@setposition b% + \fi} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\caption@setautoposition} +% \changes{v1.1}{2007/06/10}{This macro added} +% |\caption@setautoposition|\marg{position}\par +% replaces the above algorithm by a different one (or a fixed position setting). +% \begin{macrocode} +\newcommand*\caption@setautoposition[1]{% + \def\caption@autoposition{\caption@setposition{#1}}} +% \end{macrocode} +% \end{macro} +% +% \subsection{Hooks} +% +% \begin{macro}{\AtBeginCaption} +% \begin{macro}{\AtEndCaption} +% |\AtBeginCaption| \marg{code}\\ +% |\AtEndCaption| \marg{code}\par +% These hooks can be used analogous to |\AtBeginDocument| and |\AtEndDocument|. +% \begin{macrocode} +\newcommand*\caption@beginhook{} +\newcommand*\caption@endhook{} +\newcommand*\AtBeginCaption{\l@addto@macro\caption@beginhook} +\newcommand*\AtEndCaption{\l@addto@macro\caption@endhook} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsection{Lists} +% +% \changes{v1.0b}{2004/05/16}{Option \opt{listof=} added} +% \changes{v1.2}{2007/11/17}{Option \opt{list=} added} +% \begin{macrocode} +\DeclareCaptionOption{list}[1]{\caption@setlist{#1}} +\DeclareCaptionOption{listof}[1]{\caption@setlist{#1}} +% \end{macrocode} +% +% \begin{macro}{\caption@setlist} +% \changes{v1.2a}{2008/03/20}{This macro added} +% |\caption@setlist|\marg{boolean} +% \begin{macrocode} +\newcommand*\caption@setlist{\caption@set@bool\caption@iflist} +% \end{macrocode} +% \end{macro} +% +% \changes{v1.4}{2011/08/30}{Option \opt{listtype=} added} +% \changes{v1.4}{2011/08/30}{Option \opt{listtype+=} added} +% \begin{macrocode} +\DeclareCaptionOption{listtype}{\caption@setlisttype{#1}} +\DeclareCaptionOption{listtype+}{\caption@setlisttype@ext{#1}} +% \end{macrocode} +% +% \begin{macro}{\caption@setlisttype} +% \changes{v1.4}{2011/08/30}{This macro added} +% |\caption@setlisttype|\marg{type} +% \begin{macrocode} +\newcommand*\caption@setlisttype{% + \caption@setlisttype@ext{}% + \caption@@setlisttype\caption@listtype} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@@setlisttype[2]{% + \edef#1{#2}% + \ifx#1\@empty \let#1\@undefined \fi} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\caption@setlisttype@ext} +% \changes{v1.4}{2011/08/30}{This macro added} +% |\caption@setlisttype@ext|\marg{type extension} +% \begin{macrocode} +\newcommand*\caption@setlisttype@ext{% + \caption@@setlisttype\caption@listtype@ext} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DeclareCaptionListFormat} +% \changes{v1.1}{2004/07/15}{This macro added} +% \changes{v1.2}{2007/11/17}{Renamed from \cs{DeclareCaptionListOfFormat} to \cs{DeclareCaptionListFormat}} +% |\DeclareCaptionListFormat|\marg{name}\marg{code with \#1 and \#2} +% \begin{macrocode} +\newcommand*\DeclareCaptionListFormat[2]{% + \global\@namedef{caption@lstfmt@#1}##1##2{#2}} +\@onlypreamble\DeclareCaptionListFormat +% \end{macrocode} +% \end{macro} +% +% \changes{v1.1}{2007/07/15}{Option \opt{listofformat=} added} +% \changes{v1.2}{2007/11/17}{Option \opt{listofformat=} renamed to \opt{listformat=}} +% \begin{macrocode} +\DeclareCaptionOption{listformat}{\caption@setlistformat{#1}} +% \end{macrocode} +% +% \begin{macro}{\caption@setlistformat} +% \changes{v1.1}{2004/07/15}{This macro added} +% \changes{v1.2}{2007/11/17}{Renamed from \cs{caption@setlistofformat} to \cs{caption@setlistformat}} +% |\caption@setlistformat|\marg{name}\par +% Selecting a caption list format simply means saving the code (in |\caption@lstfmt|). +% \begin{macrocode} +\newcommand*\caption@setlistformat[1]{% + \@ifundefined{caption@lstfmt@#1}% + {\caption@Error{Undefined list format `#1'}}% + {\expandafter\let\expandafter\caption@lstfmt + \csname caption@lstfmt@#1\endcsname}} +% \end{macrocode} +% \end{macro} +% +% There are five pre-defined list formats, taken from the \package{subfig} package. +% \begin{macrocode} +\DeclareCaptionListFormat{empty}{} +\DeclareCaptionListFormat{simple}{#1#2} +\DeclareCaptionListFormat{parens}{#1(#2)} +\DeclareCaptionListFormat{subsimple}{#2} +\DeclareCaptionListFormat{subparens}{(#2)} +% \end{macrocode} +% +% \begin{macro}{\caption@setdefaultlistformat} +% \changes{v1.2d}{2009/03/29}{This macro added} +% \begin{macrocode} +\newcommand*\caption@setdefaultlistformat[1]{% + \ifx\caption@lstfmt\caption@lstfmt@default + \caption@set@default@listformat{#1}% + \caption@setlistformat{default}% + \else + \caption@set@default@listformat{#1}% + \fi} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@set@default@listformat[1]{% + \def\caption@lstfmt@default{\@nameuse{caption@lstfmt@#1}}} +% \end{macrocode} +% \end{macro} +% +% `default' usually maps to `subsimple'. +% \begin{macrocode} +\caption@set@default@listformat{subsimple} +% \end{macrocode} +% +% \subsection{Debug option} +% \changes{v1.0k}{2007/03/04}{Debug option added} +% +% \begin{macrocode} +\DeclareCaptionOption{debug}[1]{% + \caption@set@bool\caption@ifdebug{#1}% + \caption@ifdebug + {\let\caption@Debug\caption@Info}% + {\let\caption@Debug\@gobble}} +% \end{macrocode} +% \begin{macrocode} +\DeclareOption{debug}{\setkeys{caption}{debug}} +% \end{macrocode} +% \begin{macrocode} +\setkeys{caption}{debug=0} +% \end{macrocode} +% +% \subsection{Document classes \& Babel support} +% +% \subsubsection{The standard \texorpdfstring{\LaTeX{}}{LaTeX} classes} +% +% \begin{macrocode} +\caption@CheckCommand\@makecaption{% + % article|report|book [2005/09/16 v1.4f Standard LaTeX document class] + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{#1: #2}% + \ifdim \wd\@tempboxa >\hsize + #1: #2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} +% \end{macrocode} +% +% \subsubsection{The elsarticle classes} +% \changes{v1.5}{2013/01/06}{elsarticle class support added} +% +% \begin{macro}{\caption@ifelsarticleclass} +% \begin{macrocode} +\providecommand*\caption@ifelsarticleclass{% + \@ifclassloaded{elsarticle}\@firstofone\@gobble} +\@onlypreamble\caption@ifelsarticleclass +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\caption@ifelsarticleclass{% +% \end{macrocode} +% \begin{macrocode} + \caption@CheckCommand\@makecaption{% + % elsarticle.cls,v 1.20 2008-10-13 04:24:12 cvr Exp + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip\footnotesize + \sbox\@tempboxa{#1: #2}% + \ifdim \wd\@tempboxa >\hsize + #1: #2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} +% \end{macrocode} +% \begin{macrocode} + \DeclareCaptionDefaultFont{font}{\footnotesize} +% \end{macrocode} +% \begin{macrocode} +} +% \end{macrocode} +% +% \subsubsection{The \AmS{} \& \SmF{} classes} +% \changes{v1.1}{2007/07/29}{\AmS\ \& \SmF\ classes support added} +% +% \begin{macro}{\caption@ifamsclass} +% \begin{macrocode} +\providecommand*\caption@ifamsclass{% + \caption@ifundefined\@captionheadfont\@gobble\@firstofone} +\@onlypreamble\caption@ifamsclass +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\caption@ifamsclass{% +% \end{macrocode} +% \begin{macrocode} + \caption@CheckCommand\@makecaption{% + % amsart|amsproc|amsbook [2004/08/06 v2.20] + \long\def\@makecaption#1#2{% + \setbox\@tempboxa\vbox{\color@setgroup + \advance\hsize-2\captionindent\noindent + \@captionfont\@captionheadfont#1\@xp\@ifnotempty\@xp + {\@cdr#2\@nil}{.\@captionfont\upshape\enspace#2}% + \unskip\kern-2\captionindent\par + \global\setbox\@ne\lastbox\color@endgroup}% + \ifhbox\@ne % the normal case + \setbox\@ne\hbox{\unhbox\@ne\unskip\unskip\unpenalty\unkern}% + \fi + \ifdim\wd\@tempboxa=\z@ % this means caption will fit on one line + \setbox\@ne\hbox to\columnwidth{\hss\kern-2\captionindent\box\@ne\hss}% + \else % tempboxa contained more than one line + \setbox\@ne\vbox{\unvbox\@tempboxa\parskip\z@skip + \noindent\unhbox\@ne\advance\hsize-2\captionindent\par}% + \fi + \ifnum\@tempcnta<64 % if the float IS a figure... + \addvspace\abovecaptionskip + \hbox to\hsize{\kern\captionindent\box\@ne\hss}% + \else % if the float IS NOT a figure... + \hbox to\hsize{\kern\captionindent\box\@ne\hss}% + \nobreak + \vskip\belowcaptionskip + \fi + \relax + }} +% \end{macrocode} +% \begin{macrocode} + \caption@CheckCommand\@makecaption{% + % smfart|smfbook [1999/11/15 v1.2f Classe LaTeX pour les articles publies par la SMF] + \long\def\@makecaption#1#2{% + \ifdim\captionindent>.1\hsize \captionindent.1\hsize \fi + \setbox\@tempboxa\vbox{\color@setgroup + \advance\hsize-2\captionindent\noindent + \@captionfont\@captionheadfont#1\@xp\@ifnotempty\@xp + {\@cdr#2\@nil}{\@addpunct{.}\@captionfont\upshape\enspace#2}% + \unskip\kern-2\captionindent\par + \global\setbox\@ne\lastbox\color@endgroup}% + \ifhbox\@ne % the normal case + \setbox\@ne\hbox{\unhbox\@ne\unskip\unskip\unpenalty\unkern}% + \fi + \ifdim\wd\@tempboxa=\z@ % this means caption will fit on one line + \setbox\@ne\hbox to\columnwidth{\hss\kern-2\captionindent\box\@ne\hss}% + \@tempdima\wd\@ne\advance\@tempdima-\captionindent + \wd\@ne\@tempdima + \else % tempboxa contained more than one line + \setbox\@ne\vbox{\rightskip=0pt plus\captionindent\relax + \unvbox\@tempboxa\parskip\z@skip + \noindent\unhbox\@ne\advance\hsize-2\captionindent\par}% + \fi + \ifnum\@tempcnta<64 % if the float IS a figure... + \addvspace\abovecaptionskip + \noindent\kern\captionindent\box\@ne + \else % if the float IS NOT a figure... + \noindent\kern\captionindent\box\@ne + \nobreak + \vskip\belowcaptionskip + \fi + \relax + }} +% \end{macrocode} +% \begin{macrocode} + \let\captionmargin\captionindent % set to 3pc by AMS class + \begingroup\edef\@tempa{\endgroup + \noexpand\caption@g@addto@list\noexpand\caption@sty@default + {margin=\the\captionmargin + \caption@ifundefined\smf@makecaption{}{,maxmargin=.1\linewidth}}} + \@tempa + \caption@g@addto@list\caption@sls@default{margin*=.5\captionmargin} + \DeclareCaptionLabelSeparator{default}{.\enspace} + \DeclareCaptionDefaultFont{font}{\@captionfont} + \DeclareCaptionDefaultFont{labelfont}{\@captionheadfont} + \DeclareCaptionDefaultFont{textfont}{\@captionfont\upshape} + \captionsetup[figure]{position=b} + \captionsetup[table]{position=t} +% \end{macrocode} +% \begin{macrocode} +} +% \end{macrocode} +% +% \subsubsection{The beamer class (Part one)} +% \changes{v1.1}{2007/03/10}{\package{beamer} class support added} +% \changes{v1.3}{2011/08/06}{\package{beamer} class support revised} +% \changes{v1.5}{2013/04/27}{The \package{beamer} template \texttt{caption label separator} will be used now} +% \changes{v1.7}{2016/05/22}{Re-definition of label format \texttt{simpleMagyar} added to \package{beamer} class support} +% \changes{v1.7}{2018/04/15}{Re-definition of label format \texttt{simpleMagyar} revised} +% \changes{v1.7}{2018/05/01}{Definition of \package{beamer} default label font revised} +% +% \begin{macro}{\caption@ifbeamerclass} +% \begin{macrocode} +\providecommand*\caption@ifbeamerclass{% + \@ifclassloaded{beamer}\@firstofone\@gobble} +\@onlypreamble\caption@ifbeamerclass +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\caption@ifbeamerclass{% +% \end{macrocode} +% \begin{macrocode} + \caption@CheckCommand\beamer@makecaption{% + % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau + \long\def\beamer@makecaption#1#2{% + \def\insertcaptionname{\csname#1name\endcsname}% + \def\insertcaptionnumber{\csname the#1\endcsname}% + \def\insertcaption{#2}% + \nobreak\vskip\abovecaptionskip\nobreak + \sbox\@tempboxa{\usebeamertemplate**{caption}}% + \ifdim \wd\@tempboxa >\hsize + \usebeamertemplate**{caption}\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \nobreak\vskip\belowcaptionskip\nobreak}} +% \end{macrocode} +% +% \begin{macro}{\caption@ifbeamertemplate} +% |\caption@ifbeamertemplate|\marg{caption template name}\marg{yes-code}\marg{no-code}\\ +% tests if the given beamer caption template was selected by the user (or not). +% \begin{macrocode} + \newcommand*\caption@ifbeamertemplate[1]{% + \begingroup + \let\beamer@@tmpl@caption@ORI\beamer@@tmpl@caption + \@nameuse{beamer@@tmpop@caption@#1}% + \ifx\beamer@@tmpl@caption@ORI\beamer@@tmpl@caption + \endgroup\expandafter\@firstoftwo + \else + \endgroup\expandafter\@secondoftwo + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} + \DeclareCaptionLabelFormat{default}{% + \caption@ifbeamertemplate{numbered}% + \caption@lfmt@simple + \caption@lfmt@unnumbered + {#1}{#2}} +% \end{macrocode} +% The \package{magyar} babel package redefines the current label format to a one called |simple|\-|Magyar|, +% defined within |\@@magyar@caption|\-|fix| which will be executed |\At|\-|Begin|\-|Document|. +% \begin{macrocode} + \DeclareCaptionLabelFormat{default@magyar}{% + \caption@ifbeamertemplate{numbered}% + \caption@lfmt@simple@magyar + \caption@lfmt@unnumbered + {#1}{#2}} + \@ifundefined{@@magyar@captionfix}\AtBeginDocument\@firstofone{% + \@ifundefined{@@magyar@captionfix}{}{% + \g@addto@macro\@@magyar@captionfix{% + \let\caption@lfmt@simple@magyar\caption@lfmt@simpleMagyar + \let\caption@lfmt@simpleMagyar\caption@lfmt@default@magyar}}} +% \end{macrocode} +% \begin{macrocode} + \caption@declarelabelseparator + {\caption@ifbeamertemplate{caption name own line}\@gobble\@firstofone} + {default} + {\caption@ifbeamertemplate{caption name own line}{\\}% + {\usebeamertemplate{caption label separator}}} + \DeclareCaptionDefaultFont{font}{% + \usebeamerfont*{caption}% + \usebeamercolor[fg]{caption}} + \DeclareCaptionDefaultFont{labelfont}{% + \setbeamercolor*{caption}{}% avoid setting "caption" color additionally + \usebeamercolor[fg]{caption name}% + \setbeamerfont*{caption}{}% avoid setting "caption" font additionally + \usebeamerfont{caption name}} + \DeclareCaptionDefaultJustification{\raggedright} +% \end{macrocode} +% \begin{macrocode} + \DeclareOption{beamerclass}{% + \renewcommand\caption@ifslc{% + \caption@ifbeamertemplate{caption name own line}\@secondoftwo\@firstoftwo} + % Since the beamer class do not offer a `list of figures' we switch this support off. + \captionsetup{list=0}} + \PassOptionsToPackage{beamerclass}{caption3} +% \end{macrocode} +% +% If the \package{beamer} document class is used, we offer a beamer +% template called `caption3' which can be used with option `beamer' or +% |\setbeamertemplate{caption}[caption3]|.\par +% (Note that this is of no use when the \package{caption} package is used, too.) +% \begin{macrocode} + \defbeamertemplate{caption}{caption3}{% + \caption@make\insertcaptionname\insertcaptionnumber\insertcaption} +% \end{macrocode} +% \begin{macrocode} + \DeclareOption{beamer}{% + % \usebeamertemplate**{caption} will set font + \DeclareCaptionDefaultFont{font}{}% + \setbeamertemplate{caption}[caption3]} +% \end{macrocode} +% \begin{macrocode} +% +% \begin{macrocode] +} +% \end{macrocode} +% +% \subsubsection{The KOMA-Script classes} +% \changes{v1.1}{2007/03/31}{\KOMAScript\ classes support added} +% +% \begin{macro}{\caption@ifkomaclass} +% \begin{macrocode} +\providecommand*\caption@ifkomaclass{% + \caption@ifundefined\scr@caption\@gobble\@firstofone} +\@onlypreamble\caption@ifkomaclass +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\caption@ifkomaclass{% +% \end{macrocode} +% \begin{macrocode} + \caption@CheckCommand\@makecaption{% + % scrartcl|scrreprt|scrbook [2007/03/07 v2.97a KOMA-Script document class] + \long\def\@makecaption#1#2{% + \if@captionabove + \vskip\belowcaptionskip + \else + \vskip\abovecaptionskip + \fi + \@@makecaption\@firstofone{#1}{#2}% + \if@captionabove + \vskip\abovecaptionskip + \else + \vskip\belowcaptionskip + \fi}} +% \end{macrocode} +% \begin{macrocode} + \DeclareCaptionFormat{default}[#1#2#3\par]{% + \ifdofullc@p + \caption@ifin@list\caption@lsepcrlist\caption@lsepname + {\caption@Error{% + The option `labelsep=\caption@lsepname' does not work\MessageBreak + with \noexpand\setcaphanging (which is set by default)}}% + {\caption@fmt@hang{#1}{#2}{#3}}% + \else + #1#2% + \ifdim\cap@indent<\z@ + \par + \noindent\hspace*{-\cap@indent}% + \else\if@capbreak + \par + \fi\fi + #3\par + \fi} + \DeclareCaptionLabelSeparator{default}{\captionformat} + \DeclareCaptionDefaultFont{font}{\scr@fnt@caption} + \DeclareCaptionDefaultFont{labelfont}{\scr@fnt@captionlabel} +% \end{macrocode} +% \begin{macrocode} +} +% \end{macrocode} +% +% \subsubsection{The \NTG{} Dutch classes} +% \changes{v1.1}{2007/04/06}{NTG classes support added} +% +% \begin{macro}{\caption@ifntgclass} +% \begin{macrocode} +\providecommand*\caption@ifntgclass{% + \caption@ifundefined\CaptionFonts\@gobble\@firstofone} +\@onlypreamble\caption@ifntgclass +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\caption@ifntgclass{% +% \end{macrocode} +% \begin{macrocode} + \caption@CheckCommand\@makecaption{% + % artikel|rapport|boek [2004/06/07 v2.1a NTG LaTeX document class] + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{{\CaptionLabelFont#1:} \CaptionTextFont#2}% + \ifdim \wd\@tempboxa >\hsize + {\CaptionLabelFont#1:} \CaptionTextFont#2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} +% \end{macrocode} +% \begin{macrocode} + \DeclareCaptionDefaultFont{labelfont}{\CaptionLabelFont} + \DeclareCaptionDefaultFont{textfont}{\CaptionTextFont} +% \end{macrocode} +% \begin{macrocode} +} +% \end{macrocode} +% +% \subsubsection{The thesis class} +% \changes{v1.2a}{2008/01/31}{thesis class support added} +% \changes{v1.2e}{2009/11/15}{Bugfix 09-11-14: thesis class support revised} +% +% \begin{macro}{\caption@ifthesisclass} +% \begin{macrocode} +\providecommand*\caption@ifthesisclass{% + \caption@ifundefined\cph@font + {\@gobble}% + {\caption@ifundefined\cpb@font\@gobble\@firstofone}} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\caption@ifthesisclass{% +% \end{macrocode} +% \begin{macrocode} + \caption@CheckCommand\@makecaption{% + % thesis.cls 1996/25/01 1.0g LaTeX document class (wm). + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \setbox\@tempboxa\hbox{{\cph@font #1:} {\cpb@font #2}}% + \ifdim \wd\@tempboxa >\hsize + \@hangfrom{\cph@font #1: }{\cpb@font #2\par}% + \else + \hbox to\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} +% \end{macrocode} +% \begin{macrocode} + \DeclareCaptionDefaultFormat{hang} + \DeclareCaptionDefaultFont{labelfont}{\cph@font} + \DeclareCaptionDefaultFont{textfont}{\cpb@font} +% \end{macrocode} +% \begin{macrocode} +} +% \end{macrocode} +% +% \subsubsection{The arabic Babel option} +% \changes{v1.8}{2018/05/20}{\package{arabic} babel package support added} +% +% \begin{macrocode} +\caption@ifundefined\ArabiCoreLoaded{% +% \end{macrocode} +% \begin{macro}{\caption@rl} +% \changes{v1.8}{2018/05/20}{This macro added} +% \begin{macrocode} + \let\caption@rl\@firstofone +}{% + \newcommand\caption@rl[1]{\if@rl\textRL{#1}\else\textLR{#1}\fi} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} + \def\fnum@figure{\figurename\nobreakspace\thefigure}% + \def\fnum@table{\tablename\nobreakspace\thetable}% +% \end{macrocode} +% \begin{macrocode} + \DeclareCaptionLabelSeparator{arabi}{ : } + \DeclareCaptionLabelSeparator{default}{% + \if@rl\caption@lsep@arabi\else\caption@lsep@colon\fi} +% \end{macrocode} +% \begin{macrocode} + \caption@CheckCommand\@makecaption{% + % arabicore.sty [2006/01/01 v1.0 Arabi Core switching commands (may still change)] + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{#1: #2}% + \sbox\@Arabitempboxa{\textRL{#2} : #1}% + \if@rl{ + \ifdim \wd\@Arabitempboxa >\hsize + \textRL{#2} : #1\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@Arabitempboxa\hfil}% + \fi}\else{ + \ifdim \wd\@tempboxa >\hsize + #1: #2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi}\fi + \vskip\belowcaptionskip}} +% \end{macrocode} +% \begin{macrocode} +} +% \end{macrocode} +% +% \subsubsection{The frenchb Babel option} +% \changes{v1.1}{2006/05/14}{\package{frenchb} babel package support added} +% +% \begin{macrocode} +\caption@ifundefined\FB@makecaption{}{% +% \end{macrocode} +% \begin{macrocode} + \caption@CheckCommand\@makecaption{% + % frenchb.ldf [2005/02/06 v1.6g French support from the babel system] + % frenchb.ldf [2007/10/05 v2.0e French support from the babel system] + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{#1\CaptionSeparator #2}% + \ifdim \wd\@tempboxa >\hsize + #1\CaptionSeparator #2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} +% \end{macrocode} +% \begin{macrocode} + \ifx\@makecaption\STD@makecaption + \DeclareCaptionLabelSeparator{default}{\CaptionSeparator} + \def\caption@frenchb{% supress frenchb warning + \let\STD@makecaption\@makecaption + \let\FB@makecaption\@makecaption} + \else + \ifx\@makecaption\@undefined\else + \caption@InfoNoLine{% + The definition of \protect\@makecaption\space + has been changed,\MessageBreak + frenchb will NOT customize it}% + \fi + \fi +% \end{macrocode} +% \begin{macrocode} +} +% \end{macrocode} +% +% \subsubsection{The frenchle/pro package} +% \changes{v1.1}{2006/05/14}{\package{frenchle/pro} package support added} +% +% \begin{macrocode} +\caption@ifundefined\frenchTeXmods{}{% +% \end{macrocode} +% \begin{macrocode} + \caption@CheckCommand\@makecaption{% + % french(le).sty [2006/10/03 The french(le) package /V5,9991/] + % french(le).sty [2007/06/28 The french(le) package /V5,9994/] + \def\@makecaption#1#2{% + \ifFTY% + \def\@secondofmany##1##2\void{##2}% + \def\@tempa{\@secondofmany#2\void}% + \ifx\@tempa\empty% + \let\captionseparator\empty% + \fi% + \@mcORI{#1}{\relax\captionfont{#2}}% + \else + \@mcORI{#1}{#2}% + \fi}}% +% \end{macrocode} +% \begin{macrocode} + \caption@CheckCommand\@makecaption{% + % french(le).sty [2007/02/11 The french(le) package /V5,9993/] + \def\@makecaption#1#2{% + \ifFTY% + \def\@secondofmany##1##2\void{##2}% + \protected@edef\@tempa{\@secondofmany#2\void}% + \ifx\@tempa\empty% + \let\captionseparator\empty% + \fi% + \@mcORI{#1}{\relax\captionfont{#2}}% + \else + \@mcORI{#1}{#2}% + \fi}}% +% \end{macrocode} +% \begin{macrocode} + \DeclareCaptionDefaultFont{textfont}{\itshape}% + \DeclareCaptionLabelSeparator{default}{\captionseparator\space}% +% \end{macrocode} +% \begin{macrocode} +} +% \end{macrocode} +% +% \subsubsection{The hebrew Babel option} +% \changes{v1.8}{2018/08/26}{\package{hebrew} package support added} +% +% \begin{macrocode} + \caption@CheckCommand\@makecaption{% + % rlbabel.def [2005/03/30 v2.3h Right-to-Left support from the babel system Hebrew language support from the babel system] + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip% + \begin{center}% + #1: #2% + \end{center} \par% + \vskip\belowcaptionskip}}% +% \end{macrocode} +% +% \subsubsection{The hungarian and magyar Babel option} +% \changes{v1.3}{2009/03/29}{\package{magyar} package support added} +% \changes{v1.3a}{2011/08/12}{\package{magyar} package support revised} +% \changes{v1.8b}{2018/08/26}{\package{magyar} package support revised} +% +% \begin{macrocode} +\DeclareCaptionListFormat{subperiod}{#2.} +% \end{macrocode} +% +% \begin{macrocode} +\caption@ifundefined\hunnewlabel{}{% + \caption@CheckCommand\@makecaption{% + % magyar.ldf [2005/03/30 v1.4j Magyar support from the babel system] + \def\@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{#1. #2}% + \ifdim \wd\@tempboxa >\hsize + {#1. #2\csname par\endcsname} + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}}} +% \end{macrocode} +% +% \begin{macrocode} +\def\caption@tempa#1{% + \@ifpackagewith{babel}{#1}{% + \caption@InfoNoLine{#1 babel option is loaded}% + \expandafter\addto\csname extras#1\endcsname{% + % change default labelsep and listformat + \caption@setdefaultlabelsep{period}% + \caption@setdefaultlistformat{subperiod}}% + \expandafter\addto\csname noextras#1\endcsname{% + % change default labelsep and listformat + \caption@setdefaultlabelsep{colon}% + \caption@setdefaultlistformat{subsimple}}% + }{}} +% \end{macrocode} +% \begin{macrocode} +\caption@tempa{hungarian} +\caption@tempa{magyar} +% \end{macrocode} +% +% TODO: babel-latvian/latvian.ldf +% +% \subsubsection{Unknown document class (or package)} +% \changes{v1.1}{2007/04/10}{Check of document class added} +% +% \begin{macrocode} +\caption@IfCheckCommand{% + \caption@setbool{documentclass}{1}% +}{% + \caption@setbool{documentclass}{0}% + \caption@InfoNoLine{% + Unknown document class (or package),\MessageBreak + standard defaults will be used}% + \caption@Debug{\string\@makecaption\space=\space\meaning\@makecaption\@gobble}% +} +% \end{macrocode} +% +% \subsection{Execution of options} +% +% \begin{macrocode} +\captionsetup{style=default,position=default,% + list,listformat=default,twoside=\if@twoside 1\else 0\fi} +% \end{macrocode} +% \begin{macrocode} +\ProcessOptions* +% \end{macrocode} +% +% \subsection{Making an `List of' entry} +% +% \begin{macro}{\caption@addcontentsline} +% \changes{v1.1}{2007/07/01}{This macro added} +% \changes{v1.3}{2010/10/26}{Error check added} +% \changes{v1.3}{2011/06/24}{Split into two macros} +% \changes{v1.4}{2011/08/19}{Split into three macros} +% \changes{v1.4}{2011/08/30}{Support for option \opt{listtype=} added} +% \changes{v1.5}{2012/01/15}{Usage of \cs{caption@addsubcontentslines} added} +% \changes{v1.7}{2015/09/15}{Argument \#3 which holds the environment name added to \cs{caption@lstfmt}} +% \changes{v1.7}{2015/09/20}{Unfortunately \package{subfig} defines and uses \cs{caption@lstfmt} as well, so I replaced the third argument with \cs{captionlisttype}} +% \changes{v1.8}{2018/09/06}{Adapted to the \package{chkfloat} package} +% |\caption@addcontentsline|\marg{type}\marg{list entry}\par +% Makes an entry in the list-of-whatever, if requested, +% i.e.~the argument \meta{list entry} is not empty and +% |listof=| was set to |true|. +% \begin{macrocode} +\newcommand\caption@addcontentsline[2]{% + \caption@ifcontentsline{#2}{% + \begingroup + \let\@tempa\@gobble + \caption@ifundefined\caption@listtype + {\edef\caption@listtype{#1}}% + {\let\@tempa\@firstofone}% + \caption@ifundefined\caption@listtype@ext + {}% + {\edef\caption@listtype{\caption@listtype\caption@listtype@ext}% + \let\@tempa\@firstofone}% + \@tempa + {\caption@Debug{addcontentsline: #1 => \caption@listtype}% +% \caption@setoptions\caption@listtype + \@namedef{the\caption@listtype}{\@nameuse{the#1}}}% + \expandafter\caption@@addcontentsline\expandafter{\caption@listtype}{#2}% + \endgroup}% + \caption@addsubcontentslines{#1}} +% \end{macrocode} +% \begin{macrocode} +\newcommand\caption@@addcontentsline[2]{% + {\let\\\space + \@ifundefined{ext@#1}% + {\caption@Error{No float type '#1' defined}}% + {\def\captionlisttype{#1}% + \caption@add@contentsline + {\csname ext@#1\endcsname}% + {#1}% + {\caption@lstfmt{\@nameuse{p@#1}}{\@nameuse{the#1}}}% + {\ignorespaces #2}% + \caption@chkfloat{#1}{#2}}}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@add@contentsline{% + \caption@@@addcontentsline} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@@@addcontentsline[4]{% +% \caption@ifundefined\main@Arabi@language{}% +% {\addtocontents{#1}{\xstring\select@language{\main@Arabi@language}}}% + \addcontentsline{#1}{#2}{\protect\numberline{#3}{#4}}} +% \end{macrocode} +% \begin{macrocode} +\let\caption@chkfloat\@gobbletwo +% \end{macrocode} +% \begin{macrocode} +\newcommand\caption@ifcontentsline[1]{% + \caption@iflist + {\def\@tempa{#1}}% + {\let\@tempa\@empty}% + \ifx\@tempa\@empty + \expandafter\@gobble + \else + \expandafter\@firstofone + \fi} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@addsubcontentslines[1]{} +% \end{macrocode} +% \end{macro} +% +% \subsection{Typesetting the caption} +% +% \begin{macro}{\ifcaption@star} +% If the starred form of |\caption| is used, this will be set to |true|. +% (It will be reset to |false| at the end of |\caption@@make|.) +% \begin{macrocode} +\newif\ifcaption@star +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@fnum} +% \changes{v1.1}{2007/08/21}{This macro added} +% |\caption@fnum|\marg{float type}\par +% Typesets the caption label; as replacement for |\fnum@|\meta{float type}. +% \begin{macrocode} +\newcommand*\caption@fnum[1]{\caption@lfmt{\@nameuse{#1name}}{\@nameuse{the#1}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@make} +% |\caption@make|\marg{float name}\marg{ref.\ number}\marg{text}\par +% Typesets the caption. +% \begin{macrocode} +\newcommand\caption@make[2]{\caption@@make{\caption@lfmt{#1}{#2}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@@make} +% \changes{v1.0b}{2004/05/16}{Bugfix 04-05-05: \cs{ifdim}\cs{captionindent=}\cs{z@} added} +% \changes{v1.0c}{2005/02/12}{Bugfix 04-10-26: Use \cs{@tempdima} instead of +% \cs{captionmargin} resp. \cs{captionwidth}; check for \cs{z@} added} +% \changes{v1.0c}{2005/02/12}{Bugfix: \cs{hskip}\cs{captionmargin} to the end +% of caption added} +% \changes{v1.0c}{2005/02/12}{Bugfix: \cs{strut} moved from here to \cs{caption@@@make}} +% \changes{v1.0c}{2005/02/12}{Single-line-check moved up so it can affect margins now} +% \changes{v1.0c}{2005/02/09}{Improvement: \cs{caption@ifh} added} +% \changes{v1.0c}{2005/02/09}{Bugfix: \cs{leavevmode} added} +% \changes{v1.0f}{2005/08/24}{Uses \cs{sbox} instead of \cs{setbox} in single-line-check} +% \changes{v1.0g}{2005/12/04}{Uses \cs{caption@slc} now} +% \changes{v1.0g}{2006/01/11}{Bugfix: \cs{caption@calcmargin} inside +% single-line-check replaced by \cs{relax}} +% \changes{v1.0g}{2006/01/11}{Bugfix: \cs{caption@startbox} will always be +% typeset in horizontal mode} +% \changes{v1.0i}{2006/05/13}{Uses \cs{caption@parbox} instead of \cs{caption@start/endbox}} +% \changes{v1.0j}{2007/01/04}{Oops, bugfix 04-05-05 got lost in v1.0h, re-added} +% \changes{v1.0n}{2007/04/03}{Usage of \cs{caption@ifoddpage} added} +% \changes{v1.1}{2007/07/29}{\cs{caption@calcmargin} moved below single-line-check} +% \changes{v1.1e}{2007/10/28}{\cs{caption@stepcounter} added} +% \changes{v1.5}{2012/03/15}{Uses \cs{caption@tempdima} instead of \cs{@tempdima}} +% \changes{v1.5}{2012/12/26}{max-margin stuff moved to \cs{caption@calcmargin}} +% \changes{v1.6}{2013/05/01}{Usage of \cs{caption@box} added} +% \changes{v1.7}{2016/01/31}{Adapted to the \package{bicaption} package} +% |\caption@@make|\marg{caption label}\marg{caption text} +% \begin{macrocode} +\newcommand\caption@@make[2]{% + \begingroup + \caption@@make@{#1}{#2}% + \endgroup + \caption@@make@epilogue} +% \end{macrocode} +% \begin{macrocode} +\newcommand\caption@@make@[2]{% + \caption@stepthecounter + \caption@beginhook +% \end{macrocode} +% +% Typeset the outer box |\caption@box| +% \begin{macrocode} + \caption@box\linewidth{% +% \end{macrocode} +% +% Special single-line treatment (option |singlelinecheck=|) +% \begin{macrocode} + \caption@ifslc{\caption@slc{#1}{#2}\caption@singleline\relax}{}% +% \end{macrocode} +% +% Typeset the left margin (option |margin=|) +% \begin{macrocode} + \caption@calcmargin + \caption@tempdima\captionmargin + \ifdim\captionmargin@=\z@ \else + \caption@ifoddpage{}{\advance\caption@tempdima\captionmargin@}% + \fi + \caption@ifh{\advance\caption@tempdima\caption@indent}% + \hspace\caption@tempdima +% \end{macrocode} +% +% We actually use a |\vbox| of width |\captionwidth - \caption@indent| +% to typeset the caption. +% \Note{\cs{captionindent} is \emph{not} supported if the caption format +% was defined with \cs{DeclareCaptionFormat*}.} +% \begin{macrocode} + \caption@tempdima\captionwidth + \caption@ifh{\advance\caption@tempdima-\caption@indent}% + \caption@parbox\caption@tempdima{% +% \end{macrocode} +% +% Typeset the indention (option |indention=|)\\ +% {\small Bugfix 04-05-05: +% |\hskip-\caption@indent| replaced by |\ifdim\caption@indent=\z@|\ldots} +% \begin{macrocode} + \caption@ifh{% + \ifdim\caption@indent=\z@ + \leavevmode + \else + \hskip-\caption@indent + \fi}% +% \end{macrocode} +% +% Typeset the caption itself and close the |\caption@parbox| +% \begin{macrocode} + \caption@@@make{#1}{#2}}% +% \end{macrocode} +% +% Typeset the right margin (option |margin=|) +% \begin{macrocode} + \caption@tempdima\captionmargin + \ifdim\captionmargin@=\z@ \else + \caption@ifoddpage{\advance\caption@tempdima\captionmargin@}{}% + \fi + \hspace\caption@tempdima +% \end{macrocode} +% +% Close the outer box |\caption@box| +% \begin{macrocode} + }% +% \end{macrocode} +% +% \begin{macrocode} + \caption@endhook} +% \end{macrocode} +% \begin{macrocode} +\newcommand\caption@@make@epilogue{% + \global\caption@starfalse} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@calcmargin} +% \changes{v1.0f}{2005/10/24}{Internal: \cs{ifcaption@width} replaced by +% \cs{ifdim}\cs{captionwidth=}\cs{z@}} +% \changes{v1.0g}{2006/01/12}{Improvement: Takes care of list environment now} +% \changes{v1.1}{2006/05/13}{Check of \cs{@listdepth} removed (not necessary anymore), +% use \cs{linewidth} instead of \cs{hsize}} +% \changes{v1.5}{2012/12/26}{max-margin stuff moved from \cs{caption@@make} to here} +% |\caption@calcmargin|\par +% Calculate |\captionmargin| \& |\captionwidth|, so both contain valid +% values. +% \begin{macrocode} +\newcommand*\caption@calcmargin{% + \caption@calcmargin@hook +% \end{macrocode} +% Check margin, if |\caption@minmargin| or |\caption@maxmargin| is set +% \begin{macrocode} + \ifx\caption@maxmargin\@undefined \else + \ifdim\captionmargin>\caption@maxmargin\relax + \captionmargin\caption@maxmargin\relax + \fi + \fi + \ifx\caption@minmargin\@undefined \else + \ifdim\captionmargin<\caption@minmargin\relax + \captionmargin\caption@minmargin\relax + \fi + \fi +% \end{macrocode} +% \begin{macrocode} + \ifdim\captionwidth=\z@ + \captionwidth\linewidth + \advance\captionwidth by -2\captionmargin + \advance\captionwidth by -\captionmargin@ + \else + \captionmargin\linewidth + \advance\captionmargin by -\captionwidth + \divide\captionmargin by 2 + \captionmargin@\z@ + \fi +% \end{macrocode} +% \begin{macrocode} + \caption@Debug{% + \string\hsize=\the\hsize, + \string\linewidth=\the\linewidth,\MessageBreak + \string\leftmargin=\the\leftmargin, + \string\rightmargin=\the\rightmargin,\MessageBreak + \string\margin=\the\captionmargin, + \string\margin@=\the\captionmargin@, + \string\width=\the\captionwidth}% +% \end{macrocode} +% \begin{macrocode} +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@slc} +% \changes{v1.1}{2007/06/13}{\cs{let}\cs{caption@hj}\cs{relax} added} +% \changes{v1.1}{2007/07/29}{\cs{caption@setup}\cs{caption@sls} added after \cs{begingroup}} +% \changes{v1.1}{2007/07/29}{\cs{caption@calcmargin} added} +% \changes{v1.1c}{2007/10/14}{Support of \cs{caption@slfmt} added} +% \changes{v1.1d}{2007/10/23}{`SingleLine' renamed to `singleline' for consistency} +% \changes{v1.3}{2010/09/04}{Split into \cs{caption@slc} and \cs{caption@@slc}} +% \changes{v1.5}{2012/12/26}{Merged into a single macro again} +% \changes{v1.5}{2013/04/14}{Definition and usage of \cs{ifsinglelinecaption} added} +% |\caption@slc|\marg{label}\marg{text}\marg{single-line-code}\marg{multi-line-code}\par +% This one does the single-line-check. +% \begin{macrocode} +\newcommand\caption@slc[4]{% + \caption@Debug{Begin SLC}% + \singlelinecaptiontrue + \begingroup + \caption@singleline + \let\caption@hj\@empty + \caption@calcmargin % calculate \captionwidth + \caption@prepareslc + \sbox\@tempboxa{\caption@@@make{#1}{#2}}% + \ifdim\wd\@tempboxa>\captionwidth + \endgroup + \singlelinecaptionfalse + #4% + \else + \endgroup + #3% + \fi + \caption@Debug{End SLC}} +% \end{macrocode} +% \begin{macrocode} +\newif\ifsinglelinecaption +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@singleline{% + \caption@xsetup\caption@opt@singleline + \let\caption@fmt\caption@slfmt} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@prepareslc} +% \changes{v1.0b}{2004/05/16}{Bugfix: Redefinition of \cs{label} \& \cs{@footnotetext} added} +% \changes{v1.0b}{2004/05/16}{Redefine \cs{stepcounter} instead of \cs{footnote(mark)}} +% \changes{v1.0c}{2005/02/12}{\cs{let}\cs{caption@hj}\cs{relax} added} +% \changes{v1.0f}{2005/07/09}{Support of \package{endnotes} package added} +% \changes{v1.1}{2007/06/13}{\cs{let}\cs{caption@hj}\cs{relax} moved to \cs{caption@slc}} +% \changes{v1.1}{2007/06/13}{Redefinition of \cs{(H@)refstepcounter} added} +% \changes{v1.1}{2007/08/12}{Redefinition of \cs{label} improved} +% \changes{v1.1c}{2007/10/06}{Definition of \cs{caption@l@stepcounter} added} +% \changes{v1.3}{2011/07/07}{Bugfix 11-07-06: Redefinition of \cs{footnote} and \cs{footnotemark} added, redefinition of \cs{stepcounter} and \cs{refstepcounter} dropped} +% \changes{v1.4a}{2011/10/21}{Redefinition of \cs{pagenote} from \textsf{memoir} document class added} +% \changes{v1.4a}{2011/10/22}{Redefinition of \cs{footnote} revised} +% \changes{v1.5}{2013/04/13}{Redefinition os \cs{glsunset} added} +% \changes{v1.8}{2018/01/21}{Redefinition of \cs{endnote} added (thanks to Markus Kohm)} +% \changes{v1.8}{2018/05/16}{Redefinition of \cs{acused} added} +% \changes{v1.8}{2018/05/26}{Definition method changed so it can be pre-defined by other packages} +% \changes{v1.8}{2018/05/27}{Redefinition of \cs{hypertarget} added} +% |\caption@prepareslc|\par +% Re-define anything which would disturb the single-line-check. +% \begin{macrocode} +\@ifundefined{caption@prepareslc}\def\g@addto@macro\caption@prepareslc{% + \let\label\caption@gobble + \let\hypertarget\@gobbletwo +% \end{macrocode} +% \begin{macrocode} + \let\caption@footnotemark@ORI\footnotemark + \def\footnote{\caption@withoptargs\caption@footnote}% + \def\footnotemark{\caption@withoptargs\caption@footnotemark}% + \let\@footnotetext\caption@gobble +% \end{macrocode} +% \begin{macrocode} + \let\caption@endnotemark@ORI\endnotemark + \def\endnote{\caption@withoptargs\caption@endnote}% + \def\endnotemark{\caption@withoptargs\caption@endnotemark}% + \let\@endnotetext\caption@gobble +% \end{macrocode} +% \begin{macrocode} + \let\pagenote\caption@gobble +% \end{macrocode} +% Adaption to the \package{acronym} package.\par +% See also \url{https://tex.stackexchange.com/questions/428788} +% \begin{macrocode} + \let\acused\@gobble + \let\AC@placelabel\@gobble +% \end{macrocode} +% Adaption to the \package{glossaries} package.\par +% Please note that while this adaption is usually sufficient +% it could give incorrect measuring results if \cs{gls} is both used +% for the very first time and more than once (for a particular acronym). +% The alternative would be using internal macros of the +% \package{glossaries} package which I would like to avoid.\par +% See also \url{https://tex.stackexchange.com/questions/108368} +% \begin{macrocode} + \let\glsunset\@gobble +% \end{macrocode} +% \begin{macrocode} +} +% \end{macrocode} +% \begin{macrocode} +\newcommand\caption@footnote[2]{% + \caption@footnotemark{#1}} +\newcommand\caption@footnotemark[1]{% + \begingroup + \let\stepcounter\caption@l@stepcounter + \caption@footnotemark@ORI#1% + \endgroup} +% \end{macrocode} +% \begin{macrocode} +\newcommand\caption@endnote[2]{% + \caption@endnotemark{#1}} +\newcommand\caption@endnotemark[1]{% + \begingroup + \let\stepcounter\caption@l@stepcounter + \caption@endnotemark@ORI#1 + \endgroup} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@l@stepcounter[1]{% + \advance\csname c@#1\endcsname\@ne\relax} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@applyfont} +% \changes{v1.3}{2010/09/04}{This macro added} +% |\caption@applyfont|\par +% This macro executes the font relevant macros, i.e. by default +% the options set by |justification=|, |font=|, and |size=|. +% \begin{macrocode} +\newcommand*\caption@applyfont{% + \caption@hj\captionfont\captionsize} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@@@make} +% \changes{v1.0b}{2004/05/16}{Bugfix 04-05-06: \cs{allowhyphens} added} +% \changes{v1.0c}{2005/02/12}{Bugfix 04-12-16: Use some kind of +% \cs{@startstrut}\cs{strutbox} instead of \cs{strut}} +% \changes{v1.0c}{2005/02/12}{Bugfix 05-01-23: \cs{@finalstrut}\cs{strutbox} added} +% \changes{v1.0d}{2005/05/05}{Use \cs{caption@ifempty}; +% \cs{let}\cs{caption@ifstrut}\cs{@secondoftwo} added} +% \changes{v1.0d}{2005/05/05}{Bugfix: Handling of \cs{ifcaption@star} changed} +% \changes{v1.0f}{2005/08/24}{Check for empty label added} +% \changes{v1.0f}{2005/08/25}{\cs{caption@iflf} added} +% \changes{v1.0j}{2007/02/18}{Usage of \cs{caption@tfmt} added} +% \changes{v1.1}{2007/05/07}{Bugfix: \cs{ifhmode} added to \cs{@finalstrut}} +% \changes{v1.2}{2007/11/17}{Made option \opt{size=} stronger than \opt{font=}} +% \changes{v1.3}{2010/09/04}{Uses \cs{caption@applyfont} now} +% \changes{v1.3}{2010/11/01}{Bugfix: If the caption text is empty, the text format will be set to \opt{simple} now} +% \changes{v1.7}{2016/02/01}{Bugfix: \cs{relax} added before \cs{caption@lsep} so the label separator +% will not be gobbled if the label font command ignores spaces, e.g. by usage of \cs{color}} +% \changes{v1.8}{2018/09/12}{\cs{par} replaced by \cs{captiontextend}} +% |\caption@@@make|\marg{caption label}\marg{caption text}\par +% This one finally typesets the caption paragraph, without margin and indention. +% \begin{macrocode} +\newcommand\caption@@@make[2]{% +% \end{macrocode} +% +% If the label is empty, we use no caption label separator. +% \begin{macrocode} + \sbox\@tempboxa{#1}% + \ifdim\wd\@tempboxa=\z@ + \let\caption@lsep\relax +% \@capbreakfalse + \fi +% \end{macrocode} +% +% If the text is empty, we use no caption label separator, too. +% (And no text format either.) +% \begin{macrocode} + \caption@ifempty{#2}{% + \let\caption@lsep\@empty + \let\caption@tfmt\@firstofone +% \@capbreakfalse +% \let\caption@ifstrut\@secondoftwo + }% +% \end{macrocode} +% +% Take care that |\caption@parindent| and |\caption@hangindent| will be used +% to typeset the paragraph. +% \begin{macrocode} + \@setpar{\@@par\caption@@par}\caption@@par +% \end{macrocode} +% +% Finally typeset the caption. +% \begin{macrocode} + \caption@applyfont + \caption@fmt + {\ifcaption@star\else + \begingroup + \captionlabelfont + #1% + \endgroup + \fi}% + {\ifcaption@star\else + \begingroup + \caption@iflf\captionlabelfont + \relax\caption@lsep + \endgroup + \fi}% + {{\captiontextfont + \captiontextstart + \caption@ifstrut + {\vrule\@height\ht\strutbox\@width\z@}% + {}% + \nobreak\hskip\z@skip % enable hyphenation + \caption@tfmt{#2}% +% \caption@ifstrut{\vrule\@height\z@\@depth\dp\strutbox\@width\z@}{}% + \caption@ifstrut + {\ifhmode\@finalstrut\strutbox\fi}% + {}% + \captiontextend}}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\captiontextstart{} +\newcommand*\captiontextend{\par} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@ifempty} +% \changes{v1.0d}{2005/05/05}{This macro added} +% \changes{v1.1}{2007/07/04}{Re-defines itself now} +% \changes{v1.2a}{2007/01/22}{Revised so \cs{label} will be detected, too} +% \changes{v1.2b}{2008/08/02}{Revised so \cs{index} and \cs{glossary} will be detected, too} +% |\caption@ifempty|\marg{text}\marg{true} (\emph{no} \meta{false})\par +% This one tests if the \meta{text} is actually empty. +% \Note{This will be done without expanding the text, +% therefore this is far away from being bullet-proof.} +% \Note{This macro is re-defining itself so only +% the first test (in a group) will actually be done.} +% \begin{macrocode} +\newcommand\caption@ifempty[1]{% + \caption@if@empty{#1}% + \caption@ifempty\@unused} +% \end{macrocode} +% \begin{macrocode} +\newcommand\caption@if@empty[1]{% + \def\caption@tempa{#1}% + \ifx\caption@tempa\@empty + \let\caption@ifempty\@secondoftwo + \else + \expandafter\def\expandafter\caption@tempa\expandafter{% + \caption@car#1\caption@if@empty\caption@nil}% + \def\caption@tempb{\caption@if@empty}% + \ifx\caption@tempa\caption@tempb + \let\caption@ifempty\@secondoftwo + \else + \def\caption@tempb{\ignorespaces}% + \ifx\caption@tempa\caption@tempb + \expandafter\caption@if@empty\expandafter{\@gobble#1}% + \else + \def\caption@tempb{\label}% + \ifx\caption@tempa\caption@tempb + \expandafter\caption@if@empty\expandafter{\@gobbletwo#1}% + \else + \def\caption@tempb{\index}% + \ifx\caption@tempa\caption@tempb + \expandafter\caption@if@empty\expandafter{\@gobbletwo#1}% + \else + \def\caption@tempb{\glossary}% + \ifx\caption@tempa\caption@tempb + \expandafter\caption@if@empty\expandafter{\@gobbletwo#1}% + \else + \let\caption@ifempty\@gobbletwo + \fi + \fi + \fi + \fi + \fi + \fi} +% \end{macrocode} +% \begin{macrocode} +\long\def\caption@car#1#2\caption@nil{#1}% same as \@car, but \long +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@@par} +% \changes{v1.0f}{2005/08/22}{Made this definition global} +% |\caption@@par|\par +% This command will be executed with every |\par| inside the caption. +% \begin{macrocode} +\newcommand*\caption@@par{% + \parindent\caption@parindent\hangindent\caption@hangindent}% +% \end{macrocode} +% \end{macro} +% +% \subsection{Types \& sub-types} +% +% \begin{macro}{\DeclareCaptionType} +% \changes{v1.1}{2007/08/12}{This macro added} +% \changes{v1.1a}{2007/09/07}{Three optional arguments added} +% \changes{v1.2}{2007/12/06}{Renamed from \cs{DeclareFloatingEnvironment} to \cs{DeclareCaptionType}} +% \changes{v1.2}{2007/12/21}{Optional argument revised, uses key-value syntax now} +% \changes{v1.2b}{2008/04/13}{Uses \cs{caption@within@default} now} +% \changes{v1.2b}{2008/08/02}{Support of \cs{float@exts} and \cs{float@addtolists} added} +% \changes{v1.2e}{2010/01/09}{Usage of \cs{caption@DeclareWithinOption} added} +% \changes{v1.3}{2011/08/06}{Definition of \cs{listofXXXes} added} +% \changes{v1.4a}{2011/10/29}{Outsourced as \package{newfloat} package} +% |\DeclareCaptionType|\oarg{options}\marg{environment}\oarg{name}\oarg{list name} +% \begin{macrocode} +\newcommand*\DeclareCaptionType{% + \RequirePackage{newfloat}% + \DeclareFloatingEnvironment} +\@onlypreamble\DeclareCaptionType +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@ForEachType} +% \changes{v1.4a}{2011/10/29}{This macro added} +% |\caption@ForEachType|\marg{code} +% will execute the given code for all (known) floating environments. +% \begin{macrocode} +\newcommand\caption@ForEachType[1]{% + \caption@ifundefined\ForEachFloatingEnvironment + {\def\@elt##1{#1}% + \caption@ifundefined\c@figure\@gobble\@elt{figure}% + \caption@ifundefined\c@table\@gobble\@elt{table}% + \let\@elt\relax + \newfloat@addtohook{#1}}% + {\ForEachFloatingEnvironment{#1}}} +% \end{macrocode} +% \begin{macrocode} +\providecommand\newfloat@addtohook[1]{% + \toks@=\expandafter{\newfloat@hook{##1}#1}% + \edef\@tempa{\def\noexpand\newfloat@hook####1{\the\toks@}}% + \@tempa} +% \end{macrocode} +% \begin{macrocode} +\providecommand*\newfloat@hook[1]{} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DeclareCaptionSubType} +% \changes{v1.2}{2007/11/16}{This macro added} +% \changes{v1.2a}{2008/03/11}{Bugfix: \cs{subfigurename} will be defined now} +% \changes{v1.2d}{2009/10/09}{Bugfix 08-10-01: Usage of \cs{caption@addtoreset} added} +% \changes{v1.3}{2011/01/01}{\cs{@dottedlofline} will be defined \& used now} +% \changes{v1.4}{2011/10/09}{Support of the titletoc package added} +% \changes{v1.5}{2011/12/29}{Usage of \cs{caption@addtoreset} replaced by \cs{@addtoreset}} +% \changes{v1.5}{2013/01/10}{Bugfix: Definition of autoref string corrected} +% \changes{v1.6}{2013/06/17}{Bugfix: \cs{c@tocdepth} will be set (locally) now} +% |\DeclareCaptionSubType|\oarg{numbering scheme}\marg{type}\\ +% |\DeclareCaptionSubType*|\oarg{numbering scheme}\marg{type}\par +% The starred variant provides the numbering format +% \meta{type}|.|\meta{subtype} while the non-starred variant simply +% uses \meta{subtype}. +% \begin{macrocode} +\newcommand*\DeclareCaptionSubType{% + \caption@teststar\caption@declaresubtype\@firstoftwo\@secondoftwo} +\@onlypreamble\DeclareCaptionSubType +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@declaresubtype[1]{% + \@testopt{\caption@@declaresubtype{#1}}{alph}} +\@onlypreamble\caption@declaresubtype +% \end{macrocode} +% \begin{macrocode} +\def\caption@@declaresubtype#1[#2]#3{% + \@ifundefined{c@#3}% + {\caption@Error{No float type '#3' defined}}% +% \end{macrocode} +% \begin{macrocode} + {\@ifundefined{c@sub#3}% + {\caption@Debug{New subtype `sub#3'}% + \newcounter{sub#3}% + \@addtoreset{sub#3}{#3}% + \@namedef{ext@sub#3}{\csname ext@#3\endcsname}% + \caption@declaresublistentry{#3}% + \@cons\caption@subtypelist{{#3}}}% + {\caption@Debug{Modify caption `sub#3'}}% +% \end{macrocode} +% Support of \package{titletoc} package +% \begin{macrocode} + \caption@ifundefined\contentsuse{}{% + \contentsuse{sub#3}{\csname ext@sub#3\endcsname}}% +% \end{macrocode} +% \begin{macrocode} + \@namedef{sub#3name}{}% + \@namedef{sub#3autorefname}{\csname #3autorefname\endcsname}% + #1% is \@firstoftwo in star form, and \@secondoftwo otherwise + {\@namedef{p@sub#3}{}% + \@namedef{thesub#3}{\csname the#3\endcsname.\@nameuse{#2}{sub#3}}}% + {\@namedef{p@sub#3}{\csname the#3\endcsname}% + \@namedef{thesub#3}{\@nameuse{#2}{sub#3}}}% + \@namedef{theHsub#3}{\csname theH#3\endcsname.\arabic{sub#3}}% + }} +% \end{macrocode} +% \begin{macrocode} +\@onlypreamble\caption@@declaresubtype +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@declaresublistentry{% + \caption@ifundefined\l@chapter + {\caption@@declaresublistentry\l@subsubsection}% + {\caption@@declaresublistentry\l@subsection}} +\@onlypreamble\caption@declaresublistentry +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@@declaresublistentry[2]{% + \ifx#1\@undefined + \caption@@@declaresublistentry\relax\@dottedtocline\caption@nil{#2}% + \else + \expandafter\caption@@@declaresublistentry#1{}{}\@dottedtocline\caption@nil{#2}% + \fi} +\@onlypreamble\caption@@declaresublistentry +% \end{macrocode} +% \begin{macrocode} +\long\def\caption@@@declaresublistentry#1\@dottedtocline#2\caption@nil#3{% + \def\@tempa{#1}% +% Does \l@(sub)subsection start with \@dottedtocline? + \ifx\@tempa\@empty +% Yes + \caption@@@@declaresublistentry{#3}#2\caption@nil + \else +% No + \caption@@@@declaresublistentry{#3}@{3.8em}{3.2em}\caption@nil + \fi} +\@onlypreamble\caption@@@declaresublistentry +% \end{macrocode} +% \begin{macrocode} +\def\caption@@@@declaresublistentry#1#2#3#4#5\caption@nil{% + \expandafter\caption@@@@@declaresublistentry\expandafter + {\csname @dotted\csname ext@#1\endcsname line\endcsname}{#1}{#3}{#4}} +\@onlypreamble\caption@@@@declaresublistentry +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@@@@@declaresublistentry[4]{% + \@namedef{l@sub#2}{#1{2}{#3}{#4}}% + \expandafter\caption@@@@@@declaresublistentry + \expandafter#1\expandafter{\csname ext@#2\endcsname depth}} +\@onlypreamble\caption@@@@@declaresublistentry +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@@@@@@declaresublistentry[2]{ + \ifx#1\relax + \def#1##1{% + \def\next{\@dottedtocline{##1}}% + \@ifundefined{c@#2}{}{% + \ifnum ##1>\@nameuse{c@#2}\relax + \let\next\@gobblefour + \else + \c@tocdepth=\@nameuse{c@#2}\relax + \fi}% + \next}% + \fi} +\@onlypreamble\caption@@@@@@declaresublistentry +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@subtypelist} +% An \cs{@elt}-list containing the subtypes defined +% with |\Declare|\-|Caption|\-|Sub|\-|Type|. +% \begin{macrocode} +\newcommand*\caption@subtypelist{} +% \end{macrocode} +% \end{macro} +% +% Unfortunately the \class{memoir} document class resets the +% \texttt{subfigure} resp.~\texttt{subtable} counter at the begin +% of floating environments, i.e.~at |\@float|. +% As a side-effect |\Continued|\-|Float| does not work correctly. +% For that reason we need to introduce macros to save and restore +% all sub-caption counters here. +% +% \begin{macro}{\caption@restorecounters} +% \changes{v1.5}{2013/05/01}{This macro added} +% |\caption@restore|\-|counters| restores all counters saved with +% |\caption@save|\-|counter|. +% \begin{macrocode} +\newcommand*\caption@restorecounters{% + \caption@restore@counters + \global\let\caption@restore@counters\@empty} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@restore@counters{} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\caption@savesubcounters} +% \changes{v1.5}{2013/05/01}{This macro added} +% |\caption@save|\-|sub|\-|counters| saves all sub-caption counters, +% so they can be restored with |\caption@restore|\-|counters| later on. +% \begin{macrocode} +\newcommand*\caption@savesubcounters{% + \def\@elt##1{\caption@savecounter{sub##1}}% + \caption@subtypelist + \let\@elt\relax}% +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@savecounter[1]{% + \edef\caption@tempa{% + \noexpand\l@addto@macro\noexpand\caption@restore@counters + {\noexpand\setcounter{#1}{\number\value{#1}}}}% + \caption@tempa} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@For} +% \changes{v1.1a}{2007/09/07}{This macro added} +% \changes{v1.2}{2007/11/16}{Renamed from \cs{ForFloatingEnvironments} to \cs{caption@For}} +% |\caption@For|\marg{elt-list}\marg{code with \#1}\\ +% |\caption@For*|\marg{elt-list}\marg{code with \#1} +% \begin{macrocode} +\newcommand*\caption@For{\caption@withoptargs\caption@@For} +%\@onlypreamble\caption@For +% \end{macrocode} +% \begin{macrocode} +\newcommand\caption@@For[3]{% + \caption@AtBeginDocument#1{% + \def\@elt##1{#3}% + \@nameuse{caption@#2}% + \let\@elt\relax}}% +%\@onlypreamble\caption@@For +% \end{macrocode} +% \end{macro} +% +% \subsection{subfig package adaptions} +% \changes{v1.1}{2007/07/07}{Several adaptions to the \package{subfig} package added} +% \changes{v1.4a}{2011/11/01}{Bugfix 11-11-01: Test for the \package{subfig} package revised} +% +% Since the \package{subfig} package is not maintained anymore, +% we have to make several adaptions to \thispackage~\version{1.1} here. +% Please note that we only support the version $1.3$ of the \package{subfig} package here. +% So older versions do not work with this version of \thispackage, and newer +% versions are expected to be adapted. +% \begin{macrocode} +\caption@AtBeginDocument{% + \def\@tempa{2005/06/28 ver: 1.3 subfig package}% + \expandafter\ifx\csname ver@subfig.sty\endcsname\@tempa + \caption@InfoNoLine{subfig package v1.3 is loaded}% +% \end{macrocode} +% \begin{macrocode} + \let\caption@setfloattype\@gobble + \let\@dottedxxxline\sf@NEW@dottedxxxline + \let\sf@subfloat\sf@NEW@subfloat +% \end{macrocode} +% \begin{macrocode} + \fi + \let\sf@NEW@dottedxxxline\@undefined + \let\sf@NEW@subfloat\@undefined} +% \end{macrocode} +% +% \begin{macro}{\@dottedxxxline} +% New version of |\@dottedxxxline| +% \begin{macrocode} +\def\sf@NEW@dottedxxxline#1#2#3#4#5#6#7{% + \begingroup + \caption@setfloattype{#1}% + \caption@setoptions{subfloat}% + \caption@setoptions{sub#1}% + \ifnum #3>\@nameuse{c@#2depth}\else + \@dottedtocline{\z@}{#4}{#5}{#6}{#7}% + \fi + \endgroup} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\sf@subfloat} +% \changes{v1.4b}{2011/12/29}{Bugfix 11-12-23: Usage of \cs{caption@warmup} added} +% New version of |\sf@subfloat| +% \begin{macrocode} +\def\sf@NEW@subfloat{% + \begingroup + \@nameuse{caption@warmup}% + \caption@setfloattype\@captype + \sf@ifpositiontop{% + \maincaptiontoptrue + }{% + \maincaptiontopfalse + }% + \caption@setoptions{subfloat}% + \caption@setoptions{sub\@captype}% + \let\sf@oldlabel=\label + \let\label=\subfloat@label + \ifmaincaptiontop\else + \advance\@nameuse{c@\@captype}\@ne + \fi + \refstepcounter{sub\@captype}% + \setcounter{sub\@captype @save}{\value{sub\@captype}}% + \@ifnextchar [% %] match left bracket + {\sf@@subfloat}% + {\sf@@subfloat[\@empty]}} +% \end{macrocode} +% \end{macro} +% +% \iffalse +% +% \fi +% +% \clearpage +% \begin{thebibliography}{99} +% \bibitem{TLC2} +% Frank Mittelbach and Michel Goossens:\\ +% \newblock {\em The {\LaTeX} Companion (2nd.~Ed.)},\\ +% \newblock Addison-Wesley, 2004. +% +% \bibitem{Anne} +% Anne Br\"uggemann-Klein:\\ +% \emph{Einf\"uhrung in die Dokumentverarbeitung},\\ +% B.G. Teubner, Stuttgart, 1989 +% +% \bibitem{hyperref} +% Sebastian Rahtz \& Heiko Oberdiek:\\ +% \href{http://www.ctan.org/pkg/hyperref}% +% {\emph{Hypertext marks in \LaTeX}},\\ +% November 12, 2007 +% +% \bibitem{refcount} +% Heiko Oberdiek:\\ +% \href{http://www.ctan.org/pkg/refcount}% +% {\emph{The refcount package}},\\ +% 2006/02/20 +% +% \bibitem{threeparttable} +% Donald Arseneau:\\ +% \href{http://www.ctan.org/pkg/threeparttable}% +% {\emph{Three part tables: title, tabular environment, notes}},\\ +% 2003/06/13 +% \end{thebibliography} +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \clearpage +% \Finale +% +\endinput diff --git a/macros/latex/contrib/caption/cat.eps b/macros/latex/contrib/caption/cat.eps new file mode 100644 index 0000000000..0042ea088f --- /dev/null +++ b/macros/latex/contrib/caption/cat.eps @@ -0,0 +1,305 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%BoundingBox: 44 527 80 559 +%%Creator: COREL DRAW +%%Title: CAT.TMP +%%CreationDate: Sat Jan 18 17:29:05 1992 + +%%DocumentFonts: +%%EndComments +%%BeginProlog +% -------------- POSTSCRIPT PROLOG FOR CORELDRAW 2.X ------ +% Copyright Corel Systems Corporation 1990 +/AutoFlatness 0 def/wCorelDict 300 dict def +wCorelDict begin/bd{bind def}bind def/ld{load def}bd +/xd{exch def}bd/_ null def/$c 0 def/$m 0 def +/$y 0 def/$k 0 def/$t 1 def/$n _ def/$o 0 def +/$fil 0 def/$C 0 def/$M 0 def/$Y 0 def/$K 0 def +/$T 1 def/$N _ def/$O 0 def/$PF false def +/$pan 0 def/$h false def/$al 0 def/$tr 0 def +/$le 0 def/$lx 0 def/$ly 0 def/$ctm matrix currentmatrix def +/$ptm matrix def/$ttm matrix def/$stm matrix def +/$skm matrix def/$fst 128 def/$pad 0 def/$rox 0 def +/$roy 0 def currentscreen/@dsp xd/$dsp/@dsp def +/$dsa xd/$dsf xd/$sdf false def/$SDF false def +/$Scra 0.0 def statusdict/pageparams known{statusdict begin +pageparams end 1 ne{/$Scra -90.0 def}if pop pop pop}if +/$sv 0 def/@cp/closepath ld/@gs/gsave ld/@gr/grestore ld +/@np/newpath ld/@sv{/$sv save def}bd/@rs{$sv restore}bd +/@ss{load setscreen}bd AutoFlatness 1 eq{/$cpx ([Error: PathTooComplex; OffendingCommand: AnyPaintingOperator;\n) def +/@err1{$cpx print flush newpath}bd/@ifl{currentflat dup 10 gt{pop @err1 exit}if 2 add setflat}bd +/@fill/fill ld/fill{currentflat{{@fill}stopped{@ifl}{exit}ifelse}bind loop setflat}bd +/@eofill/eofill ld/eofill{currentflat{{@eofill}stopped{@ifl}{exit}ifelse}bind loop setflat}bd +/@clip/clip ld/clip{currentflat{{@clip}stopped{initclip @ifl}{exit}ifelse}bind loop setflat}bd +/@eoclip/eoclip ld/eoclip{currentflat{{@eoclip}stopped{initclip @ifl}{exit}ifelse}bind loop setflat}bd +/@stroke/stroke ld/stroke{currentflat{{@stroke}stopped{@ifl}{exit}ifelse}bind loop setflat}bd +}if/InRange{3 -1 roll 2 copy le{pop}{exch pop}ifelse +2 copy ge{pop}{exch pop}ifelse}bd/wDstChck{2 1 roll dup 3 -1 roll +eq{1 add}if}bd/@dot{dup mul exch dup mul add 1 exch sub 2 div}bd +/@lin{exch pop abs 1 exch sub}bd/@MN{2 copy le{pop}{exch pop}ifelse}bd +/setcmykcolor where{pop}{/setcmykcolor{4 1 roll +3{3 index add 1 @MN 1 exch sub 3 1 roll}repeat +setrgbcolor pop}bd}ifelse/colorimage where{pop}{/colorimage{/$ncl xd +pop pop pop pop{currentfile $dat readhexstring pop}repeat +pop}bd}ifelse/@tc{dup 1 ge{pop}{4{dup 6 -1 roll +mul exch}repeat pop}ifelse}bd/@spc{7 2 roll +ColorSeparationMode 1 eq{6 index @tc 0 4 $ink sub index +exch pop}{5 index dup _ eq{pop 0 4 $ink sub index +exch pop}{CurrentInkName eq{6 index}{0}ifelse}ifelse}ifelse +5 1 roll 8 -2 roll 6{pop}repeat 1 exch sub dup setgray +1 eq exch 1 eq and not}bd/@scc{$ink -1 eq +{$c $m $y $k $t @tc setcmykcolor true}{$o $c $m $y $k $t $n @spc +}ifelse}bd/@SCC{$ink -1 eq{$C $M $Y $K $T @tc setcmykcolor true}{ +$O $C $M $Y $K $T $N @spc}ifelse}bd/@sft{ +/$tx $tllx $pxf add dup $tllx gt{$pwid sub}if def +/$ty $tury $pyf sub dup $tury lt{$phei add}if def}bd +/@stb{pathbbox/$ury xd/$urx xd/$lly xd/$llx xd}bd +/@ep{{cvx exec}forall}bd/@tp{@sv/$in true def +2 copy dup $lly le{/$in false def}if $phei sub $ury ge{/$in false def}if +dup $urx ge{/$in false def}if $pwid add $llx le{/$in false def}if +$in{@np 2 copy moveto $pwid 0 rlineto 0 $phei neg rlineto +$pwid neg 0 rlineto 0 $phei rlineto clip @np +$pn cvlit load aload pop 7 -1 roll 5 index sub +7 -1 roll 3 index sub translate/$ctm matrix currentmatrix def +@ep pop pop pop pop}{pop pop}ifelse @rs}bd/@th{@sft +0 1 $tly 1 sub{dup $psx mul $tx add{dup $llx gt{$pwid sub}{exit}ifelse +}loop exch $phei mul $ty exch sub 0 1 $tlx 1 sub{$pwid mul +3 copy 3 -1 roll add exch @tp pop}for pop pop}for}bd +/@tv{@sft 0 1 $tlx 1 sub{dup $pwid mul $tx add +exch $psy mul $ty exch sub{dup $ury lt{$phei add}{exit}ifelse}loop +0 1 $tly 1 sub{$phei mul 3 copy sub @tp pop}for +pop pop}for}bd/@pf{@gs $ctm setmatrix $pm concat +@stb @gs ColorSeparationMode 0 eq{1 setgray eofill}{ +$o 0 0 0 0 0 (Black) @spc{eofill}if}ifelse +@gr eoclip Bburx Bbury $pm itransform/$tury xd/$turx xd +Bbllx Bblly $pm itransform/$tlly xd/$tllx xd +/$wid $turx $tllx sub def/$hei $tury $tlly sub def +$wid 0 gt $hei 0 gt and{$pn cvlit load aload pop +/$pd xd 3 -1 roll sub/$phei xd exch sub/$pwid xd +/$tlx $wid $pwid div ceiling 1 add def/$tly $hei $phei div ceiling 1 add def +$psx 0 eq{@tv}{@th}ifelse}if @gr @np}bd/@dlt{ColorSeparationMode 0 eq{ +/$dc $toc $tot mul $frc $frt mul dup/$c xd sub $fst 1 sub div def +/$dm $tom $tot mul $frm $frt mul dup/$m xd sub $fst 1 sub div def +/$dy $toy $tot mul $fry $frt mul dup/$y xd sub $fst 1 sub div def +/$dk $tok $tot mul $frk $frt mul dup/$k xd sub $fst 1 sub div def +true}{$o $frc $frm $fry $frk $frt $frn @spc +dup{/$frk 1 currentgray sub def}{/$frk 0 def}ifelse +$o $toc $tom $toy $tok $tot $ton @spc dup{/$tok 1 currentgray sub def} +{/$tok 0 def}ifelse or dup{/$c 0 def/$m 0 def/$y 0 def/$k $frk def +/$dc 0 def/$dm 0 def/$dy 0 def/$dk $tok $frk sub $fst 1 sub div def}if +}ifelse}bd/@ftl{1 index 4 index sub dup $pad mul dup/$pdw xd +2 mul sub $fst div/$wid xd 2 index sub/$hei xd +pop translate $c $m $y $k 4 copy ColorSeparationMode 0 ne +{1 exch sub setgray pop pop pop}{setcmykcolor}ifelse +0 0 moveto 0 $hei lineto $pdw $hei lineto $pdw 0 lineto 0 0 lineto fill +$pdw 0 translate $fst{4 copy ColorSeparationMode 0 ne +{1 exch sub setgray pop pop pop}{setcmykcolor}ifelse +0 0 moveto 0 $hei lineto $wid $hei lineto $wid 0 lineto 0 0 lineto fill +$wid 0 translate $dk add 4 1 roll $dy add 4 1 roll +$dm add 4 1 roll $dc add 4 1 roll}repeat $dk sub 4 1 roll +$dy sub 4 1 roll $dm sub 4 1 roll $dc sub 4 1 roll +ColorSeparationMode 0 ne{1 exch sub setgray pop pop pop} +{setcmykcolor}ifelse 0 0 moveto 0 $hei lineto $pdw $hei lineto $pdw 0 lineto 0 0 lineto fill +}bd/@ftr{1 index 4 index sub dup $rox mul/$row xd +2 div 1 index 4 index sub dup $roy mul/$roh xd +2 div 2 copy dup mul exch dup mul add sqrt +$row dup mul $roh dup mul add sqrt add dup/$hei xd $fst div/$wid xd +4 index add $roh add exch 5 index add $row add +exch translate pop pop pop pop currentflat 5 mul setflat +$c $m $y $k 4 copy ColorSeparationMode 0 ne +{1 exch sub setgray pop pop pop}{setcmykcolor}ifelse +$wid 0 moveto 0 0 $hei 0 360 arc fill 1.0 $pad 2 mul sub dup scale +$fst{4 copy ColorSeparationMode 0 ne{1 exch sub setgray pop pop pop} +{setcmykcolor}ifelse $wid 0 moveto 0 0 $hei 0 360 arc fill +/$hei $hei $wid sub def $dk add 4 1 roll $dy add 4 1 roll +$dm add 4 1 roll $dc add 4 1 roll}repeat pop pop pop pop}bd +/@ff{@gs @dlt{$ctm setmatrix eoclip newpath Bbllx Bblly moveto +Bbllx Bbury lineto Bburx Bbury lineto Bburx Bblly lineto +$fan rotate pathbbox newpath $fty 1 eq{@ftr}{@ftl}ifelse}if +@gr @np}bd/@Pf{@sv ColorSeparationMode 0 eq $ink 3 eq or{$ctm setmatrix +72 1000 div dup matrix scale dup concat dup Bburx exch Bbury exch itransform +ceiling cvi/Bbury xd ceiling cvi/Bburx xd Bbllx exch Bblly exch itransform +floor cvi/Bblly xd floor cvi/Bbllx xd $Prm aload pop +$Psn load exec}{1 setgray eofill}ifelse @rs +@np}bd/@ftx{{(0) dup 3 -1 roll 0 exch put +@gs true charpath currentpoint $ctm setmatrix +@@txt @gr @np moveto $tr 0 rmoveto}forall pop}bd +/@sm{/$ctm $ctm currentmatrix def}bd/@lorg{$lx $ly moveto +/$ly $ly $le sub def}bd/@ft{matrix currentmatrix 3 1 roll +$sdf{$scf $sca $scp @ss}if $fil 1 eq{/@@txt/@pf ld @ftx}{$fil 2 eq +{/@@txt/@ff ld @ftx}{$fil 3 eq{/@@txt/@Pf ld @ftx}{@scc +{dup $tr exch 0 exch ashow}if pop pop}ifelse}ifelse}ifelse +$sdf{$dsf $dsa $dsp @ss}if setmatrix}bd/@st{ +matrix currentmatrix 3 1 roll $SDF{$SCF $SCA $SCP @ss}if +@SCC{{(0) dup 3 -1 roll 0 exch put @gs true charpath currentpoint +$ctm setmatrix $ptm concat stroke @gr moveto $tr 0 rmoveto}forall +pop}{pop pop}ifelse $SDF{$dsf $dsa $dsp @ss}if +setmatrix}bd/@pt{dup length exch}bd/@te{@pt +@lorg @ft cleartomark [}bd/@tr{@pt @lorg @st cleartomark [}bd +/@ta{@pt @lorg 2 copy @gs @ft @gr @st cleartomark [}bd +/@t@a{@pt @lorg 2 copy @gs @st @gr @ft cleartomark [}bd +/g{1 exch sub/$k xd/$c 0 def/$m 0 def/$y 0 def/$t 1 def/$n _ def/$fil 0 def +}bd/G{1 exch sub/$K xd/$C 0 def/$M 0 def/$Y 0 def/$T 1 def/$N _ def}bd +/k{/$k xd/$y xd/$m xd/$c xd/$t 1 def/$n _ def/$fil 0 def}bd +/K{/$K xd/$Y xd/$M xd/$C xd/$T 1 def/$N _ def}bd +/x{1 exch sub/$t xd/$n xd/$k xd/$y xd/$m xd/$c xd/$fil 0 def}bd +/X{1 exch sub/$T xd/$N xd/$K xd/$Y xd/$M xd/$C xd}bd +/d/setdash ld/i{dup 0 ne{setflat}{pop}ifelse}bd +/j/setlinejoin ld/J/setlinecap ld/M/setmiterlimit ld +/w/setlinewidth ld/O{/$o xd}bd/R{/$O xd}bd +/c/curveto ld/C/c ld/v{4 -2 roll 2 copy 6 -2 roll curveto}bd +/V/v ld/y{2 copy curveto}bd/Y/y ld/l/lineto ld +/L/l ld/m/moveto ld/n/newpath ld/N/newpath ld +/F{matrix currentmatrix $sdf{$scf $sca $scp @ss}if +$fil 1 eq{@pf}{$fil 2 eq{@ff}{$fil 3 eq{@Pf}{@scc{eofill}{@np}ifelse +}ifelse}ifelse}ifelse $sdf{$dsf $dsa $dsp @ss}if +setmatrix}bd/f{@cp F}bd/S{matrix currentmatrix +$ctm setmatrix $SDF{$SCF $SCA $SCP @ss}if @SCC{$skm currentmatrix +$ptm concat stroke setmatrix}{@np}ifelse $SDF{$dsf $dsa $dsp @ss}if +setmatrix}bd/s{@cp S}bd/B{@gs F @gr S}bd/b{@cp B}bd +/W{eoclip}bd/p{/$pm xd 7{pop}repeat/$pyf xd/$pxf xd +/$pn xd/$fil 1 def}bd/P{11{pop}repeat}bd/z{/$al xd +/$tr xd/$le xd exch findfont exch scalefont setfont}bd +/Z{dup type 0 type eq{/$bDir xd}if findfont +dup maxlength 1 add dict exch dup{1 index/FID ne{3 index +3 1 roll put}{pop pop}ifelse}forall pop dup dup/Encoding get +256 array copy dup/$fe xd/Encoding exch put +dup/Fontname 3 index put 3 -1 roll dup length 0 ne{0 exch{ +dup type 0 type eq{exch pop}{$fe exch 2 index exch put +1 add}ifelse}forall pop}if definefont pop}bd +/e{@sm concat [/t{@te}def}bd/r{@sm concat [/t{@tr}def}bd +/o{@sm concat [/t{pop}def}bd/a{@sm concat [/t{@ta}def}bd +/t{@te}def/T{cleartomark @np/$lx 0 def/$ly 0 def +$ctm setmatrix/$ttm matrix def}bd/u{}bd/U{}bd +/A{pop}bd/H{/$h true def}bd/h{@cp H}bd/q/@gs ld +/Q/@gr ld/E{5 array astore exch cvlit exch def}bd +/`{}bd/~{}bd/@{}bd/&{}bd/CorelDrawRencodeVect [ +16#80/grave/circumflex/tilde/dotlessi/florin/quotedblleft/quotedblright/guilsinglleft +16#88/guilsinglright/fi/fl/dagger/daggerdbl/endash/periodcentered/breve +16#90/quotedblbase/ellipsis/perthousand/trademark/Pt/fractionbar +16#98/divide 16#a1/exclamdown/cent/sterling/currency/yen/bar/section +16#a8/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/emdash/registered/overbar +16#b0/ring/plusminus/twosuperior/threesuperior/acute/mu/paragraph/bullet +16#b8/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown +16#c0/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla +16#c8/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis +16#d0/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/OE +16#d8/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls +16#e0/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla +16#e8/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis +16#f0/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/oe +16#f8/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis +] def/@cc{currentfile $dat readhexstring pop}bd +/@ii{concat 3 index 3 index m 3 index 1 index l +2 copy l 1 index 3 index l 3 index 3 index l +clip pop pop pop pop}bd/@E{/Bbury xd/Bburx xd +/Bblly xd/Bbllx xd}bd/@c{@cp}bd/@p{/$fil 1 def +/$pm xd/$psy xd/$psx xd/$pyf xd/$pxf xd/$pn xd}bd +/@P{/$fil 3 def/$Psn xd array astore/$Prm xd}bd +/@k{/$fil 2 def/$roy xd/$rox xd/$pad xd/$fty xd/$fan xd +$fty 1 eq{/$fan 0 def}if/$tok xd/$toy xd/$tom xd/$toc xd +/$frk xd/$fry xd/$frm xd/$frc xd/$frn _ def/$frt 1 def/$ton _ def/$tot 1 def +}bd/@x{/$fil 2 def/$roy xd/$rox xd/$pad xd +/$fty xd/$fan xd 1 exch sub/$tot xd/$ton xd/$tok xd/$toy xd/$tom xd/$toc xd +1 exch sub/$frt xd/$frn xd/$frk xd/$fry xd/$frm xd/$frc xd}bd +/@i{@sm @gs @ii 5 index 1 ne{@gs 1 g F @gr}if +1 eq 5 index 1 eq and{@gs $ctm setmatrix F @gr}if +@np/$ury xd/$urx xd/$lly xd/$llx xd/$bts xd +/$hei xd/$wid xd/$dat $wid $bts mul 8 div ceiling cvi string def +$bts 1 eq{@SCC/$frg xd}{1 G @SCC/$frg xd}ifelse +$frg{$SDF{$SCF $SCA $SCP @ss}if $llx $lly translate +$urx $llx sub $ury $lly sub scale $wid $hei abs +$bts 1 eq{false}{$bts}ifelse [ $wid 0 0 $hei neg 0 +$hei 0 gt{$hei}{0}ifelse]/@cc load $bts 1 eq{imagemask}{image}ifelse +$SDF{$dsf $dsa $dsp @ss}if}{$hei{@cc pop}repeat}ifelse +@gr $ctm setmatrix}def/@M {@sv}bd/@N{/@cc{}def +12 -1 roll neg 12 1 roll @i @rs}bd/@I{@sm @gs +@ii @np/$ury xd/$urx xd/$lly xd/$llx xd/$ncl xd +/$bts xd/$hei xd/$wid xd/$dat $wid $bts mul $ncl mul 8 div ceiling cvi string def +$llx $lly translate $urx $llx sub $ury $lly sub scale +$wid $hei $bts [ $wid 0 0 $hei neg 0 $hei]/@cc load +false $ncl colorimage @gr $ctm setmatrix}bd +/@t{/$lx 0 def/$ly 0 def/$stm $stm currentmatrix def +3 1 roll translate $ttm concat 1 exch t $stm setmatrix}def +/@n{/$ttm exch matrix rotate def}bd/@z{ exch findfont exch scalefont setfont +}bd/@s{}bd/@l{}bd/@B{@gs S @gr F}bd/@b{@cp @B}bd +/@a{@sm concat [/t{@t@a}def}bd/@w{5 2 roll dup/$pan xd +matrix rotate/$ptm xd matrix scale $ptm dup concatmatrix/$ptm xd +1 eq{$ptm exch dup concatmatrix/$ptm xd}{pop}ifelse +1 w}bd/@g{1 eq dup/$sdf xd{/$scp xd/$sca xd +/$scf xd}if}bd/@G{1 eq dup/$SDF xd{/$SCP xd +/$SCA xd/$SCF xd}if}bd/@D{3 copy @ss/$dsp xd +/$dsa xd/$dsf xd}bd/@j{@sv @np}bind def/@J{@rs}bind def +/@sep{/ColorSeparationMode where{pop}{/ColorSeparationMode 0 def +/CurrentInkName (Composite) def}ifelse ColorSeparationMode 0 eq +{/CurrentInkName (Composite) def}if/CurrentInkName where{pop}{ +/CurrentInkName (Composite) def}ifelse CurrentInkName (Composite) eq{/$ink -1 def} +{CurrentInkName (Cyan) eq{/$ink 0 def} {CurrentInkName (Magenta) eq{/$ink 1 def} +{CurrentInkName (Yellow) eq{/$ink 2 def} {CurrentInkName (Black) eq{/$ink 3 def} +{/$ink 4 def}ifelse}ifelse}ifelse}ifelse}ifelse}bd +@sep/@whi{@gs -72000 dup moveto -72000 72000 lineto +72000 dup lineto 72000 -72000 lineto closepath 1 setgray fill +@gr}bd/@neg{ [{1 exch sub}/exec cvx currenttransfer/exec cvx] cvx settransfer +@whi}bd/@reg{[] 0 d 0 setgray .3 setlinewidth +2 copy 5.4 0 360 arc closepath 2 copy moveto 9 0 rlineto +2 copy moveto -9 0 rlineto 2 copy moveto 0 9 rlineto +moveto 0 -9 rlineto stroke}bd/leftbracket{(\050)}def +/rightbracket{(\051)}def + +%%EndProlog +%%BeginSetup +11.4737 setmiterlimit +1.00 setflat +/$fst 128 def + +%%EndSetup +@sv +/$ctm matrix currentmatrix def +u +%%Note: Object +45.22 528.19 78.98 558.14 @E +0 J 0 j [] 0 d 0 R 0 @G +0.00 0.00 0.00 1.00 K +1.01 1.01 0.00 [1.00000 0.00000 0.00000 1.00000 0.00000 0.00000] 0 @w +%%CURV 106 +73.30 539.78 m +73.08 538.42 72.22 537.26 71.78 536.33 C +72.79 534.67 73.73 531.43 74.81 530.64 C +74.59 530.64 77.04 528.84 73.87 529.06 C +73.08 529.34 73.08 530.93 70.20 533.81 C +69.70 533.74 70.56 530.57 71.50 529.63 c +73.15 528.19 70.27 528.55 70.13 528.62 C +68.98 529.34 68.62 534.60 67.03 536.26 c +66.24 537.19 65.16 536.98 64.30 536.90 C +63.22 536.62 60.62 537.19 60.55 534.02 C +60.62 532.66 62.14 530.21 62.86 529.78 c +65.30 528.41 62.06 528.34 61.70 528.77 C +61.13 529.34 60.19 530.64 59.26 531.65 C +57.74 532.44 56.38 533.66 56.02 534.96 C +54.94 534.74 53.86 534.17 53.64 533.23 C +53.42 532.22 53.86 531.58 54.86 530.14 C +56.02 529.85 56.38 529.27 56.02 528.98 c +55.87 528.84 53.71 528.62 53.57 528.91 C +52.70 529.49 51.70 531.86 51.19 533.16 c +50.90 533.88 49.97 535.82 51.55 537.77 C +51.98 538.49 51.91 539.86 51.77 540.65 c +51.55 541.94 51.55 542.74 52.42 544.46 C +49.75 546.77 45.22 551.23 49.61 557.14 C +50.11 557.64 51.55 558.14 50.76 556.27 C +49.82 553.68 46.66 551.45 53.42 546.19 C +54.50 546.91 58.97 546.48 60.48 546.19 c +64.66 545.33 65.52 545.33 68.40 546.05 C +68.76 546.19 68.83 547.99 70.34 549.22 C +70.06 550.15 72.00 551.45 72.22 552.53 C +72.65 553.39 73.66 550.73 73.66 550.66 C +73.58 551.23 74.66 552.31 74.81 552.96 C +75.74 553.25 75.10 550.94 75.89 549.50 c +76.32 548.93 76.68 549.07 77.11 547.70 C +77.47 546.34 78.98 545.18 76.54 543.89 c +75.17 543.17 74.59 543.31 73.58 542.88 C +73.58 542.23 73.51 540.79 73.30 539.78 c +@c +S +U +@rs +%%Trailer + end diff --git a/macros/latex/contrib/caption/elephant.eps b/macros/latex/contrib/caption/elephant.eps new file mode 100644 index 0000000000..a38bfcb75d --- /dev/null +++ b/macros/latex/contrib/caption/elephant.eps @@ -0,0 +1,639 @@ +%!PS-Adobe-2.0 EPSF-1.2 +%%Creator:Adobe Illustrator(TM) 1.1 0000000000 +%%For: +%%Title:elephant.ps +%%CreationDate:25/4/88 7:57 pm +%%DocumentProcSets:Adobe_Illustrator_1.1 0 0 +%%DocumentSuppliedProcSets:Adobe_Illustrator_1.1 0 0 +%%DocumentFonts:Courier +%%BoundingBox: 40 -505 507 -87 +%%TemplateBox:0 -720 576 0 +%%EndComments +%%BeginProcSet:Adobe_Illustrator_1.1 0 0 +% Copyright (C) 1987 Adobe Systems Incorporated. +% All Rights Reserved. +% Adobe Illustrator is a trademark of Adobe Systems Incorporated. +/Adobe_Illustrator_1.1 dup 100 dict def load begin +/Version 0 def +/Revision 0 def +% definition operators +/bdef {bind def} bind def +/ldef {load def} bdef +/xdef {exch def} bdef +% graphic state operators +/_K {3 index add neg dup 0 lt {pop 0} if 3 1 roll} bdef +/_k /setcmybcolor where +{/setcmybcolor get} {{1 sub 4 1 roll _K _K _K setrgbcolor pop} bind} ifelse def +/g {/_b xdef /p {_b setgray} def} bdef +/G {/_B xdef /P {_B setgray} def} bdef +/k {/_b xdef /_y xdef /_m xdef /_c xdef /p {_c _m _y _b _k} def} bdef +/K {/_B xdef /_Y xdef /_M xdef /_C xdef /P {_C _M _Y _B _k} def} bdef +/d /setdash ldef +/_i currentflat def +/i {dup 0 eq {pop _i} if setflat} bdef +/j /setlinejoin ldef +/J /setlinecap ldef +/M /setmiterlimit ldef +/w /setlinewidth ldef +% path construction operators +/_R {.25 sub round .25 add} bdef +/_r {transform _R exch _R exch itransform} bdef +/c {_r curveto} bdef +/C /c ldef +/v {currentpoint 6 2 roll _r curveto} bdef +/V /v ldef +/y {_r 2 copy curveto} bdef +/Y /y ldef +/l {_r lineto} bdef +/L /l ldef +/m {_r moveto} bdef +% error operators +/_e [] def +/_E {_e length 0 ne {gsave 0 g 0 G 0 i 0 J 0 j 1 w 10 M [] 0 d +/Courier 20 0 0 1 z [0.966 0.259 -0.259 0.966 +_e 0 get _e 2 get add 2 div _e 1 get _e 3 get add 2 div] e _f t T grestore} if} bdef +/_fill {{fill} stopped +{/_e [pathbbox] def /_f (ERROR: can't fill, increase flatness) def n _E} if} bdef +/_stroke {{stroke} stopped +{/_e [pathbbox] def /_f (ERROR: can't stroke, increase flatness) def n _E} if} bdef +% path painting operators +/n /newpath ldef +/N /n ldef +/F {p _fill} bdef +/f {closepath F} bdef +/S {P _stroke} bdef +/s {closepath S} bdef +/B {gsave F grestore S} bdef +/b {closepath B} bdef +% text block construction and painting operators +/_s /ashow ldef +/_S {(?) exch {2 copy 0 exch put pop dup false charpath currentpoint _g setmatrix +_stroke _G setmatrix moveto 3 copy pop rmoveto} forall pop pop pop n} bdef +/_A {_a moveto _t exch 0 exch} bdef +/_L {0 _l neg translate _G currentmatrix pop} bdef +/_w {dup stringwidth exch 3 -1 roll length 1 sub _t mul add exch} bdef +/_z [{0 0} bind {dup _w exch neg 2 div exch neg 2 div} bind {dup _w exch neg exch neg} bind] def +/z {_z exch get /_a xdef /_t xdef /_l xdef exch findfont exch scalefont setfont} bdef +/_g matrix def +/_G matrix def +/_D {_g currentmatrix pop gsave concat _G currentmatrix pop} bdef +/e {_D p /t {_A _s _L} def} bdef +/r {_D P /t {_A _S _L} def} bdef +/a {_D /t {dup p _A _s P _A _S _L} def} bdef +/o {_D /t {pop _L} def} bdef +/T {grestore} bdef +% group construction operators +/u {} bdef +/U {} bdef +% font construction operators +/Z {findfont begin currentdict dup length dict begin +{1 index /FID ne {def} {pop pop} ifelse} forall /FontName exch def dup length 0 ne +{/Encoding Encoding 256 array copy def 0 exch {dup type /nametype eq +{Encoding 2 index 2 index put pop 1 add} {exch pop} ifelse} forall} if pop +currentdict dup end end /FontName get exch definefont pop} bdef +end +%%EndProcSet +%%EndProlog +%%BeginSetup +Adobe_Illustrator_1.1 begin +n +%%EndSetup +0 g +0 G +1 i +0 J +0 j +0.7 w +10 M +[]0 d +%%Note: +90.632 -245.419 m +86.134 -229.425 95.131 -228.926 96.63 -221.429 c +98.129 -213.932 107.126 -212.932 109.125 -202.936 c +111.124 -192.94 119.121 -183.944 125.618 -176.947 c +132.116 -169.949 146.61 -163.952 156.106 -168.45 c +165.602 -172.948 169.102 -174.947 178.598 -176.447 c +188.094 -177.946 195.591 -179.945 208.086 -176.947 c +220.581 -173.948 226.578 -171.949 237.074 -172.948 c +247.569 -173.948 277.557 -172.948 290.052 -171.949 c +302.547 -170.949 335.034 -171.449 345.53 -171.449 c +356.026 -171.449 374.019 -177.446 388.012 -182.444 c +402.006 -187.442 426.996 -197.438 439.491 -204.435 c +451.986 -211.433 469.979 -230.425 479.476 -238.422 c +488.972 -246.418 497.969 -243.42 499.968 -278.905 c +501.967 -314.39 499.968 -334.882 498.968 -346.377 c +497.969 -357.872 492.971 -371.367 491.971 -382.862 c +490.971 -394.358 490.971 -399.356 490.971 -410.851 c +490.971 -422.346 490.971 -433.342 492.471 -442.338 c +493.97 -451.336 494.47 -457.333 494.97 -461.332 c +495.47 -465.33 491.971 -464.83 489.472 -465.83 c +486.973 -466.829 483.474 -462.331 481.975 -458.333 c +480.476 -454.334 481.475 -444.837 481.475 -441.339 c +481.475 -437.84 483.474 -434.841 483.974 -427.844 c +484.474 -420.847 485.474 -386.861 482.975 -378.364 c +480.476 -369.868 484.974 -364.37 485.973 -354.374 c +486.973 -344.378 491.971 -311.391 489.972 -308.392 c +487.973 -305.394 484.474 -327.885 478.475 -333.882 c +472.478 -339.88 471.478 -346.377 471.478 -351.875 c +471.478 -357.373 467.48 -363.37 464.981 -365.869 c +462.482 -368.368 461.982 -374.366 457.984 -380.863 c +453.985 -387.36 450.987 -394.857 450.487 -402.854 c +449.987 -410.851 451.486 -436.341 450.487 -440.839 c +449.487 -445.337 447.988 -447.836 446.988 -448.836 c +445.989 -449.835 451.486 -448.336 451.486 -453.835 c +451.486 -459.332 449.987 -459.832 449.487 -468.329 c +448.987 -476.825 447.488 -479.324 447.488 -484.322 c +447.488 -489.32 447.488 -495.318 445.489 -495.818 c +443.49 -496.317 437.492 -498.317 433.494 -498.816 c +429.495 -499.316 420.999 -499.816 419.999 -499.316 c +419 -498.816 419.499 -495.318 420.999 -494.318 c +422.498 -493.319 424.746 -490.011 y +417.5 -495.818 415.501 -496.817 v +413.502 -497.817 410.003 -499.816 407.004 -499.316 c +404.006 -498.816 402.506 -498.317 401.507 -496.817 c +400.507 -495.318 397.508 -496.817 394.509 -494.818 c +391.511 -492.819 392.01 -490.82 393.01 -489.32 c +394.01 -487.821 399.507 -482.323 y +394.01 -483.323 392.51 -483.323 v +391.011 -483.323 377.017 -484.322 374.019 -484.322 c +371.02 -484.322 364.023 -485.322 363.023 -484.822 c +362.024 -484.322 361.024 -483.323 361.024 -482.823 c +361.024 -482.323 356.526 -482.823 356.026 -482.823 c +355.526 -482.823 353.027 -480.324 353.527 -479.324 c +354.027 -478.325 357.525 -473.327 359.525 -471.827 c +361.524 -470.328 365.022 -466.329 368.021 -465.33 c +371.02 -464.33 371.52 -459.832 373.019 -457.333 c +374.518 -454.834 375.018 -451.336 375.518 -447.836 c +376.018 -444.337 377.017 -433.342 377.017 -427.844 c +377.017 -422.346 379.516 -406.353 382.015 -399.356 c +384.514 -392.358 386.514 -386.861 385.514 -381.363 c +384.514 -375.865 381.016 -368.368 381.016 -366.369 c +381.016 -364.37 381.016 -358.872 y +377.517 -358.872 371.02 -361.371 v +364.523 -363.87 348.529 -368.368 342.531 -367.369 c +336.534 -366.369 308.044 -365.369 306.545 -362.371 c +305.046 -359.372 289.552 -353.374 289.052 -352.874 c +288.552 -352.375 288.052 -359.872 289.552 -367.369 c +291.051 -374.866 292.551 -382.362 294.55 -389.36 c +296.549 -396.357 298.548 -425.345 300.048 -433.842 c +301.547 -442.338 307.545 -449.335 310.044 -453.335 c +312.542 -457.333 313.542 -460.332 313.042 -464.83 c +312.542 -469.328 311.043 -475.326 310.543 -477.825 c +310.044 -480.324 306.045 -484.322 303.046 -483.822 c +300.048 -483.323 291.051 -480.824 289.552 -481.323 c +288.052 -481.823 285.054 -485.322 284.054 -485.822 c +283.055 -486.321 277.557 -486.321 274.558 -487.321 c +271.559 -488.321 263.063 -489.82 261.563 -488.321 c +260.064 -486.821 262.063 -493.319 249.568 -491.319 c +246.078 -490.761 239.072 -491.819 235.075 -492.819 c +231.077 -493.818 224.579 -492.319 224.079 -492.319 c +223.58 -492.319 215.583 -491.819 214.083 -490.82 c +212.584 -489.82 204.087 -489.82 204.087 -487.321 c +204.087 -484.822 208.586 -482.823 211.085 -480.324 c +213.584 -477.825 220.581 -472.827 221.081 -470.328 c +221.58 -467.829 221.081 -461.332 221.081 -458.333 c +221.081 -455.334 219.081 -449.335 217.082 -445.337 c +215.083 -441.339 213.584 -427.344 213.084 -424.845 c +212.584 -422.346 214.583 -415.349 213.584 -413.35 c +212.584 -411.351 210.085 -398.356 209.085 -395.357 c +208.086 -392.358 206.087 -385.361 205.587 -379.364 c +205.087 -373.366 202.088 -354.874 201.089 -351.875 c +200.089 -348.876 198.59 -335.881 199.089 -331.883 c +199.589 -327.885 192.092 -314.89 191.592 -312.391 c +191.093 -309.892 188.594 -305.394 188.594 -300.895 c +188.594 -296.397 184.096 -294.898 181.597 -294.898 c +179.098 -294.898 170.101 -291.899 169.102 -290.899 c +168.102 -289.9 159.105 -293.398 155.606 -293.898 c +152.107 -294.398 140.112 -296.897 139.613 -296.397 c +139.113 -295.897 135.114 -303.894 134.615 -306.393 c +134.115 -308.892 132.615 -313.39 131.116 -313.89 c +129.617 -314.39 126.118 -318.888 126.118 -320.388 c +126.118 -321.887 122.12 -317.889 y +122.12 -312.391 121.62 -308.392 v +121.12 -304.394 124.619 -300.895 125.118 -298.396 c +125.618 -295.897 131.116 -287.901 130.616 -286.401 c +130.116 -284.902 128.131 -286.36 125.118 -288.4 c +121.244 -291.026 118.121 -310.392 115.622 -313.39 c +113.123 -316.389 106.626 -331.383 105.126 -333.882 c +103.627 -336.381 103.127 -363.87 102.128 -372.866 c +101.128 -381.863 103.127 -397.356 104.627 -401.355 c +106.126 -405.353 107.625 -409.352 106.626 -409.851 c +105.626 -410.351 112.623 -403.354 118.121 -403.854 c +123.619 -404.354 130.616 -408.352 131.616 -413.85 c +132.615 -419.348 131.116 -428.844 127.617 -431.343 c +124.119 -433.842 110.624 -436.341 108.125 -433.842 c +105.626 -431.343 94.631 -427.844 90.632 -418.848 c +89.333 -415.924 80.137 -391.859 79.637 -384.861 c +79.202 -378.776 76.514 -369.619 76.638 -367.868 c +76.673 -367.37 64.143 -379.364 61.644 -380.863 c +59.145 -382.362 50.149 -389.859 48.15 -387.86 c +46.15 -385.861 50.649 -383.362 52.148 -381.363 c +53.647 -379.364 61.144 -372.866 63.143 -371.367 c +65.143 -369.868 55.147 -374.866 51.148 -375.365 c +47.15 -375.865 45.151 -373.866 46.15 -373.366 c +47.15 -372.866 57.146 -368.368 62.144 -364.87 c +67.142 -361.371 74.139 -355.873 74.639 -353.374 c +75.139 -350.875 74.139 -326.885 73.139 -319.888 c +72.14 -312.891 77.138 -296.397 77.638 -287.401 c +78.137 -278.405 82.136 -267.91 84.135 -262.412 c +86.134 -256.914 90.824 -246.099 90.632 -245.419 c +s +262.063 -478.325 m +263.562 -474.326 271.059 -469.828 272.559 -467.829 c +274.058 -465.83 274.558 -460.332 272.559 -457.833 c +270.56 -455.334 267.561 -446.836 266.561 -444.837 c +265.562 -442.838 264.562 -437.34 263.562 -433.842 c +262.563 -430.343 262.063 -423.846 261.063 -421.347 c +260.064 -418.848 257.065 -412.35 256.565 -411.351 c +256.065 -410.351 254.066 -418.848 254.066 -422.346 c +254.066 -425.845 257.565 -430.343 257.565 -433.842 c +257.565 -437.34 258.065 -439.839 257.065 -443.338 c +256.065 -446.836 254.566 -450.836 255.066 -455.334 c +255.566 -459.832 256.565 -465.33 258.065 -468.828 c +259.564 -472.327 261.814 -478.986 262.063 -478.325 c +s +114.374 -421.846 m +114.123 -422.846 117.122 -422.597 118.621 -421.846 c +120.12 -421.098 121.371 -418.848 119.871 -417.348 c +118.372 -415.849 117.405 -416.194 116.122 -416.6 c +113.748 -417.348 114.509 -421.305 114.374 -421.846 c +s +121.871 -294.148 m +119.372 -291.65 119.121 -289.4 y +108.789 -290.299 108.625 -293.898 v +107.625 -315.889 64.143 -370.867 63.143 -371.367 c +S +76.638 -367.868 m +83.635 -362.371 105.126 -333.382 105.126 -333.882 c +S +164.602 -189.442 m +172.1 -193.44 172.6 -194.939 178.098 -194.939 c +183.596 -194.939 186.595 -191.441 191.592 -197.438 c +196.59 -203.436 198.59 -210.433 199.589 -217.43 c +200.589 -224.427 198.59 -229.425 194.591 -232.924 c +190.593 -236.422 194.091 -240.921 192.592 -242.42 c +191.093 -243.919 190.593 -248.418 190.593 -250.417 c +190.593 -252.416 182.845 -253.666 181.346 -254.665 c +179.846 -255.665 174.635 -263.779 173.849 -263.162 c +166.852 -257.664 168.351 -252.416 165.853 -250.417 c +163.354 -248.418 158.605 -239.921 157.105 -238.921 c +155.606 -237.922 148.021 -233.866 148.021 -231.367 c +148.021 -228.868 149.109 -219.166 148.609 -216.667 c +148.109 -214.168 152.107 -209.433 152.107 -208.434 c +S +159.781 -179.035 m +164.485 -180.211 169.189 -181.975 172.717 -182.563 c +176.245 -183.151 185.653 -186.091 188.593 -187.267 c +191.533 -188.443 198.001 -193.735 199.765 -197.263 c +201.529 -200.791 202.117 -206.671 202.705 -209.023 c +203.293 -211.375 203.293 -219.607 202.117 -221.371 c +200.941 -223.135 197.413 -231.955 196.237 -232.543 c +S +108.097 -233.86 m +112.167 -236.446 116.296 -237.525 120.179 -236.971 c +125.831 -236.166 128.942 -227.524 129.27 -225.841 c +S +109.73 -237.489 m +111.163 -238.845 115.233 -241.43 117.92 -241.079 c +120.607 -240.727 123.178 -240.834 125.479 -238.64 c +127.339 -236.869 130.379 -228.116 130.528 -226.81 c +S +108.46 -230.129 m +110.117 -226.085 113.633 -223.711 115.101 -223.019 c +120.739 -220.367 127.21 -223.619 127.234 -224.548 c +S +108.8 -230.633 m +111.01 -231.549 112.29 -232.49 113.598 -232.64 c +116.814 -233.01 120.042 -233.379 122.149 -230.779 c +123.23 -229.447 123.643 -229.297 125.175 -227.488 c +126.707 -225.678 126.557 -225.264 127.234 -224.548 c +S +u +117.144 -223.904 m +118.708 -223.335 120.422 -224.096 120.972 -225.607 c +121.522 -227.117 120.699 -228.804 119.135 -229.373 c +117.57 -229.943 115.856 -229.179 115.307 -227.669 c +114.757 -226.159 115.58 -224.472 117.144 -223.904 c +f +118.14 -226.638 m +F +U +129.952 -224.71 m +130.389 -223.353 131.426 -223.641 129.289 -222.158 c +128.199 -221.4 122.082 -217.838 119.797 -218.137 c +117.44 -218.445 114.876 -219.824 113.16 -222.044 c +S +109.974 -231.066 m +110.638 -229.885 111.271 -230.044 110.638 -229.885 c +110.188 -229.77 109.038 -229.138 y +S +125.118 -288.4 m +132.615 -282.903 135.114 -282.903 138.113 -276.906 c +141.112 -270.909 139.613 -259.413 137.613 -255.915 c +135.614 -252.416 133.615 -244.919 y +S +128.971 -242.98 m +126.971 -247.478 124.472 -253.975 120.973 -255.475 c +117.474 -256.974 111.477 -257.974 109.478 -258.473 c +S +129.823 -220.573 m +126.834 -218.203 123.007 -214.64 121.267 -214.609 c +119.528 -214.578 116.234 -213.677 113.623 -215.785 c +111.96 -217.128 108.602 -222.181 107.962 -223.343 c +S +73.139 -317.889 m +82.136 -309.392 94.631 -316.389 y +S +74.139 -305.394 m +77.638 -301.395 78.137 -298.396 85.135 -299.396 c +92.132 -300.396 97.13 -303.894 97.63 -303.894 c +S +74.139 -331.883 m +77.138 -329.384 83.635 -327.385 85.135 -327.885 c +86.634 -328.384 92.632 -329.884 y +S +74.639 -345.877 m +76.638 -343.878 83.635 -343.878 y +S +77.138 -371.367 m +80.137 -369.368 86.01 -366.119 90.008 -366.869 c +92.204 -367.28 99.629 -370.867 y +S +79.512 -382.114 m +82.011 -380.614 89.633 -374.866 96.63 -380.863 c +S +83.635 -399.356 m +92.383 -389.611 99.129 -397.356 y +S +86.885 -408.603 m +93.131 -400.355 101.628 -407.352 y +S +89.384 -414.6 m +94.631 -407.852 104.127 -413.35 y +S +93.631 -423.597 m +94.631 -420.598 104.378 -417.848 104.627 -417.848 c +S +106.877 -420.347 m +103.127 -423.097 102.128 -429.594 y +S +117.872 -422.097 m +116.873 -431.343 124.869 -432.093 y +S +112.375 -420.847 m +106.877 -427.844 114.374 -434.841 y +S +120.371 -419.348 m +125.118 -425.596 131.616 -419.099 y +S +119.871 -417.348 m +127.118 -416.6 124.619 -406.104 y +S +118.372 -416.349 m +123.119 -408.603 114.374 -404.354 y +S +116.122 -416.6 m +114.874 -409.103 106.126 -410.351 106.626 -409.851 c +106.877 -409.602 103.878 -416.849 105.377 -420.347 c +108.125 -413.85 114.374 -421.846 v +114.528 -422.044 109.876 -419.598 105.377 -420.347 c +S +114.623 -418.848 m +111.875 -411.851 104.878 -415.1 105.126 -415.1 c +S +74.639 -356.373 m +74.763 -354.498 74.639 -353.374 v +S +81.012 -390.235 m +83.511 -388.735 91.132 -382.987 98.129 -388.984 c +S +95.506 -346.127 m +95.881 -346.127 99.629 -347.377 y +S +77.388 -352.75 m +76.388 -352.125 74.639 -352.874 74.639 -352.75 c +S +89.384 -353.998 m +91.507 -353.75 97.88 -356.249 y +S +78.137 -279.904 m +84.135 -277.405 89.133 -276.406 94.131 -277.905 c +99.129 -279.405 107.126 -285.402 y +S +83.635 -265.411 m +88.133 -262.412 95.131 -262.912 99.629 -263.412 c +104.127 -263.911 113.623 -270.909 y +121.62 -276.406 l +S +77.388 -352.75 m +S +74.639 -352.75 m +S +256.565 -411.351 m +262.563 -398.856 259.564 -384.362 261.563 -374.866 c +263.562 -365.369 263.063 -354.374 267.561 -348.376 c +272.059 -342.379 281.555 -321.387 283.554 -314.89 c +285.553 -308.392 276.057 -271.908 273.059 -264.911 c +270.06 -257.914 265.562 -248.917 264.562 -244.419 c +263.562 -239.921 261.563 -225.927 263.562 -221.928 c +S +1 w +291.198 -93.775 m +S +0.7 w +289.052 -352.874 m +284.554 -343.878 266.561 -350.875 y +S +242.394 -491.555 m +242.394 -488.056 239.469 -483.145 238.221 -482.896 c +236.972 -482.645 231.474 -483.645 231.474 -483.896 c +231.474 -484.145 228.225 -480.897 226.976 -479.898 c +225.726 -478.898 221.727 -480.146 220.728 -480.646 c +219.728 -481.146 217.229 -479.398 216.729 -478.898 c +216.23 -478.398 212.951 -478.957 212.701 -479.207 c +S +219.728 -480.397 m +220.479 -483.896 212.701 -490.085 y +S +231.474 -483.896 m +231.723 -486.395 224.079 -492.319 y +S +261.872 -477.736 m +264.621 -485.233 260.622 -487.483 y +S +284.054 -485.822 m +280.556 -485.572 268.369 -482.734 267.869 -481.485 c +267.37 -480.235 262.622 -480.486 y +S +288.552 -482.073 m +285.054 -478.075 279.806 -473.826 278.057 -473.826 c +276.307 -473.826 268.854 -481.809 268.854 -481.559 c +S +269.06 -470.828 m +272.559 -470.328 275.807 -475.076 y +S +358.525 -473.327 m +362.272 -472.577 366.271 -474.326 367.27 -475.576 c +368.27 -476.825 361.524 -482.823 361.024 -482.823 c +S +367.374 -474.988 m +369.623 -474.237 372.622 -474.988 374.371 -476.236 c +376.121 -477.487 379.869 -483.484 y +S +390.275 -261.943 m +380.278 -279.436 357.347 -332.502 384.015 -355.373 c +398.54 -367.832 399.507 -387.86 404.505 -393.358 c +409.503 -398.856 405.005 -410.351 406.005 -416.849 c +407.004 -423.346 410.003 -429.843 410.003 -439.839 c +410.003 -449.835 408.004 -460.832 408.504 -465.33 c +409.004 -469.828 405.005 -475.826 404.006 -477.825 c +403.006 -479.824 398.008 -483.323 y +403.506 -482.823 407.504 -486.821 407.755 -487.071 c +408.004 -487.321 401.007 -496.067 y +S +407.269 -487.071 m +415.017 -483.821 423.513 -490.319 y +432.259 -485.321 441.006 -497.067 y +S +381.016 -358.872 m +382.337 -358.961 385.277 -357.197 y +S +489.972 -308.392 m +491.998 -302.514 496.114 -294.87 496.114 -293.106 c +S +490.234 -445.397 m +490.234 -453.629 493.762 -464.213 y +S +487.882 -446.573 m +487.882 -450.101 489.299 -465.683 489.472 -465.83 c +S +484.942 -443.045 m +483.178 -447.749 484.354 -461.273 y +S +421.439 -452.453 m +431.435 -455.981 446.668 -448.747 446.988 -448.836 c +S +376.163 -444.221 m +383.219 -451.277 401.447 -451.277 y +S +377.927 -423.641 m +382.043 -426.581 397.331 -425.993 y +S +406.739 -407.765 m +417.323 -418.349 438.491 -410.117 y +S +370.871 -461.861 m +376.163 -468.917 397.331 -471.857 y +S +409.679 -434.225 m +416.735 -440.693 439.079 -431.285 y +S +406.739 -396.593 m +414.383 -398.945 433.787 -391.301 y +S +448.487 -477.737 m +430.847 -486.557 412.031 -479.501 y +S +312.072 -455.981 m +306.78 -462.449 281.496 -464.213 y +S +300.048 -433.842 m +295.608 -439.517 276.792 -439.517 y +S +295.608 -395.417 m +290.904 -392.477 263.856 -397.769 y +S +297.96 -413.057 m +293.844 -417.173 268.56 -420.113 y +S +291.492 -374.249 m +287.376 -372.485 261.623 -374.307 261.563 -374.866 c +S +250.92 -424.229 m +247.392 -444.221 217.993 -435.401 y +S +253.272 -430.109 m +250.92 -448.337 223.285 -454.217 y +S +256.8 -461.861 m +245.04 -473.033 225.637 -468.329 y +S +213.584 -413.35 m +220.933 -420.701 239.16 -413.645 y +S +236.809 -380.129 m +232.693 -386.597 205.645 -383.657 y +S +238.572 -389.537 m +245.04 -387.185 260.328 -394.829 y +S +237.985 -371.897 m +240.924 -370.133 261.504 -378.365 y +S +237.985 -358.961 m +235.045 -362.489 202.705 -361.901 y +S +199.177 -335.442 m +215.641 -344.262 248.568 -327.21 y +S +192.709 -314.274 m +201.529 -306.63 238.572 -311.334 y +S +149.785 -246.655 m +158.605 -263.707 138.025 -287.814 y +S +160.957 -258.415 m +166.837 -267.823 146.257 -288.402 y +S +174.481 -270.763 m +178.597 -277.818 167.425 -290.166 y +S +191.533 -259.591 m +200.353 -270.175 183.889 -294.87 y +S +206.233 -247.243 m +212.113 -269.587 187.418 -299.865 188.594 -300.895 c +S +159.193 -201.379 m +162.133 -207.259 161.545 -215.491 161.545 -217.255 c +161.545 -219.019 153.313 -227.251 153.901 -230.779 c +S +237.985 -176.095 m +244.452 -180.799 251.508 -187.855 254.448 -192.559 c +257.388 -197.263 253.861 -213.37 253.566 -214.431 c +251.359 -222.372 242.571 -252.416 244.57 -262.412 c +246.569 -272.408 251.567 -282.403 252.567 -295.398 c +253.566 -308.392 253.566 -320.388 246.569 -331.383 c +239.572 -342.379 236.574 -357.373 237.574 -368.368 c +238.572 -379.364 235.575 -404.354 245.57 -422.346 c +S +457.895 -360.725 m +464.951 -348.378 464.363 -327.798 469.067 -315.45 c +473.77 -303.102 477.886 -295.458 477.298 -278.994 c +476.71 -262.531 473.77 -263.119 y +S +410.267 -370.133 m +402.035 -357.197 396.155 -340.734 394.979 -328.974 c +394.151 -320.699 409.091 -287.814 y +S +u +116.786 -223.328 m +119.079 -222.493 121.637 -223.74 122.502 -226.115 c +123.365 -228.487 122.208 -231.089 119.915 -231.922 c +117.621 -232.757 115.064 -231.51 114.199 -229.135 c +113.335 -226.763 114.493 -224.163 116.786 -223.328 c +s +118.351 -227.626 m +S +U +118.294 -232.651 m +116.002 -233.016 113.653 -232.151 112.636 -230.643 c +111.618 -229.137 111.9 -227.548 112.377 -226.28 c +112.854 -225.01 114.424 -223.735 114.926 -223.396 c +115.428 -223.057 118.062 -222.269 119.178 -222.397 c +122.279 -222.753 123.831 -224.223 124.232 -225.328 c +124.635 -226.433 124.862 -227.915 124.723 -227.965 c +S +%%Trailer +_E end + diff --git a/macros/latex/contrib/caption/ltcaption.dtx b/macros/latex/contrib/caption/ltcaption.dtx new file mode 100644 index 0000000000..1365f2ecc8 --- /dev/null +++ b/macros/latex/contrib/caption/ltcaption.dtx @@ -0,0 +1,907 @@ +% \iffalse meta-comment +% +% This is file `ltcaption.dtx'. +% +% Copyright (C) 2007-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +% +% -------------------------------------------------------------------------- +% +% 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, +% caption3.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, and newfloat.dtx, +% the derived files caption.sty, caption2.sty, caption3.sty, +% bicaption.sty, ltcaption.sty, subcaption.sty, and newfloat.sty, +% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. +% +% \fi +% \CheckSum{378} +% +% \iffalse +%<*driver> +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesFile{ltcaption.drv}% + [2013/06/01 v1.4 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} +% +\usepackage{ifpdf} +\ifpdf + \usepackage{mathptmx,courier} + \usepackage[scaled=0.90]{helvet} +% \addtolength\marginparwidth{15pt} +\fi +% +\usepackage[bottom]{footmisc} +\usepackage{longtable} +\makeatletter\let\LT@makecaption@ORI\LT@makecaption\makeatother +% +\usepackage{hypdoc} +\ifpdf\usepackage{hypdestopt}\fi +\hypersetup{pdfkeywords={LaTeX, package, ltcaption},pdfstartpage={},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} +% +% \fi +% +% \newcommand*\purerm[1]{{\upshape\mdseries\rmfamily #1}} +% \newcommand*\puresf[1]{{\upshape\mdseries\sffamily #1}} +% \newcommand*\purett[1]{{\upshape\mdseries\ttfamily #1}} +% \let\class\puresf \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 +% \let\docversion\fileversion +% \GetFileInfo{ltcaption.sty} +% +% \title{\texorpdfstring{\Thispackage\thanks{%^^A +% This package has version number \docversion.}}%^^A +% {The ltcaption package}} +% \author{Axel Sommerfeldt\\ +% \url{https://gitlab.com/axelsommerfeldt/caption}} +% \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} +% +% The content of \cs{caption} in longtables is usually centered to the content of the +% longtable itself. +% This is sufficient for centered longtables, but for left or right aligned longtables +% this results in captions moved into the left or right page margin. +% +% To solve this problem just include this package \emph{after} the \package{longtable} +% package\cite{longtable}, e.g.: +% \begin{quote} +% |\usepackage{longtable,ltcaption}| +% \end{quote} +% Afterwards the captions of all longtables should be aligned as expected, +% even for not-centered longtables. +% +% \subsection{Further justification} +% +% \DescribeMacro{\LTcapskip} +% This length is controlling the skip between the caption and the contents +% below the caption (which is usually the longtable contents if you place +% the caption above the longtable), and it can be altered with +% |\setlength\LTcapskip{|\ldots|}|. +% When \thispackage\ is loaded it will be set to |\abovecaptionskip| which +% usually represents the skip between caption and contents in floating +% environments. +% (Without this package, the \package{longtable} package uses |\baselineskip| here.) +% +% \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 lengths \& commands do not work when \thispackage\ is used with one +% of the \KOMAScript\ document classes \class{scrartcl}, \class{scrreprt}, or \class{scrbook}~\cite{KOMAScript}, +% or used with the \class{memoir} document class~\cite{memoir}. +% The \KOMAScript\ resp.~\class{memoir} settings for captions are used instead. +% Same with the \package{caption} package which also uses its own options +% and settings. +% +% \subsection{Bonus features} +% +% \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 \\|\\ +% |\end{longtable}| +% \end{quote} +% \pagebreak[3] +% will result in a longtable like this: +% \pagebreak[3] +% \setcounter{figure}{6} +% \begingroup +% \renewcommand\LTcaptype{figure} +% \begin{longtable}{l} +% \caption{An example longtable}\\ +% \ldots \\ +% \end{longtable} +% \endgroup +% +% \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.) +% +% \pagebreak[3] +% \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 +% \pagebreak[3] +% \begin{thebibliography}{9} +% \bibitem{longtable} +% David Carlisle: +% \href{http://www.ctan.org/pkg/longtable}% +% {\emph{The longtable package}}, +% 2004/02/01 +% +% \bibitem{NTGclasses} +% Victor Eijkhout: +% \href{http://www.ctan.org/pkg/ntgclass}% +% {\emph{An introduction to the Dutch \LaTeX\ document classes}}, +% \mbox{3~September~1989} +% +% \bibitem{KOMAScript} +% Markus Kohm \& Jens-Uwe-Morawski: +% \href{http://www.ctan.org/pkg/koma-script}% +% {\emph{KOMA-Script -- a versatile \LaTeXe\ bundle}}, +% 2012-07-22 +% +% \bibitem{memoir} +% Peter Wilson, maintained by Lars Madsen: +% \href{http://www.ctan.org/pkg/koma-script}% +% {\emph{The Memoir Class for Configurable Typesetting}}, +% 2013-05-30 +% +% \bibitem{floatrow} +% Olga Lapko: +% \href{http://www.ctan.org/pkg/floatrow}% +% {\emph{The floatrow package documentation}}, +% 2007/08/24 +% \end{thebibliography} +% } +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \DoNotIndex{\\,\_,\ ,\@@par} +% \DoNotIndex{\@bsphack} +% \DoNotIndex{\@car,\@cdr,\@classoptionslist,\@cons,\@currext,\@currname} +% \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@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 \cs{LTcaptype} added} +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \clearpage +% \section{The Implementation} +% \iffalse +%<*package> +% \fi +% +% \subsection{Identification} +% +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{ltcaption}[2018/08/26 v1.4a longtable captions (AR)] +% \end{macrocode} +% +% \begin{macrocode} +\@ifpackageloaded{longtable}{}{% + \PackageError{ltcaption}{longtable package not loaded, aborting}{RTFM}} +% \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}{\LTcapskip} +% \changes{v1.2}{2007/03/28}{This skip added} +% \begin{macrocode} + \newskip\LTcapskip \LTcapskip=\abovecaptionskip +% \end{macrocode} +% \end{macro} +% +% \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 |\Caption|\-|Label|\-|Font| \& |\Caption|\-|Text|\-|Font| here. +% \begin{macrocode} + \providecommand*\CaptionLabelFont{} + \providecommand*\CaptionTextFont{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\CaptionLabelSeparator} +% \changes{v1.3}{2011/09/12}{This macro added} +% Additionally, we define |\Caption|\-|Label|\-|Separator| which is predefined as colon. +% \begin{macrocode} + \providecommand*\CaptionLabelSeparator{:} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +} +% \end{macrocode} +% +% \subsection{The longtable patch} +% +% \begin{macro}{\LT@array} +% \changes{v1.1a}{2008/03/21}{Improved redefinition of \cs{refstepcounter} etc.} +% 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{% + \let\ltcaption@ORI@LT@array\LT@array + \renewcommand*\LT@array{% +% \end{macrocode} +% We modify |\ref|\-|step|\-|counter| resp.~|\H@ref|\-|step|\-|counter| and +% |\hyper@make|\-|current|, so |\LT|\-|cap|\-|type| is used instead of |table|. +% \begin{macrocode} + \let\caption@LT@refstepcounter\refstepcounter + \def\refstepcounter{% + \caption@LTtype\caption@LT@refstepcounter}% + \let\caption@LT@Hrefstepcounter\H@refstepcounter + \def\H@refstepcounter{% + \caption@LTtype\caption@LT@Hrefstepcounter}% + \let\caption@LT@makecurrent\hyper@makecurrent + \def\hyper@makecurrent{% + \caption@LTtype\caption@LT@makecurrent}% +% \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} +\newcommand*\caption@LTtype[2]{% + \edef\caption@LT@tempa{#2}% + \ifx\caption@LT@tempa\caption@LT@table + \caption@LT@type#1% + \else + #1{#2}% + \fi}% +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@LT@type[1]{% + \expandafter#1\expandafter{\LTcaptype}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@LT@table{table}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\LT@c@ption} +% \changes{v1.1a}{2008/01/22}{Bugfix: Made it \cs{long}} +% \changes{v1.2a}{2011/01/01}{Bugfix: \cs{ignorespaces} added} +% 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} +\long\def\LT@c@ption#1[#2]#3{% + \LT@makecaption#1{\csname fnum@\LTcaptype\endcsname}{#3}% + \LT@listentry\LTcaptype{#2}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\LT@makecaption} +% \changes{v1.1}{2007/04/20}{\cs{LT@@makecaption} added} +% \changes{v1.1}{2007/06/27}{Adapted to the \package{floatrow} package by Olga Lapko} +% \changes{v1.2}{2007/03/28}{Uses \cs{LTcapskip} instead of \cs{baselineskip} now} +% \changes{v1.3}{2011/09/12}{Usage of \cs{CaptionLabelSeparator} 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} +% \begin{macrocode} +\renewcommand\LT@makecaption[3]{% + \LT@@makecaption{% + \sbox\@tempboxa{% + #1{{\CaptionLabelFont#2\CaptionLabelSeparator} }\CaptionTextFont#3}% + \ifdim\wd\@tempboxa>\hsize + #1{{\CaptionLabelFont#2\CaptionLabelSeparator} }\CaptionTextFont#3% + \else + \hbox to\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \endgraf\vskip\LTcapskip}} +% \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} +% +% \begin{macro}{\LT@listentry} +% \changes{v1.4}{2018/08/26}{This macro added} +% \begin{macrocode} +\newcommand*\LT@listentry[2]{% + \def\@tempa{#2}% + \ifx\@tempa\@empty\else + {\let\\\space + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\protect\numberline{\csname the#1\endcsname}{#2}}}% + \fi + \ignorespaces} +% \end{macrocode} +% \end{macro} +% +% \subsection{The \texttt{longtable*} environment} +% \changes{v1.1}{2007/09/01}{Environment \env{longtable*} added} +% +% \begin{environment}{longtable*} +% \changes{v1.1a}{2008/03/21}{Improved redefinition of \cs{refstepcounter} etc.} +% A |longtable| environment without reference counter and hyperlink anchors. +% \begin{macrocode} +\newenvironment{longtable*}{% +% \end{macrocode} +% We simply supress anything which has to do with reference counters here. +% \begin{macrocode} + \let\caption@LT@type\@gobble +% \end{macrocode} +% Unfortunately this is not so easy with |\Hy@raisedlink| (which actually sets +% the hyperlink anchor), so we assume that we have to supress the first usage. +% \begin{macrocode} + \let\caption@LT@raisedlink\Hy@raisedlink + \def\Hy@raisedlink{% + \let\Hy@raisedlink\caption@LT@raisedlink + \@gobble}% +% \end{macrocode} +% Finally we are redefining |\caption| so the non-starred variant +% issues an error. +% \begin{macrocode} + \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}% +% \end{macrocode} +% \begin{macrocode} + \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} +% +% \subsection{Adaption for \texorpdfstring{Memoir}{Memoir}} +% +% \begin{macrocode} +\@ifclassloaded{memoir}{% + \@ifundefined{@@makecaption}{}{% + \renewcommand\LT@makecaption[3]{% +% \noalign{\vskip\abovecaptionskip}% + \caption@LT@make{% + \let\@memtempa\relax + % starred form -> #1 = \@gobble + \ifx#1\@gobble + \let\@contnfont\@empty + \let\@contdelim\@empty + \@@makecaption{}{#3}% + \else + \@@makecaption{#2}{#3}% + \fi + \endgraf\vskip\belowcaptionskip}}% +% \end{macrocode} +% \begin{macrocode} + \let\LT@@makecaption\@undefined +% \end{macrocode} +% \begin{macrocode} + }}{} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \Finale +% +\endinput diff --git a/macros/latex/contrib/caption/ltcaption.pdf b/macros/latex/contrib/caption/ltcaption.pdf new file mode 100644 index 0000000000..26a82e3e0a Binary files /dev/null and b/macros/latex/contrib/caption/ltcaption.pdf differ diff --git a/macros/latex/contrib/caption/newfloat.dtx b/macros/latex/contrib/caption/newfloat.dtx new file mode 100644 index 0000000000..71484e60bc --- /dev/null +++ b/macros/latex/contrib/caption/newfloat.dtx @@ -0,0 +1,2074 @@ +% \iffalse meta-comment +% +% This is file `newfloat.dtx'. +% +% Copyright (C) 2011-2019 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +% +% -------------------------------------------------------------------------- +% +% 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, +% caption3.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, and newfloat.dtx, +% the derived files caption.sty, caption2.sty, caption3.sty, +% bicaption.sty, ltcaption.sty, subcaption.sty, and newfloat.sty, +% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. +% +% \fi +% \CheckSum{1605} +% +% \iffalse +%<*driver> +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesFile{newfloat.drv}% + [2013/04/27 v1.1 This package offers a command for defining new floating environments] +\hbadness=9999 \newcount\hbadness \hfuzz=48pt % Make TeX shut up. +% +\documentclass{ltxdoc} +\setlength\parindent{0pt} +\setlength\parskip{\smallskipamount} +% +\usepackage{ifpdf} +\ifpdf + \usepackage{mathptmx,courier} + \usepackage[scaled=0.90]{helvet} +% \addtolength\marginparwidth{15pt} +\fi +% +\usepackage[bottom]{footmisc} +% +\usepackage{hypdoc} +\ifpdf\usepackage{hypdestopt}\fi +\hypersetup{pdfkeywords={LaTeX, package, newfloat},pdfstartpage={},pdfstartview={}} +% +\usepackage{newfloat} +% +\DeclareRobustCommand*\eTeX{\texorpdfstring + {\leavevmode\hbox{$\varepsilon$}-\TeX}% + {e-TeX}} +\DeclareRobustCommand*\AmS{\texorpdfstring + {{\protect\usefont{OMS}{cmsy}{m}{n}A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}% + {AMS}} +\DeclareRobustCommand*\KOMAScript{\texorpdfstring + {\textsf{K\kern.05em O\kern.05em M\kern.05em A\kern.1em-\kern.1em Script}}% + {KOMA-Script}} +\DeclareRobustCommand*\NTG{NTG} +\DeclareRobustCommand*\SmF{SMF} +% +\begin{document} + \DocInput{newfloat.dtx} +\end{document} +% +% \fi +% +% \newcommand*\purerm[1]{{\upshape\mdseries\rmfamily #1}} +% \newcommand*\puresf[1]{{\upshape\mdseries\sffamily #1}} +% \newcommand*\purett[1]{{\upshape\mdseries\ttfamily #1}} +% \let\class\puresf \let\package\puresf +% \let\env\purett \let\opt\purett +% +% \def\thispackage{the \package{newfloat} package} +% \def\Thispackage{The \package{newfloat} package} +% +% \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}} +% \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}} +% \newcommand*\version[2][]{\textit{v#2}} +% +% \setlength\leftmargini{1.5em} +% +% \GetFileInfo{newfloat.drv} +% \let\docdate\filedate +% \let\docversion\fileversion +% \GetFileInfo{newfloat.sty} +% +% \title{\texorpdfstring{\Thispackage\thanks{%^^A +% This package has version number \docversion.}}%^^A +% {The newfloat package}} +% \author{Axel Sommerfeldt\\ +% \url{https://gitlab.com/axelsommerfeldt/caption}} +% \date{\docdate} +% \maketitle +% +% \begin{abstract} +% \centering +% This package offers the command +% |\Declare|\-|Floating|\-|Environment| for defining new floating environments +% which behave like |figure| and |table|. +% \end{abstract} +% +% \tableofcontents +% +% \clearpage +% \section{Loading the package} +% +% First of all you need to include this package into your document with +% \begin{quote} +% |\usepackage|\oarg{options}|{newfloat}| +% \end{quote} +% where \meta{options} are one or more of +% \begin{quote}\begin{tabular}{r@{\,}l} +% |within=| & \meta{``within'' counter} \emph{or} \texttt{none}\quad\\ +% |chapterlistsgap=| & \meta{value}~\footnotemark[1] +% \end{tabular}\end{quote} +% +% The ``within'' counter specifies the counter which will be used to reset +% the counter of the floating environments |figure| and |table| . +% (Furthermore this setting will be used as default setting for +% |\Declare|\-|Floating|\-|Environment|.) +% +% So for example |within=chapter| will give you a numbering scheme +% \meta{chapter}.\meta{x} for floating environments, +% while |within=section| will give you a numbering scheme +% \meta{chapter}.\meta{section}.\meta{x}, or \meta{section}.\meta{x} +% if the document class does not offer |\chapter|. +% |within=none| will result in a continuous numbering throughout the document, +% i.e.~the numbering scheme will be simply \meta{x}. +% +% The option |chapterlistsgap=|\meta{value} sets the amount of the +% vertical gap inserted into the ``List of Figure'', ``List of Tables'', +% and all lists created with |\Declare|\-|Floating|\-|Environment| +% when a new chapter will be started. +% The default value is |10pt|. +% (This option will only be available if the document class used offer +% the usage of chapters, e.g.~the |book| or |report| document class.) +% +% \pagebreak[3] +% Both options can be changed later on, too, by using the command +% \begin{quote} +% |\newfloatsetup|\meta{options}\quad, +% \end{quote} +% +% \pagebreak[3] +% \section{\cs{DeclareFloatingEnvironment}} +% +% After loading \thispackage\ you can define your own floating environments with +% \begin{quote} +% \iffalse +% \setlength{\leftmargin}{6cm} +% \fi +% |\DeclareFloatingEnvironment|\oarg{options}\marg{type}% +% \iffalse +% \oarg{name}\oarg{list name} +% \fi +% \end{quote} +% where \meta{options} are one or more of +% \begin{quote}\begin{tabular}{r@{\,}l} +% |fileext=| & \meta{file extension}\\ +% |listname=| & \meta{list name}\\ +% |name=| & \meta{prosa name}\\ +% |placement=| & \meta{combination of \,\purett{htbp}}\\ +% |within=| & \meta{``within'' counter} \emph{or} \texttt{none}\\ +% |chapterlistsgaps=| & \texttt{on} \emph{or} \texttt{off}~\footnotemark[1] +% \end{tabular}\end{quote} +% \footnotetext[1]{Please note that although \thispackage\ tries hard to offer this +% option it may not be available or is working incorrectly in cooperation with +% your document class since there is no standard interface which we could use +% for that purpose. Therefore we have to try to patch the \cs{chapter} command, +% and if this fails, we try to patch \cs{addtocontents} (in an unusual way) instead.} +% +% If no \meta{options} are given, +% ``lo\meta{type}'' will be used as \meta{file extension} for the list, +% ``List of \meta{name}s'' as \meta{list name}. +% ``\meta{name}'' as \meta{name} (but with the first letter capitalized), +% ``|tbp|'' as \meta{placement} specifier, +% and ``|chapter|'' resp. ``|none|'' as \meta{``within'' counter}, +% i.e., the counter which resets the numbering. +% +% The default value of the |chapterlistsgaps=| option depends on the +% ``within'' setting, it is set to |on| if |chapter| or |section| is selected, +% otherwise it is set to |off|. +% (This option will only be available if the document class used offer +% the usage of chapters, e.g.~the |book| or |report| document class.) +% +% The list will be typeset using the command |\list|\-|of|\meta{type}|s| +% resp.~|\list|\-|of|\meta{type}|es|, +% analogous to |\list|\-|of|\-|figures| and |\list|\-|of|\-|tables|. +% +% If the \package{fltpage} package is loaded, an environment called +% |FP|\meta{type} will be defined additionally, same for |sideways|\meta{type} +% (\package{rotating} package), |SC|\meta{type} (\package{sidecap} package), +% and |wrap|\meta{type} (\package{wrapfig} package). +% +% \bigskip +% +% \pagebreak[3] +% So for example +% \begin{quote} +% |\DeclareFloatingEnvironment{diagram}| +% \end{quote} +% will define a new floating environment called |diagram|, +% the list will be stored in a file with the extension |lodiagram|, the name +% (used for the caption) will be ``Diagram'' and the list name +% ``List of Diagrams''. +% The list could be typeset with |\list|\-|of|\-|diagrams|. +% Dependent on which packages are loaded, the environments |FP|\-|diagram|, +% |sideways|\-|diagram|, |SC|\-|diagram|, and |wrap|\-|diagram| will be defined additionally. +% +% \pagebreak[3] +% Another example: +% \begin{quote} +% |\DeclareFloatingEnvironment[|\\ +% | fileext=lox,|\\ +% | listname={List of Matrixes},|\\ +% | name=Matrix,|\\ +% | placement=p,|\\ +% | within=section,|\\ +% | chapterlistsgaps=off,|\\ +% | ]{matrix}| +% \end{quote} +% will define a new floating environment called |matrix| with the given settings. +% Please note that names which contain spaces needs to be enclosed in curly braces. +% +% \pagebreak[3] +% \section{\cs{SetupFloatingEnvironment}} +% +% While |\DeclareFloatingEnvironment| will create new floating environments, +% \begin{quote} +% |\SetupFloatingEnvironment|\marg{floating environment}\marg{options} +% \end{quote} +% will change the settings of existing ones, i.e. either |figure| or |table|, +% or a one created with |\Declare|\-|Floating|\-|Environment|, +% or a one created with |\new|\-|float| offered by the \package{float} package, +% or a one created with |\new|\-|float| offered by the \package{memoir} document class, +% or a one created with |\Declare|\-|New|\-|Float|\-|Type| offered by the \package{floatrow} package, +% or \ldots +% +% The \meta{options} are the same as the options for +% |\Declare|\-|Floating|\-|Environment|, +% but one should avoid changing the file extension +% of existing floating environments, +% i.e.~using the |fileext=| option within |\Setup|\-|Floating|\-|Environment| +% is usually a very bad idea. +% +% \bigskip +% +% \pagebreak[3] +% An example: +% \begin{quote} +% |\SetupFloatingEnvironment{lstlisting}{chapterlistsgaps=off}| +% \end{quote} +% will switch off the chapter lists gaps for |lstlisting| environments +% offered by the \package{listings} package. +% +% \pagebreak[3] +% \section{\cs{ForEachFloatingEnvironment}} +% +% \begin{quote} +% |\ForEachFloatingEnvironment|\marg{code with \#1} +% \end{quote} +% will execute the given \meta{code} for all known floating environments, +% and for ones defined with |\Declare|\-|Floating|\-|Environment| later on. +% +% \pagebreak[3] +% So for example the \package{subcaption} packages uses +% \begin{quote} +% |\ForEachFloatingEnvironment{\DeclareCaptionSubType{#1}}| +% \end{quote} +% for initializing itself for all floating environments which are +% known to \thispackage. +% +% \medskip +% +% There is also a starred variant |\For|\-|Each|\-|Floating|\-|Environment*| +% which will execute the given code for already existing floating environments +% only, i.e.~no hook will be placed inside |\Declare|\-|Floating|\-|Environment|. +% +% \pagebreak[3] +% An example: +% \begin{quote} +% |\ForEachFloatingEnvironment*{\typeout{#1}}| +% \end{quote} +% will typeout the names of all already known floating environments to the terminal +% and log file. +% +% \pagebreak[3] +% \section{\cs{PrepareListOf}} +% +% Unfortunately there is no standardized way of typesetting and customizing +% lists of floating environments, i.e.~every document class offers it's own stuff here, +% and there are plenty of \LaTeXe\ packages for this purpose. +% +% \pagebreak[3] +% For that reason the \thispackage\ simply typesets the lists of newly +% defined floating environments as ``List of Figure'' internally (using |\list|\-|of|\-|figure|) +% but using a different list (the right one, of course) and using a different list name, +% the one you have specified with either |\Declare|\-|Floating|\-|Environment| or +% |\Setup|\-|Floating|\-|Environment|.\footnote{Please note that this is not the +% fact when using a \KOMAScript\ document class, not \cs{listoffigure} but \cs{listoftoc} +% will be used here, and therefore no problems should occur.} +% +% \pagebreak[3] +% While this usually results in the same layout as the ``List of Figure'' and +% is sufficient for most cases, there are some cases where this might +% lead to an unwanted side effect. +% +% \pagebreak[3] +% Therefore the \thispackage\ offers +% \begin{quote} +% |\PrepareListOf|\marg{floating environment}\marg{code} +% \end{quote} +% which will execute the given \meta{code} right before actually typesetting the list +% with |\list|\-|of|\-|figures| internally. +% +% \pagebreak[3] +% One example: +% \begin{quote} +% |\PrepareListOf{diagram}{%|\\ +% | \renewcommand{\cftfigpresnum}{Diagram~}}| +% \end{quote} +% will change the part typeset in front of the diagram number within the +% ``List of Diagrams'' when using the \package{tocloft} package~\cite{tocloft}. +% Without the code above you will get the part defined for figures instead. +% +% \pagebreak[3] +% However, when dealing with the \package{tocloft} package it's a better +% idea not to use |\Prepare|\-|List|\-|Of| but the customization facilities of that package +% instead, e.g.: +% \begin{quote} +% |\documentclass{book}|\\ +% \ldots\\ +% |\usepackage{newfloat,tocloft}|\\ +% |\newlistof{diagram}{lod}{List of Diagrams}|\\ +% |\DeclareFloatingEnvironment[name=Diagram,fileext=lod]{diagram}|\\ +% | % Note: Due of a bug in tocloft the file extension|\\ +% | % must be repeated at \DeclareFloatingEnvironment,|\\ +% | % otherwise you will get an empty list.|\\ +% ||\\ +% |% Customize `List of Figures'|\\ +% |\renewcommand{\cftfigpresnum}{Figure~}|\\ +% |\setlength{\cftfignumwidth}{2cm}|\\ +% ||\\ +% |% Customize `List of Diagrams'|\\ +% |\renewcommand{\cftdiagrampresnum}{Diagram~}|\\ +% |\setlength{\cftdiagramnumwidth}{2cm}|\\ +% ||\\ +% \ldots\\ +% ||\\ +% |\begin{document}|\\ +% \ldots\\ +% |\listoffigures|\\ +% |\listofdiagrams|\\ +% \ldots\\ +% |\end{document}| +% \end{quote} +% +% \iffalse +% \pagebreak[3] +% \section{For \LaTeX{} package authors} +% +% |\For|\-|Each|\-|Floating|\-|Environment| without \package{newfloat} package: +% \begin{quote} +% |\newcommand\mypackage@foreachfloat[1]{%|\\ +% | \@ifundefined{ForEachFloatingEnvironment}%|\\ +% | {\def\@elt##1{#1}%|\\ +% | \@ifundefined{c@figure}\@gobble\@elt{figure}%|\\ +% | \@ifundefined{c@table}\@gobble\@elt{table}%|\\ +% | \let\@elt\relax|\\ +% | \newfloat@addtohook{#1}}%|\\ +% | {\ForEachFloatingEnvironment{#1}}}|\\ +% |\providecommand\newfloat@addtohook[1]{%|\\ +% | \toks@=\expandafter{\newfloat@hook{##1}#1}%|\\ +% | \edef\@tempa{\def\noexpand\newfloat@hook####1{\the\toks@}}%|\\ +% | \@tempa}|\\ +% |\providecommand*\newfloat@hook[1]{}| +% \end{quote} +% +% \pagebreak[3] +% Adding environment to list of floating environments: +% \begin{quote} +% |\SetupFloatingEnvironment|\marg{environment}|{}| +% \end{quote} +% or (without \package{newfloat} package loaded): +% \begin{quote} +% |\providecommand\newfloat@list{}|\\ +% |\@cons\newfloat@list{|\marg{environment}|}| +% \end{quote} +% (Please note the doubled curly braces around the environment name.) +% \fi +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \StopEventually{%^^A +% \pagebreak[4] +% \begin{thebibliography}{9} +% +% \bibitem{memoir} +% Peter Wilson:\\ +% \href{http://www.ctan.org/pkg/memoir}% +% {\emph{The Memoir Class for Configurable Typesetting}},\\ +% 2011/03/06 +% +% \bibitem{NTGclasses} +% Victor Eijkhout:\\ +% \href{http://www.ctan.org/pkg/ntgclass}% +% {\emph{An introduction to the Dutch \LaTeX\ document classes}},\\ +% \mbox{3~September~1989} +% +% \bibitem{KOMAScript} +% Markus Kohm \& Jens-Uwe-Morawski:\\ +% \href{http://www.ctan.org/pkg/koma-script}% +% {\emph{KOMA-Script -- a versatile \LaTeXe\ bundle}},\\ +% 2012-07-22 +% +% \bibitem{float} +% Anselm Lingnau:\\ +% \href{http://www.ctan.org/pkg/float}% +% {\emph{An Improved Environment for Floats}},\\ +% 2001/11/08 +% +% \bibitem{fltpage} +% Sebastian Gross:\\ +% \href{http://www.ctan.org/pkg/fltpage}% +% {\emph{Welcome to the beta test of fltpage package!}},\\ +% 1998/11/13 +% +% \bibitem{rotating} +% Sebastian Rahtz and Leonor Barroca:\\ +% \href{http://www.ctan.org/pkg/rotating}% +% {\emph{A style option for rotated objects in \LaTeX}},\\ +% 1997/09/26 +% +% \bibitem{sidecap} +% Rolf Niepraschk \& Hubert G\"a\ss lein:\\ +% \href{http://www.ctan.org/pkg/sidecap}% +% {\emph{The sidecap package}},\\ +% 2003/06/06 +% +% \bibitem{tocloft} +% Peter Wilson, Herries Press, Will Robertson:\\ +% \href{http://www.ctan.org/pkg/tocloft}% +% {\emph{The tocloft package}},\\ +% 2010/10/13 +% +% \bibitem{wrapfig} +% Donald Arseneau:\\ +% \href{http://www.ctan.org/pkg/wrapfig}% +% {\emph{WRAPFIG.STY ver 3.6}},\\ +% 2003/01/31 +% +% \end{thebibliography} +% } +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \DoNotIndex{\\,\_,\ ,\@@par} +% \DoNotIndex{\@bsphack} +% \DoNotIndex{\@car,\@cdr,\@classoptionslist,\@cons,\@currext,\@currname} +% \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs} +% \DoNotIndex{\@for,\@firstofone,\@firstoftwo} +% \DoNotIndex{\@gobble,\@gobbletwo,\@gobblethree,\@gobblefour,\@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}{2011/10/30}{First release as \package{newfloat} package, +% outsourced from the \package{caption3} package and revised} +% \changes{v1.1}{2013/04/27}{Adapted to the \package{tocloft} package} +% \changes{v1.1}{2013/04/27}{New command \cs{PrepareListOf} added} +% \changes{v1.1d}{2019/03/16}{Adapted to the \package{dgruyter} package} +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \clearpage +% \section{The Implementation} +% \iffalse +%<*package> +% \fi +% +% \pagebreak[3] +% \subsection{Identification} +% +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{newfloat}[2019/09/01 v1.1k Defining new floating environments (AR)] +% \end{macrocode} +% +% \begin{macro}{\newfloat@Info} +% \begin{macro}{\newfloat@InfoNoLine} +% |\newfloat@Info|\marg{message} +% \begin{macrocode} +\newcommand*\newfloat@Info[1]{% + \PackageInfo{newfloat}{#1}} +\newcommand*\newfloat@InfoNoLine[1]{% + \newfloat@Info{#1\@gobble}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\newfloat@Warning} +% \begin{macro}{\newfloat@WarningNoLine} +% |\newfloat@Warning|\marg{message} +% \begin{macrocode} +\newcommand*\newfloat@Warning[1]{% + \PackageWarning{newfloat}{#1}} +\newcommand*\newfloat@WarningNoLine[1]{% + \newfloat@Warning{#1\@gobble}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\newfloat@Error} +% |\newfloat@Error|\marg{message} +% \begin{macrocode} +\newcommand*\newfloat@Error[1]{% + \PackageError{newfloat}{#1}\newfloat@eh} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\newfloat@eh{% + If you do not understand this error, please take a closer look\MessageBreak + at the documentation of the `newfloat' package.\MessageBreak\@ehc} +% \end{macrocode} +% \end{macro} +% +% \pagebreak[3] +% \subsection{Using the keyval package} +% +% We need the \package{keyval} package for option handling, so we load it here. +% \begin{macrocode} +\RequirePackage{keyval}[1997/11/10] +% \end{macrocode} +% +% \pagebreak[3] +% \subsection{Helper macros} +% +% \begin{macro}{\newfloat@def} +% \changes{v1.1}{2013/04/27}{This macro added} +% |\newfloat@def|\marg{macro name}\marg{definition} +% \begin{macrocode} +\newcommand*\newfloat@def[2]{% + \newfloat@ifundefined{#1}{% + \@namedef{#1}{#2}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\newfloat@let} +% \changes{v1.1}{2013/04/27}{This macro added} +% |\newfloat@let|\marg{macro name}\marg{macro} +% \begin{macrocode} +\newcommand*\newfloat@let[2]{% + \newfloat@ifundefined{#1}{% + \expandafter\let\csname #1\endcsname#2}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\newfloat@ifundefined} +% \changes{v1.1}{2013/04/27}{This macro added} +% |\newfloat@ifundefined|\marg{macro name}\marg{code} +% \begin{macrocode} +\newcommand*\newfloat@ifundefined[2]{% + \@ifundefined{#1}{#2}{% + \newfloat@Info{% + \expandafter\string\csname#1\endcsname\space is already defined}}} +% \end{macrocode} +% \end{macro} +% +% \pagebreak[3] +% \subsection{\cs{DeclareFloatingEnvironment}} +% +% \begin{macro}{\DeclareFloatingEnvironment} +% \changes{v1.0a}{2011/11/16}{Bugfix: Undefines \cs{fst@}\meta{environment} now} +% \changes{v1.1}{2013/04/27}{Revised, only defines stuff yet undefined now} +% \changes{v1.1}{2013/11/03}{Uses \cs{newfloat@capitalize} now} +% \changes{v1.1}{2015/09/16}{Support of \cs{autodot} (offered by the \KOMAScript\ classes) added} +% \changes{v1.1}{2018/03/04}{Usage of \cs{ifdefined} replaced by \cs{@ifundefined} to improve compatibility with the \package{listings} package} +% \changes{v1.1b}{2018/12/26}{Bugfix: Missing curly braces added} +% \changes{v1.1c}{2019/01/10}{Bugfix: Support of \cs{autodot} fixed} +% \changes{v1.1k}{2019/09/01}{Adapted to the \class{beamer} document class} +% |\DeclareFloatingEnvironment|\oarg{options}\marg{environment}\oarg{name}\oarg{list name} +% \begin{macrocode} +\newcommand*\DeclareFloatingEnvironment{% + \@testopt\@DeclareFloatingEnvironment{}} +\@onlypreamble\DeclareFloatingEnvironment +% \end{macrocode} +% \begin{macrocode} +\def\@DeclareFloatingEnvironment[#1]#2{% + \newfloat@Info{New float `#2' with options `#1'}% +% \end{macrocode} +% Define a counter with the same name as the floating environment +% \begin{macrocode} + \newfloat@ifundefined{c@#2}{\newcounter{#2}}% +% \end{macrocode} +% Set |\ftype@|\meta{type} which contains the type number for floats of type \meta{type}\par +% (See also \url{http://tex.stackexchange.com/q/32359/2574}) +% \begin{macrocode} + \@ifundefined{c@float@type}% from float package + {\@ifundefined{c@newflo@tctr}% from memoir document class + {\ifdefined\newfloat@ftype \else + \newcount\newfloat@ftype + \newfloat@ftype=8\relax + \fi + \expandafter\xdef\csname ftype@#2\endcsname{\the\newfloat@ftype}% + \advance\newfloat@ftype\newfloat@ftype}% + {\expandafter\edef\csname ftype@#2\endcsname{\the\c@newflo@tctr}% + \advance\c@newflo@tctr \c@newflo@tctr}}% + {\expandafter\edef\csname ftype@#2\endcsname{\the\value{float@type}}% + \addtocounter{float@type}{\value{float@type}}}% +% \end{macrocode} +% \begin{macrocode} + \newfloat@Info{float type `#2'=\@nameuse{ftype@#2}}% +% \end{macrocode} +% Define |\fnum@|\meta{type}, a macro to generate the figure number for a caption +% \begin{macrocode} + \newfloat@def{fnum@#2}% + {\@nameuse{#2name}\nobreakspace\@nameuse{the#2}% + \ifdefined\autodot\expandafter\autodot\fi}% +% \end{macrocode} +% Define |\|\meta{type}|name| used by |\fnum@|\meta{type} as \meta{type}, +% but with first letter capitalized +% \begin{macrocode} + \newfloat@capitalize\newfloat@Type{#2}% + \newfloat@let{#2name}{\newfloat@Type}% + \newfloat@def{fleg#2}{\@nameuse{#2name}}% legend naming (memoir) +% \end{macrocode} +% Legend name in ToC (memoir document class) +% \begin{macrocode} + \newfloat@ifundefined{flegtoc#2}{\@namedef{flegtoc#2}##1{}}% +% \end{macrocode} +% Define the floating environment\par +% If the \class{tufte} document class is loaded, +% |\@tufte@float| and |\end@tufte@float| will be used instead of +% |\@float|, |\end@float|, |\@dblfloat|, and |\end@dblfloat|.\par +% If the \class{beamer} document class is loaded, +% |\beamer@float| and |\end@beamer@float| will be used. +% \begin{macrocode} + \ifcsname @tufte@float\endcsname + \newenvironment{#2}[1][htbp]% + {\begin{@tufte@float}[{##1}]{#2}{}}% + {\end{@tufte@float}}% + \newenvironment{#2*}[1][htbp]% + {\begin{@tufte@float}[{##1}]{#2}{star}}% + {\end{@tufte@float}}% + \else + \@ifclassloaded{beamer}{% + \newenvironment{#2}[1][]{\beamer@float{#2}}{\end@beamer@float}% + }{% + \newenvironment{#2}{\@float{#2}}{\end@float}% + \newenvironment{#2*}{\@dblfloat{#2}}{\end@dblfloat}% + }% + \fi +% \end{macrocode} +% Define the listing command |\listof|\meta{type}(|e|)|s| +% \changes{v1.1}{2013/04/27}{Definition of list hook added} +% \begin{macrocode} + \newfloat@def{listof#2}{\newfloat@listof{#2}}% + \newfloat@def{listof#2s}{\@nameuse{listof#2}}% + \newfloat@def{listof#2es}{\@nameuse{listof#2s}}% + \newfloat@def{newfloat@listof#2@hook}{}% + \ifdefined\l@figure + \newfloat@let{l@#2}{\l@figure}% + \else + \newfloat@def{l@#2}{\@dottedtocline{1}{1.5em}{2.3em}}% + \fi + \edef\newfloat@tempa{List of \newfloat@Type s}% + \newfloat@let{list#2name}{\newfloat@tempa}% +% \end{macrocode} +% We undefine |\fst@|\meta{environment} so the new environment +% will not be recognized as defined by the \package{float} package. +% (|\fst@|\meta{type} use to hold the float style, see \package{float} package +% implementation for details.) +% \begin{macrocode} + \expandafter\let\csname fst@#2\endcsname\@undefined +% \end{macrocode} +% Set default parameters +% \begin{macrocode} + \newfloat@ifundefined{fps@#2}{\newfloat@setplacement{#2}{tbp}}% + \newfloat@ifundefined{ext@#2}{\newfloat@setfileext{#2}{lo#2}}% +% \end{macrocode} +% Apply given options +% \begin{macrocode} + \newfloat@setoptions*{#2}{#1}% +% \end{macrocode} +% Announce the new floating environment to other packages +% \begin{macrocode} + \@expandtwoargs\newfloat@announce{#2}{\@nameuse{ext@#2}}% +% \end{macrocode} +% Apply the last two optional arguments for setting names +% \begin{macrocode} + \@ifnextchar[\newfloat@DFE@setname\relax} +\@onlypreamble\@DeclareFloatingEnvironment +% \end{macrocode} +% \begin{macrocode} +\def\newfloat@DFE@setname[#1]{% + \KV@@newfloat@name{#1}% + \@ifnextchar[\newfloat@DFE@setlistname\relax} +\@onlypreamble\newfloat@DFE@setname +% \end{macrocode} +% \begin{macrocode} +\def\newfloat@DFE@setlistname[#1]{% + \KV@@newfloat@listname{#1}} +\@onlypreamble\newfloat@DFE@setlistname +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\newfloat@capitalize} +% \changes{v1.1}{2013/11/03}{Code extracted from \cs{DeclareFloatingEnvironment}} +% \changes{v1.1}{2013/11/03}{Uses \cs{newfloat@tempa} instead of \cs{@tempa} now} +% |\newfloat@capitalize|\marg{command}\marg{name}\\ +% Defines \meta{command} to \meta{name}, but with first letter capitalized. +% \begin{macrocode} +\newcommand*\newfloat@capitalize[2]{% + \edef\newfloat@tempa{\gdef\noexpand#1{\@car#2\@nil}}% + \uppercase\expandafter{\newfloat@tempa}% + \edef\newfloat@tempa{% + \noexpand\g@addto@macro\noexpand#1{\@cdr#2\@nil}}% + \newfloat@tempa} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\newfloat@listof} +% \changes{v1.1}{2013/04/27}{Revised} +% \changes{v1.1g}{2019/08/28}{Starred variant added} +% |\newfloat@listof|\marg{float type}\\ +% typesets the list, using |\listoffigure| with patched list name and file extension. +% \begin{macrocode} +\newcommand*\newfloat@listof[1]{% + \@ifstar + {\newfloat@list@of{#1}*}% + {\newfloat@list@of{#1}\relax}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\newfloat@list@of[1]{% + \@expandtwoargs\newfloat@list@of@{#1}{\@nameuse{ext@#1}}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\newfloat@list@of@[3]{% + \begingroup + \expandafter\let\expandafter\listfigurename\csname list#1name\endcsname + \def\ext@figure{#2}% + \let\newfloat@starttoc\@starttoc + \def\@starttoc##1{\newfloat@starttoc{#2}}% + \let\newfloat@listoftoc\listoftoc + \def\listoftoc##1{\newfloat@listoftoc{#2}}% + \@nameuse{newfloat@listof#1@hook}% + \listoffigures#3% + \endgroup} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\newfloat@setoptions} +% |\newfloat@setoptions*|\marg{environment}\marg{options} +% \begin{macrocode} +\newcommand*\newfloat@setoptions{% + \@ifstar + {\newfloat@@setoptions\@firstofone}% + {\newfloat@@setoptions\@gobble}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\newfloat@@setoptions[3]{% + \let\newfloat@within@value\@undefined + \let\newfloat@chapterlistsgaps@value\@undefined + #1{\KV@@newfloat@within\newfloat@within@default}% set default value for new floats + \def\newfloat@type{#2}% + \setkeys{@newfloat}{#3}% + \ifx\newfloat@within@value\@undefined \else + \newfloat@setoption{within}\newfloat@within@value + \fi + \ifx\newfloat@chapterlistsgaps@value\@undefined \else + \newfloat@setoption{chapterlistsgaps}\newfloat@chapterlistsgaps@value + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\newfloat@within@default} +% The default `within' value. +% This one will be used if no option |within=|\meta{counter} is given. +% \begin{macrocode} +\newcommand*\newfloat@within@default{% + \ifcsname c@chapter\endcsname chapter\else none\fi} +\@onlypreamble\newfloat@within@default +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\newfloat@setoption} +% \changes{v1.1}{2015/09/15}{Bugfix: \cs{@expandtwoargs} replaced by own expansion so the option value do not get expanded anymore} +% |\newfloat@setoption|\marg{option name}{options} +% \begin{macrocode} +\newcommand*\newfloat@setoption[1]{% + \edef\caption@tempa{\noexpand\@nameuse{newfloat@set#1}{\newfloat@type}}% + \caption@tempa} +% \end{macrocode} +% \end{macro} +% +% The available \meta{options} are: +% |fileext=|\meta{file extension}, +% |listname=|\meta{list name}, +% |name=|\meta{prosa name}, +% |placement=|\meta{htbp}, +% |within=|\meta{none,chapter,section}, and +% |without|. +% +% \begin{macro}{\newfloat@setfileext} +% |\newfloat@setfileext|\marg{environment}\marg{file extension} +% \begin{macrocode} +\newcommand*\newfloat@setfileext[2]{% + \@namedef{ext@#1}{#2}} +% \end{macrocode} +% \begin{macrocode} +\define@key{@newfloat}{fileext}{% + \newfloat@setoption{fileext}{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\newfloat@setlistname} +% |\newfloat@setlistname|\marg{environment}\marg{list name} +% \begin{macrocode} +\newcommand*\newfloat@setlistname[2]{% + \@namedef{list#1name}{#2}} +% \end{macrocode} +% \begin{macrocode} +\define@key{@newfloat}{listname}{% + \newfloat@setoption{listname}{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\newfloat@setname} +% |\newfloat@setname|\marg{environment}\marg{name} +% \begin{macrocode} +\newcommand*\newfloat@setname[2]{% + \newfloat@@setname{#1}{#2}% + \begingroup + \ifcsname languagename\endcsname + \ifcsname captions\languagename\endcsname + \expandafter\g@addto@macro\csname captions\languagename\endcsname + {\newfloat@@setname{#1}{#2}}% + \fi + \fi + \endgroup} +%%\AtBeginDocument{\let\newfloat@setname\newfloat@@setname} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\newfloat@@setname[2]{% + \@namedef{#1name}{#2}} +% \end{macrocode} +% \begin{macrocode} +\define@key{@newfloat}{name}{% + \newfloat@setoption{name}{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\newfloat@setplacement} +% |\newfloat@setplacement|\marg{environment}\marg{float placement} +% \begin{macrocode} +\newcommand*\newfloat@setplacement[2]{% + \@namedef{fps@#1}{#2}} +% \end{macrocode} +% \begin{macrocode} +\define@key{@newfloat}{placement}{% + \newfloat@setoption{placement}{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\newfloat@setwithin} +% |\newfloat@setwithin|\marg{environment}\marg{counter}\par +% setup the counter for working ``within'' a given counter. +% Furthermore the chapters lists gap will be switched on +% (if counter $=$ |chapter|) or off (otherwise). +% \begin{macrocode} +\newcommand*\newfloat@setwithin[2]{% + \ifcsname c@chapter\endcsname + \@removefromreset{#1}{chapter}% + \fi + \@removefromreset{#1}{section}% +% \end{macrocode} +% \begin{macrocode} + \edef\@tempa{#2}% + \ifx\@tempa\@empty + \def\@tempa{none}% + \fi + \def\@tempb{none}% + \ifx\@tempa\@tempb + \ifcsname c@chapter\endcsname + \@chapterlistsgap@off{#1}% + \fi + \newfloat@@setwithin{#1}{}{}% + \else + \def\@tempb{chapter}% + \ifx\@tempa\@tempb + \@addtoreset{#1}{chapter}% + \@chapterlistsgap@on{#1}% + \newfloat@@setwithin{#1}{\ifnum\c@chapter>\z@ \thechapter.\fi}{\theHchapter.}% + \else + \def\@tempb{section}% + \ifx\@tempa\@tempb + \@addtoreset{#1}{section}% + \ifcsname c@chapter\endcsname + \@addtoreset{#1}{chapter}% + \@chapterlistsgap@on{#1}% + \newfloat@@setwithin{#1}{\thesection.}{\theHsection.}% + \else + \newfloat@@setwithin{#1}{\ifnum\c@section>\z@ \thesection.\fi}{\theHsection.}% + \fi + \else + \newfloat@Error{Invalid value `#2' for option `within'}% + \fi + \fi + \fi} +% \end{macrocode} +% Note: Since the \package{hyperref} package with version $<$ 6.82k defines +% |\the|\-|H|\-|figure| and |\the|\-|H|\-|table| with |\new|\-|command|, +% |\newfloat@@setwithin| will yield to an error message when using with an +% old version of \package{hyperref}, +% e.g. ``\texttt{LaTeX Error: Command \cs{theHfigure} already defined}''. +% \begin{macrocode} +\newcommand*\newfloat@@setwithin[3]{% + \global\@namedef{the#1}{#2\arabic{#1}}% + \global\@namedef{theH#1}{#3\arabic{#1}}} +% \end{macrocode} +% \begin{macrocode} +\define@key{@newfloat}{within}{% + \def\newfloat@within@value{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\newfloat@setwithout} +% |\newfloat@setwithout|\marg{environment} +% \begin{macrocode} +\newcommand*\newfloat@setwithout[1]{% + \newfloat@setwithin{#1}{none}} +% \end{macrocode} +% \begin{macrocode} +\define@key{@newfloat}{without}[]{% + \def\newfloat@within@value{none}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\newfloat@setchapterlistsgaps} +% |\newfloat@setchapterlistsgaps|\marg{environment}\marg{on/off} +% \begin{macrocode} +\newcommand*\newfloat@setchapterlistsgaps[2]{% + \edef\@tempa{#2}% + \def\@tempb{off}% + \ifx\@tempa\@tempb + \@chapterlistsgap@off{#1}% + \else + \def\@tempb{on}% + \ifx\@tempa\@tempb + \@chapterlistsgap@on{#1}% + \else + \newfloat@Error{Invalid value `#2' for option `chapterlistsgaps'}% + \fi + \fi} +% \end{macrocode} +% \begin{macrocode} +\define@key{@newfloat}{chapterlistsgaps}{% + \def\newfloat@chapterlistsgaps@value{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@removefromreset} +% This code was taken from the \package{remreset} package +% which is part of the `carlisle' package bundle. +% (Copyright 1997 David Carlisle) +% \begin{macrocode} +\providecommand*\@removefromreset[2]{{% + \expandafter\let\csname c@#1\endcsname\@removefromreset + \def\@elt##1{% + \expandafter\ifx\csname c@##1\endcsname\@removefromreset + \else + \noexpand\@elt{##1}% + \fi}% + \expandafter\xdef\csname cl@#2\endcsname{% + \csname cl@#2\endcsname}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\newfloat@announce} +% |\newfloat@announce|\marg{environment name}\marg{list file extension} +% \begin{macrocode} +\newcommand*\newfloat@announce[2]{% +% \end{macrocode} +% \begin{macrocode} + \@cons\newfloat@list{{#1}}% + \@cons\newfloat@@list{{#1}}% +% \end{macrocode} +% \begin{macrocode} + \newfloat@ifundefined{newfloat@ext@#2}{% + \@namedef{newfloat@ext@#2}{#1}% +% \end{macrocode} +% Support of \package{memoir} document class +% \begin{macrocode} + \ifcsname c@lofdepth\endcsname + \newfloat@ifundefined{c@#2depth}{% + \newcounter{#2depth}% + \setcounter{#2depth}{1}}% + \fi +% \end{macrocode} +% Support of \package{tocbasic} package +% \begin{macrocode} + \ifcsname addtotoclist\endcsname + \addtotoclist[float]{#2}% + \newfloat@def{listof#2name}{\@nameuse{list#1name}}% + \fi +% \end{macrocode} +% \begin{macrocode} + }% +% \end{macrocode} +% Support of \package{titletoc} package +% \begin{macrocode} + \ifcsname contentsuse\endcsname + \contentsuse{#1}{#2}% + \fi +% \end{macrocode} +% \begin{macrocode} + \newfloat@hook{#1}} +\@onlypreamble\newfloat@announce +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\newfloat@@list} +% |\newfloat@@list| is an \cs{@elt}-list containing the floating environments defined +% with |\Declare|\-|Floating|\-|Environment| only. +% \begin{macrocode} +\newcommand*\newfloat@@list{} +% \end{macrocode} +% \end{macro} +% +% \pagebreak[3] +% \subsection{\cs{SetupFloatingEnvironment}} +% +% \begin{macro}{\SetupFloatingEnvironment} +% |\SetupFloatingEnvironment|\marg{environment}\marg{options} +% \begin{macrocode} +\newcommand*\SetupFloatingEnvironment[1]{% + \newfloat@addtolist{#1}% + \newfloat@setoptions{#1}} +% \end{macrocode} +% \end{macro} +% +% \pagebreak[3] +% \subsection{\cs{ForEachFloatingEnvironment}} +% +% \begin{macro}{\ForEachFloatingEnvironment} +% |\ForEachFloatingEnvironment|\marg{code} +% will execute the given code for each floating environment. +% The starred variant will only work for already existing environments, +% i.e.~no hook will be placed inside |\Declare|\-|Floating|\-|Environment|. +% \begin{macrocode} +\newcommand\ForEachFloatingEnvironment{% + \@ifstar + {\@ForEachFloatingEnvironment\@gobble}% + {\@ForEachFloatingEnvironment\@iden}} +% \end{macrocode} +% \begin{macrocode} +\newcommand\@ForEachFloatingEnvironment[2]{% + \def\@elt##1{#2}% + \newfloat@list + \let\@elt\relax + #1{\newfloat@addtohook{#2}}} +% \end{macrocode} +% \begin{macrocode} +\providecommand\newfloat@addtohook[1]{% + \toks@=\expandafter{\newfloat@hook{##1}#1}% + \edef\@tempa{\def\noexpand\newfloat@hook####1{\the\toks@}}% + \@tempa} +% \end{macrocode} +% \begin{macrocode} +\providecommand*\newfloat@hook[1]{} +% \end{macrocode} +% \end{macro} +% +% \pagebreak[3] +% \subsection{\cs{PrepareListOf}} +% +% \begin{macro}{\PrepareListOf} +% \changes{v1.1}{2013/04/27}{This macro added} +% |\PrepareListOf|\marg{float type}\marg{code}\\ +% adds \meta{code} to the one which prepares typesetting the list, +% just before |\listoffigures|. +% \begin{macrocode} +\newcommand\PrepareListOf[1]{% + \expandafter\g@addto@macro\csname newfloat@listof#1@hook\endcsname} +\@onlypreamble\PrepareListOf +% \end{macrocode} +% \end{macro} +% +% \pagebreak[3] +% \subsection{The list of floating environments} +% +% \begin{macro}{\newfloat@list} +% |\newfloat@list| is an \cs{@elt}-list containing the already existising floating +% environments as well the ones defined with |\Declare|\-|Floating|\-|Environment|. +% \begin{macrocode} +\newcommand*\newfloat@list{} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\newfloat@addtolist} +% \changes{v1.0b}{2012/05/18}{Bugfix: Definition of \cs{@ifchapterlistsgap@}\meta{environment} added} +% |\newfloat@addtolist|\marg{environment} +% adds an environment to the list of floating environments. +% \begin{macrocode} +\newcommand*\newfloat@addtolist[1]{% + \newfloat@ifinlist{#1}{}{% + \ifcsname ext@#1\endcsname + \@cons\newfloat@list{{#1}}% + \@namedef{newfloat@ext@\@nameuse{ext@#1}}{#1}% + \newfloat@let{@ifchapterlistsgap@#1}{\@iden}% + \else + \newfloat@Error{`#1' does not seem to be a floating environment}% + \fi}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\newfloat@ifinlist} +% |\newfloat@ifinlist|\marg{environment}\marg{yes code}\marg{no code} +% tests if an environment is an element of the list of floating environments. +% \begin{macrocode} +\newcommand*\newfloat@ifinlist[1]{% + \let\next\@secondoftwo + \begingroup + \expandafter\let\csname c@#1\endcsname\newfloat@ifinlist + \def\@elt##1{% + \expandafter\ifx\csname c@##1\endcsname\newfloat@ifinlist + \global\let\next\@firstoftwo + \fi}% + \newfloat@list + \endgroup + \next} +% \end{macrocode} +% \end{macro} +% +% Add |figure| and |table| to the list of floating environments. +% \begin{macrocode} +\ifcsname ext@figure\endcsname + \newfloat@addtolist{figure} +\fi +\ifcsname ext@table\endcsname + \newfloat@addtolist{table} +\fi +% \end{macrocode} +% +% \pagebreak[3] +% \subsection{Chapter lists gaps} +% +% \begin{macrocode} +\ifcsname @chapter\endcsname +% \end{macrocode} +% +% \begin{macro}{\@chapterlistsgap} +% The amount of the chapter lists gap, the default one is |10pt|. +% (This command is already defined in \KOMAScript.) +% \begin{macrocode} + \providecommand*\@chapterlistsgap{10\p@}% +% \end{macrocode} +% If the \package{dgruyter} package is loaded, the default gap is |13pt|. +% \begin{macrocode} + \@ifpackageloaded{dgruyter}{\renewcommand*\@chapterlistsgap{13\p@}}{}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@addchapterlistsgap} +% |\@addchapterlistsgap|\marg{float type}\marg{file extension}\par +% will add the chapter lists gap for the given float type. +% \begin{macrocode} + \providecommand*\@addchapterlistsgap[2]{% + \@nameuse{@ifchapterlistsgap@#1}{% if switched on + \@@addchapterlistsgap{#1}{#2}}} +% \end{macrocode} +% \begin{macrocode} + \providecommand*\@@addchapterlistsgap[2]{% + \@ifundefined{@addchapterlistsgap@#2}{% only once per extension + \@namedef{@addchapterlistsgap@#2}{#1}% + \@@@addchapterlistsgap{#2}}{}} +% \end{macrocode} +% \begin{macrocode} + \providecommand*\@@@addchapterlistsgap[1]{% + \ifdim \@chapterlistsgap>\z@ + \addtocontents{#1}{\protect\addvspace{\@chapterlistsgap}}% + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@addchapterlistsgaps} +% \changes{v1.0b}{2012/05/18}{Bugfix: Group added to make \cs{@addchapterlistsgap} work correctly} +% |\@addchapterlistsgaps|\par +% will add the chapter lists gaps for all floating environments in |\newfloat@list|. +% \begin{macrocode} + \providecommand*\@addchapterlistsgaps{% + \begingroup + \def\@elt##1{% + \@expandtwoargs\@addchapterlistsgap{##1}{\@nameuse{ext@##1}}}% + \newfloat@list + \endgroup} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@chapterlistsgap@off} +% |\@chapterlistsgap@off|\marg{float type}\par +% switches the chapter lists gap off for the given float type. +% Since \KOMAScript{} (still) supports |\float@exts| we need to handle +% this locally, too, even if |\unsettoc| is offered by the \package{tocbasic} package. +% (Otherwise our handling could be moved into the |\else| branch.) +% \begin{macrocode} + \providecommand*\@chapterlistsgap@off[1]{% + \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@gobble + \ifcsname unsettoc\endcsname + \@expandtwoargs\unsettoc{\@nameuse{ext@#1}}{chapteratlist}% + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@chapterlistsgap@on} +% |\@chapterlistsgap@off|\marg{float type}\par +% switches the chapter lists gap on for the given float type. +% \begin{macrocode} + \providecommand*\@chapterlistsgap@on[1]{% + \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@iden + \ifcsname setuptoc\endcsname + \@expandtwoargs\setuptoc{\@nameuse{ext@#1}}{chapteratlist}% + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\fi +% \end{macrocode} +% +% \pagebreak[3] +% \subsection{Global options} +% +% \begin{macro}{chapterlistsgap=} +% The |chapterlistsgap=| option sets the vertical skip added to each list when +% starting a new chapter. +% \begin{macrocode} +\define@key{newfloat}{chapterlistsgap}{% + \renewcommand*\@chapterlistsgap{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{within=} +% The |within=| option redefines the default value and modifies all +% existing floating environments. +% \begin{macrocode} +\define@key{newfloat}{within}{% + \def\newfloat@within@default{#1}% set new default value + \def\@elt##1{\newfloat@setwithin{##1}{#1}}% + \newfloat@list + \let\@elt\relax} +% \end{macrocode} +% \begin{macrocode} +\define@key{newfloat}{without}[]{% + \KV@newfloat@within{none}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{figurename=} +% \begin{macro}{listfigurename=} +% \begin{macro}{figurewithin=} +% We define these options not only for |figure| but for all existing floating environments. +% \begin{macrocode} +\def\@elt#1{% + \define@key{newfloat}{#1name}{% + \newfloat@setname{#1}{##1}}% + \define@key{newfloat}{list#1name}{% + \newfloat@setname{list#1}{##1}}% + \define@key{newfloat}{#1within}{% + \newfloat@setwithin{#1}{##1}}% + \define@key{newfloat}{#1without}[]{% + \newfloat@setwithout{#1}}% +}% +\newfloat@list +\let\@elt\relax +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{planb=} +% \changes{v1.0b}{2012/05/18}{This option added} +% This option switches the `Plan B' on or off. (default$=$true) +% \begin{macrocode} +\define@key{newfloat}{planb}[true]{% + \def\@tempa{#1}% + \def\@tempb{false}% + \ifx\@tempa\@tempb + \let\newfloat@ifplanb\@gobble + \else + \def\@tempb{true}% + \ifx\@tempa\@tempb + \let\newfloat@ifplanb\@iden + \else + \newfloat@Error{Invalid value `#1' for option `planb'}% + \fi + \fi} +% \end{macrocode} +% \end{macro} +% \begin{macro}{planb-filext=} +% \changes{v1.0b}{2012/05/19}{This option added} +% This option sets the file extension used for `Plan B'. +% (default$=$use the 1st one which seem to fit) +% \begin{macrocode} +\define@key{newfloat}{planb-fileext}{% + \newfloat@Info{Setting Plan B file extension to `#1'} + \xdef\newfloat@addtocontents@ext{#1}} +% \end{macrocode} +% \end{macro} +% +% Process the package options: +% We use |\setkeys| here instead of |\ProcessOptions|. +% \begin{macrocode} +\let\@tempc\relax +\@expandtwoargs\setkeys{newfloat}{planb,\@ptionlist{\@currname.\@currext}}% +\AtEndOfPackage{\let\@unprocessedoptions\relax} +% \end{macrocode} +% +% \begin{macro}{\newfloatsetup} +% |\newfloatsetup|\marg{options} +% sets global options after loading the package. +% \begin{macrocode} +\newcommand*\newfloatsetup{\setkeys{newfloat}} +% \end{macrocode} +% \end{macro} +% +% \pagebreak[3] +% \subsection{Patching \cs{chapter}} +% +% \begin{macro}{\newfloat@replace@chapter} +% \changes{v1.1f}{2019/08/25}{Parameter \meta{class name} added to macro} +% \changes{v1.1i}{2019/08/31}{Local definition of \cs{if@chapnum} added} +% |\newfloat@replace@chapter|\marg{class name}\marg{original code}\marg{replacement code}\par +% tries to patch |\@chapter| so |\@add|\-|chapter|\-|lists|\-|gaps| will be supported. +% It checks for |\Hy@org@chapter|, too, since the original code will be stored here +% if the \package{hyperref} package was loaded. +% \begin{macrocode} +\newcommand\newfloat@replace@chapter[3]{% + \begingroup + \let\if@twocolumn\iffalse + \let\if@mainmatter\iffalse + \let\if@thema\iffalse + \let\if@chapnum\iffalse + \def\@tempa[##1]##2{#2}% + \ifx\@tempa\@chapter + \newfloat@InfoNoLine{Document class `#1' detected}% + \gdef\@chapter[##1]##2{#3}% + \global\let\newfloat@replace@chapter\newfloat@dont@replace@chapter + \else\ifx\@tempa\Hy@org@chapter + \newfloat@InfoNoLine{Document class `#1' detected (Hy)}% + \gdef\Hy@org@chapter[##1]##2{#3}% + \global\let\newfloat@replace@chapter\newfloat@dont@replace@chapter + \fi\fi + \endgroup} +% \end{macrocode} +% \begin{macrocode} +\newcommand\newfloat@dont@replace@chapter[3]{} +% \end{macrocode} +% \begin{macrocode} +\ifcsname @chapter\endcsname \else + \let\newfloat@replace@chapter\newfloat@dont@replace@chapter +\fi +% \end{macrocode} +% \end{macro} +% +% \pagebreak[3] +% \subsubsection{Standard \LaTeX{} document classes} +% +% \begin{macrocode} +% report.cls [2005/09/16 v1.4f Standard LaTeX document class] +\newfloat@replace@chapter{report}{% + \ifnum \c@secnumdepth >\m@ne + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter}#1}% + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \chaptermark{#1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi +}{% + \ifnum \c@secnumdepth >\m@ne + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter}#1}% + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \chaptermark{#1}% + \@addchapterlistsgaps + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi} +% \end{macrocode} +% +% \begin{macrocode} +% book.cls [2005/09/16 v1.4f Standard LaTeX document class] +\newfloat@replace@chapter{book}{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter}#1}% + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \chaptermark{#1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi +}{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter}#1}% + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \chaptermark{#1}% + \@addchapterlistsgaps + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi} +% \end{macrocode} +% +% \pagebreak[3] +% \subsubsection{\AmS{} \& \SmF{} document classes} +% +% \begin{macrocode} +% amsbook.cls [2004/08/06 v2.20] +% smfbook.cls [1999/11/15 v1.2f Classe LaTeX pour les monographies editees par la SMF] +\newfloat@replace@chapter{amsbook}{% + \refstepcounter{chapter}% + \ifnum\c@secnumdepth<\z@ \let\@secnumber\@empty + \else \let\@secnumber\thechapter \fi + \typeout{\chaptername\space\@secnumber}% + \def\@toclevel{0}% + \ifx\chaptername\appendixname \@tocwriteb\tocappendix{chapter}{#2}% + \else \@tocwriteb\tocchapter{chapter}{#2}\fi + \chaptermark{#1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \@makechapterhead{#2}\@afterheading +}{% + \refstepcounter{chapter}% + \ifnum\c@secnumdepth<\z@ \let\@secnumber\@empty + \else \let\@secnumber\thechapter \fi + \typeout{\chaptername\space\@secnumber}% + \def\@toclevel{0}% + \ifx\chaptername\appendixname \@tocwriteb\tocappendix{chapter}{#2}% + \else \@tocwriteb\tocchapter{chapter}{#2}\fi + \chaptermark{#1}% + \@addchapterlistsgaps + \@makechapterhead{#2}\@afterheading} +% \end{macrocode} +% +% \pagebreak[3] +% \subsubsection{\KOMAScript{} document classes} +% +% If a \KOMAScript{} document class or the \package{tocbasic} package is used +% we don't need to patch anything. +% Instead we use |\setup|\-|toc| and |\un|\-|set|\-|toc| to setup the +% chapters gap in |\@chapter|\-|lists|\-|gap@on| and |\@chapter|\-|lists|\-|gap@off|. +% \begin{macrocode} +\@ifpackageloaded{tocbasic}{% + \let\newfloat@replace@chapter\newfloat@dont@replace@chapter}{} +% \end{macrocode} +% +% \pagebreak[3] +% \subsubsection{memoir document classes} +% +% If the \package{memoir} document class is used, +% replacing |\insert|\-|chapter|\-|space| by |\@add|\-|chapter|\-|lists|\-|gaps| is sufficient. +% \begin{macrocode} +\ifcsname insertchapterspace\endcsname + \renewcommand*\insertchapterspace{\@addchapterlistsgaps} + \let\newfloat@replace@chapter\newfloat@dont@replace@chapter +\fi +% \end{macrocode} +% +% \pagebreak[3] +% \subsubsection{NTG document classes} +% +% \begin{macrocode} +% rapport1/3.cls [2004/06/07 v2.1a NTG LaTeX document class] +\newfloat@replace@chapter{rapport}{% + \ifnum \c@secnumdepth >\m@ne + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter}\toc@font0 #1}% + \else + \addcontentsline{toc}{chapter}{\toc@font0 #1}% + \fi + \chaptermark{#1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi +}{% + \ifnum \c@secnumdepth >\m@ne + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter}\toc@font0 #1}% + \else + \addcontentsline{toc}{chapter}{\toc@font0 #1}% + \fi + \chaptermark{#1}% + \@addchapterlistsgaps + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi} +% \end{macrocode} +% \begin{macrocode} +% boek(3).cls [2004/06/07 v2.1a NTG LaTeX document class] +\newfloat@replace@chapter{boek}{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter}\toc@font0 #1}% + \else + \addcontentsline{toc}{chapter}{\toc@font0 #1}% + \fi + \else + \addcontentsline{toc}{chapter}{\toc@font0 #1}% + \fi + \chaptermark{#1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi +}{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter}\toc@font0 #1}% + \else + \addcontentsline{toc}{chapter}{\toc@font0 #1}% + \fi + \else + \addcontentsline{toc}{chapter}{\toc@font0 #1}% + \fi + \chaptermark{#1}% + \@addchapterlistsgaps + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi} +% \end{macrocode} +% +% \pagebreak[3] +% \subsubsection{The thesis document class} +% +% \begin{macrocode} +% thesis.cls [1996/25/01 1.0g LaTeX document class (wm).] +\newfloat@replace@chapter{thesis}{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \refstepcounter{chapter}% + \typeout{\chaptername\space\thechapter.} + \if@thema + \ifx\@shortauthor\@empty + \addcontentsline{toc}{chapter}{% + \protect\numberline{\thechapter.}#1}% + \else + \addcontentsline{toc}{chapter}{% + \protect\numberline{\thechapter.}% + \@shortauthor\hfill\mbox{}\vskip\normallineskip #1}% + \fi + \else + \addcontentsline{toc}{chapter}{% + \protect\numberline{\thechapter.}#1}% + \fi + \else + \addcontentsline{toc}{chapter}{#1} + \fi + \else + \addcontentsline{toc}{chapter}{#1} + \fi + \chaptermark{#1} + \addtocontents{lof}{\protect\addvspace{10pt}} + \addtocontents{lot}{\protect\addvspace{10pt}} + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}] + \else + \@makechapterhead{#2} + \@afterheading + \fi +}{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \refstepcounter{chapter}% + \typeout{\chaptername\space\thechapter.}% + \if@thema + \ifx\@shortauthor\@empty + \addcontentsline{toc}{chapter}{% + \protect\numberline{\thechapter.}#1}% + \else + \addcontentsline{toc}{chapter}{% + \protect\numberline{\thechapter.}% + \@shortauthor\hfill\mbox{}\vskip\normallineskip #1}% + \fi + \else + \addcontentsline{toc}{chapter}{% + \protect\numberline{\thechapter.}#1}% + \fi + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \chaptermark{#1}% + \@addchapterlistsgaps + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi} +% \end{macrocode} +% +% \pagebreak[3] +% \subsubsection{The Springer Verlag document classes} +% \changes{v1.1f}{2019/08/25}{Support of \package{svmono} and \package{svmult} document classes added} +% +% \begin{macrocode} +% svmono.cls [2018/06/25 v5.6 Springer Verlag global LaTeX document class for monographs] +% svmult.cls [2018/01/11 v5.5 Springer Verlag global LaTeX document class for multi authored books] +\newfloat@replace@chapter{svmono}{% + \if@chapnum % war mal \ifnum \c@secnumdepth >\m@ne + \refstepcounter{chapter}% + \if@mainmatter + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}{\protect + \numberline{\thechapter\thechapterend}#1}% + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \chaptermark{#1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi +}{% + \if@chapnum % war mal \ifnum \c@secnumdepth >\m@ne + \refstepcounter{chapter}% + \if@mainmatter + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}{\protect + \numberline{\thechapter\thechapterend}#1}% + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \chaptermark{#1}% + \@addchapterlistsgaps + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi} +% \end{macrocode} +% +% \pagebreak[3] +% \subsubsection{The dgruyter package} +% \changes{v1.1j}{2019/08/31}{Extended support of \package{dgruyter} package added} +% +% \begin{macrocode} +% dgruyter.sty [2017/09/19 v2.00 De Gruyter layout] +\newfloat@replace@chapter{dgruyter}{% + \let\thesection\theinchapsection + \let\theequation\theinchapequation + \let\thefigure\theinchapfigure + \let\thetable\theinchaptable + \ifx\bookDOI\@undefined + \else + \@tempcnta\numexpr\componentd@i+\@ne\relax + \xdef\componentd@i{\the\@tempcnta}% + \xdef\@DOI{% + https://doi.org/\bookDOI + -\ifx\thepage\thefrontmatterpage2\else\ifnum\@tempcnta<100 0\fi\fi + \ifnum\@tempcnta<10 0\fi\componentd@i}% + \fi + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}% + \else + \addcontentsline{toc}{schapter}{#1}% + \fi + \else + \addcontentsline{toc}{schapter}{#1}% + \fi + \chaptermark{#1}% + \addtocontents{lof}{\protect\addvspace{13\p@}}% + \addtocontents{lot}{\protect\addvspace{13\p@}}% + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi +}{% + \let\thesection\theinchapsection + \let\theequation\theinchapequation + \let\thefigure\theinchapfigure + \let\thetable\theinchaptable + \ifx\bookDOI\@undefined + \else + \@tempcnta\numexpr\componentd@i+\@ne\relax + \xdef\componentd@i{\the\@tempcnta}% + \xdef\@DOI{% + https://doi.org/\bookDOI + -\ifx\thepage\thefrontmatterpage2\else\ifnum\@tempcnta<100 0\fi\fi + \ifnum\@tempcnta<10 0\fi\componentd@i}% + \fi + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}% + \else + \addcontentsline{toc}{schapter}{#1}% + \fi + \else + \addcontentsline{toc}{schapter}{#1}% + \fi + \chaptermark{#1}% + \@addchapterlistsgaps + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi} +% \end{macrocode} +% +% \pagebreak[3] +% \subsubsection{Compatibility warning} +% +% \begin{macrocode} +\ifx\newfloat@replace@chapter\newfloat@dont@replace@chapter \else +% \end{macrocode} +% If we were not able to patch |\@chapter| an info message is issued +% since we may not be able to support chapter lists gaps then. +% \begin{macrocode} + \newfloat@InfoNoLine{% + Unsupported document class, or \noexpand\@chapter\MessageBreak + was already redefined by another package} + \newfloat@InfoNoLine{\string\@chapter\space=\space\meaning\@chapter} + \newfloat@InfoNoLine{\string\Hy@org@chapter\space=\space\meaning\Hy@org@chapter} +% \end{macrocode} +% Plan B: We patch |\add|\-|to|\-|contents| instead, and keep our fingers crossed +% in the hope that this redefinition actually will fit. +% (Note: Since \package{biblatex} patches |\add|\-|to|\-|contents| as well we do +% this using |\At||Begin||Document|.) +% \changes{v1.1f}{2019/08/25}{Plan B will now be done using \cs{AtBeginDocument}} +% \begin{macrocode} + \newfloat@ifplanb{\AtBeginDocument{% + \newfloat@InfoNoLine{Trying Plan B..}% + \let\newfloat@addtocontents@ORI\addtocontents + \long\def\addtocontents#1#2{% + \newfloat@addtocontents{#1}{#2}#2\addvspace\newfloat@nil}% + \long\def\newfloat@addtocontents#1#2#3\addvspace#4\newfloat@nil{% + \def\newfloat@tempa{#4}% + \ifx\newfloat@tempa\@empty + \newfloat@addtocontents@ORI{#1}{#2}% + \else + \ifx\newfloat@addtocontents@ext\@undefined + \newfloat@Info{Setting Plan B file extension to `#1'...}% + \xdef\newfloat@addtocontents@ext{#1}% + \fi + \edef\newfloat@tempa{#1}% + \ifx\newfloat@tempa\newfloat@addtocontents@ext + \begingroup + \let\addtocontents\newfloat@addtocontents@ORI + \@addchapterlistsgaps + \endgroup + \fi + \fi}}} +% \end{macrocode} +% \begin{macrocode} +\fi +% \end{macrocode} +% +% \pagebreak[3] +% \subsection{Support of document classes} +% +% \subsubsection{The beamer document class} +% +% \begin{macro}{\beamer@float} +% \changes{v1.1k}{2019/09/01}{This macro added} +% Unfortunately the \class{beamer} document class does not offer +% |\beamer@float| and |\end@beamer@float| (yet), so we have to define them +% for ourself. +% (This code was taken from beamerbaselocalstructure.sty [2019/07/23 v3.56] and adapted.) +% \begin{macrocode} +\ifcsname beamer@float\endcsname \else +% \end{macrocode} +% \begin{macrocode} + \def\beamer@float#1{% + \ifcsname caption@settype\endcsname + \caption@settype{#1}% + \else + \def\@captype{#1}% + \fi + \par\nobreak\begin{center}\nobreak} +% \end{macrocode} +% \begin{macrocode} + \def\end@beamer@float{% + \par\nobreak\end{center}} +% \end{macrocode} +% \begin{macrocode} +\fi +% \end{macrocode} +% \end{macro} +% +% \pagebreak[3] +% \subsection{Support of other packages} +% +% \begin{macro}{\newfloat@IfPackageLoaded} +% \changes{v1.1e}{2019/03/17}{This macro revised} +% \changes{v1.1h}{2019/08/31}{This macro revised again and renamed from \cs{newfloat@ForEachNew} to \cs{newfloat@IfPackageLoaded}} +% |\newfloat@IfPackageLoaded|\marg{package name}\marg{command}\marg{code} +% will execute the given code for every floating environment defined with +% |\Declare|\-|Floating|\-|Environment| if \meta{command} is not defined yet. +% (If \meta{command} is already defined a warning will be issued.) +% This will be tried |\At|\-|Begin|\-|Document| additionally so the affected package could +% be loaded after \thispackage. +% \begin{macrocode} +\newcommand\newfloat@IfPackageLoaded[3]{% + \@ifpackageloaded{#1}{% + \newfloat@@IfPackageLoaded{#1}{#2}{#3}% + }{% + \AtBeginDocument{% + \@ifpackageloaded{#1}{% + \newfloat@@IfPackageLoaded{#1}{#2}{#3}% + }{}}% + }} +\@onlypreamble\newfloat@IfPackageLoaded +% \end{macrocode} +% \begin{macrocode} +\newcommand\newfloat@@IfPackageLoaded[3]{% + \newfloat@InfoNoLine{`#1' package detected}% + % Execute code for every previous \DeclareFloatingEnvironment + \def\@elt##1{\newfloat@@@IfPackageLoaded{#1}{#2}{#3}}% + \newfloat@@list + \let\@elt\relax + % Execute code for every future \DeclareFloatingEnvironment + \newfloat@addtohook{\newfloat@@@IfPackageLoaded{#1}{#2}{#3}}} +\@onlypreamble\newfloat@@IfPackageLoaded +% \end{macrocode} +% \begin{macrocode} +\newcommand\newfloat@@@IfPackageLoaded[3]{% + \ifcsname#2\endcsname + \newfloat@WarningNoLine{% + Command \@backslashchar#2 already defined.\MessageBreak + (`#1' package support)}% + \else + #3% + \fi} +\@onlypreamble\newfloat@@@IfPackageLoaded +% \end{macrocode} +% \end{macro} +% +% \pagebreak[3] +% \subsubsection{\package{dgruyter}} +% +% The De Gruyter layout package (for preparing books for Walter de Gruyter GmbH) +% is defining |\plist@figure| and |\plist@table|, and expects this to be +% defined for other floating environments as well. +% (This will be used as prefix for the ``List of''.) +% \begin{macrocode} +\newfloat@IfPackageLoaded{dgruyter}{plist@#1}{% + \expandafter\newcommand\csname plist@#1\endcsname{% + \@nameuse{#1name}\space}} +% \end{macrocode} +% +% \pagebreak[3] +% \subsubsection{\package{float}} +% +% If the \package{float} package is used we fill up |\float@exts| with our file +% extensions, too. Since this list will be used for inserting chapters gaps +% we only add the ones which are configured for chapters gaps on. +% \begin{macrocode} +\newfloat@IfPackageLoaded{float}{newfloat@undefined}{% + \@nameuse{@ifchapterlistsgap@#1}{% if switched on + \let\float@do=\relax + \edef\@tempa{% + \noexpand\float@exts{\the\float@exts\float@do{\@nameuse{ext@#1}}}}% + \@tempa}} +% \end{macrocode} +% +% \pagebreak[3] +% \subsubsection{\package{fltpage}} +% +% We define a FP-variant of new floating environments here. +% \begin{macrocode} +\newfloat@IfPackageLoaded{fltpage}{FP#1}{% + \newcounter{FP@#1C}% + \newenvironment{FP#1}{\FP@floatBegin{#1}}{\FP@floatEnd}} +% \end{macrocode} +% +% \pagebreak[3] +% \subsubsection{\package{listings}} +% +% \begin{macro}{\ext@lstlisting} +% Since the \package{listings} package do not define |\ext@lst|\-|listing| +% but we needed it when |Setup|\-|Floating|\-|Environment{lst|\-|listing}{|\ldots|}| +% will be done by the end user, we define it here. +% \begin{macrocode} +\providecommand*\ext@lstlisting{lol}% +% \end{macrocode} +% \end{macro} +% +% \pagebreak[3] +% \subsubsection{\package{rotating}} +% +% We define a sideways-variant of new floating environments here. +% \begin{macrocode} +\newfloat@IfPackageLoaded{rotating}{sideways#1}{% + \newenvironment{sideways#1}{\@rotfloat{#1}}{\end@rotfloat}% + \newenvironment{sideways#1*}{\@rotdblfloat{#1}}{\end@rotdblfloat}} +% \end{macrocode} +% +% \pagebreak[3] +% \subsubsection{\package{sidecap}} +% +% We define a SC-variant of new floating environments here. +% \begin{macro}{\SC@float} +% \changes{v1.1b}{2018/12/26}{Bugfix: Missing curly braces added} +% \begin{macrocode} +\newcommand*\newfloat@For@SC[2]{% + \def#1{b}% = \sidecaptionvpos{#2}{b} (v1.6) + \newenvironment{SC#2}% + {\SC@float[{#1}]{#2}}{\endSC@float}% + \newenvironment{SC#2*}% + {\SC@dblfloat[{#1}]{#2}}{\endSC@dblfloat}} +\@onlypreamble\newfloat@For@SC +% \end{macrocode} +% \begin{macrocode} +\newfloat@IfPackageLoaded{sidecap}{SC#1}{% + \expandafter\newfloat@For@SC\csname SC@#1@vpos\endcsname{#1}} +% \end{macrocode} +% \end{macro} +% +% \pagebreak[3] +% \subsubsection{\package{wrapfig}} +% +% We define a wrap-variant of new floating environments here. +% \begin{macrocode} +\newfloat@IfPackageLoaded{wrapfig}{wrap#1}{% + \newenvironment{wrap#1}{\wrapfloat{#1}}{\endwrapfloat}} +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \Finale +% +\endinput diff --git a/macros/latex/contrib/caption/newfloat.pdf b/macros/latex/contrib/caption/newfloat.pdf new file mode 100644 index 0000000000..597f044f51 Binary files /dev/null and b/macros/latex/contrib/caption/newfloat.pdf differ diff --git a/macros/latex/contrib/caption/subcaption.dtx b/macros/latex/contrib/caption/subcaption.dtx new file mode 100644 index 0000000000..0eb2a144fc --- /dev/null +++ b/macros/latex/contrib/caption/subcaption.dtx @@ -0,0 +1,1269 @@ +% \iffalse meta-comment +% +% This is file `subcaption.dtx'. +% +% Copyright (C) 2007-2019 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +% +% -------------------------------------------------------------------------- +% +% 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, +% caption3.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, and newfloat.dtx, +% the derived files caption.sty, caption2.sty, caption3.sty, +% bicaption.sty, ltcaption.sty, subcaption.sty, and newfloat.sty, +% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. +% +% \fi +% \CheckSum{235} +% +% \iffalse +%<*driver> +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesFile{subcaption.drv}[2019/08/31 v1.3 Adds a sub-caption feature to the caption package] +\hbadness=9999 \newcount\hbadness \hfuzz=74pt % Make TeX shut up. +%\errorcontextlines=3 +% +\documentclass{ltxdoc} +\setlength\parindent{0pt} +\setlength\parskip{\smallskipamount} +% +\newcommand\LineBreak{\linebreak[3]} +\newcommand\PageBreak{\pagebreak[3]} +\usepackage{ifpdf} +\ifpdf + \usepackage{mathptmx,courier} + \usepackage[scaled=0.90]{helvet} + \addtolength\marginparwidth{15pt} + \ifdim\paperheight=297mm % a4paper + \renewcommand\LineBreak{\\} + \renewcommand\PageBreak{\clearpage} + \fi +\fi +% +\usepackage[bottom]{footmisc} +\usepackage{array,graphicx,overpic,pict2e,diagbox} +% +\PassOptionsToPackage{breaklinks=true}{hyperref} +\usepackage{hypdoc} +\ifpdf\usepackage{hypdestopt}\fi +\hypersetup{pdfkeywords={LaTeX, package, subcaption},pdfstartpage={},pdfstartview={}} +% +\usepackage{subcaption}[2011/08/01] % needs v1.1 or newer +\DeclareCaptionSubType*[arabic]{table} +\captionsetup[subtable]{labelformat=simple,labelsep=colon} +% +\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 +% +\newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}} +\newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}} +\newcommand*\version[2][]{$v#2$} +% +\usepackage{marvosym} +\makeatletter +\newcommand*\INFO{\@ifstar{\@INFO{}}{\@INFO{\vbox to \ht\strutbox}}} +\newcommand*\@INFO[1]{\MARGINSYM{#1{\LARGE\Info}}} +\makeatother +% +\usepackage[alpine]{ifsym} +\newenvironment{background}{\par\bigskip\csname background*\endcsname}{\csname endbackground*\endcsname} +\newenvironment{background*}{\small\MARGINSYM{\Mountain}\ignorespaces}{\par} +% +\newcommand*\MARGINSYM[1]{\hskip 1sp \marginpar{\raggedleft\textcolor{blue}{{#1}}}} +\newcommand*\NEW[2]{\MARGINSYM{\vskip2pt\footnotesize#1\\#2}} +% +\begin{document} + \DocInput{subcaption.dtx} +\end{document} +% +% \fi +% +% \let\subsectionautorefname\sectionautorefname +% \let\subsubsectionautorefname\sectionautorefname +% +% \def\thispackage{the \package{subcaption} package} +% \def\Thispackage{The \package{subcaption} package} +% +% \newcommand\NEWfeature{\NEW{New feature}} +% \newcommand\NEWdescription{\NEW{New description}} +% +% \makeatletter +% \newcommand*\Ref{\@ifstar{\@Ref\ref}{\@Ref\autoref}} +% \newcommand*\@Ref[2]{#1{#2}: \textit{\nameref{#2}}} +% \makeatother +% \newcommand*\See[1]{\nopagebreak{\small (See #1)}} +% +% \GetFileInfo{subcaption.drv} +% \let\docdate\filedate +% \let\docversion\fileversion +% \GetFileInfo{subcaption.sty} +% +% \title{\texorpdfstring{\Thispackage\thanks{%^^A +% This package has version number \docversion.}}%^^A +% {The subcaption package}} +% \author{Axel Sommerfeldt\\ +% \url{https://gitlab.com/axelsommerfeldt/caption}} +% \date{\docdate} +% \maketitle +% +% \begin{abstract} +% This package supports typesetting of sub-captions +% (by using the the sub-caption feature of the \package{caption} package). +% \end{abstract} +% +% \begin{background} +% At the end of each section, text marked with the mountain symbol +% will contain background knowledge on how the particular command or +% environment is actually implemented. +% If you just want to use this package as it is, you don't have to read or +% understand them. +% \end{background} +% +% \begin{background*} +% This package demonstrates the usage of |\Declare|\-|Caption|\-|Sub|\-|Type|, +% |\caption|\-|setup{sub|\-|type}|, and the internal hook +% |\caption@sub|\-|type|\-|hook| (offered by the \package{caption} package). +% \end{background*} +% +% \bigskip +% \INFO* +% \emph{Please note:} +% This package is incompatible with the \package{subfigure} and \package{subfig} +% packages. +% +% \clearpage +% \setcounter{tocdepth}{2} +% \tableofcontents +% +% \clearpage +% \section{Loading the package} +% +% Load this package using +% \begin{quote} +% |\usepackage|\oarg{options}|{subcaption}|\quad. +% \end{quote} +% The options for \thispackage\ are the same ones as for the \package{caption} +% package, but specify settings which are used for sub-captions +% \emph{additionally}. +% In fact +% \begin{quote} +% |\usepackage|\oarg{options}|{subcaption}| +% \end{quote} +% is identical to +% \begin{quote} +% |\usepackage{subcaption}|\\ +% |\captionsetup[sub]|\marg{options}\quad. +% \end{quote} +% +% \bigskip +% +% The default settings for |sub|captions are: +% \begin{quote} +% |margin=0pt,size=smaller,labelformat=parens,labelsep=space,|\\ +% |skip=6pt,list=false,hypcap=false|~\footnote{%^^A +% This means that sub-captions are not listed in the List of Figures +% or Tables by default, but you can enable that by +% specifying the option \texttt{list=true}.} +% \end{quote} +% +% Options specified with |\usepackage[|\ldots|]{sub|\-|caption}| and +% |\caption|\-|setup[sub]{|\ldots|}| will override the ones specified by +% |\caption|\-|setup{|\ldots|}| and |\caption|\-|setup[fig|\-|ure]{|\ldots|}|, +% but are again overwritten by |\caption|\-|setup[sub|\-|figure]{|\ldots|}| +% (same for `table'). So finally we have the following order how +% settings for sub-captions are applied: +% \begin{enumerate} +% \item Global settings +% {\small(|\usepackage[|\ldots|]{caption}| and |\captionsetup{|\ldots|}|)} +% \item Environmental settings +% {\small(|\captionsetup[figure|\emph{ -or- }|table]{|\ldots|}|)} +% \item Local settings +% {\small(|\captionsetup{|\ldots|}| inside |figure| or |table| environment)} +% \item Default `sub' settings +% {\small(|margin=0pt,size=smaller,|\ldots, see above)} +% \item Custom `sub' settings +% {\small(|\usepackage[|\ldots|]{subcaption}| and |\captionsetup[sub]{|\ldots|}|)} +% \item Environmental `sub' settings +% {\small(|\captionsetup[subfigure|\emph{ -or- }|subtable]{|\ldots|}|)} +% \item Local `sub' settings +% {\small(|\captionsetup{|\ldots|}| inside |sub|\-|figure| or |sub|\-|table|)} +% \end{enumerate} +% An example: +% \begin{quote} +% |\usepackage[labelsep=quad,indention=10pt]{caption}|\\ +% |\usepackage[labelfont=bf,list=true]{subcaption}|\\ +% |\captionsetup[table]{textfont=it,position=top}|\\ +% |\captionsetup[subtable]{textfont=sf}| +% \end{quote} +% causes the captions inside |sub|\-|table| environments to be typeset with +% the settings +% \begin{quote} +% |indention=10pt,position=top,margin=0pt,font=small,|\\ +% |labelformat=parens,labelsep=space,skip=6pt,hypcap=false,|\\ +% |labelfont=bf,list=true,textfont=sf|\quad. +% \end{quote} +% +% \PageBreak +% \section{The \cs{subcaptionbox} command} +% +% \DescribeMacro\subcaptionbox +% The easiest way to apply a sub-caption is by using the +% |\sub|\-|caption|\-|box| command, which automatically aligns the +% sub-figures resp.~sub-tables by their very first caption line. +% +% Its syntax is: +% \begingroup +% \leftmargini=12pt +% \begin{quote} +% |\subcaptionbox|\oarg{list entry}\marg{heading}\oarg{width}\oarg{inner-pos}\marg{contents}\\ +% |\subcaptionbox*|\marg{heading}\oarg{width}\oarg{inner-pos}\marg{contents} +% \end{quote} +% \endgroup +% \begin{small} +% The arguments \meta{list entry} \& \meta{heading} will be used for +% typesetting the |\caption|.\par +% \meta{width} is the width of the resulting |\par|\-|box|; the default value is +% the width of the contents.\par +% \meta{inner-pos} specifies how the contents will be justified inside the +% resulting |\parbox|; +% it can be either `c' (for |\centering|), `l' (for |\ragged|\-|right|), +% `r' (for |\ragged|\-|left|), or `s' (for no special justification). +% The default is `c'. +% (But you can use any justification defined with +% |\Declare|\-|Caption|\-|Jus|\-|ti|\-|fi|\-|ca|\-|tion| as well, +% e.g.~`|center|\-|last|'.) +% \end{small} +% +% \bigskip +% +% Using |\sub|\-|caption|\-|box|, the baseline of the resulting box will be placed +% right between contents and heading, so usually you don't have to care about the +% vertical alignment of the sub-figures for yourself. +% Also the hyperlink anchor is placed properly with respect to the |hyp|\-|cap=| +% setting. +% +% One example: +% \begin{quote} +% |\begin{figure}|\\ +% | \centering|\\ +% | \subcaptionbox{A cat\label{cat}}|\\ +% | {\includegraphics{cat}}|\\ +% | \subcaptionbox{An elephant\label{elephant}}|\\ +% | {\includegraphics{elephant}}|\\ +% | \caption{Two animals}\label{animals}|\\ +% |\end{figure}| +% \end{quote} +% gives the result:\par +% \noindent\begin{minipage}{\linewidth} +% \setcaptiontype{figure} +% \centering +% \subcaptionbox{A cat\label{cat}} +% {\includegraphics[width=30pt]{cat}} +% \subcaptionbox{An elephant\label{elephant}} +% {\includegraphics[width=.4\textwidth]{elephant}} +% \caption[Two animals]{Two animals~\footnotemark}\label{animals} +% \end{minipage} +% \footnotetext{The pictures were taken with permission from the +% \LaTeX\ Companion\cite{TLC2} examples.} +% +% \bigskip +% +% As you see the result is not satisfying; +% the caption below the cat looks ugly because of the small width of the +% graphic. This can be solved by using the optional arguments of +% |\sub|\-|caption|\-|box|, increasing the width of the resulting box: +% \begin{quote} +% | |\ldots\\ +% | \subcaptionbox{A cat\label{cat}}|\\ +% | |\textcolor{blue}{\csoarg{2.5cm}}|{\includegraphics{cat}}|\\ +% | |\ldots +% \end{quote} +% \noindent\begin{minipage}{\linewidth} +% \setcaptiontype{figure} +% \centering +% \subcaptionbox{A cat\label{cat2}} +% [2.5cm]{\includegraphics[width=30pt]{cat}} +% \subcaptionbox{An elephant\label{elephant2}} +% {\includegraphics[width=.4\textwidth]{elephant}} +% \caption{Two animals}\label{animals2} +% \end{minipage} +% +% \bigskip +% +% Furthermore the main caption, which is centered with respect to the +% |\text|\-|width|, looks mis-aligned with respect to the sub-captions. +% This can (again) be solved by using the optional arguments of +% |\sub|\-|caption|\-|box|, giving both boxes the same width, for example: +% \begin{quote} +% | |\ldots\\ +% | \subcaptionbox{A cat\label{cat}}|\\ +% | |\textcolor{blue}{\csoarg{.4\cs{linewidth}}}|{\includegraphics{cat}}%|\\ +% | \subcaptionbox{An elephant\label{elephant}}|\\ +% | |\textcolor{blue}{\csoarg{.4\cs{linewidth}}}|{\includegraphics{elephant}}|\\ +% | |\ldots +% \end{quote} +% \noindent\begin{minipage}{\linewidth} +% \setcaptiontype{figure} +% \centering +% \subcaptionbox{A cat\label{cat3}} +% [.4\linewidth]{\includegraphics[width=39.34724pt]{cat}}%^^A +% \subcaptionbox{An elephant\label{elephant3}} +% [.4\linewidth]{\includegraphics[width=.4\textwidth]{elephant}} +% \caption{Two animals}\label{animals3} +% \end{minipage} +% +% \bigskip +% +% \iffalse +% \noindent\begin{minipage}{\linewidth} +% \setcaptiontype{figure} +% \centering +% \hbox{\subcaptionbox{An elephant\label{elephant4}} +% {\includegraphics[width=.4\textwidth]{elephant}}%^^A +% \vbox{\subcaptionbox{Cat 1\label{cat4.1}} +% {\includegraphics[width=30pt]{cat}}\par +% \subcaptionbox{Cat 2\label{cat4.2}} +% {\includegraphics[width=30pt]{cat}}}}%^^A +% \caption{Two animals}\label{animals4} +% \end{minipage} +% \bigskip +% \fi +% +% \begin{background} +% The |\sub|\-|caption|\-|box| is a |\par|\-|box| with +% |\set|\-|caption|\-|sub|\-|type| as first contents line. +% \iffalse See implementation for details.\fi +% \end{background} +% +% \PageBreak +% \section{The subfigure \& subtable environments} +% +% \DescribeEnv{subfigure} +% \DescribeEnv{subtable} +% After loading \thispackage\ the new environments |sub|\-|figure| and +% |sub|\-|table| are available, which have the same (optional \& mandatory) +% arguments as the |mini|\-|page| environment: +% \begin{quote} +% |\begin{subfigure}|\oarg{outer-pos}\oarg{height}\oarg{inner-pos}\marg{width}\\ +% \ldots\\ +% |\end{subfigure}| +% \end{quote} +% and +% \begin{quote} +% |\begin{subtable}|\oarg{outer-pos}\oarg{height}\oarg{inner-pos}\marg{width}\\ +% \ldots\\ +% |\end{subtable}| +% \end{quote} +% Inside these environments you use the ordinary |\caption| command +% for typesetting captions. So this example is the same as the last one, +% but uses the |sub|\-|figure| environment: +% \begin{quote} +% |\begin{figure}|\\ +% | \begin{|\textcolor{blue}{\texttt{subfigure}}|}[b]{.5\linewidth}|\\ +% | \centering\large A|\\ +% | |\textcolor{blue}{\cs{caption}}|{A subfigure}\label{fig:1a}|\\ +% | \end{|\textcolor{blue}{\texttt{subfigure}}|}%|\\ +% | \begin{|\textcolor{blue}{\texttt{subfigure}}|}[b]{.5\linewidth}|\\ +% | \centering\large B|\\ +% | |\textcolor{blue}{\cs{caption}}|{Another subfigure}\label{fig:1b}|\\ +% | \end{|\textcolor{blue}{\texttt{subfigure}}|}|\\ +% | \caption{A figure}\label{fig:1}|\\ +% |\end{figure}| +% \end{quote} +% Some additional notes: +% \begin{itemize} +% \item You can override the setttings for a specific subcaption +% with a |\caption|\-|setup| inside the |sub|\-|figure| or |sub|\-|table| environment, e.g.: +% \begin{quote} +% |\begin{subfigure}[b]{.5\linewidth}|\\ +% | \centering\large A|\\ +% | |\textcolor{blue}{\cs{captionsetup}\csmarg{skip=3pt}}\\ +% | \caption{A subfigure}\label{fig:1a}|\\ +% |\end{subfigure}|\\ +% \end{quote} +% \item Hyperlinks targeted to this subfigure will jump to the beginning +% of the subfigure, and not to the caption of the subfigure +% (if |hypcap=true| is set for sub-captions). +% \See{\Ref{hypcap}} +% \end{itemize} +% +% \NEWfeature{v1.2} +% Beside the \meta{inner-pos} values of `c', `t', and `b', \thispackage\ also offers the +% values `T' and `B' additionally which align the |sub|\-|figure| at the +% very top resp.~bottom. (In contrast `t' and `b' align the |sub|\-|figure| at the +% top resp.~bottom \textit{baseline}.) +% +% \bigskip +% +% \begin{background} +% The |subfigure| \& |subtable| environments are just simple minipage +% environments with |\set|\-|caption|\-|sub|\-|type| as first contents line. +% These environments are defined with the help of +% |\caption@For{subtypelist}|, which executes code for every sub-type +% declared with |\Declare|\-|Caption|\-|Sub|\-|Type|. +% \end{background} +% +% \iffalse\PageBreak\fi +% \section{The \cs{subcaption} command} +% +% \DescribeMacro\subcaption +% The most flexible way to apply a sub-caption is by using the +% |\subcaption| command. Its syntax is analogous to the one of the |\caption| +% command and shares its features: +% \begin{quote} +% |\subcaption|\oarg{list entry}\marg{heading}\\ +% |\subcaption*|\marg{heading} +% \end{quote} +% Please note that the |\subcaption| command \emph{must} be applied inside +% its own box or environment. +% +% An example: +% \begin{quote} +% |\begin{figure}|\\ +% | \begin{minipage}[b]{.5\linewidth}|\\ +% | \centering\large A|\\ +% | \subcaption{A subfigure}\label{fig:1a}|\\ +% | \end{minipage}%|\\ +% | \begin{minipage}[b]{.5\linewidth}|\\ +% | \centering\large B|\\ +% | \subcaption{Another subfigure}\label{fig:1b}|\\ +% | \end{minipage}|\\ +% | \caption{A figure}\label{fig:1}|\\ +% |\end{figure}| +% \end{quote} +% gives the result: +% \par\bigskip +% \noindent\begin{minipage}{\linewidth} +% \setcaptiontype{figure} +% \begin{minipage}[b]{.5\linewidth} +% \centering\large A +% \subcaption{A subfigure}\label{fig:1a} +% \end{minipage}%^^A +% \begin{minipage}[b]{.5\linewidth} +% \centering\large B +% \subcaption{Another subfigure}\label{fig:1b} +% \end{minipage} +% \caption{A figure}\label{fig:1} +% \end{minipage} +% +% \bigskip +% +% \begin{background} +% Prepared with |\Declare|\-|Caption|\-|Sub|\-|Type| (offered by the +% \package{caption} package), the caption package command |\set|\-|caption|\-|sub|\-|type| +% becames available. +% Analogous to the |\set|\-|caption|\-|type| command of the \package{caption} package, +% the |\set|\-|caption|\-|sub|\-|type| command sets the sub-type of the box or environment +% (so |\caption| will typeset a sub-caption instead of an ordinary one), +% places a proper hyperlink anchor (non-starred variant only), +% executes options associated with the sub-type etc.\par +% The |\subcaption| command is just a simple combination of +% |\set|\-|caption|\-|sub|\-|type*| and |\caption|. +% \end{background} +% +% \PageBreak +% \section{The \cs{DeclareCaptionSubType} command} +% +% \DescribeMacro\DeclareCaptionSubType +% For using the sub-caption feature of the \package{caption} package some +% commands and counters must be prepared. This is done with +% \iffalse\footnote{%^^A +% \cs{newsubfloat} offered by the \package{subfig} package\cite{subfig} +% could be used for this purpose as well.}\fi +% \begin{quote} +% |\DeclareCaptionSubType|\oarg{numbering scheme}\marg{type}\\ +% |\DeclareCaptionSubType*|\oarg{numbering scheme}\marg{type} +% \end{quote} +% For the environments |figure| \& |table|, and all the ones +% defined with |\Declare|\-|Floating|\-|Environment| offered by the +% \package{newfloat} package, this will be done automatically, +% but for other environments (e.g.~the ones defined with |\newfloat| offered by the +% \package{float} package or |\Declare|\-|New|\-|Float|\-|Type| offered by the +% \package{floatrow} package) this has to be done manually. +% +% \medskip +% +% The starred variant provides the sub-caption numbering format +% \meta{type}|.|\meta{subtype} (e.g.~`|1.2|') while the non-starred variant +% simply uses \meta{subtype} (e.g.~`|a|'). +% +% \begin{small} +% Own numbering formats can be created by redefining |\thesub|\meta{type}, e.g. +% \begin{quote}|\DeclareCaptionSubType*{figure}|\\ +% |\renewcommand\thesubfigure{\thefigure\alph{subfigure}}|\end{quote} +% would give you sub-caption numbers like `|1b|'. +% \end{small} +% +% The default numbering scheme is |alph|, but you can use any \LaTeX\ (or self-defined) +% command name here which converts a counter to a text value, e.g. |arabic|, |roman|, +% |Roman|, |alph|, |Alph|, |fnsymbol|, \ldots +% +% But |\DeclareCaptionSubType| is not only for defining new sub-caption types, +% you can use this command for re-definitions as well, e.g. +% \begingroup +% \leftmargini=12pt +% \begin{quote} +% |\DeclareCaptionSubType*[arabic]{table}|\\ +% |\captionsetup[subtable]{labelformat=simple,labelsep=colon}| +% \end{quote} +% \endgroup +% \pagebreak[2] +% will give you sub-captions in |table|s like these ones: +% \par\bigskip +% \noindent\begin{minipage}{\linewidth} +% \setcaptiontype{table} +% \centering +% \caption{Two tables} +% \subcaptionbox{Table one}[3cm][c]{\begin{tabular}{cc}A & B\\ C & D\\ \end{tabular}} +% \subcaptionbox{Table two}[3cm][c]{\begin{tabular}{cc}E & F\\ G & H\\ \end{tabular}} +% \end{minipage} +% +% \begin{background} +% |\Declare|\-|Caption|\-|Sub|\-|Type| is an integral part of the \package{caption} +% package kernel. +% \end{background} +% +% \PageBreak +% \section{References} +% +% The macro |\the|\-\meta{counter} is not only responsible for the look of the \meta{counter}, +% but for the look of the references typeset with |\ref|, too. References will be prefixed by +% \LaTeX{} with the internal macro |\p@|\-\meta{counter}. +% +% |\Declare|\-|Caption|\-|Sub|\-|Type| will define both of them for sub-captions +% (e.g. |sub|\-|figure| and |sub|\-|table|), and as you have seen in the last section +% |\Declare|\-|Caption|\-|Sub|\-|Type| will give you some options to control the +% internal (re-)definition of |\the|\-\meta{counter} and |\p@|\-\meta{counter}. +% +% \DescribeMacro\thesubfigure +% \DescribeMacro\p@subfigure +% For example |\thesubfigure| and |\p@subfigure| are (as default) internally defined as +% \begin{quote} +% |\newcommand\thesubfigure{\alph{subfigure}}|\\ +% |\newcommand\p@subfigure{\thefigure}| +% \end{quote} +% so the label of sub-captions will look like `|a|' (decorated by the selected label format), +% while references will look like `|1a|' since they are prefixed by |\p@sub|\-|figure| $=$ +% |\the|\-|figure|. +% +% After |\Declare|\-|Caption|\-|Sub|\-|Type*[arabic]{figure}|, |\the|\-|sub|\-|figure| and +% |\p@sub|\-|figure| will look like +% \begin{quote} +% |\renewcommand\thesubfigure{\thefigure.\arabic{subfigure}}|\\ +% |\renewcommand\p@subfigure{}| +% \end{quote} +% +% But if you want detailed control on how the references will look like, +% the options of |\Declare|\-|Caption|\-|Sub|\-|Type| are potentially not sufficient. +% In this case one need to redefine these two macros on his/her own. +% Some examples: +% +% If you want parentheses around the sub-figure part of the reference, +% so they will look like `|1(a)|', you may get them this way: +% \begin{quote} +% |\usepackage[labelformat=simple]{subcaption}|\\ +% |\renewcommand\thesubfigure{(\alph{subfigure})}| +% \end{quote} +% {\small (\emph{Note:} Since |parens| is the default label format you will get double +% parentheses in sub-captions when not specifiying a different label format, e.g. |simple|.)} +% +% But if you want only a closing parenthesis, so references will look like `|1a)|', +% but the sub-captions itself should still look like `|(a)|', +% this would be a possible solution: +% \begin{quote} +% |\usepackage{subcaption}|\\ +% |\renewcommand\thesubfigure{\alph{subfigure})}|\\ +% |\DeclareCaptionLabelFormat{opening}{(#2}|\\ +% |\captionsetup[subfigure]{labelformat=opening}| +% \end{quote} +% +% {\small(Please note that you need to surround redefinitions of |\p@|\-\meta{counter} +% with |\makeatletter| and |\makeatother|. See +% \url{http://tex.stackexchange.com/questions/8351/} +% for details.)} +% +% \pagebreak[3] +% \subsection{The \cs{subref} command} +% \label{subref} +% +% While |\ref|\marg{key} (and |\ref*|\marg{key}, if the \package{hyperref} +% package is used) usually gives a combined result representing the main +% caption counter and the sub-caption one, it is sometimes useful to have +% a reference to the sub-caption only. For this purpose you can use +% \begin{quote} +% |\subref|\marg{key}\\ +% |\subref*|\marg{key}~\footnote{%^^A +% Like \cs{ref*}, \cs{subref*} is only available if the \package{hyperref} +% package\cite{hyperref} is used.}%^^A +% \qquad. +% \end{quote} +% So for example |\ref{cat}| gives the result `\ref{cat}' but |\subref{cat}| +% gives `\subref{cat}'. +% +% \begin{small} +% \emph{Note:} If the sub-caption was (re-)defined with the starred variant +% |\Declare|\-|Caption|\-|Sub|\-|Type*|, both |\ref| and |\sub|\-|ref| usually gives +% the same result. +% \end{small} +% +% \begin{background} +% The |\sub|\-|ref| command demonstrates the usage of |\caption@sub|\-|type|\-|hook| +% which will be called during |\caption|\-|setup{sub|\-|type}|. +% \end{background} +% +% \pagebreak[3] +% \subsection{The \opt{subrefformat=} option} +% \label{subrefformat} +% +% \DescribeMacro{subrefformat=} +% \NEWfeature{v1.1} +% By applying |\Declare|\-|Caption|\-|Sub|\-|Type|, or by redefining |\the|\-\meta{counter} +% and |\p@|\-\meta{counter}, you will change the look of references typeset with |\ref| +% \emph{and} |\sub|\-|ref|. +% But maybe you only want to change the output of |\sub|\-|ref| without +% affecting the references typeset with |\ref|? +% This is possible, too, by using the option \opt{subrefformat}: +% \begin{quote} +% |\captionsetup{subrefformat=|\meta{label format}|}| +% \end{quote} +% This one will choose a label format (either a pre-defined one, or a one defined with +% |\Declare|\-|Caption|\-|Label|\-|Format|) as decorative element to sub-references. +% The default one is |simple| which has no decorative elements but simply typeset +% the reference as it is. +% +% For example +% \begin{quote} +% |\captionsetup{subrefformat=parens}| +% \end{quote} +% will result in references (typeset with |\ref|) like `|1a|' but sub-references +% (typeset with |\subref|) like `|(a)|'. +% +% \subsection{Referencing sub-figures without sub-captions} +% +% \DescribeMacro\phantomsubcaption +% \DescribeMacro\phantomcaption +% \NEWfeature{v1.1} +% If you don't want to give a sub-figure a caption, because the picture itself +% already contains the caption, or for some other reason, you can use the command +% \begin{quote} +% |\phantomsubcaption| +% \end{quote} +% instead of |\sub|\-|caption|, or +% -- when inside a |sub|\-|figure| or |sub|\-|table| environment -- +% |\phantom|\-|caption| instead of |\caption|. +% |\phantom|\-|sub|\-|caption| and |\phantom|\-|caption| do not have any arguments, and +% they do not generate any output, but give you an anchor for a |\label| command +% which can be placed afterwards. +% Furthermore it increases the sub-figure resp. sub-table counter. +% +% Please note that -- just like |\sub|\-|caption| -- the |\phantom|\-|sub|\-|caption| +% command \emph{must} be applied inside its own group, box, or environment. +% +% \pagebreak[3] +% An example: +% \begin{quote} +% |\begin{figure}|\\ +% | \centering|\\ +% | {\includegraphics{cat_with_a}|\\ +% | \phantomsubcaption\label{cat}}|\\ +% | {\includegraphics{elephant_with_b}|\\ +% | \phantomsubcaption\label{elephant}}|\\ +% | \caption{Two animals: \subref{cat} a huge cat,|\\ +% | and \subref{elephant} an elephant}|\\ +% |\end{figure}| +% \end{quote} +% +% \noindent\begin{minipage}{\linewidth} +% \setcaptiontype{figure} +% \centering +% {\begin{overpic}[width=60pt]{cat} +% \put(40,34){(a)} +% \end{overpic} +% \phantomsubcaption\label{cat6.3}} +% {\begin{overpic}[width=.4\textwidth]{elephant} +% \put(60,50){(b)} +% \end{overpic} +% \phantomsubcaption\label{elephant6.3}} +% \captionsetup{subrefformat=parens} +% \caption{Two animals: \subref{cat6.3} a huge cat, and \subref{elephant6.3} an elephant} +% \end{minipage} +% +% \pagebreak[3] +% \subsection{Where to place the \cs{label} command?} +% \label{label} +% +% When using |\sub|\-|caption| or |\phantom|\-|sub|\-|caption|, +% or |\caption| or |\phantom|\-|caption| inside a |sub|\-|figure| or |sub|\-|table| environment, +% the |\label| can be either placed inside the caption text or right after the |\sub|\-|caption| or +% |\caption| command, e.g: +% \begin{quote} +% |\subcaption{Some text here\label{label1}}|\\ +% \ldots\\ +% |\subcaption{Some other text}\label{label2}}|\\ +% \ldots\\ +% |\subcaption{Something different}|\\ +% |\label{label3}| +% \end{quote} +% +% When using the |\sub|\-|caption|\-|box| command, the |\label| should be placed inside +% the caption text, e.g.: +% \begin{quote} +% |\subcaptionbox{A description here\label{label4}}|\\ +% | {Some content here}|\\ +% \ldots\\ +% |\subcaptionbox[List-of-Figures entry]|\\ +% | {A description here\label{label5}}|\\ +% | {Some content here}| +% \end{quote} +% +% \pagebreak[3] +% \subsection{Where do hyperlinks jump?} +% \label{hypcap} +% +% For the |subfigure| \& |subtable| environments and |\subcaptionbox| boxes +% (and own constructs which use |\set|\-|caption|\-|sub|\-|type|) the +% hyperlink anchors will be placed in respect to the |hypcap=| setting. +% While usage of this option is straight-forward for ordinary captions, +% the usage for sub-captions depends on the setting regarding the main captions. +% This table gives you an overview where the hyperlinks will jump:\par +% +% \bigskip +% \begin{small} +% \centering +% \DeleteShortVerb{\|} +% \renewcommand\arraystretch{1.5} +% \begin{tabular}{|l|p{3cm}p{3cm}|} +% \hline +% \backslashbox{subcaption}{caption} & +% \multicolumn{1}{c}{\texttt{hypcap=false}} & +% \multicolumn{1}{c|}{\texttt{hypcap=true}} \\ +% \hline +% \raisebox{-1.5ex}[1.5ex]{\texttt{hypcap=false}} & +% sub-caption & figure or table\par\hfill\textit{(default setting)}\\ +% \raisebox{-1.5ex}[1.5ex]{\texttt{hypcap=true}} & +% sub-figure or\par sub-table & sub-figure or\par sub-table \\ +% \hline +% \end{tabular}\par +% \MakeShortVerb{\|} +% \end{small} +% \bigskip +% +% But if |\subcaption| is used and |hypcap=true| is set for sub-captions, +% \thispackage\ does not know where the sub-figure or sub-table actually +% begins, so it will jump to the sub-caption instead. +% +% \medskip +% \emph{Remember:} If you use the \package{hypcap} package\cite{hypcap}, +% it controls the placement of the hyperlink anchors, making the rules +% above invalid. +% +% \bigskip +% {\small(See also the documentation of the \package{caption} package, +% sections about \package{hyperref} \& \package{hypcap}.)} +% +% \pagebreak[3] +% \section{The \cs{subfloat} command} +% \label{subfloat} +% +% \DescribeMacro\subfloat +% \NEWfeature{v1.3} +% To allow a smoother transition from the \package{subfig} package +% (which is unmaintained for over 14 years) +% this package also offers |\sub|\-|float| with the same syntax: +% \begin{quote} +% |\subfloat|\oarg{list\_entry}\oarg{sub-caption}\marg{body} +% \end{quote} +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \pagebreak[3] +% \section{Beyond this package} +% \label{floatrow} +% +% For a more advanced usage of the sub-caption feature of the +% \package{caption} package, please take a look at the \package{floatrow} +% package\cite{floatrow} which provides the powerful \texttt{subfloatrow} +% environment for typesetting sub-figures. +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \pagebreak[3] +% \section{Thanks} +% +% I would like to thank +% Stephen Dalton +% who helped to make this package a better one. +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \StopEventually{%^^A +% \begin{thebibliography}{9} +% \bibitem{TLC2} +% Frank Mittelbach and Michel Goossens:\\ +% \newblock {\em The {\LaTeX} Companion (2nd.~Ed.)}, +% \newblock Addison-Wesley, 2004. +% \bibitem{floatrow} +% Olga Lapko:\\ +% \href{http://www.ctan.org/pkg/floatrow}% +% {\emph{The floatrow package documentation}}, +% 2007/12/24 +% \bibitem{hyperref} +% Sebastian Rahtz \& Heiko Oberdiek:\\ +% \href{http://www.ctan.org/pkg/hyperref}% +% {\emph{Hypertext marks in \LaTeX}}, +% November 12, 2007 +% \bibitem{hypcap} +% Heiko Oberdiek:\\ +% \href{http://www.ctan.org/pkg/hypcap}% +% {\emph{The hypcap package -- Adjusting anchors of captions}}, +% 2007/04/09 +% \iffalse +% \bibitem{subfig} +% Steven D. Cochran:\\ +% \href{http://www.ctan.org/pkg/subfig}% +% {\emph{The subfig package}}, +% 2005/07/05 +% \fi +% \end{thebibliography} +% } +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \DoNotIndex{\\,\_,\ ,\@@par} +% \DoNotIndex{\@bsphack} +% \DoNotIndex{\@car,\@cdr,\@classoptionslist,\@cons,\@currext,\@currname} +% \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@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{v0.1}{2007/09/01}{First demo} +% \changes{v0.2}{2007/11/11}{\cs{subcaptionbox} added} +% \changes{v0.3}{2007/12/06}{Adapted to \package{caption} package \version{3.1f}} +% \changes{v1.0}{2008/03/16}{\cs{subfloat} added} +% \changes{v1.0}{2010/10/27}{An error message will be issued when the subfigure or subfig package is loaded} +% \changes{v1.0}{2011/01/22}{Undocumented command \cs{subfloat} removed} +% +% \newcommand*\Note[2][Note]{\par{\small\emph{#1:} #2}} +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \clearpage +% \section{The implementation} +% \iffalse +%<*package> +% \fi +% +% \subsection{Identification} +% +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{subcaption}[2019/09/01 v1.3a Sub-captions (AR)] +% \end{macrocode} +% +% \subsection{Initial code} +% +% Since we base on the \package{caption} package we load it here. +% \begin{macrocode} +\RequirePackage{caption}[2019/09/01] % needs v3.3c or newer +% \end{macrocode} +% +% \begin{macro}{\subcaption@CheckCompatibility} +% \changes{v1.1}{2011/09/01}{Compatibility error added} +% \changes{v1.1}{2016/05/22}{The presence of \package{subfigure} or \package{subfig} will be checked \cs{AtBeginDocument}, too} +% Since we are incompatible to them an error message will be issued when +% the \package{subfigure} or \package{subfig} package is loaded. +% \begin{macrocode} +\newcommand\subcaption@CheckCompatibility{% +% \end{macrocode} +% \begin{macrocode} + \@ifundefined{caption@ifcompatibility}{}{% + \caption@ifcompatibility{% + \caption@Error{% + The `subcaption' package does not work correctly\MessageBreak + in compatibility mode}}{}}% +% \end{macrocode} +% \begin{macrocode} + \@ifpackageloaded{subfigure}{% + \PackageError{subcaption}% + {This package can't be used in cooperation\MessageBreak + with the subfigure package}% + {\subcaption@EH}% + \endinput}{}% +% \end{macrocode} +% \begin{macrocode} + \@ifpackageloaded{subfig}{% + \PackageError{subcaption}% + {This package can't be used in cooperation\MessageBreak + with the subfig package}% + {\subcaption@EH}% + \endinput}{}% +% \end{macrocode} +% \begin{macrocode} +} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\subcaption@EH{% + If you do not understand this error, please take a closer look\MessageBreak + at the documentation of the `subcaption' package, especially the\MessageBreak + section about errors.\MessageBreak\@ehc} +% \end{macrocode} +% \begin{macrocode} +\subcaption@CheckCompatibility +% \end{macrocode} +% \begin{macrocode} +\caption@AtBeginDocument{% + \subcaption@CheckCompatibility + \let\subcaption@CheckCompatibility\@undefined + \let\subcaption@EH\@undefined +} +% \end{macrocode} +% \end{macro} +% +% \iffalse +% \subsection{Declaration of options} +% We do not have own options. +% \fi +% +% \subsection{Execution of options} +% +% We use |\caption@ExecuteOptions| and |\caption@ProcessOptions| here to add +% the options to the `|sub|' option list instead of executing them immediately. +% \changes{v1.1}{2018/05/01}{Bugfix: Option \texttt{font+=small} changed to \texttt{size=smaller}} +% \begin{macrocode} +\caption@SetupOptions{subcaption}{\captionsetup[sub]{#2}}% +\caption@ExecuteOptions{subcaption}{% + size=smaller,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0} +\caption@ProcessOptions*{subcaption} +% \end{macrocode} +% +% \subsection{Main code} +% +% \changes{v1.1}{2011/10/30}{Adapted to the newfloat package} +% We call |\Declare|\-|Caption|\-|Sub|\-|Type| for |figure|, |table|, +% and each caption type declared with |\Declare|\-|Floating|\-|Environment| here. +% \begin{macrocode} +\caption@ForEachType{\DeclareCaptionSubType{#1}} +% \end{macrocode} +% +% \begin{macro}{\newsubfloat} +% \changes{v1.1}{2016/01/31}{Adapted to the memoir document class} +% We re-define |\new|\-|sub|\-|float| (offered by the \package{memoir} document class), +% so our stuff will be used instead. +% \begin{macrocode} +\caption@ifundefined\newsubfloat{}{% + \renewcommand*\newsubfloat{\DeclareCaptionSubType}} +% \end{macrocode} +% \end{macro} +% +% \pagebreak[3] +% \subsubsection{The \cs{subcaption} command} +% +% \begin{macro}{\subcaption} +% \changes{v1.1}{2012/04/06}{\cs{newcommand} changed to \cs{def} +% so it works with the \package{memoir} document class, too} +% Without a prefacing |\set|\-|caption|\-|sub|\-|type|, |\sub|\-|caption| is some kind +% of |\caption|\-|of{sub|\-|\@cap|\-|type}|. +% \Note{Like \cs{captionof}, this command is designed to be used inside an +% own group!} +% \begin{macrocode} +\def\subcaption{% + \caption@iftype + {\setcaptionsubtype*\caption}% + {\caption@Error{\noexpand\subcaption outside float}% + \caption@gobble}}% +% \end{macrocode} +% But with a prefacing |\set|\-|caption|\-|sub|\-|type|, |\sub|\-|caption| is simply +% |\caption|. +% \begin{macrocode} +\g@addto@macro\caption@subtypehook{% + \let\subcaption\caption} +% \end{macrocode} +% \end{macro} +% +% \pagebreak[3] +% \subsubsection{The \cs{phantomsubcaption} command} +% +% \begin{macro}{\phantomsubcaption} +% \changes{v1.1}{2011/08/17}{This macro added} +% Same as |\phantom|\-|caption|, but for subfigures. +% \begin{macrocode} +\newcommand*\phantomsubcaption{% + \caption@iftype + {\setcaptionsubtype*\phantomcaption}% + {\caption@Error{\noexpand\phantomsubcaption outside float}}}% +% \end{macrocode} +% \begin{macrocode} +\g@addto@macro\caption@subtypehook{% + \let\phantomsubcaption\phantomcaption} +% \end{macrocode} +% \end{macro} +% +% \pagebreak[3] +% \subsubsection{The subfigure \& subtable environments} +% +% \begin{macro}{subfigure} +% \begin{macro}{subtable} +% \changes{v1.2}{2016/02/21}{Optional argument values `B' and `T' added} +% This is just an ordinary \env{minipage} environment with +% |\setcaptionsubtype| as first contents line. +% It will be defined using the helper macro |\caption@For{sub|\-|type|\-|list}| +% offered by the \package{caption} kernel, so for every caption type +% declared with |\Declare|\-|Floating|\-|Environment| a corresponding +% `sub' environment will be defined automatically. +% \begin{macrocode} +\caption@For{subtypelist}{% + \newenvironment{sub#1}% + {\@ifnextchar[%] + \subcaption@iminipage + {\subcaption@iminipage[c]}}% + {\subcaption@endminipage + \endminipage}}% +% \end{macrocode} +% We pass all other optional arguments using the generic helper macro +% |\caption@with|\-|opt|\-|args| offered by the \package{caption} kernel). +% \begin{macrocode} +\def\subcaption@iminipage[#1]{% + \caption@withoptargs{\subcaption@iiminipage{#1}}} +% \end{macrocode} +% `B' and `T' will add a |\vspace{0pt}|, all other values (and additional +% optional arguments) will be passed unseen to the |minipage| environment. +% \begin{macrocode} +\newcommand*\subcaption@iiminipage[3]{% + \let\subcaption@endminipage\@empty + \if#1B% + \minipage[b]#2{#3}% + \def\subcaption@endminipage{\vspace{0pt}}% + \else\if#1T% + \minipage[t]#2{#3}% + \vspace{0pt}% + \else + \minipage[#1]#2{#3}% + \fi\fi + \setcaptionsubtype\relax} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \pagebreak[3] +% \subsubsection{The \cs{subcaptionbox} command} +% +% \begin{macro}{\subcaptionbox} +% \changes{v1.0}{2008/05/06}{Adapted to the \opt{rule} option of the \package{caption} package} +% \changes{v1.0}{2008/08/31}{Definition and usage of \cs{subcaption@hrule} added} +% \changes{v1.0}{2010/12/17}{Uses \cs{caption@box} now} +% \changes{v1.1}{2011/08/16}{Adapted to actual version of \cs{caption@box}} +% \changes{v1.1}{2012/04/09}{Adapted to actual version of \cs{caption@ibox}} +% A |\parbox| with contents and sub-caption, separated by an invisible |\hrule|. +% \begin{macrocode} +\newcommand*\subcaptionbox{% + \caption@withoptargs{\caption@ibox\setcaptionsubtype}} +% \end{macrocode} +% \end{macro} +% +% \pagebreak[3] +% \subsubsection{The \cs{subref} command} +% +% At |\captionsetup{subtype}|, we redefine |\label|. +% \begin{macrocode} +\g@addto@macro\caption@subtypehook{% + \ifx\label\subcaption@label \else + \let\subcaption@ORI@label\label + \let\label\subcaption@label + \fi} +% \end{macrocode} +% +% \begin{macro}{\subcaption@label} +% \changes{v1.1}{2011/09/12}{Redefinition of \cs{SK@} added} +% \changes{v1.1}{2011/09/12}{Uses \cs{caption@withoptargs} now} +% \changes{v1.1}{2016/02/20}{Unwanted space removed} +% When a label will be placed for a sub-caption, we automatically place +% a second one for |\subref|, too. This second label will contain +% the sub-type counter only. +% \begin{macrocode} +\newcommand*\subcaption@label{% + \caption@withoptargs\subcaption@@label} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\subcaption@@label[2]{% + \@bsphack\begingroup + \subcaption@ORI@label#1{#2}% + \let\SK@\@gobbletwo + \protected@edef\@currentlabel{\csname thesub\@captype\endcsname}% + \subcaption@ORI@label#1{sub@#2}% + \endgroup\@esphack} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\subref} +% \changes{v1.1}{2011/08/14}{Caption option \opt{subrefformat=} added} +% \changes{v1.1}{2011/08/18}{Uses \cs{caption@setoptions*} now} +% \changes{v1.1}{2012/01/12}{Usage of \cs{caption@setoptions*} replaced by \cs{caption@setoptions}} +% \changes{v1.1}{2012/04/09}{Revised} +% \changes{v1.1}{2018/12/26}{Bugfix: Missing curly braces added} +% This one calls |\ref| with the second label. (see |\subcaption@label|) +% \begin{macrocode} +\DeclareRobustCommand*\subref{% + \@ifstar + {\caption@withoptargs\subcaption@ref*}% + {\caption@withoptargs\@subref}} +\newcommand*\@subref[2]{% + \caption@ifundefined\hyperref + {\subcaption@ref{#1}{#2}}% + {\hyperref[{#2}]{\subcaption@ref{*#1}{#2}}}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\subcaption@ref[2]{% + \begingroup + \caption@setoptions{sub}% + \subcaption@reffmt\p@subref{\ref#1{sub@#2}}% + \endgroup} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\p@subref{} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\DeclareCaptionOption{subrefformat}{\subcaption@setrefformat{#1}} +% \end{macrocode} +% +% \begin{macro}{\subcaption@setrefformat} +% |\subcaption@setrefformat|\marg{name}\par +% Selecting a subref format simply means saving the code (in |\subcaption@reffmt|). +% \begin{macrocode} +\newcommand*\subcaption@setrefformat[1]{% + \@ifundefined{caption@lfmt@#1}% + {\caption@Error{Undefined label format `#1'}}% + {\expandafter\let\expandafter\subcaption@reffmt\csname caption@lfmt@#1\endcsname}} +% \end{macrocode} +% \begin{macrocode} +\subcaption@setrefformat{simple} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{The \cs{subfloat} command} +% +% \begin{macro}{\subfloat} +% \changes{v0.4}{2008/03/01}{This macro added} +% \changes{v1.0c}{2011/01/22}{This macro removed since it's too incompatible with the one from \package{subfig}} +% \changes{v1.3}{2019/08/31}{This macro re-added and revised} +% \changes{v1.3a}{2019/09/01}{\cs{ignorespaces} copied from \cs{\sf@@@subfloat}} +% |\subfloat|\oarg{list\_entry}\oarg{sub-caption}\marg{body}\par +% If \meta{sub-caption} is given, we map this to |\sub|\-|caption|\-|box| +% but transfer the |\label| from \meta{body} to \meta{sub-caption}. +% If not, we do the same as |\sub|\-|caption|\-|box| does, but use |\phantom|\-|caption| instead of |\caption|. +% In both cases we do a |\ignore|\-|spaces| at the end since the original implementation of |\sub|\-|float| does this, too. +% \begin{macrocode} +\caption@ifundefined\subfloat{% +% \end{macrocode} +% \begin{macrocode} + \newcommand*\subfloat{% + \@ifnextchar[\@subfloat\subfloat@} +% \end{macrocode} +% \begin{macrocode} + \long\def\@subfloat[#1]{% + \@ifnextchar[{\@@subfloat{#1}}{\@@@subfloat\subcaptionbox{#1}}} +% \end{macrocode} +% \begin{macrocode} + \long\def\@@subfloat#1[#2]{\@@@subfloat{\subcaptionbox[{#1}]}{#2}} +% \end{macrocode} +% \begin{macrocode} + \newcommand\@@@subfloat[3]{% + \caption@getlabel#3\label{}\@nil + #1{#2\caption@thelabel}{\let\label\caption@gobble#3}% + \global\let\caption@thelabel\relax + \ignorespaces} +% \end{macrocode} +% \begin{macrocode} + \newcommand*\subfloat@[1]{% + \setbox\@tempboxa\hbox{#1}% + \caption@iiiibox\setcaptionsubtype + {\phantomcaption\@gobble}{\phantomcaption\@gobble}% no box with \caption + {}% no optional arguments for \caption + {}% no sub-caption + [\wd\@tempboxa][\caption@hj@default]% + {\unhbox\@tempboxa}% + \ignorespaces} +% \end{macrocode} +% \begin{macrocode} +}{% + \PackageInfo{subcaption}{\protect\subfloat\space is already defined\@gobble} +} +% \end{macrocode} +% \end{macro} +% +% \iffalse +% +% \fi +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \Finale +% +\endinput diff --git a/macros/latex/contrib/caption/subcaption.pdf b/macros/latex/contrib/caption/subcaption.pdf new file mode 100644 index 0000000000..70b4cde42d Binary files /dev/null and b/macros/latex/contrib/caption/subcaption.pdf differ diff --git a/macros/latex/contrib/caption/totalcount.dtx b/macros/latex/contrib/caption/totalcount.dtx new file mode 100644 index 0000000000..a2e0d934a3 --- /dev/null +++ b/macros/latex/contrib/caption/totalcount.dtx @@ -0,0 +1,384 @@ +% \iffalse meta-comment +% +% This is file `totalcount.dtx'. +% +% Copyright (C) 2010-2018 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +% +% -------------------------------------------------------------------------- +% +% 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 file totalcount.dtx, +% and the derived file totalcount.sty. +% +% \fi +% \CheckSum{126} +% +% \iffalse +%<*driver> +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesFile{totalcount.drv}[2013/05/12 v1.0 Total values of counters] +\hbadness=9999 \newcount\hbadness \hfuzz=74pt % Make TeX shut up. +%\errorcontextlines=3 +% +\documentclass{ltxdoc} +\setlength\parindent{0pt} +\setlength\parskip{\smallskipamount} +% +\usepackage{ifpdf} +\ifpdf + \usepackage{mathptmx,courier} + \usepackage[scaled=0.90]{helvet} +% \addtolength\marginparwidth{15pt} +\fi +% +\usepackage[bottom]{footmisc} +\usepackage{hypdoc} +\ifpdf\usepackage{hypdestopt}\fi +\hypersetup{pdfkeywords={LaTeX, package, totalcount},pdfstartpage={},pdfstartview={}} +% +\usepackage{totalcount}[2008/02/16] +% +\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 +% +\newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}} +\newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}} +\newcommand*\version[2][]{$v#2$} +% +\usepackage{marvosym} +\makeatletter +\newcommand*\INFO{\@ifstar{\@INFO{}}{\@INFO{\vbox to \ht\strutbox}}} +\newcommand*\@INFO[1]{\MARGINSYM{#1{\LARGE\Info}}} +\makeatother +% +\begin{document} + \DocInput{totalcount.dtx} +\end{document} +% +% \fi +% +% \def\thispackage{the \package{totalcount} package} +% \def\Thispackage{The \package{totalcount} package} +% +% \GetFileInfo{totalcount.drv} +% \let\docdate\filedate +% \let\docversion\fileversion +% \GetFileInfo{totalcount.sty} +% +% \title{\texorpdfstring{\Thispackage\thanks{%^^A +% This package has version number \docversion.}}%^^A +% {The totalcount package}} +% \author{Axel Sommerfeldt\\ +% \url{https://gitlab.com/axelsommerfeldt/caption}} +% \date{\docdate} +% \maketitle +% +% \begin{abstract} +% This package offers commands for typesetting total values of counters. +% \end{abstract} +% +% \iffalse\clearpage\fi +% \setcounter{tocdepth}{2} +% \tableofcontents +% +% \iffalse\clearpage\fi +% \pagebreak[3] +% \section{Loading the package} +% +% Load this package using +% \begin{quote} +% |\usepackage|\oarg{options}|{totalcount}|\quad, +% \end{quote} +% where \meta{options} is a list of names of \LaTeX\ counters, e.g.: +% \begin{quote} +% |\usepackage[figure,table]{totalcount}|\quad. +% \end{quote} +% \pagebreak[3] +% This way the commands |\total|\-|figures| and |\total|\-|tables| will be defined which +% are typesetting the total number of figures resp.~tables, e.g.: +% \begin{quote} +% |This document contains \totalfigures\ figures.| +% \end{quote} +% \pagebreak[3] +% Furthermore the commands |\if|\-|total|\-|figures| and |\if|\-|total|\-|tables| are offered +% for typesetting text only if the document contains figures resp.~tables at all, e.g.: +% \begin{quote} +% |\iftotalfigures|\\ +% | \listoffigures|\\ +% |\fi| +% \end{quote} +% \pagebreak[3] +% This should work with other counters as well (for example |equation|, +% or |lst|\-|listing| offered by the \package{listings} package~\cite{listings}), +% but please note that using the |page| counter here is not supported. +% +% \pagebreak[3] +% \section{\cs{DeclareTotalCounter}} +% \begin{quote} +% |\DeclareTotalCounter|\marg{counter} +% \end{quote} +% actually defines the commands |\total|\meta{counter}|s| and |\if|\-|total|\meta{counter}|s|. +% +% \pagebreak[3] +% So in fact +% \begin{quote} +% |\usepackage[figure,table]{totalcount}| +% \end{quote} +% is identical to +% \begin{quote} +% |\usepackage{totalcount}|\\ +% |\DeclareTotalCounter{figure}|\\ +% |\DeclareTotalCounter{table}| +% \end{quote} +% +% \pagebreak[3] +% \section{Spacing} +% The space after all \LaTeX\ commands without (optional or mandatory) arguments +% like |\total|\-|figures| will not be typeset, +% so these commands needs to be finished with an additional backslash or an empty +% pair of curly braces right before the space character, +% or to be finished with a tilde (swung dash), +% so \TeX\ will be prevented from omitting the following space character. +% +% \pagebreak[3] +% This could be avoided by defining new commands with the help of +% the \package{xspace} package~\cite{xspace}. +% When using \thispackage\ with the package option |xspace| this will be actually done, +% so after +% \begin{quote} +% |\usepackage[figure,table,xspace]{totalcount}| +% \end{quote} +% code like +% \begin{quote} +% |This document contains \totalfigures figures.| +% \end{quote} +% will give correct results without a missing space between the total number of figures +% and the word ``figures''. +% +% \pagebreak[3] +% \section{Thanks} +% I would like to thank Herbert Vo\ss\ since the implementation of this package is +% based on an idea from him which could be found at +% \url{http://texnik.dante.de/cgi-bin/mainFAQ.cgi?file=counter/counter#number}. +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \StopEventually{%^^A +% \begin{thebibliography}{9} +% \bibitem{listings} +% Carsten Heinz \& Brooks Moses:\\ +% \href{http://www.ctan.org/pkg/listings}% +% {\emph{The Listings Package}},\\ +% 2007/02/22 +% \bibitem{xspace} +% David Carlisle and Morten H\o gholm:\\ +% \href{http://www.ctan.org/pkg/xspace}% +% {\emph{The xspace package}}, +% 2009/10/20 +% \end{thebibliography} +% } +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \DoNotIndex{\\,\_,\ ,\@@par} +% \DoNotIndex{\@bsphack} +% \DoNotIndex{\@car,\@cdr,\@classoptionslist,\@cons,\@currext,\@currname} +% \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@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}{2008/02/16}{First version} +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \clearpage +% \section{The implementation} +% \iffalse +%<*package> +% \fi +% +% \subsection{Identification} +% +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{totalcount}[2018/01/21 v1.0a Total values of counters (AR)] +% \end{macrocode} +% +% \subsection{Initial code} +% +% \begin{macro}{\DeclareTotalCounter} +% \changes{v1.0}{2013/05/12}{Usage of \cs{totalcount@counters} delayed} +% |\DeclareTotalCounter|\marg{counter name} +% \begin{macrocode} +\newcommand*\DeclareTotalCounter[1]{% + \newcounter{totalcount@#1}% + \@namedef{total#1s}{\nfss@text{\reset@font\bfseries ??}}% + \@namedef{total#1es}{\@nameuse{total#1s}}% + \expandafter\newif\csname iftotal#1s\endcsname + \@namedef{iftotal#1es}{\@nameuse{iftotal#1s}}% +% \@nameuse{totalcount@set@#1}% + \AtBeginDocument{\@ifundefined{c@#1}% + {\PackageError{totalcount}{Undefined counter `#1'}\@ehc}% + {\@cons\totalcount@counters{{#1}}}}} +\@onlypreamble\DeclareTotalCounter +% \end{macrocode} +% \begin{macrocode} +\let\totalcount@counters\@empty +% \end{macrocode} +% \end{macro} +% +% \subsection{Declaration of options} +% +% \begin{macrocode} +\newcommand*\totalcount@xspace{} +\DeclareOption{xspace}{\renewcommand*\totalcount@xspace{\xspace}} +% \end{macrocode} +% \begin{macrocode} +\DeclareOption*{\expandafter\DeclareTotalCounter\expandafter{\CurrentOption}} +% \end{macrocode} +% +% \subsection{Execution of options} +% +% \begin{macrocode} +\ProcessOptions\relax +\ifx\totalcount@xspace\@empty\else + \RequirePackage{xspace} +\fi +% \end{macrocode} +% +% \subsection{Main code} +% +% \begin{macro}{\totalcount@addtocounter} +% |\totalcount@addtocounter|\marg{counter name} +% \begin{macrocode} +\newcommand*\totalcount@addtocounter[1]{% + \@ifundefined{c@totalcount@#1}{}{% + \addtocounter{totalcount@#1}{\value{#1}}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@stpelt} +% |\@stpelt|\marg{counter name} +% \begin{macrocode} +\let\totalcount@stpelt@ORI\@stpelt +\renewcommand*\@stpelt[1]{% + \totalcount@addtocounter{#1}% + \totalcount@stpelt@ORI{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\totalcount@set} +% \changes{v1.0a}{2018/01/21}{A negative counter value will be handled correctly now} +% |\totalcount@set|\marg{counter name}\marg{value} +% \begin{macrocode} +\newcommand*\totalcount@set[2]{% + \@ifundefined{c@totalcount@#1}% +% {\global\@namedef{totalcount@set@#1}{\totalcount@set{#1}{#2}}}% + {}% + {\global\@namedef{total#1s}{#2\totalcount@xspace}% + \ifnum#2<1\relax \else + \global\@nameuse{total#1strue}% + \fi}} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\AtBeginDocument{\AtEndDocument{% + \begingroup + \@tempswafalse + \if@filesw + \immediate\write\@mainaux{% + \string\providecommand\string\totalcount@set[2]{}}% + \fi + \def\@elt#1{% + \totalcount@addtocounter{#1}% + \edef\totalcount@tempa{\the\value{totalcount@#1}}% + \expandafter\let\expandafter\totalcount@tempb\csname total#1s\endcsname + \@expandtwoargs\totalcount@set{#1}{\totalcount@tempa}% + \expandafter\ifx\csname total#1s\endcsname\totalcount@tempb \else + \@tempswatrue + \fi + \if@filesw + \immediate\write\@mainaux{% + \string\totalcount@set{#1}{\totalcount@tempa}}% + \fi}% + \totalcount@counters + \if@tempswa + \PackageWarningNoLine{totalcount}{% + Total counter(s) have changed.\MessageBreak + Rerun to get them right}% + \fi + \endgroup}}% +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \Finale +% +\endinput diff --git a/macros/latex/contrib/caption/totalcount.pdf b/macros/latex/contrib/caption/totalcount.pdf new file mode 100644 index 0000000000..bbe1a9dfd3 Binary files /dev/null and b/macros/latex/contrib/caption/totalcount.pdf differ -- cgit v1.2.3