%% %% This is file `bicaption.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% bicaption.dtx (with options: `package') %% %% Copyright (C) 1994-2011 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% -------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 %% of this license or (at your option) any later version. %% The latest version of this license is in %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX %% version 2003/12/01 or later. %% %% This work has the LPPL maintenance status "maintained". %% %% This Current Maintainer of this work is Axel Sommerfeldt. %% %% This work consists of the files caption.ins, caption.dtx, caption2.dtx, %% caption3.dtx, bicaption.dtx, ltcaption.dtx, and subcaption.dtx, %% the derived files caption.sty, caption2.sty, caption3.sty, bicaption.sty, %% ltcaption.sty, and subcaption.sty, and the user manuals caption-deu.tex, %% caption-eng.tex, and caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] \ProvidesPackage{bicaption}[2011/08/12 v0.9b Bilingual Captions (AR)] \RequirePackage{caption}[2011/08/12] % needs v3.2a or newer \newcommand*\bicaption@Warning[1]{% \bicaption@WarningNoLine{#1\on@line}} \newcommand*\bicaption@WarningNoLine[1]{% \PackageWarning{bicaption}{#1.^^J\bicaption@wh\@gobbletwo}} \newcommand*\bicaption@wh{% See the bicaption package documentation for explanation.} \newcommand*\bicaption@Error[1]{% \PackageError{bicaption}{#1}\bicaption@eh} \newcommand*\bicaption@eh{% If you do not understand this error, please take a closer look\MessageBreak at the documentation of the `bicaption' package.\MessageBreak\@ehc} \newcount\bicaption@lang \DeclareCaptionOption{bi-lang}{% \caption@ifinlist{#1}{0,all,both}{% \bicaption@lang=0\relax }{\caption@ifinlist{#1}{1,1st,first}{% \bicaption@lang=1\relax }{\caption@ifinlist{#1}{2,2nd,second}{% \bicaption@lang=2\relax }{% \bicaption@Error{Undefined bi-lang value `#1'}% }}}} \DeclareCaptionOption{bi-singlelinecheck}[1]{% \caption@set@bool\bicaption@ifslc{#1}} \DeclareCaptionOption{bi-slc}[1]{% \caption@set@bool\bicaption@ifslc{#1}} \DeclareCaptionOption{bi-swap}[1]{% \caption@set@bool\bicaption@ifswap{#1}} \DeclareCaptionOption{lang}{\def\bicaption@language{#1}} \let\KV@caption@language\KV@caption@lang \newcommand*\bicaption@selectlanguage{% \caption@ifundefined\bicaption@language{}{% \expandafter\selectlanguage\expandafter{\bicaption@language}}} \g@addto@macro\caption@applyfont{% \bicaption@selectlanguage} \g@addto@macro\caption@prepareslc{% \let\bicaption@language\@undefined} \caption@ExecuteOptions{caption}{bi-lang=0,bi-slc=1,bi-swap=0} \ifx\bbl@main@language\@undefined \bicaption@WarningNoLine{Please load this package after the babel package} \else \edef\@tempa{\noexpand\captionsetup[bi-first]{lang=\bbl@main@language}} \@tempa \fi \caption@SetupOptions{bicaption}{\captionsetup[bi-second]{#2}}% \caption@ProcessOptions*{bicaption} \let\caption@@make@ORI\caption@@make \renewcommand\caption@@make[2]{% \caption@ifundefined\bicaption@text {\caption@@make@ORI{#1}{#2}}% {\bicaption@@make{#1}{#2}{\bicaption@text}% \global\let\bicaption@label\@undefined \global\let\bicaption@text\@undefined}} \newcommand\bicaption@@make[3]{% \caption@setoptions{bi}% \ifnum\bicaption@lang=0\relax \bicaption@ifslc {\caption@@slc{#1}{#2}{\captionwidth}{}% {\caption@set@bool\caption@ifslc0}% \caption@@slc{#1}{#3}{\captionwidth}{}% {\caption@set@bool\caption@ifslc0}}% {}% \fi \ifnum\bicaption@lang=2\relax \ifx\bicaption@label\@empty\else \expandafter\label\expandafter{\bicaption@label}% \fi \else \begingroup \caption@setoptions{bi-first}% \caption@@make@ORI{#1}{#2}% \endgroup \fi \ifnum\bicaption@lang=1\relax \else \begingroup \caption@setoptions{bi-second}% \caption@@make@ORI{#1}{#3}% \endgroup \fi} \newcommand\bicaption@setup[2]{% \bicaption@getlabel#1\label{}\@nil \global\long\def\bicaption@text{\ignorespaces#2}} \long\def\bicaption@getlabel#1\label#2#3\@nil{% \global\def\bicaption@label{#2}} \newcommand*\@bicaption[1]{% \let\bicaption@cmd#1% \caption@withoptargs\@@bicaption} \newcommand\@@bicaption[3]{% \bicaption@ifswap {\bicaption@setup{#2}{#2}% \bicaption@cmd#1{#3}}% {\bicaption@setup{#2}{#3}% \bicaption@cmd#1{#2}}} \newcommand\bicaption{\@bicaption\caption} \newcommand\bisubcaption{\@bicaption\subcaption} \newcommand\bisubcaptionbox{\@bicaption\subcaptionbox} \endinput %% %% End of file `bicaption.sty'.