summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/caption/caption-koma.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/caption/caption-koma.dtx')
-rw-r--r--macros/latex/contrib/caption/caption-koma.dtx90
1 files changed, 30 insertions, 60 deletions
diff --git a/macros/latex/contrib/caption/caption-koma.dtx b/macros/latex/contrib/caption/caption-koma.dtx
index c4daad26fa..1469e190dd 100644
--- a/macros/latex/contrib/caption/caption-koma.dtx
+++ b/macros/latex/contrib/caption/caption-koma.dtx
@@ -2,7 +2,7 @@
%
% This is file `caption-koma.dtx'.
%
-% Copyright (C) 2004-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+% Copyright (C) 2004-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%
% --------------------------------------------------------------------------
%
@@ -31,12 +31,12 @@
%
% \fi
%
-% \CheckSum{273}
+% \CheckSum{255}
%
% \iffalse
%<*driver>
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption-koma.drv}[2018/05/24 v2.0 Implementation of the caption-koma package]
+\ProvidesFile{caption-koma.drv}[2022/12/27 v2.0 Implementation of the caption-koma package]
\hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up.
%\errorcontextlines=3
%
@@ -73,7 +73,7 @@
% \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\cls\puresf \let\pkg\puresf
% \let\env\purett \let\opt\purett
%
% \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}}
@@ -86,7 +86,7 @@
% \GetFileInfo{caption-koma.sto}
%
% \title{\texorpdfstring
-% {The adaption of the \package{caption} package to the \KOMAScript\ document classes\thanks{%^^A
+% {The adaption of the \pkg{caption} package to the \KOMAScript\ document classes\thanks{%^^A
% This adaption has version number \docversion.}}%^^A
% {The adaption of the caption package to the KOMA-Script document classes}}
% \author{Axel Sommerfeldt\\
@@ -95,26 +95,34 @@
% \maketitle
%
% \begin{abstract}
-% This package adapts the \package{caption} package to the \KOMAScript\ document classes.
+% This package adapts the \pkg{caption} package to the \KOMAScript\ document classes.
% \end{abstract}
-%
+%
% \section*{User manual}
%
% 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 caption package bundle documentation \\
+% \href{http://mirror.ctan.org/macros/latex/contrib/caption/caption.pdf}%
+% {\texttt{caption.pdf}} & The caption package documentation \\
% \end{tabular}
% \end{quote}
%
+% \section*{State of this package}
+%
+% Please note that the last major revision of this code was done in the year 2007,
+% afterwards the \KOMAScript\ support was adapted to changes in the \pkg{caption} package only.
+%
+% So nearly everything which has changed in the caption support of \KOMAScript\ since 2007 is not reflected here.
+% (So for example |\set|\-|cap|\-|dyn|\-|width| is not emulated yet etc.)
+%
% \StopEventually{}
% \iffalse
% \clearpage
% \tableofcontents
% \fi
-%
+%
% \iffalse
% --------------------------------------------------------------------------- %
% \fi
@@ -177,7 +185,7 @@
% \changes{v1.1}{2007/03/17}{\KOMAScript\ compatibility options removed}
% \changes{v1.1}{2007/03/31}{\KOMAScript\ classes support added}
% \changes{v1.1}{2007/04/05}{\KOMAScript\ compatibility revised \& enhanced}
-% \changes{v2.0}{2020/07/27}{\KOMAScript\ class support adapted to \package{caption3}~\version{2.0}}
+% \changes{v2.0}{2020/07/27}{\KOMAScript\ class support adapted to \pkg{caption3}~\version{2.0}}
%
% \iffalse
% --------------------------------------------------------------------------- %
@@ -193,14 +201,14 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption-koma.sto}[2020/09/21 v2.0b Adaption of the caption package to the KOMA-Script document classes (AR)]
+\ProvidesFile{caption-koma.sto}[2022/12/27 v2.0c Adaption of the caption package to the KOMA-Script document classes (AR)]
% \end{macrocode}
%
% \section{Margin resp. width}
%
% \begin{macro}{\setcapwidth}
% \changes{v1.9}{2018/12/26}{Bugfix: Missing curly braces added}
-% Patch |\setcapwidth| so it will set the \package{caption3} width setting, too.
+% Patch |\setcapwidth| so it will set the \pkg{caption3} width setting, too.
% \begin{macrocode}
\expandafter\let\expandafter\caption@koma@setcapwidth
\csname\string\setcapwidth\endcsname
@@ -239,7 +247,7 @@
% \emph{TODO:} |\setcapdynwidth|
%
% \begin{macro}{\setcapmargin}
-% Patch |\setcapmargin| so it will set the \package{caption3} margin setting, too.
+% Patch |\setcapmargin| so it will set the \pkg{caption3} margin setting, too.
% \begin{macrocode}
\expandafter\let\expandafter\caption@koma@setcapmargin
\csname\string\@setcapmargin\endcsname
@@ -281,7 +289,7 @@
% \section{Indentions}
%
% \begin{macro}{\setcapindent}
-% Patch |\setcapindent| so it will set the \package{caption3} indention setting, too.
+% Patch |\setcapindent| so it will set the \pkg{caption3} indention setting, too.
% \begin{macrocode}
\let\caption@koma@setcapindent\@setcapindent
\renewcommand*\@setcapindent[1]{%
@@ -304,49 +312,11 @@
\caption@ifdefined\cap@indent{\caption@setcapindent}{}
% \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 \package{caption3}~\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}
-\let\caption@koma@parindent\KV@caption@parindent
-\DeclareCaptionOption{parindent}[]{%
- \ifx,#1,%
- \caption@Debug{Option `parindent' ignored}%
- \else
- \caption@koma@parindent{#1}%
- \fi}%
-% \end{macrocode}
-% \begin{macrocode}
-\let\caption@koma@parskip\KV@caption@parskip
-\DeclareCaptionOption{parskip}[]{%
- \ifx,#1,%
- \caption@Debug{Option `parskip' ignored}%
- \else
- \caption@koma@parskip{#1}%
- \fi}%
-% \end{macrocode}
-%
% \section{Single-line-check}
%
% \begin{macro}{\ifonelinecaptions}
% \changes{v1.1g}{2008/03/01}{\cs{def} changed to \cs{g@addto@macro}}
-% Patch |\onelinecaptionstrue| and |onelinecaptionsfalse| so they will set the corresponding \package{caption3} setting, too.
+% Patch |\onelinecaptionstrue| and |onelinecaptionsfalse| so they will set the corresponding \pkg{caption3} setting, too.
% \begin{macrocode}
\g@addto@macro\onelinecaptionstrue{\caption@setsinglelinecheck{true}}%
\g@addto@macro\onelinecaptionsfalse{\caption@setsinglelinecheck{false}}%
@@ -404,7 +374,7 @@
%
% \section{Positioning}
%
-% Here we patch the caption related \KOMAScript\ commands to set \package{caption} package settings as well.
+% Here we patch the caption related \KOMAScript\ commands to set \pkg{caption} package settings as well.
% Furthermore we take over the caption related settings from the \KOMAScript\ classes.
%
% \begin{macro}{\if@captionabove}
@@ -416,7 +386,7 @@
% \changes{v1.1k}{2009/10/09}{\opt{figureposition} and \opt{tableposition} will issue a warning now}
% \changes{v1.8e}{2019/09/11}{\opt{figureposition} and \opt{tableposition} will now set the position anyway since it could be used by other packages}
% \changes{v2.0a}{2020/09/12}{Faulty \cs{AtBeginCaption} replaced with correct \cs{AfterCaptionPackage}}
-% Patch |\@captionabovetrue| and |\@captionabovefalse| so they will set the \package{caption3} position setting, too.
+% Patch |\@captionabovetrue| and |\@captionabovefalse| so they will set the \pkg{caption3} position setting, too.
% 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}
@@ -440,7 +410,7 @@
%
% \begin{macro}{\if@tablecaptionabove}
% \changes{v1.1g}{2008/03/01}{\cs{def} changed to \cs{g@addto@macro}}
-% Patch |\@tablecaptionabovetrue| and |\@tablecaptionabovefalse| so they will set the \package{caption3} position setting, too.
+% Patch |\@tablecaptionabovetrue| and |\@tablecaptionabovefalse| so they will set the \pkg{caption3} position setting, too.
% \begin{macrocode}
\g@addto@macro\@tablecaptionabovetrue{\captionsetup*[table]{position=t}}%
\g@addto@macro\@tablecaptionabovefalse{\captionsetup*[table]{position=b}}%
@@ -456,7 +426,7 @@
%
% \begin{macro}{\if@figurecaptionabove}
% \changes{v1.5}{2013/02/15}{Support of \cs{if@figurecaptionabove} added}
-% Patch |\@figurecaptionabovetrue| and |\@figurecaptionabovefalse| so they will set the \package{caption3} position setting, too.
+% Patch |\@figurecaptionabovetrue| and |\@figurecaptionabovefalse| so they will set the \pkg{caption3} position setting, too.
% \begin{macrocode}
\caption@ifdefined\@figurecaptionabovetrue{%
\g@addto@macro\@figurecaptionabovetrue{\captionsetup*[figure]{position=t}}%
@@ -471,7 +441,7 @@
% \end{macrocode}
% \end{macro}
%
-% Since the \KOMAScript\ position setting overwrites the one from the \package{caption} package,
+% Since the \KOMAScript\ position setting overwrites the one from the \pkg{caption} package,
% we re-define the options |figure|\-|position| and |table|\-|position| to issue a warning.
% \Note{But we set the value anyway since it will be used by sub-captions.}
%
@@ -498,7 +468,7 @@
% \begin{macro}{\scr@caption}
% \KOMAScript\ contains the code
% |\AtBeginDocument{\let\scr@caption\caption}|
-% so we need to update |\scr@caption| after the \package{caption} package has re-defined |\caption|.
+% so we need to update |\scr@caption| after the \pkg{caption} package has re-defined |\caption|.
% \begin{macrocode}
\AtBeginDocument{\let\scr@caption\caption}
% \end{macrocode}