From 01c5b7b8dfc848413685e16692be37a4cad2a14a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 12 Jun 2016 16:12:11 +0000 Subject: caption (24may16) git-svn-id: svn://tug.org/texlive/trunk@41409 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/caption/bicaption.sty | 22 ++++++++--- Master/texmf-dist/tex/latex/caption/caption3.sty | 32 +++++++++------ Master/texmf-dist/tex/latex/caption/subcaption.sty | 46 ++++++++++++++-------- 3 files changed, 65 insertions(+), 35 deletions(-) (limited to 'Master/texmf-dist/tex/latex/caption') diff --git a/Master/texmf-dist/tex/latex/caption/bicaption.sty b/Master/texmf-dist/tex/latex/caption/bicaption.sty index f018a58e35f..06d119c3abf 100644 --- a/Master/texmf-dist/tex/latex/caption/bicaption.sty +++ b/Master/texmf-dist/tex/latex/caption/bicaption.sty @@ -39,7 +39,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: bicaption.sty 136 2016-02-02 09:41:30Z sommerfeldt $ +\caption@tempa $Id: bicaption.sty 158 2016-03-27 17:17:41Z sommerfeldt $ \ProvidesPackage{bicaption}[\caption@tempa v1.1-\caption@tempb Bilingual Captions (AR)] \RequirePackage{caption}[2016/02/01] % needs v3.3-134 or newer \caption@AtBeginDocument{\caption@ifcompatibility{% @@ -78,15 +78,25 @@ \caption@set@bool\bicaption@ifslc{#1}} \DeclareCaptionOption{bi-swap}[1]{% \caption@set@bool\bicaption@ifswap{#1}} -\DeclareCaptionOption{lang}{\def\bicaption@language{#1}} +\DeclareCaptionOption{lang}{% + \caption@ifundefined\bicaption@language + {\let\KV@bicaption@name\KV@caption@name + \def\KV@caption@name{\bicaption@KV{name}}}% + {}% + \def\bicaption@language{#1}% + \let\bicaption@language@options\@empty} \let\KV@caption@language\KV@caption@lang +\newcommand\bicaption@KV[2]{% + \@bicaption@KV{#1}{#2}% + \l@addto@macro\bicaption@language@options{\@bicaption@KV{#1}{#2}}} +\newcommand\@bicaption@KV[1]{% + \@nameuse{KV@bicaption@#1}} \newcommand*\bicaption@selectlanguage[1]{% \caption@ifundefined\bicaption@language{}{% - \expandafter\selectcaptionlanguage\expandafter#1\expandafter{\bicaption@language}}} -\g@addto@macro\caption@applyfont{% + \expandafter\selectcaptionlanguage\expandafter#1\expandafter{\bicaption@language}% + \bicaption@language@options}} +\g@addto@macro\caption@beginhook{% \bicaption@selectlanguage\@firstoftwo} -\g@addto@macro\caption@prepareslc{% - \let\bicaption@language\@undefined} \providecommand*\selectcaptionlanguage[1]{% #1\select@language\selectlanguage} \caption@ExecuteOptions{caption}{bi-lang=0,bi-slc=1,bi-swap=0} diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty index c232acac5d7..7aa3b591244 100644 --- a/Master/texmf-dist/tex/latex/caption/caption3.sty +++ b/Master/texmf-dist/tex/latex/caption/caption3.sty @@ -39,7 +39,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.sty 139 2016-02-04 10:26:00Z sommerfeldt $ +\caption@tempa $Id: caption3.sty 166 2016-05-22 18:50:55Z sommerfeldt $ \ProvidesPackage{caption3}[\caption@tempa v1.7-\caption@tempb caption3 kernel (AR)] \providecommand\caption@FixArabTeX{% \def\caption@tempa##1{}% @@ -657,7 +657,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} \def\caption@lfmt@default{\caption@lfmt@simple} \newcommand\DeclareCaptionLabelSeparator{% \caption@teststar\caption@declarelabelseparator\@gobble\@firstofone} @@ -1117,17 +1117,25 @@ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% \fi \nobreak\vskip\belowcaptionskip\nobreak}} -\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} \DeclareCaptionLabelFormat{default}{% - #1\caption@ifbeamertemplate{numbered}{~#2}{}} + \caption@ifbeamertemplate{numbered}{% + \caption@lfmt@simple{#1}{#2}}{#1}} + \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}} \caption@declarelabelseparator {\caption@ifbeamertemplate{caption name own line}\@gobble\@firstofone} {default} diff --git a/Master/texmf-dist/tex/latex/caption/subcaption.sty b/Master/texmf-dist/tex/latex/caption/subcaption.sty index 271bfebf997..932900ca917 100644 --- a/Master/texmf-dist/tex/latex/caption/subcaption.sty +++ b/Master/texmf-dist/tex/latex/caption/subcaption.sty @@ -39,25 +39,37 @@ \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: subcaption.sty 142 2016-02-20 19:59:43Z sommerfeldt $ +\caption@tempa $Id: subcaption.sty 161 2016-05-22 14:39:14Z sommerfeldt $ \ProvidesPackage{subcaption}[\caption@tempa v1.1-\caption@tempb Sub-captions (AR)] \RequirePackage{caption}[2012/03/25] % needs v3.3 or newer -\caption@AtBeginDocument{\caption@ifcompatibility{% - \caption@Error{% - The `subcaption' package does not work correctly\MessageBreak - in compatibility mode}}{}} -\@ifpackageloaded{subfigure}{% - \PackageError{subcaption}% - {This package can't be used in cooperation\MessageBreak - with the subfigure package}% - {RTFM}% - \endinput}{}% -\@ifpackageloaded{subfig}{% - \PackageError{subcaption}% - {This package can't be used in cooperation\MessageBreak - with the subfig package}% - {RTFM}% - \endinput}{}% +\newcommand\subcaption@CheckCompatibility{% + \@ifpackageloaded{subfigure}{% + \PackageError{subcaption}% + {This package can't be used in cooperation\MessageBreak + with the subfigure package}% + {\subcaption@EH}% + \endinput}{}% + \@ifpackageloaded{subfig}{% + \PackageError{subcaption}% + {This package can't be used in cooperation\MessageBreak + with the subfig package}% + {\subcaption@EH}% + \endinput}{}% +} +\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} +\subcaption@CheckCompatibility +\caption@AtBeginDocument{% + \caption@ifcompatibility{% + \caption@Error{% + The `subcaption' package does not work correctly\MessageBreak + in compatibility mode}}{}% + \subcaption@CheckCompatibility + \let\subcaption@CheckCompatibility\@undefined + \let\subcaption@EH\@undefined +} \caption@SetupOptions{subcaption}{\captionsetup[sub]{#2}}% \caption@ExecuteOptions{subcaption}{% font+=small,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0} -- cgit v1.2.3