summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/caption/bicaption.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/caption/bicaption.sty')
-rw-r--r--Master/texmf-dist/tex/latex/caption/bicaption.sty57
1 files changed, 45 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/latex/caption/bicaption.sty b/Master/texmf-dist/tex/latex/caption/bicaption.sty
index 05f7e511911..f018a58e35f 100644
--- a/Master/texmf-dist/tex/latex/caption/bicaption.sty
+++ b/Master/texmf-dist/tex/latex/caption/bicaption.sty
@@ -6,7 +6,7 @@
%%
%% bicaption.dtx (with options: `package')
%%
-%% Copyright (C) 1994-2015 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%% Copyright (C) 1994-2016 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%%
%% http://sourceforge.net/projects/latex-caption/
%%
@@ -39,9 +39,9 @@
\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 111 2015-09-17 09:48:20Z sommerfeldt $
+\caption@tempa $Id: bicaption.sty 136 2016-02-02 09:41:30Z sommerfeldt $
\ProvidesPackage{bicaption}[\caption@tempa v1.1-\caption@tempb Bilingual Captions (AR)]
-\RequirePackage{caption}[2015/09/01] % needs v3.3 or newer
+\RequirePackage{caption}[2016/02/01] % needs v3.3-134 or newer
\caption@AtBeginDocument{\caption@ifcompatibility{%
\caption@Error{%
The `bicaption' package does not work correctly\MessageBreak
@@ -109,6 +109,9 @@
\caption@ProcessOptions*{bicaption}
\let\bicaption@addcontentsline@ORI\caption@addcontentsline
\renewcommand*\caption@addcontentsline[2]{%
+ \caption@ifundefined\bicaption@LT@setup{}{%
+ \bicaption@LT@setup
+ \global\let\bicaption@LT@setup\@undefined}%
\caption@ifundefined\bicaption@lentry
{\bicaption@addcontentsline@ORI{#1}{#2}}%
{\expandafter\bicaption@addcontentsline\expandafter
@@ -136,13 +139,15 @@
\caption@ifcontentsline{#2}{%
\bicaption@selectlanguage\@secondoftwo
\bicaption@addcontentsline@ORI{#1}{#2}}}
-\let\caption@@make@ORI\caption@@make
\renewcommand\caption@@make[2]{%
\caption@ifundefined\bicaption@text
- {\caption@@make@ORI{#1}{#2}}%
+ {\begingroup
+ \caption@@make@{#1}{#2}%
+ \endgroup}%
{\expandafter\bicaption@@make\expandafter
{\bicaption@text}{#1}{#2}%
- \global\let\bicaption@text\@undefined}}
+ \global\let\bicaption@text\@undefined}%
+ \caption@@make@epilogue}
\newcommand\bicaption@@make[3]{%
\caption@setoptions{bi}%
\ifnum\bicaption@lang=0\relax
@@ -157,16 +162,17 @@
\else
\begingroup
\caption@setoptions{bi-first}%
- \caption@@make@ORI{#2}{#3}%
+ \caption@@make@{#2}{#3}%
\endgroup
\fi
\ifnum\bicaption@lang=1\relax
\else
\begingroup
\caption@setoptions{bi-second}%
- \caption@@make@ORI{#2}{#1}%
+ \caption@@make@{#2}{#1}%
\endgroup
- \fi}
+ \fi
+}
\newcommand\bicaption{\@bicaption\caption}
\newcommand\bicaptionbox{\@bicaption\captionbox}
\newcommand\bisubcaption{\@bicaption\subcaption}
@@ -174,11 +180,11 @@
\newcommand\bisubcaptionbox{\@bicaption\subcaptionbox}
\let\subbicaptionbox\bisubcaptionbox
\newcommand*\@bicaption[1]{%
- \def\bicaption@cmd{#1}%
\@ifstar
- {\l@addto@macro\bicaption@cmd*%
+ {\def\bicaption@cmd{\bicaption@star{#1}}%
\@@bicaption}%
- {\caption@dblarg\@@@bicaption}}
+ {\def\bicaption@cmd{#1}%
+ \caption@dblarg\@@@bicaption}}
\newcommand\@@bicaption[1]{%
\@@@@bicaption{}{#1}[]}
\long\def\@@@bicaption[#1]#2{%
@@ -190,6 +196,33 @@
\bicaption@cmd[{#3}]{#4}}%
{\bicaption@setup{#3}{#4}%
\bicaption@cmd[{#1}]{#2}}}
+\long\def\bicaption@star#1[#2]{#1*}
+\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}[]}
+\long\def\LT@@@bicaption[#1]#2{%
+ \caption@dblarg{\LT@@@@bicaption{#1}{#2}}}
+\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}}}
+\g@addto@macro\caption@LT@setup{%
+ \caption@ifundefined\bicaption@LTsetup{}{%
+ \bicaption@LTsetup
+ \global\let\bicaption@LTsetup\@undefined}}
\newcommand\bicaption@setup[2]{%
\def\bicaption@lentry{#1}%
\def\bicaption@text{\ignorespaces#2}}