summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/caption/caption3.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-06-12 16:12:11 +0000
committerKarl Berry <karl@freefriends.org>2016-06-12 16:12:11 +0000
commit01c5b7b8dfc848413685e16692be37a4cad2a14a (patch)
treeb0c3b60b2864a8b2d094bdef920cb993da777a94 /Master/texmf-dist/source/latex/caption/caption3.dtx
parent1da26fe4bf4ac2b50bbce09e9874582c8593a2d3 (diff)
caption (24may16)
git-svn-id: svn://tug.org/texlive/trunk@41409 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/caption/caption3.dtx')
-rw-r--r--Master/texmf-dist/source/latex/caption/caption3.dtx61
1 files changed, 41 insertions, 20 deletions
diff --git a/Master/texmf-dist/source/latex/caption/caption3.dtx b/Master/texmf-dist/source/latex/caption/caption3.dtx
index 50fc631aba2..f1bf4b7088d 100644
--- a/Master/texmf-dist/source/latex/caption/caption3.dtx
+++ b/Master/texmf-dist/source/latex/caption/caption3.dtx
@@ -2,7 +2,7 @@
%
% This is file `caption3.dtx'.
%
-% $Id: caption3.dtx 139 2016-02-04 10:26:00Z sommerfeldt $
+% $Id: caption3.dtx 166 2016-05-22 18:50:55Z sommerfeldt $
% $HeadURL: svn+ssh://sommerfeldt@svn.code.sf.net/p/latex-caption/code/branches/3.3/source/caption3.dtx $
%
% Copyright (C) 1994-2016 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
@@ -28,7 +28,7 @@
% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%
% \fi
-% \CheckSum{3664}
+% \CheckSum{3679}
%
% \iffalse
%<*driver>
@@ -203,7 +203,7 @@
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\def\caption@tempa$Id: #1 #2 #3-#4-#5 #6${%
\def\caption@tempa{#3/#4/#5 }\def\caption@tempb{#2 }}
-\caption@tempa $Id: caption3.dtx 139 2016-02-04 10:26:00Z sommerfeldt $
+\caption@tempa $Id: caption3.dtx 166 2016-05-22 18:50:55Z sommerfeldt $
\ProvidesPackage{caption3}[\caption@tempa v1.7-\caption@tempb caption3 kernel (AR)]
% \end{macrocode}
%
@@ -243,7 +243,7 @@
% \end{macro}
%
% \begin{macro}{\l@addto@macro}
-% \changes{v3.3}{2013/04/26}{Revised}
+% \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.
@@ -1756,6 +1756,7 @@
%
% \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}
% There are five pre-defined label formats, called `empty', `simple',
% `parens', `brace', and `autodot'.
% \begin{macrocode}
@@ -1763,7 +1764,7 @@
\DeclareCaptionLabelFormat{simple}{\bothIfFirst{#1}{\nobreakspace}#2}
\DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{\nobreakspace}(#2)}
\DeclareCaptionLabelFormat{brace}{\bothIfFirst{#1}{\nobreakspace}#2)}
-\DeclareCaptionLabelFormat{autodot}{\bothIfFirst{#1}{\nobreakspace}\autodot}
+\DeclareCaptionLabelFormat{autodot}{\bothIfFirst{#1}{\nobreakspace}#2\autodot}
% \end{macrocode}
%
% `default' usually maps to `simple'.
@@ -2742,9 +2743,10 @@
% \end{macrocode}
%
% \subsubsection{The beamer class (Part one)}
-% \changes{v1.1}{2007/03/10}{beamer class support added}
-% \changes{v1.3}{2011/08/06}{beamer class support revised}
-% \changes{v3.3}{2013/04/27}{The beamer template \texttt{caption label separator} will be used now}
+% \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}
%
% \begin{macro}{\caption@ifbeamerclass}
% \begin{macrocode}
@@ -2774,24 +2776,41 @@
\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}
+ \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}{%
- #1\caption@ifbeamertemplate{numbered}{~#2}{}}
+ \caption@ifbeamertemplate{numbered}{%
+ \caption@lfmt@simple{#1}{#2}}{#1}}
+% \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|.
+% But without accounting for the \package{beamer} document class, so we will make up leeway here.
+% \begin{macrocode}
+ \DeclareCaptionLabelFormat{default@magyar}{%
+ \caption@ifbeamertemplate{numbered}{%
+ \caption@lfmt@simple@magyar{#1}{#2}}{#1}}
+ \@ifundefined{@@magyar@captionfix}\AtBeginDocument\@firstofone{%
+ \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}
@@ -2804,6 +2823,8 @@
\usebeamercolor[fg]{caption name}%
\usebeamerfont*{caption name}}
\DeclareCaptionDefaultJustification{\raggedright}
+% \end{macrocode}
+% \begin{macrocode}
\DeclareOption{beamerclass}{%
\renewcommand\caption@ifslc{%
\caption@ifbeamertemplate{caption name own line}\@secondoftwo\@firstoftwo}
@@ -3385,7 +3406,7 @@
% \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{v3.3}{2013/04/14}{Definition and usage of \cs{ifsinglelinecaption} added}
+% \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}
@@ -3431,7 +3452,7 @@
% \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{v3.3}{2013/04/13}{Redefinition os \cs{glsunset} added}
+% \changes{v1.5}{2013/04/13}{Redefinition os \cs{glsunset} added}
% Re-define anything which would disturb the single-line-check.
% \begin{macrocode}
\newcommand*\caption@prepareslc{%