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.dtx28
1 files changed, 25 insertions, 3 deletions
diff --git a/Master/texmf-dist/source/latex/caption/caption3.dtx b/Master/texmf-dist/source/latex/caption/caption3.dtx
index 6ae6658e7cf..50fc631aba2 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 136 2016-02-02 09:41:30Z sommerfeldt $
+% $Id: caption3.dtx 139 2016-02-04 10:26:00Z 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{3646}
+% \CheckSum{3664}
%
% \iffalse
%<*driver>
@@ -203,10 +203,32 @@
\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 136 2016-02-02 09:41:30Z sommerfeldt $
+\caption@tempa $Id: caption3.dtx 139 2016-02-04 10:26:00Z sommerfeldt $
\ProvidesPackage{caption3}[\caption@tempa v1.7-\caption@tempb caption3 kernel (AR)]
% \end{macrocode}
%
+% \subsection{Workaround for bug in package \package{arabtex}}
+% \package{arabtex} re-defines \cs{@gobble} as not-long so the packages of the
+% \package{caption} package bundle are doomed to fail.
+% Since this fatal bug won't be fixed in \package{arabtex} but we are dependent on a
+% proper definition of \cs{@gobble}, \cs{@firstofone}, \cs{@firstoftwo}, \cs{@secondoftwo}
+% and so on we fix this here. (Sigh!)
+% \begin{macrocode}
+\providecommand\caption@FixArabTeX{%
+ \def\caption@tempa##1{}%
+ \ifx\caption@tempa\@gobble
+ \PackageInfo{caption3}{Fixing ArabTeX}%
+ \long\def\@gobble##1{}%
+ \fi}
+% \end{macrocode}
+% Do the fix now and at |\begin{document}|, in case \package{arabtex} will be loaded after \package{caption}.
+% \begin{macrocode}
+\caption@FixArabTeX
+\AtBeginDocument{%
+ \caption@FixArabTeX
+ \let\caption@FixArabTeX\@undefined}
+% \end{macrocode}
+%
% \subsection{Generic helpers}
%
% \begin{macro}{\@nameundef}