diff options
author | Karl Berry <karl@freefriends.org> | 2007-09-23 22:53:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-09-23 22:53:14 +0000 |
commit | 7e54db207398fab8c02c3b8fc20a6700be7e8a74 (patch) | |
tree | 6d2ec5dead8e257ef747db674a60a6fe601e9313 | |
parent | 73da625d038c1dcd3061a8233f5abdbab8dd4555 (diff) |
caption 3.1b (22sep07)
git-svn-id: svn://tug.org/texlive/trunk@5018 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/caption/caption-deu.pdf | bin | 320675 -> 321472 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/caption/caption-deu.tex | 125 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/caption/caption-eng.pdf | bin | 304728 -> 306378 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/caption/caption-eng.tex | 107 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/caption/caption.pdf | bin | 351808 -> 352782 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/caption/caption.dtx | 242 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/caption/caption2.dtx | 10 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/caption/ltcaption.dtx | 11 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/caption.sty | 117 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/caption3.sty | 31 |
10 files changed, 364 insertions, 279 deletions
diff --git a/Master/texmf-dist/doc/latex/caption/caption-deu.pdf b/Master/texmf-dist/doc/latex/caption/caption-deu.pdf Binary files differindex 997a967888c..b1dc4ca62f6 100644 --- a/Master/texmf-dist/doc/latex/caption/caption-deu.pdf +++ b/Master/texmf-dist/doc/latex/caption/caption-deu.pdf diff --git a/Master/texmf-dist/doc/latex/caption/caption-deu.tex b/Master/texmf-dist/doc/latex/caption/caption-deu.tex index 7ae2462b8ec..e4319a124bc 100644 --- a/Master/texmf-dist/doc/latex/caption/caption-deu.tex +++ b/Master/texmf-dist/doc/latex/caption/caption-deu.tex @@ -23,7 +23,7 @@ % caption-eng.tex, and caption-rus.tex. % \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesFile{caption-deu.tex}[2007/09/16 v3.1a Das caption-Paket] +\ProvidesFile{caption-deu.tex}[2007/09/22 v3.1b Das caption-Paket] \hbadness=9999 \newcount\hbadness \hfuzz=20pt % Make TeX shut up. %\errorcontextlines=3 @@ -32,12 +32,11 @@ \setlength\parskip{\medskipamount} %%%\usepackage[T1]{fontenc} -\ifx\pdfoutput\undefined\else - \ifcase\pdfoutput\else - \usepackage{mathptmx,courier} - \usepackage[scaled=0.90]{helvet} - \addtolength\marginparwidth{15pt} - \fi +\usepackage{ifpdf} +\ifpdf + \usepackage{mathptmx,courier} + \usepackage[scaled=0.90]{helvet} + \addtolength\marginparwidth{15pt} \fi \usepackage[german]{babel} @@ -1394,8 +1393,8 @@ bezüglich der Abbildungs- und Tabellenbeschriftungen gleich. \Thispackage überprüft automatisch die Kompatibilität zur Dokumentenklasse und gibt eine klare Warnung aus, wenn es eine Unverträglichkeit entdeckt. Wenn Sie keine solche Warnung erhalten, ist alles bestens, wenn doch, wird von -der Verwendung des \package{caption}"=Paketes abgeraten, insbesondere wird eine -solche Verwendung nicht supportet. +der Verwendung des \package{caption}"=Paketes abgeraten, insbesondere erhalten +Sie in einem solchen Fall keinen Support. {\small(Sollten Sie trotz der angemahnten Inkompatibilität \thispackage{} nutzen wollen, sollten Sie vorsichtig auf Seiteneffekte achten; gewöhnlich @@ -1570,7 +1569,7 @@ oder \package{frenchpro}"=Paket. % --------------------------------------------------------------------------- % -\pagebreak[3] +\pagebreak[4] \section{Interaktion mit anderen Paketen} \label{packages} @@ -2111,6 +2110,19 @@ Möchten sie weiterhin die "`alten"' Vorbelegungen, so können Sie die Option |style=base| beim Laden des \package{caption}"=Paketes angeben oder später mittels |\captionsetup|\xx|{style=base}| den alten Grundzustand wieder herstellen. +Weiterhin prüft die aktuelle Version des \package{caption}"=Paketes automatisch +nach Inkompatibilitäten und gibt ggf.~ eine Warnung diesbezüglich aus. +Sollte eine ernsthafte Inkompatibilität festgestellt werden, werden außerdem +einige Features des \package{caption}"=Paketes abgeschaltet. +Lediglich diese Prüfung ist neu, wenn sie also neuerdings eine +Kompatibilitätswarnung erhalten, so waren auch bereits vorangegangene Versionen +des \package{caption}"=Paketes inkompatibel, dies hatte sich aber früher "`nur"' +durch Seiteneffekte bzw.~nicht korrekt funktionierende Features geäußert. +Die Kompatibilitätswarnungen sagen auch nicht aus, daß etwas schief gegangen ist, +sondern lediglich, daß etwas schief gehen kann. Sie sollten aber auf jeden Fall, +wenn Sie \thispackage\ trotz einer solchen Warnung einsetzen, die Abbildungs- +und Tabellenbeschriftungen bzgl.~ ihres Aussehens genau im Auge behalten. + % --------------------------------------------------------------------------- % \pagebreak[4] @@ -2239,13 +2251,11 @@ Option & Kurzbeschreibung & Abschnitt \\ \begin{Warnings} \Message - |*************************************************|\\ |\caption will not be redefined since it's already|\\ |redefined by a document class or package which is|\\ |unknown to the caption package.|\\ |As a result some new features of the caption|\\ - |package will not work as expected.|\\ - |*************************************************| + |package will not work as expected.| \Description Wenn \thispackage\ eine vorhandene (und unbekannte) Erweiterung des Befehls |\caption| erkannt hat, definiert es |\caption| nicht erneut um, da dies @@ -2262,12 +2272,21 @@ Option & Kurzbeschreibung & Abschnitt \\ \par\See{\Ref{classes}} \Message - |*****************************************************|\\ + |Caption type was already set to `|\meta{type}|'.| +\Description + Diese Warnung informiert Sie über vermische \package{caption}"=Optionen. + Wenn Sie z.B.~ein |\captionof|\xx|{table}|\xx|{|\ldots|}| in einer |figure| + Umgebung verwenden, werden beide Optionensätze, sowohl derjenige für |figure| + (mittels |\captionsetup|\xx|[figure]|\xx|{|\ldots|}| angegeben) als auch + derjenige für |table| (mittels |\captionsetup|\xx|[table]|\xx|{|\ldots|}| + angegeben), angewandt. + \par\See{\Ref{commands}} + +\Message |Forced redefinition of \caption since the|\\ |unsupported(!) package option `compatibility=false'|\\ |was given. Please fasten your seat belts, as we may|\\ - |experience turbulence!|\\ - |*****************************************************| + |experience turbulence!| \Description Da Sie so mutig waren, die Option |compatibility=false| zu probieren, wird \thispackage\ sein bestes geben, um diesen Wunsch zu erfüllen. @@ -2277,17 +2296,6 @@ Option & Kurzbeschreibung & Abschnitt \\ \par\See{\Ref{classes}} \Message - |Caption type was already set to `|\meta{type}|'.| -\Description - Diese Warnung informiert Sie über vermische \package{caption}"=Optionen. - Wenn Sie z.B.~ein |\captionof|\xx|{table}|\xx|{|\ldots|}| in einer |figure| - Umgebung verwenden, werden beide Optionensätze, sowohl derjenige für |figure| - (mittels |\captionsetup|\xx|[figure]|\xx|{|\ldots|}| angegeben) als auch - derjenige für |table| (mittels |\captionsetup|\xx|[table]|\xx|{|\ldots|}| - angegeben), angewandt. - \par\See{\Ref{commands}} - -\Message |Hyperref support is turned off because hyperref has|\\ |stopped early.| \Description @@ -2308,6 +2316,24 @@ Option & Kurzbeschreibung & Abschnitt \\ \par\See{\Ref{KOMA}} \Message + |Internal Warning: |\meta{Warnungstext}|.| +\Description + Diese Warnung sollten Sie niemals sehen; entweder verwenden Sie ein Paket, + welches |figure| und/oder |table| in einer dem \package{caption}"=Paket + unbekannten Art \& Weise verändert, oder aber es ist ein Bug im + \package{caption}"=Paket. + Bitte senden Sie mir einen Fehlerbericht diesbezüglich per E-Mail. Danke! + +\Message + |\label before \caption ignored| +\Description + Anders als bei nicht gleitenden Umgebungen wird bei den + gleitenden Umgebungen die interne Referenz erst bei Anwendung des Befehls + |\caption| erzeugt. Ein |\label| Befehl, der auf diese Abbildung + bzw.~Tabelle verweisen soll, muß daher entweder \emph{nach} |\caption| + oder innerhalb des Argumentes von |\caption| platziert werden. + +\Message |Option `|\meta{option}|' was not in list `|\meta{option list}|'.| \Description Wenn Sie versuchen, eine bestimmte Option aus einer Optionsliste zu @@ -2444,17 +2470,6 @@ Option & Kurzbeschreibung & Abschnitt \\ \thispackage\ -- zu entscheiden, um falsche Abstände zu vermeiden. \par\See{\Ref{skips}} -\Message - |Wrong TeX mode, no hyper anchor was set.| -\Description -% \Thispackage\ kann nur im sog.~vertikalen Modus von \TeX\ Hyperlink"=Anker -% setzen.\par - Diese Warnung sollten Sie niemals sehen; entweder verwenden Sie ein Paket, - welches |figure| und/oder |table| in einer dem \package{caption}"=Paket - unbekannten Art \& Weise verändert, oder aber es ist ein Bug im - \package{caption}"=Paket. - Bitte senden Sie mir einen Fehlerbericht diesbezüglich per E-Mail. Danke! - \end{Warnings} \pagebreak[4] @@ -2470,7 +2485,7 @@ Option & Kurzbeschreibung & Abschnitt \\ als optionales Argument bei |\caption| bzw. |\captionof| mit angegeben werden muß, auch wenn Ihr Dokument gar kein Abbildungs- oder Tabellenverzeichnis beeinhaltet. - \par\See{\Ref{commands}, \Ref{listof}, and \Ref{hyperref}\,} + \par\See{\Ref{commands}, \Ref{listof} und \Ref{hyperref}\,} \Message |\caption outside float.| @@ -2550,12 +2565,25 @@ Option & Kurzbeschreibung & Abschnitt \\ benötigte Version. \Message - |Internal error: |\meta{internal-error-message}|.| + |Internal Error: |\meta{Fehlertext}|.| \Description Diesen Fehler sollten Sie niemals sehen. Wenn doch, senden Sie mir bitte einen Fehlerbericht per E-Mail. \Message + |! LaTeX Error: Option clash for package caption.|\\ +{\color{black}\hspace{1.5em}-- oder --}\\ + |! LaTeX Error: Missing \begin{document}.| +\Description + Ein anderes \LaTeX-Paket hat \thispackage\ bereits geladen, Sie können es + daher nicht noch einmal mit anderen Optionen laden. + Als Verdächtiger kommt das \package{subfig}"=Paket in Frage, sollte dies + zutreffen, laden Sie bitte entweder \thispackage\ \emph{vor} dem + \package{subfig}"=Paket oder geben beim Laden des \package{subfig}"=Paketes + die Option |caption=false| an. + \par\See{Dokumentation des \package{subfig}"=Paketes\cite{subfig}} + +\Message |Not allowed in longtable* environment.| \Description Der Befehl |\caption| ist nicht immerhalb einer |longtable*| Umgebung @@ -2580,8 +2608,9 @@ Option & Kurzbeschreibung & Abschnitt \\ Argument bei |\caption| bzw. |\captionof| mit angegeben werden muß, auch wenn Ihr Dokument gar kein Abbildungs- oder Tabellenverzeichnis beeinhaltet. - \par\See{\Ref{commands}, \Ref{listof}, and \Ref{hyperref}\,} + \par\See{\Ref{commands}, \Ref{listof} und \Ref{hyperref}\,} +\iffalse % was removed in v3.1b \Message |Something is going wrong here...|\\ |For a removal of this problem please consult the|\\ @@ -2594,6 +2623,7 @@ Option & Kurzbeschreibung & Abschnitt \\ \package{float}"=Paket in einer für \thispackage\ inkompatiblen Art \& Weise erweitert!? \par\See{\Ref{float} und \Ref{wrapfig}} +\fi \iffalse \Message @@ -2788,9 +2818,10 @@ Sang-Heon Shim, Henrik Lundell, David Byers, William Asquith, -Prof.~Dr.~Dirk Hoffmann -und +Prof.~Dr.~Dirk Hoffmann, Frank Martini +und +Danie Els f"ur ihre Hilfe beim stetigen Verbessern dieses Paketes bedanken. % --------------------------------------------------------------------------- % @@ -2798,7 +2829,7 @@ f"ur ihre Hilfe beim stetigen Verbessern dieses Paketes bedanken. \pagebreak[4] \begin{thebibliography}{99} \bibitem{TLC2} - Frank Mittelbach and Michel Goossens:\\ + Frank Mittelbach und Michel Goossens:\\ \newblock {\em Der {\LaTeX} Begleiter (2.\,Auflage)},\\ \newblock Addison-Wesley, 2004. @@ -2875,13 +2906,13 @@ f"ur ihre Hilfe beim stetigen Verbessern dieses Paketes bedanken. July 13, 1993 \bibitem{picins} - Joachim Bleser and Edmund Lang:\\ + Joachim Bleser und Edmund Lang:\\ \href{ftp://dante.ctan.org/tex-archive/macros/latex209/contrib/picins/mpic.dvi}% {\emph{PicIns-Benutzerhandbuch Version 3.0}},\\ September~1992 \bibitem{rotating} - Sebastian Rahtz and Leonor Barroca:\\ + Sebastian Rahtz und Leonor Barroca:\\ \href{ftp://dante.ctan.org/tex-archive/macros/latex/contrib/rotating/}% {\emph{A style option for rotated objects in \LaTeX}},\\ 1997/09/26 @@ -2905,7 +2936,7 @@ f"ur ihre Hilfe beim stetigen Verbessern dieses Paketes bedanken. 2005/07/05 \bibitem{supertabular} - Johannes Braams and Theo Jurriens:\\ + Johannes Braams und Theo Jurriens:\\ \href{ftp://dante.ctan.org/tex-archive/macros/latex/contrib/supertabular/supertabular.pdf}% {\emph{The supertabular environment}},\\ 2002/07/19 diff --git a/Master/texmf-dist/doc/latex/caption/caption-eng.pdf b/Master/texmf-dist/doc/latex/caption/caption-eng.pdf Binary files differindex 15526524aee..76d0c31ece3 100644 --- a/Master/texmf-dist/doc/latex/caption/caption-eng.pdf +++ b/Master/texmf-dist/doc/latex/caption/caption-eng.pdf diff --git a/Master/texmf-dist/doc/latex/caption/caption-eng.tex b/Master/texmf-dist/doc/latex/caption/caption-eng.tex index 18295b190ca..831e97f493e 100644 --- a/Master/texmf-dist/doc/latex/caption/caption-eng.tex +++ b/Master/texmf-dist/doc/latex/caption/caption-eng.tex @@ -23,7 +23,7 @@ % caption-eng.tex, and caption-rus.tex. % \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesFile{caption-eng.tex}[2007/09/16 v3.1a The caption package] +\ProvidesFile{caption-eng.tex}[2007/09/22 v3.1b The caption package] \hbadness=9999 \newcount\hbadness \hfuzz=20pt % Make TeX shut up. %\errorcontextlines=3 @@ -31,12 +31,11 @@ \setlength\parindent{0pt} \setlength\parskip{\smallskipamount} -\ifx\pdfoutput\undefined\else - \ifcase\pdfoutput\else - \usepackage{mathptmx,courier} - \usepackage[scaled=0.90]{helvet} - \addtolength\marginparwidth{15pt} - \fi +\usepackage{ifpdf} +\ifpdf + \usepackage{mathptmx,courier} + \usepackage[scaled=0.90]{helvet} + \addtolength\marginparwidth{15pt} \fi \usepackage[USenglish]{babel} @@ -1892,6 +1891,18 @@ when when used with the \package{beamer} document class. An easy way to select the `old' defaults is using the option |style=base| when loading \thispackage\ (or later on using |\captionsetup|). +Another new feature is the automatic check for compatibility; if an +incompatibility will be found, a warning message will be issued and if a strong +incompatibility was found some features of \thispackage\ will be disabled. +Please note that only this check was added to \thispackage, so if you get +such warning message, the previous versions of \thispackage\ were incompatible +as well, but did not issued such warning, they were ``only'' having +side-effects or causing problems. +So these warnings only say that some bad side effects or problems could +happen, but not that they actually will happen. +Anyway, if you use \thispackage\ in such circumstances, +you should use it with care. + % --------------------------------------------------------------------------- % \pagebreak[4] @@ -2019,13 +2030,11 @@ Option & Short description & Section \\ \begin{Warnings} \Message - |*************************************************|\\ |\caption will not be redefined since it's already|\\ |redefined by a document class or package which is|\\ |unknown to the caption package.|\\ |As a result some new features of the caption|\\ - |package will not work as expected.|\\ - |*************************************************| + |package will not work as expected.| \Description If \thispackage\ detects that some (unknown) documentclass or package has enhanced |\caption|, it will not redefine @@ -2042,12 +2051,21 @@ Option & Short description & Section \\ \par\See{\Ref{classes}} \Message - |*****************************************************|\\ + |Caption type was already set to `|\meta{type}|'.| +\Description + This warning informs you about mixed caption options. For example if + you use a |\captionof{table}{|\ldots|}| inside a |figure| environment, + this would result in using both option sets for that specific caption, + the ones for |figure| (specified with |\captionsetup[figure]{|\ldots|}|) + and the one for |table| (specified with |\captionsetup[table]{|\ldots|}|) + as well. + \par\See{\Ref{commands}} + +\Message |Forced redefinition of \caption since the|\\ |unsupported(!) package option `compatibility=false'|\\ |was given. Please fasten your seat belts, as we may|\\ - |experience turbulence!|\\ - |*****************************************************| + |experience turbulence!| \Description Since you were so keen to specify the option |compatibility=false| \thispackage\ will try to do its best to fulfill your wishes. @@ -2057,17 +2075,6 @@ Option & Short description & Section \\ \par\See{\Ref{classes}} \Message - |Caption type was already set to `|\meta{type}|'.| -\Description - This warning informs you about mixed caption options. For example if - you use a |\captionof{table}{|\ldots|}| inside a |figure| environment, - this would result in using both option sets for that specific caption, - the ones for |figure| (specified with |\captionsetup[figure]{|\ldots|}|) - and the one for |table| (specified with |\captionsetup[table]{|\ldots|}|) - as well. - \par\See{\Ref{commands}} - -\Message |Hyperref support is turned off because hyperref has|\\ |stopped early.| \Description @@ -2088,6 +2095,24 @@ Option & Short description & Section \\ \par\See{\Ref{KOMA}} \Message + |Internal Warning: |\meta{warning message}|.| +\Description +% \Thispackage\ can only set hyperanchors in \TeX s vertical mode.\par + You should never see this warning, either you use a package which redefines + |figure| or |table| and which is unknown to \thispackage, or this is a bug + in \thispackage. + Please send me an e-mail reporting this issue. + +\Message + |\label before \caption ignored| +\Description + Regarding |\label| the floating environments behave differently than its + non-floating counterparts: The internal reference will not be generated + at the beginning of the environment, but at |\caption| instead. + So you have to place the |\label| command either \emph{after} the + |\caption| command or inside the caption text. + +\Message |Option `|\meta{option}|' was not in list `|\meta{option list}|'.| \Description If you try to remove a specific option of an option list, @@ -2192,7 +2217,8 @@ Option & Short description & Section \\ |Unused \captionsetup[|\meta{type}|].| \Description You have specified options with |\captionsetup[|\meta{type}|]| which are - not used later on in the document. This can be because of a typo in \meta{type}, + not used later on. + This can be because of a typo in \meta{type}, or because you use a package which redefines |figure| or |table| and which is unknown to \thispackage, or simply because you don't have any usage of the environment \meta{type} after this line.\par @@ -2211,15 +2237,6 @@ Option & Short description & Section \\ other one, using both can lead to wrong skips above or below the caption. \par\See{\Ref{skips}} -\Message - |Wrong TeX mode, no hyperlink anchor was set.| -\Description -% \Thispackage\ can only set hyperanchors in \TeX s vertical mode.\par - You should never see this warning, either you use a package which redefines - |figure| or |table| and which is unknown to \thispackage, or this is a bug - in \thispackage. - Please send me an e-mail reporting this issue. - \end{Warnings} \pagebreak[4] @@ -2307,12 +2324,25 @@ Option & Short description & Section \\ to a more recent version, at least to the one requested. \Message - |Internal error: |\meta{internal-error-message}|.| + |Internal Error: |\meta{error message}|.| \Description You should never see this error. Please send me an e-mail reporting this issue. \Message + |! LaTeX Error: Option clash for package caption.|\\ +{\color{black}\hspace{1.5em}-- oder --}\\ + |! LaTeX Error: Missing \begin{document}.| +\Description + \Thispackage\ has already been loaded by some other \LaTeX\ package, + so you can't do that again specifying different options. + A candidate causing this could be the \package{subfig} package; if this is + the case, please load \thispackage\ \emph{before} the \package{subfig} + package or specify the option |caption=false| while loading the + \package{subfig} package. + \par\See{the \package{subfig} package\cite{subfig} documentation} + +\Message |Not allowed in longtable* environment.| \Description The usage of |\caption| is not allowed inside the |longtable*| environment. @@ -2338,6 +2368,7 @@ Option & Short description & Section \\ Figures resp.~List of Tables, too, even if you don't use such list. \par\See{\Ref{commands}, \Ref{listof}, and \Ref{hyperref}\,} +\iffalse % was removed in v3.1b \Message |Something is going wrong here...|\\ |For a removal of this problem please consult the|\\ @@ -2350,6 +2381,7 @@ Option & Short description & Section \\ the \package{float} package in a manner which is incompatible to \thispackage!? \par\See{\Ref{float} and \Ref{wrapfig}} +\fi \iffalse \Message @@ -2383,7 +2415,7 @@ Option & Short description & Section \\ \package{subfig} package working. This mechanism is obsolet and not offered anymore, please pass this option to the \package{subfig} instead and do not load \thispackage\ anymore. - \par\See{the \package{subfig}\cite{subfig} documentation} + \par\See{the \package{subfig} package\cite{subfig} documentation} \Message |Undefined boolean value `|\meta{value}|'.| @@ -2523,8 +2555,9 @@ Henrik Lundell, David Byers, William Asquith, Prof.~Dr.~Dirk Hoffmann, +Frank Martini, and -Frank Martini +Danie Els who all helped to make this package a better one. % --------------------------------------------------------------------------- % diff --git a/Master/texmf-dist/doc/latex/caption/caption.pdf b/Master/texmf-dist/doc/latex/caption/caption.pdf Binary files differindex 35443f2375d..f2a77dbc3cb 100644 --- a/Master/texmf-dist/doc/latex/caption/caption.pdf +++ b/Master/texmf-dist/doc/latex/caption/caption.pdf diff --git a/Master/texmf-dist/source/latex/caption/caption.dtx b/Master/texmf-dist/source/latex/caption/caption.dtx index ec95b4086e4..ee64571a57a 100644 --- a/Master/texmf-dist/source/latex/caption/caption.dtx +++ b/Master/texmf-dist/source/latex/caption/caption.dtx @@ -24,12 +24,12 @@ % caption-eng.tex, and caption-rus.tex. % % \fi -% \CheckSum{5395} +% \CheckSum{5423} % % \iffalse %<*driver> \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesFile{caption.drv}[2007/09/16 v3.1a Implementation of the caption package] +\ProvidesFile{caption.drv}[2007/09/22 v3.1b Implementation of the caption package] \hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up. %\errorcontextlines=3 % @@ -42,18 +42,17 @@ \renewcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{3.6em}} \makeatother % -\ifx\pdfoutput\undefined \else - \ifcase\pdfoutput \else - \usepackage{mathptmx,courier} - \usepackage[scaled=0.90]{helvet} - \addtolength\marginparwidth{15pt} - \fi +\usepackage{ifpdf} +\ifpdf + \usepackage{mathptmx,courier} + \usepackage[scaled=0.90]{helvet} + \addtolength\marginparwidth{15pt} \fi % \usepackage{hypdoc} \hypersetup{pdfkeywords={LaTeX, package, caption},pdfstartview={}} % -\usepackage[debug]{caption}[2007/09/16] +\usepackage[debug]{caption}[2007/09/17] % \DeclareRobustCommand*\eTeX{\texorpdfstring {\leavevmode\hbox{$\varepsilon$}-\TeX}% @@ -222,7 +221,7 @@ % % \begin{macrocode} \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)] % \end{macrocode} % % \subsection{Generic helpers} @@ -380,6 +379,7 @@ % \end{macro} % % \begin{macro}{\caption@setbool} +% \begin{macro}{\caption@set@bool} % \changes{v3.1}{2007/04/05}{\cs{caption@set@bool}\marg{cmd}\marg{value} added} % \begin{macro}{\caption@ifbool} % \begin{macro}{\caption@undefbool} @@ -413,6 +413,7 @@ % \end{macro} % \end{macro} % \end{macro} +% \end{macro} % % \begin{macro}{\caption@teststar} % \changes{v3.1}{2007/05/08}{This macro and its usage added} @@ -536,16 +537,15 @@ % \begin{macro}{\caption@Error} % \changes{v3.0l}{2007/01/20}{This macro added, will now be used for errors} % \changes{v3.0q}{2007/04/11}{Renamed from \cs{caption@error} to \cs{caption@Error}} -% |\caption@Error|\marg{message}\par -% This is mainly identical to |\PackageError{caption}{|\meta{message}|}{\caption@eh}|. -% \begin{macrocode} -\newcommand*\caption@Error[1]{% - \PackageError\caption@Package{#1}\caption@eh} -% \end{macrocode} +% \changes{v3.1b}{2007/09/18}{Usage of \cs{caption@Package} removed} +% \begin{macro}{\caption@KV@err} +% |\caption@Error|\marg{message} % \begin{macrocode} -\newcommand*\caption@Package{caption} +\newcommand*\caption@Error[1]{\PackageError{caption}{#1}\caption@eh} +\let\caption@KV@err\caption@Error % \end{macrocode} % \end{macro} +% \end{macro} % % \begin{macro}{\caption@eh} % At the moment we only offer this simple error message as generic helper @@ -553,7 +553,7 @@ % \begin{macrocode} \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} % \end{macrocode} % \end{macro} @@ -783,6 +783,7 @@ % \changes{v3.0l}{2007/01/20}{Bugfix: Usage of \cs{caption@keydepth} added} % \changes{v3.0l}{2007/01/30}{Optional argument added} % \changes{v3.0p}{2007/04/08}{\cs{caption@keydepth} is now a command instead of a counter} +% \changes{v3.1b}{2007/09/18}{Usage of \cs{caption@Package} removed, we use \cs{caption@KV@err} instead} % |\caption@setkeys|\oarg{package}\marg{family}\marg{key-values}\par % This one simply calls |\setkeys|\marg{family}\marg{key-values} % but lets the error messages not refer to the \package{keyval} package, @@ -792,26 +793,22 @@ % \end{macrocode} % \begin{macrocode} \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.% + \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% % \end{macrocode} % \begin{macrocode} - \def\caption@Package{#1}% \caption@Debug{\protect\setkeys{#2}{#3}}% \setkeys{#2}{#3}% - \def\caption@Package{caption}% % \end{macrocode} % \begin{macrocode} \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} % \end{macrocode} % \begin{macrocode} \let\caption@keydepth\@empty @@ -2835,7 +2832,7 @@ % % \begin{macrocode} \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)] % \end{macrocode} % % \begin{macro}{\caption@Info} @@ -3310,6 +3307,7 @@ % % \begin{macro}{\caption@settype} % \changes{v3.1}{2007/05/09}{This macro added} +% \changes{v3.1b}{2007/09/22}{Usage of \cs{caption@xlabel} added} % |\caption@settype*|\marg{type}\par % sets |\@captype| and executes the options associated with it % (using |\caption@setoptions|). @@ -3355,7 +3353,11 @@ \let\caption@ifrefstepcounter\@secondoftwo #2{% \@gobble or \@firstofone \let\@currentlabel\caption@undefinedlabel - \let\@currentHlabel\@undefined +% \let\@currentHlabel\@undefined + \ifx\caption@ORI@label\@undefined + \let\caption@ORI@label\label + \def\label{\caption@withoptargs\caption@xlabel}% + \fi \caption@start}} % \end{macrocode} % \end{macro} @@ -3413,15 +3415,23 @@ % % \begin{macro}{\caption@undefinedlabel} % \changes{v3.1}{2007/07/03}{This macro and its usage added} +% \changes{v3.1b}{2007/09/22}{Contents changed to \texttt{??}} % This label will be used for |\currentlabel| inside (floating) environments % as default. (see above) % \Note{All commands used have to be robust here.} % \begin{macrocode} -\newcommand*\caption@undefinedlabel{% - \emph{Please place \caption@cs{label} \textbf{after} \caption@cs{caption}}}% +\newcommand*\caption@undefinedlabel{??} % \end{macrocode} +% \end{macro} +% \begin{macro}{\caption@xlabel} +% \changes{v3.1b}{2007/09/22}{This macro and its usage added} % \begin{macrocode} -\DeclareRobustCommand\caption@cs[1]{\texttt{\char`\\#1}} +\newcommand*\caption@xlabel[2]{% + \ifx\@currentlabel\caption@undefinedlabel + \PackageWarning{caption}{\noexpand\label before \noexpand\caption ignored}% + \else + \caption@ORI@label#1{#2}% + \fi} % \end{macrocode} % \end{macro} % @@ -3632,6 +3642,7 @@ % % \begin{macro}{\caption@boxrestore} % \changes{v3.1}{2007/03/03}{This macro and its usage added} +% \changes{v3.1b}{2007/09/17}{Bugfix: Redefinition of CR added} % The original code (from |latex/base/ltboxes.dtx|): % \begin{verbatim} % \def\@parboxrestore{\@arrayparboxrestore\let\\\@normalcr} @@ -3653,20 +3664,20 @@ % This one will be used by |\@caption| instead of |\@parboxrestore|. % \begin{macrocode} \newcommand*\caption@boxrestore{% -% \let\if@nobreak\iffalse -% \let\if@noskipsec\iffalse + \let\if@nobreak\iffalse + \let\if@noskipsec\iffalse \let\par\@@par % \let\-\@dischyph % \let\'\@acci\let\`\@accii\let\=\@acciii \parindent\z@ \parskip\z@skip -% \everypar{}% + \everypar{}% % \linewidth\hsize % \@totalleftmargin\z@ \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip \parfillskip\@flushglue \lineskip\normallineskip \baselineskip\normalbaselineskip \sloppy -% \let\\\@normalcr + \let\\\@normalcr } % \end{macrocode} % \end{macro} @@ -3697,7 +3708,7 @@ % % \begin{macro}{\caption@makecurrent} % \begin{macro}{\caption@makestart} -% \begin{macro}{\caption@anchor} +% \begin{macro}{\caption@@anchor} % \begin{macro}{\caption@start} % \begin{macro}{\caption@@start} % \begin{macro}{\caption@freezeHref} @@ -3706,15 +3717,12 @@ % \begin{macrocode} \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 % \end{macrocode} -% \begin{macrocode} -\g@addto@macro\caption@prepareslc{\let\caption@anchor\@firstofone} -% \end{macrocode} % \end{macro} % \end{macro} % \end{macro} @@ -4018,14 +4026,12 @@ % % \begin{macrocode} \@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}% }% % \end{macrocode} % @@ -4066,12 +4072,10 @@ % \begin{macrocode} \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}% }{}% % \end{macrocode} % @@ -4135,32 +4139,33 @@ \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}% % \end{macrocode} % \end{macro} % +% \begin{macrocode} + }% +% \end{macrocode} +% % \begin{macro}{\@xfloat} % \changes{v3.1}{2007/05/09}{This re-definition added} +% \changes{v3.1b}{2007/09/22}{Will now be redefined in compatibility mode, too} % We redefine |\@xfloat| so inside floating environments our % type-specific options will be used, a \package{hyperref} % anchor will be set etc. % \begin{macrocode} - \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}}% % \end{macrocode} % \end{macro} % % \begin{macrocode} - }% -% \end{macrocode} -% -% \begin{macrocode} } % \end{macrocode} % @@ -4445,7 +4450,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}% % \end{macrocode} @@ -4559,22 +4564,23 @@ % \end{macro} % % \begin{macro}{\caption@setfloatcapt} -% \changes{v3.1}{2007/06/23}{This macro added} +% \changes{v3.1}{2007/06/23}{This check added} +% \changes{v3.1b}{2007/09/22}{This check removed, so \cs{captionsetup(type=Example)} works} % Here we do a consistency check: If the caption to handle is a one from % the \package{float} package (|\newfloat| or |\restylefloat|), % |\setfloatcapt| should be redefined, so actually this error should never % occur. % \begin{macrocode} - \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 - }}% +% \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 +% }}% % \end{macrocode} % \end{macro} % @@ -4919,7 +4925,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 @@ -4973,6 +4979,7 @@ Hyperref support is turned off\MessageBreak because hyperref has stopped early}% }{% + \g@addto@macro\caption@prepareslc{\measuring@true}% % \end{macrocode} % % \begin{macro}{\caption@@refstepcounter} @@ -5025,19 +5032,19 @@ \renewcommand*\caption@makestart[1]{% \begingroup \Hy@hypertexnamesfalse - \gdef\@currentHlabel{}% +% \gdef\@currentHlabel{}% \hyper@makecurrent{#1.xxx}% \endgroup \caption@Debug{hyper start=\@currentHref}}% % \end{macrocode} % \end{macro} % -% \begin{macro}{\caption@anchor} -% We redefine |\caption@anchor| so a \package{hyperref} anchor +% \begin{macro}{\caption@@anchor} +% We redefine |\caption@@anchor| so a \package{hyperref} anchor % will be set inside |\@caption|. % \begin{macrocode} - \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}% @@ -5045,23 +5052,46 @@ \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#1% \fi}% % \end{macrocode} +% \begin{macrocode} + \g@addto@macro\caption@prepareslc{\let\caption@@anchor\@firstofone}% +% \end{macrocode} % \end{macro} % -% \begin{macro}{\caption@@anchor} -% We define |\caption@@anchor| so a \package{hyperref} anchor -% will be set inside |\caption@start|. +% \begin{macro}{\caption@startanchor} +% \changes{v3.1b}{2007/09/17}{Bugfix 06-09-17: We use \cs{caption@anchor} instead of \cs{hyper@@anchor}} +% We redefine |\caption@@anchor| so a \package{hyperref} anchor +% will be set inside |\caption@start|. This code was taken from the +% \package{hypcap} package\cite{hypcap} and adapted. +% \Note{Since \cs{hyper@@anchor} can cause a change from vertical mode to +% horizontal mode (Bug in \package{hyperref} package!?), and since the +% workaround \cs{let}\cs{leavevmode}\cs{relax} which can be found in the +% \package{hypcap} package is not always sufficient +% (for example with ``Direct pdfmark support'' and \texttt{breaklinks=true}), +% we use \cs{caption@anchor} instead of \cs{hyper@@anchor} here.} % \begin{macrocode} - \newcommand*\caption@@anchor[1]{% - \caption@Debug{hyper anchor #1}% - \begingroup + \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}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\caption@anchor} +% Sets a \package{hyperref} anchor. +% \begin{macrocode} + \newcommand*\caption@anchor[1]{% + \ifmeasuring@ \else + \Hy@raisedlink{\hyper@anchorstart{#1}\hyper@anchorend}% + \fi}% % \end{macrocode} % \end{macro} % @@ -5098,39 +5128,35 @@ % This macro renamed from \cs{capstart} to \cs{caption@start} and revised} % This one emulates the \package{hypcap} package (if |hypcap=true|). % \begin{macrocode} - \def\caption@start{% - \caption@ifhypcap{% - \ifvmode + \def\caption@start{\caption@ifhypcap{% % \end{macrocode} % % Generate the \package{hyperref} label and set the \package{hyperref} anchor, % usually both is done inside |\@caption|. % \begin{macrocode} - \caption@makestart\@captype - \caption@@anchor\@currentHref + \caption@makestart\@captype + \caption@startanchor\@currentHref % \end{macrocode} % % Prevent |\@caption| from generating a new \package{hyperref} label, % use the label we save in |\hc@currentHref| instead. % (We also support the |\@capstart| flag from the \package{hypcap} package.) % \begin{macrocode} - \global\@capstarttrue - \let\hc@currentHref\@currentHref - \def\caption@makecurrentHref##1{% - \global\@capstartfalse - \global\let\@currentHref\hc@currentHref}% + \global\@capstarttrue + \let\hc@currentHref\@currentHref + \def\caption@makecurrentHref##1{% + \global\@capstartfalse + \global\let\@currentHref\hc@currentHref}% % \end{macrocode} % % Prevent |\@caption| from generating a \package{hyperref} anchor since this % has already been done. % \begin{macrocode} - \let\caption@anchor\@firstofone - \let\caption@@anchor\@gobble + \let\caption@@anchor\@firstofone +%%% \let\caption@startanchor\@gobble % \end{macrocode} % \begin{macrocode} - \else - \PackageWarning{caption}{Wrong TeX mode, no hyperlink anchor was set}% - \fi}{}}% + }{}}% % \end{macrocode} % \end{macro} % @@ -5174,7 +5200,7 @@ \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}}% % \end{macrocode} @@ -5186,7 +5212,7 @@ % \begin{macrocode} \def\caption@defrostHref{% \ifx\caption@currentHref\@undefined \else - \caption@@anchor\caption@currentHref + \caption@startanchor\caption@currentHref \global\let\caption@currentHref\@undefined \fi}% % \end{macrocode} @@ -5368,10 +5394,10 @@ % \def\hyper@makecurrent##1{% % \let\hyper@makecurrent\caption@ORI@hyper@makecurrent % \caption@makestart{##1}% -% \let\Hy@LT@currentHlabel\@currentHlabel +%% \let\Hy@LT@currentHlabel\@currentHlabel % \let\Hy@LT@currentHref\@currentHref % \def\hyper@makecurrent####1{% -% \let\@currentHlabel\Hy@LT@currentHlabel +%% \let\@currentHlabel\Hy@LT@currentHlabel % \let\@currentHref\Hy@LT@currentHref}}% % \let\caption@ORI@ContinuedFloat\ContinuedFloat % \def\ContinuedFloat{\noalign{% diff --git a/Master/texmf-dist/source/latex/caption/caption2.dtx b/Master/texmf-dist/source/latex/caption/caption2.dtx index b6a52d38b00..8c8dde8c4b6 100644 --- a/Master/texmf-dist/source/latex/caption/caption2.dtx +++ b/Master/texmf-dist/source/latex/caption/caption2.dtx @@ -38,11 +38,11 @@ \setlength\parindent{0pt} \setlength\parskip{\smallskipamount} % -\ifx\pdfoutput\undefined\else - \ifcase\pdfoutput\else - \usepackage{mathptmx,courier} - \usepackage[scaled=0.90]{helvet} - \fi +\usepackage{ifpdf} +\ifpdf + \usepackage{mathptmx,courier} + \usepackage[scaled=0.90]{helvet} +% \addtolength\marginparwidth{15pt} \fi % \usepackage{hypdoc} diff --git a/Master/texmf-dist/source/latex/caption/ltcaption.dtx b/Master/texmf-dist/source/latex/caption/ltcaption.dtx index f7a2e0e9c0c..be81d9e3917 100644 --- a/Master/texmf-dist/source/latex/caption/ltcaption.dtx +++ b/Master/texmf-dist/source/latex/caption/ltcaption.dtx @@ -38,12 +38,11 @@ \setlength\parindent{0pt} \setlength\parskip{\smallskipamount} % -\ifx\pdfoutput\undefined\else - \ifcase\pdfoutput\else - \usepackage{mathptmx,courier} - \usepackage[scaled=0.90]{helvet} -% \addtolength\marginparwidth{15pt} - \fi +\usepackage{ifpdf} +\ifpdf + \usepackage{mathptmx,courier} + \usepackage[scaled=0.90]{helvet} +% \addtolength\marginparwidth{15pt} \fi % \usepackage{longtable} 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}}% |