summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption.sty117
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption3.sty31
2 files changed, 72 insertions, 76 deletions
diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty
index 653e9a4ec52..0c3426c8bcc 100644
--- a/Master/texmf-dist/tex/latex/caption/caption.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption.sty
@@ -28,7 +28,7 @@
%% caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2007/09/16 v3.1a Customising captions (AR)]
+\ProvidesPackage{caption}[2007/09/22 v3.1b Customising captions (AR)]
\newcommand*\caption@Info[1]{\PackageInfo{caption}{#1\@gobble}}
\@onlypreamble\caption@Info
\RequirePackage{caption3}[2007/09/16] % needs v3.1a or newer
@@ -273,7 +273,10 @@
\let\caption@ifrefstepcounter\@secondoftwo
#2{% \@gobble or \@firstofone
\let\@currentlabel\caption@undefinedlabel
- \let\@currentHlabel\@undefined
+ \ifx\caption@ORI@label\@undefined
+ \let\caption@ORI@label\label
+ \def\label{\caption@withoptargs\caption@xlabel}%
+ \fi
\caption@start}}
\newcommand*\caption@settypehook{}
\newcommand*\caption@iftype{%
@@ -295,9 +298,13 @@
\fi
}{}}
\fi
-\newcommand*\caption@undefinedlabel{%
- \emph{Please place \caption@cs{label} \textbf{after} \caption@cs{caption}}}%
-\DeclareRobustCommand\caption@cs[1]{\texttt{\char`\\#1}}
+\newcommand*\caption@undefinedlabel{??}
+\newcommand*\caption@xlabel[2]{%
+ \ifx\@currentlabel\caption@undefinedlabel
+ \PackageWarning{caption}{\noexpand\label before \noexpand\caption ignored}%
+ \else
+ \caption@ORI@label#1{#2}%
+ \fi}
\def\captionof{\caption@teststar\caption@of{\caption*}\caption}
\newcommand*\caption@of[2]{%
\let\caption@setfloatcapt\@firstofone
@@ -361,24 +368,27 @@
\sf@ifpositiontop{}{\@listsubcaptions{#1}}}%
}}
\newcommand*\caption@boxrestore{%
+ \let\if@nobreak\iffalse
+ \let\if@noskipsec\iffalse
\let\par\@@par
\parindent\z@ \parskip\z@skip
+ \everypar{}%
\leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip
\parfillskip\@flushglue \lineskip\normallineskip
\baselineskip\normalbaselineskip
\sloppy
+ \let\\\@normalcr
}
\newcommand*\caption@normalsize{%
\caption@font*{\KV@caption@fnt@normal\@unused}}
\let\caption@setfloatcapt\@firstofone
\newcommand*\caption@makecurrent[2]{}
\let\caption@makestart\@gobble
-\let\caption@anchor\@firstofone
+\let\caption@@anchor\@firstofone
\let\caption@start\relax
\let\caption@@start\relax
\let\caption@freezeHref\relax
\let\caption@defrostHref\relax
-\g@addto@macro\caption@prepareslc{\let\caption@anchor\@firstofone}
\caption@AtBeginDocument{%
\caption@setbool{incompatible}{0}%
\caption@CheckCommand\caption{%
@@ -584,14 +594,12 @@
{\let\@tempa\@gobble}% suppress warning
\caption@ifcompatibility{%
\@tempa{%
- \PackageWarning{caption}{%
- *************************************************\MessageBreak
+ \PackageWarningNoLine{caption}{%
\noexpand\caption will not be redefined since it's already\MessageBreak
redefined by a document class or package which is\MessageBreak
unknown to the caption package.\MessageBreak
As a result some new features of the caption\MessageBreak
- package will not work as expected.\MessageBreak
- *************************************************\@gobbletwo}%
+ package will not work as expected}%
}%
\renewcommand*\caption@ContinuedFloat[1]{%
\caption@Error{Not available in compatibility mode}}%
@@ -612,12 +620,10 @@
}{%
\caption@ifincompatible{%
\PackageWarning{caption}{%
- *****************************************************\MessageBreak
Forced redefinition of \noexpand\caption since the\MessageBreak
unsupported(!) package option `compatibility=false'\MessageBreak
was given. Please fasten your seat belts, as we may\MessageBreak
- experience turbulence!\MessageBreak
- *****************************************************\@gobbletwo}%
+ experience turbulence!\@gobbletwo}%
}{}%
\def\caption{%
\caption@iftype
@@ -639,16 +645,16 @@
\caption@boxrestore
\caption@normalsize
\ifcaption@star
- \let\caption@anchor\@firstofone
+ \let\caption@@anchor\@firstofone
\fi
\@makecaption{\csname fnum@#1\endcsname}%
- {\ignorespaces\caption@anchor{#3}}\par}%
+ {\ignorespaces\caption@@anchor{#3}}\par}%
\caption@end}%
- \let\caption@ORI@xfloat\@xfloat
- \def\@xfloat#1[#2]{%
- \caption@ORI@xfloat{#1}[#2]%
- \caption@settype{#1}}%
}%
+ \let\caption@ORI@xfloat\@xfloat
+ \def\@xfloat#1[#2]{%
+ \caption@ORI@xfloat{#1}[#2]%
+ \caption@settype{#1}}%
}
\long\def\@makecaption#1#2{%
\caption@iftop{\vskip\belowcaptionskip}{\vskip\abovecaptionskip}%
@@ -780,7 +786,7 @@
\expandafter\label\expandafter{\caption@SClabel}%
\fi
\else
- \caption@Error{Internal error:\MessageBreak
+ \caption@Error{Internal Error:\MessageBreak
\noexpand\caption@defrost in same group as \string\caption@freeze}%
\fi}%
}{}%
@@ -802,16 +808,6 @@
}{}%
\caption@freezeHref % will be defrosted in \float@makebox
\caption@ORI@float@setevery{#1}}%
- \renewcommand*\caption@setfloatcapt{%
- \float@ifcaption\@captype{%
- \caption@Error{Something is going wrong here...\MessageBreak
- For a removal of this problem please consult the\MessageBreak
- caption package documentation, especially the sections\MessageBreak
- about the `float' and the `wrapfig' package}%
- \@gobble
- }{%
- \@firstofone
- }}%
\g@addto@macro\caption@settypehook{%
\expandafter\ifx\csname #1name\endcsname\relax
\expandafter\let\csname #1name\expandafter\endcsname
@@ -898,7 +894,7 @@
\expandafter\caption@makecurrent\expandafter\@captype
\expandafter{\caption@SClentry}}%
{\expandafter\captionlistentry\expandafter{\caption@SClentry}}%
- \caption@anchor\relax
+ \caption@@anchor\relax
\ifx\FP@LabelText\@empty \else
\expandafter\label\expandafter{\FP@LabelText}%
\fi
@@ -936,6 +932,7 @@
Hyperref support is turned off\MessageBreak
because hyperref has stopped early}%
}{%
+ \g@addto@macro\caption@prepareslc{\measuring@true}%
\renewcommand*\caption@@refstepcounter{\H@refstepcounter}%
\renewcommand*\caption@makecurrent[2]{%
\caption@makecurrentHref{#1}%
@@ -945,49 +942,51 @@
\renewcommand*\caption@makestart[1]{%
\begingroup
\Hy@hypertexnamesfalse
- \gdef\@currentHlabel{}%
\hyper@makecurrent{#1.xxx}%
\endgroup
\caption@Debug{hyper start=\@currentHref}}%
- \renewcommand\caption@anchor[1]{%
- \caption@Debug{hyper anchor \@currentHref}%
+ \renewcommand\caption@@anchor[1]{%
+ \caption@Debug{hyper anchor: \@currentHref}%
% If we cannot have nesting, the anchor is empty.
\ifHy@nesting
\hyper@@anchor{\@currentHref}{#1}%
\else
\Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#1%
\fi}%
- \newcommand*\caption@@anchor[1]{%
- \caption@Debug{hyper anchor #1}%
- \begingroup
+ \g@addto@macro\caption@prepareslc{\let\caption@@anchor\@firstofone}%
+ \newcommand*\caption@startanchor[1]{%
+ \caption@Debug{hyper anchor: #1}%
+ \ifvmode\begingroup
\@tempdima\prevdepth
\nointerlineskip
\vspace*{-\caption@hypcapspace}%
- \let\leavevmode\relax
- \hyper@@anchor{#1}\relax
+ \caption@anchor{#1}%
\vspace*{\caption@hypcapspace}%
\prevdepth\@tempdima
- \endgroup}%
+ \endgroup\else
+ \PackageWarning{caption}{Internal Warning: Vertical TeX mode expected}%
+ \caption@anchor{#1}%
+ \fi}%
+ \newcommand*\caption@anchor[1]{%
+ \ifmeasuring@ \else
+ \Hy@raisedlink{\hyper@anchorstart{#1}\hyper@anchorend}%
+ \fi}%
\renewcommand*\caption@@ContinuedFloat[1]{%
\@ifundefined{theH#1}{}{%
\expandafter\l@addto@macro\csname theH#1\endcsname{%
\@alph\c@ContinuedFloat}}}%
\newif\if@capstart
- \def\caption@start{%
- \caption@ifhypcap{%
- \ifvmode
- \caption@makestart\@captype
- \caption@@anchor\@currentHref
- \global\@capstarttrue
- \let\hc@currentHref\@currentHref
- \def\caption@makecurrentHref##1{%
- \global\@capstartfalse
- \global\let\@currentHref\hc@currentHref}%
- \let\caption@anchor\@firstofone
- \let\caption@@anchor\@gobble
- \else
- \PackageWarning{caption}{Wrong TeX mode, no hyperlink anchor was set}%
- \fi}{}}%
+ \def\caption@start{\caption@ifhypcap{%
+ \caption@makestart\@captype
+ \caption@startanchor\@currentHref
+ \global\@capstarttrue
+ \let\hc@currentHref\@currentHref
+ \def\caption@makecurrentHref##1{%
+ \global\@capstartfalse
+ \global\let\@currentHref\hc@currentHref}%
+ \let\caption@@anchor\@firstofone
+%%% \let\caption@startanchor\@gobble
+ }{}}%
\def\caption@@start{%
\@ifundefined{hc@currentHref}{%
\PackageWarning{caption}{%
@@ -1002,12 +1001,12 @@
\let\caption@ORI@setfloatcapt\caption@setfloatcapt
\renewcommand*\caption@setfloatcapt{%
\ifx\caption@currentHref\@undefined \else
- \let\caption@anchor\@firstofone
+ \let\caption@@anchor\@firstofone
\fi
\caption@ORI@setfloatcapt}}%
\def\caption@defrostHref{%
\ifx\caption@currentHref\@undefined \else
- \caption@@anchor\caption@currentHref
+ \caption@startanchor\caption@currentHref
\global\let\caption@currentHref\@undefined
\fi}%
\@ifundefined{HyOrg@float@makebox}{}{%
@@ -1057,6 +1056,8 @@
\def\@captionabovefalse{\LT@captionsetup{position=b}}%
\def\captionlistentry##1{\noalign{%
\caption@listentry[\LTcaptype]{##1}}}%
+%% \let\Hy@LT@currentHlabel\@currentHlabel
+%% \let\@currentHlabel\Hy@LT@currentHlabel
\def\ContinuedFloat{\noalign{%
\caption@Error{\noexpand\ContinuedFloat outside float}}}%
\caption@ORI@LT@array}}%
diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty
index 14a28367e74..4bc31c25115 100644
--- a/Master/texmf-dist/tex/latex/caption/caption3.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption3.sty
@@ -28,7 +28,7 @@
%% caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2007/09/16 v3.1a caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2007/09/22 v3.1b caption3 kernel (AR)]
\providecommand*\@nameundef[1]{%
\expandafter\let\csname #1\endcsname\@undefined}
\providecommand\l@addto@macro[2]{%
@@ -153,12 +153,11 @@
\caption@@begindocumenthook
\let\caption@@begindocumenthook\@undefined
\PackageInfo{caption}{End \noexpand\AtBeginDocument code\@gobble}}
-\newcommand*\caption@Error[1]{%
- \PackageError\caption@Package{#1}\caption@eh}
-\newcommand*\caption@Package{caption}
+\newcommand*\caption@Error[1]{\PackageError{caption}{#1}\caption@eh}
+\let\caption@KV@err\caption@Error
\newcommand*\caption@eh{%
If you do not understand this error, please take a closer look\MessageBreak
- at the documentation of the `\caption@Package' package.\MessageBreak
+ at the documentation of the `caption' package.\MessageBreak
\@ehc}
\RequirePackage{keyval}[1997/11/10]
\providecommand*\undefine@key[2]{%
@@ -257,22 +256,18 @@
on input line \csname caption@opt@#1@lineno\endcsname}}}
\newcommand*\caption@setkeys{\@dblarg\caption@@setkeys}
\long\def\caption@@setkeys[#1]#2#3{%
- \ifx\caption@keydepth\@empty
- \let\caption@ORI@KV@errx\KV@errx
- \let\caption@ORI@KV@err\KV@err
- \let\KV@errx\caption@Error
- \let\KV@err\caption@Error
- \fi
- \l@addto@macro\caption@keydepth.%
- \def\caption@Package{#1}%
+ \expandafter\let\csname ORI@KV@err\caption@keydepth\endcsname\KV@err
+ \expandafter\let\csname ORI@KV@errx\caption@keydepth\endcsname\KV@errx
+ \@ifundefined{#1@KV@err}%
+ {\let\KV@err\ORI@KV@err\let\KV@errx\ORI@KV@errx}%
+ {\expandafter\let\expandafter\KV@err\csname #1@KV@err\endcsname
+ \let\KV@errx\KV@err}%
+ \l@addto@macro\caption@keydepth i%
\caption@Debug{\protect\setkeys{#2}{#3}}%
\setkeys{#2}{#3}%
- \def\caption@Package{caption}%
\edef\caption@keydepth{\expandafter\@cdr\caption@keydepth\@nil}%
- \ifx\caption@keydepth\@empty
- \let\KV@errx\caption@ORI@KV@errx
- \let\KV@err\caption@ORI@KV@err
- \fi}
+ \expandafter\let\expandafter\KV@err\csname ORI@KV@err\caption@keydepth\endcsname
+ \expandafter\let\expandafter\KV@errx\csname ORI@KV@errx\caption@keydepth\endcsname}
\let\caption@keydepth\@empty
\newcommand*\caption@ExecuteOptions[2]{%
\@expandtwoargs\caption@setkeys{#1}{#2}}%