summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/caption/caption3.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/caption/caption3.dtx')
-rw-r--r--Master/texmf-dist/source/latex/caption/caption3.dtx113
1 files changed, 96 insertions, 17 deletions
diff --git a/Master/texmf-dist/source/latex/caption/caption3.dtx b/Master/texmf-dist/source/latex/caption/caption3.dtx
index 3caa2bf9746..e71c4daed17 100644
--- a/Master/texmf-dist/source/latex/caption/caption3.dtx
+++ b/Master/texmf-dist/source/latex/caption/caption3.dtx
@@ -25,7 +25,7 @@
% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%
% \fi
-% \CheckSum{3848}
+% \CheckSum{3954}
%
% \iffalse
%<*driver>
@@ -198,7 +198,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2018/05/27 v1.8a caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2018/09/12 v1.8c caption3 kernel (AR)]
% \end{macrocode}
%
% \subsection{Workaround for bug in package \package{arabtex}}
@@ -3054,8 +3054,57 @@
}
% \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} package support added}
+% \changes{v1.1}{2006/05/14}{\package{frenchb} babel package support added}
%
% \begin{macrocode}
\caption@ifundefined\FB@makecaption{}{%
@@ -3139,9 +3188,24 @@
}
% \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.}
@@ -3164,24 +3228,26 @@
% \end{macrocode}
%
% \begin{macrocode}
-\def\caption@tempa#1{\@ifundefined{extras#1}{}{%
- \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}
-}}
+\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}
%
@@ -3218,6 +3284,7 @@
% \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
@@ -3252,7 +3319,8 @@
{\csname ext@#1\endcsname}%
{#1}%
{\caption@lstfmt{\@nameuse{p@#1}}{\@nameuse{the#1}}}%
- {\ignorespaces #2}}}}
+ {\ignorespaces #2}%
+ \caption@chkfloat{#1}{#2}}}}
% \end{macrocode}
% \begin{macrocode}
\newcommand*\caption@add@contentsline{%
@@ -3260,9 +3328,14 @@
% \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}}%
@@ -3620,6 +3693,7 @@
% \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}
@@ -3669,6 +3743,7 @@
\endgroup
\fi}%
{{\captiontextfont
+ \captiontextstart
\caption@ifstrut
{\vrule\@height\ht\strutbox\@width\z@}%
{}%
@@ -3678,7 +3753,11 @@
\caption@ifstrut
{\ifhmode\@finalstrut\strutbox\fi}%
{}%
- \par}}}
+ \captiontextend}}}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\captiontextstart{}
+\newcommand*\captiontextend{\par}
% \end{macrocode}
% \end{macro}
%