diff options
Diffstat (limited to 'Master')
17 files changed, 897 insertions, 468 deletions
diff --git a/Master/texmf-dist/doc/latex/caption/CHANGELOG b/Master/texmf-dist/doc/latex/caption/CHANGELOG index 1fe8b11e58e..38e2e691fb9 100644 --- a/Master/texmf-dist/doc/latex/caption/CHANGELOG +++ b/Master/texmf-dist/doc/latex/caption/CHANGELOG @@ -153,3 +153,14 @@ newfloat package v1.0 (2011/10/30) - 1st published version + +v1.1 (2013/04/27) +- New command \PrepareListOf + + +totalcount package +================== + +v1.0 (2008/03/09) +- 1st published version + diff --git a/Master/texmf-dist/doc/latex/caption/README b/Master/texmf-dist/doc/latex/caption/README index 3315aec7182..41de4a54224 100644 --- a/Master/texmf-dist/doc/latex/caption/README +++ b/Master/texmf-dist/doc/latex/caption/README @@ -70,7 +70,7 @@ User Manual: subcaption.pdf (English) -------------------------------------------------------------------------- -The `newfloat' package v1.0 offers the command \DeclareFloatingEnvironment +The `newfloat' package v1.1 offers the command \DeclareFloatingEnvironment for defining new floating environments which behave like the existing floating environments "figure" and "table". diff --git a/Master/texmf-dist/doc/latex/caption/bicaption.pdf b/Master/texmf-dist/doc/latex/caption/bicaption.pdf Binary files differindex e99edc20e6e..08784a0d0c0 100644 --- a/Master/texmf-dist/doc/latex/caption/bicaption.pdf +++ b/Master/texmf-dist/doc/latex/caption/bicaption.pdf diff --git a/Master/texmf-dist/doc/latex/caption/newfloat.pdf b/Master/texmf-dist/doc/latex/caption/newfloat.pdf Binary files differindex 555b03fe8c0..3e8503b2ff4 100644 --- a/Master/texmf-dist/doc/latex/caption/newfloat.pdf +++ b/Master/texmf-dist/doc/latex/caption/newfloat.pdf diff --git a/Master/texmf-dist/doc/latex/caption/subcaption.pdf b/Master/texmf-dist/doc/latex/caption/subcaption.pdf Binary files differindex 0ca4931af41..a19ad789d60 100644 --- a/Master/texmf-dist/doc/latex/caption/subcaption.pdf +++ b/Master/texmf-dist/doc/latex/caption/subcaption.pdf diff --git a/Master/texmf-dist/doc/latex/caption/totalcount.pdf b/Master/texmf-dist/doc/latex/caption/totalcount.pdf Binary files differnew file mode 100644 index 00000000000..1c8cf7e0471 --- /dev/null +++ b/Master/texmf-dist/doc/latex/caption/totalcount.pdf diff --git a/Master/texmf-dist/source/latex/caption/bicaption.dtx b/Master/texmf-dist/source/latex/caption/bicaption.dtx index b68cec1aa87..90b7184f13a 100644 --- a/Master/texmf-dist/source/latex/caption/bicaption.dtx +++ b/Master/texmf-dist/source/latex/caption/bicaption.dtx @@ -2,7 +2,7 @@ % % This is file `bicaption.dtx'. % -% $Id: bicaption.dtx 68 2013-03-10 09:31:58Z sommerfeldt $ +% $Id: bicaption.dtx 89 2013-05-02 07:05:20Z sommerfeldt $ % $HeadURL: svn+ssh://sommerfeldt@svn.code.sf.net/p/latex-caption/code/trunk/source/bicaption.dtx $ % % Copyright (C) 2010-2013 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{398} +% \CheckSum{387} % % \iffalse %<*driver> @@ -127,7 +127,7 @@ % This package has version number \fileversion, last revised \filedate.}}%^^A % {The bicaption package}} % \author{Axel Sommerfeldt\\ -% \url{http://sourceforge.net/projects/latex-caption/}} +% \url{http://sourceforge.net/p/latex-caption/}} % \date{\docdate} % \maketitle % @@ -139,9 +139,7 @@ % \tableofcontents % % \clearpage -% \section{The user interface} -% -% \subsection{Loading the package} +% \section{Loading the package} % \label{sec:loading} % % \DescribeMacro{\usepackage} @@ -166,7 +164,7 @@ % \package{bicaption} package should be loaded \emph{after} it, so the main % language will be set automatically. See \autoref{sec:babel} for details. % -% \subsection{Setting options} +% \section{Setting options} % \label{sec:options} % % \DescribeMacro{\captionsetup} @@ -236,7 +234,7 @@ % Please note that the environment name has to be specified as first optional argument % while the bilingual selection as second one. % -% \subsection{Additional options} +% \section{Additional options} % \label{sec:additional-options} % % These options are available additional to the ones offered by the @@ -277,7 +275,7 @@ % making the first language the second one and vice versa. (The default is |false|.) % \end{Options} % -% \subsection{The \cs{bicaption} commands} +% \section{The \cs{bicaption} commands} % \label{sec:bicaption} % % \DescribeMacro\bicaption @@ -340,7 +338,7 @@ % \endgroup % % \PageBreak -% \subsection{A sample document} +% \section{A sample document} % \label{sec:example} % % \begin{quote} @@ -538,7 +536,7 @@ % \end{figure} % % \PageBreak -% \subsection{Customising lists} +% \section{Customising lists} % \label{sec:lists} % % \DescribeMacro{list=} @@ -654,7 +652,7 @@ % |\end{document}| % \end{quote} % -% \subsection{Language Selection} +% \section{Language Selection} % \label{sec:babel} % % For language selection \thispackage\ uses two macros internally: @@ -799,7 +797,7 @@ \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.dtx 68 2013-03-10 09:31:58Z sommerfeldt $ +\caption@tempa $Id: bicaption.dtx 89 2013-05-02 07:05:20Z sommerfeldt $ \ProvidesPackage{bicaption}[\caption@tempa v1.1-\caption@tempb Bilingual Captions (AR)] % \end{macrocode} % \begin{macrocode} @@ -1238,22 +1236,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\bicaption@listof} -% \changes{v1.0a}{2011/10/30}{Adapted to the newfloat package} -% Make commands like |\listoffigure2s| work. -% (Is this a good idea or not!?) -% \begin{macrocode} -\newcommand*\bicaption@declarelist[1]{% - \@namedef{listof#1}{\bicaption@listof#1}} -\@onlypreamble\bicaption@declarelist -% \end{macrocode} -% \begin{macrocode} -\def\bicaption@listof#1 {\@nameuse{listof#1}} -% \end{macrocode} -% \begin{macrocode} -\caption@ForEachType{\bicaption@declarelist{#1}} -% \end{macrocode} -% \end{macro} +% \changes{v1.1}{2013/05/02}{Definition of \cs{bicaption@listof} removed} % % \begin{thebibliography}{9} % \bibitem{TLC2} diff --git a/Master/texmf-dist/source/latex/caption/caption.dtx b/Master/texmf-dist/source/latex/caption/caption.dtx index 64991dcd6fa..36d35e39f2e 100644 --- a/Master/texmf-dist/source/latex/caption/caption.dtx +++ b/Master/texmf-dist/source/latex/caption/caption.dtx @@ -2,7 +2,7 @@ % % This is file `caption.dtx'. % -% $Id: caption.dtx 73 2013-04-14 19:40:46Z sommerfeldt $ +% $Id: caption.dtx 89 2013-05-02 07:05:20Z sommerfeldt $ % $HeadURL: svn+ssh://sommerfeldt@svn.code.sf.net/p/latex-caption/code/trunk/source/caption.dtx $ % % Copyright (C) 1994-2013 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{3491} +% \CheckSum{3507} % % \iffalse %<*driver> @@ -99,7 +99,7 @@ % This package has version number \fileversion, last revised \filedate.}}%^^A % {the caption package}} % \author{Axel Sommerfeldt\\ -% \url{http://sourceforge.net/projects/latex-caption/}} +% \url{http://sourceforge.net/p/latex-caption/}} % \date{\docdate} % \maketitle % @@ -223,14 +223,14 @@ \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: caption.dtx 73 2013-04-14 19:40:46Z sommerfeldt $ +\caption@tempa $Id: caption.dtx 89 2013-05-02 07:05:20Z sommerfeldt $ \ProvidesPackage{caption}[\caption@tempa v3.3-\caption@tempb Customizing captions (AR)] % \end{macrocode} % % \subsection{Loading the kernel} % % \begin{macrocode} -\RequirePackage{caption3}[2012/12/26] % needs v1.5 or newer +\RequirePackage{caption3}[2013/05/01] % needs v1.6 or newer % \end{macrocode} % % \subsection{Check against incompatible document classes} @@ -1512,7 +1512,19 @@ % \end{macrocode} % \end{macro} % -% \subsection{\cs{captionof} and \cs{captionlistentry}} +% \begin{macro}{\phantomcaption} +% \changes{v3.2}{2010/10/31}{Bugfix 10-09-01b: This macro added} +% |\phantomcaption|\par +% Use this one for figures with subcaptions but without main caption. +% \begin{macrocode} +\newcommand\phantomcaption{% + \caption@iftype + {\caption@refstepcounter\@captype}% + {\caption@Error{\noexpand\phantomcaption outside float}}}% +% \end{macrocode} +% \end{macro} +% +% \subsection{\cs{captionof}} % % \changes{v3.0d}{2004/08/03}{Option \opt{type=} added} % \changes{v3.1}{2007/06/25}{Option \opt{type*=} added} @@ -1643,7 +1655,8 @@ % \end{macro} % % \begin{macro}{\caption@typehook} -% Hook, will be extended later on, e.g.~by our \package{float} package +% Hook which will be used inside |\caption@set|\-|type|. +% It will be extended later on, e.g.~by our \package{float} package % support. % \begin{macrocode} \newcommand*\caption@typehook{} @@ -1663,16 +1676,12 @@ % \begin{macro}{\caption@checkgrouplevel} % \changes{v3.1}{2007/07/15}{This macro and its usage added} % \changes{v3.1f}{2007/11/28}{Error changed to warning (compatibility)} +% \changes{v3.3}{2013/04/21}{Uses \cs{caption@ifeTeX} now} % Checks if |\captionsetup{type=|\ldots|}| or |\caption| is done % inside a group or not -- in the latter case a warning message will % be issued. (needs \eTeX) % \begin{macrocode} -\begingroup\expandafter\expandafter\expandafter\endgroup -\expandafter\ifx\csname currentgrouplevel\endcsname\relax - \caption@Debug{TeX engine: TeX} - \let\caption@checkgrouplevel\@gobbletwo -\else - \caption@Debug{TeX engine: e-TeX} +\caption@ifeTeX{% \newcommand*\caption@checkgrouplevel[2]{% \@ifundefined{#1caption@grouplevel}{% \caption@ifundefined\caption@grouplevel{\let\caption@grouplevel\z@}{}% @@ -1682,8 +1691,10 @@ \else \caption@Warning{\string#2\MessageBreak outside box or environment}% \fi - }{}} -\fi + }{}}% +}{% + \let\caption@checkgrouplevel\@gobbletwo +} % \end{macrocode} % \end{macro} % @@ -1758,6 +1769,8 @@ % \end{macrocode} % \end{macro} % +% \subsection{\cs{captionlistentry}} +% % \begin{macro}{\captionlistentry} % \changes{v3.1}{2007/07/28}{This macro added} % \changes{v3.1f}{2007/11/16}{Bugfix 07-11-09: `space hack' added} @@ -1854,6 +1867,7 @@ % \changes{v3.1g}{2008/01/29}{Starred variant added} % \changes{v3.2f}{2011/12/17}{Undocumented optional argument removed} % \changes{v3.3}{2011/12/28}{Uses \cs{ifcaption@ContinuedFloat} now} +% \changes{v3.3}{2013/05/01}{Usage of \cs{caption@restorecounters} added} % |\ContinuedFloat|\\ % |\ContinuedFloat*|\par % This mainly sets the appropriate flag, increments the @@ -1889,6 +1903,7 @@ \newcommand*\caption@Continued@Float[1]{% \edef\caption@tempa{#1}% \ifx\caption@tempa\caption@CFtype + \caption@restorecounters \caption@@ContinuedFloat{#1}% \else \caption@Error{Continued `#1' after `\caption@CFtype'}% @@ -1936,15 +1951,15 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\phantomcaption} -% \changes{v3.2}{2010/10/31}{Bugfix 10-09-01b: This macro added} -% |\phantomcaption|\par -% Use this one for figures with subcaptions but without main caption. +% \begin{macro}{\donemaincaptionfalse} +% Since the \class{memoir} document class resets the sub-caption +% counter at |\@float|, right after |\done|\-|main|\-|caption|\-|false|, +% we save all sub-caption counters at |\done|\-|main|\-|caption|\-|false| +% so we can restore them using |\caption@restore|\-|counters| +% inside |\Continued|\-|Float|. % \begin{macrocode} -\newcommand\phantomcaption{% - \caption@iftype - {\caption@refstepcounter\@captype}% - {\caption@Error{\noexpand\phantomcaption outside float}}}% +\caption@ifundefined\donemaincaptionfalse{}{% + \g@addto@macro\donemaincaptionfalse\caption@savesubcounters} % \end{macrocode} % \end{macro} % @@ -2283,6 +2298,7 @@ % \changes{v3.2c}{2011/09/30}{Bugfix 11-09-26: Usage of \cs{if@subfloatrow} added} % \changes{v3.3}{2011/12/28}{Bugfix 11-12-16: \cs{caption@l@stepcounter} replaced by \cs{stepcounter}} % \changes{v3.3}{2012/03/15}{Usage of \cs{caption@setbox} added} +% \changes{v3.3}{2013/05/01}{Redefinition of \cs{caption@settype} added} % Hook, will be used inside \cs{caption@setsubtype}.\par % (Note: If we are inside an |sub|\-|float|\-|row| environment we have to keep % the |\@make|\-|caption| code of the \package{floatrow} package intact.) @@ -2312,15 +2328,30 @@ \let\caption@setfloatcapt\@firstofone % \end{macrocode} % \begin{macrocode} - \caption@setbox{parbox}% + \caption@setbox{none}% \caption@clearmargin \caption@iflist{}{\let\caption@setlist\@gobble}% \caption@setoptions{sub}% \caption@setoptions{subfloat}% for subfig-package compatibility % \end{macrocode} % \begin{macrocode} +% redefine \setcaptiontype + \def\caption@settype{\caption@withoptargs\caption@sub@settype}% + \def\caption@sub@settype##1##2{% + \def\caption@tempa{##2}% + \ifx\caption@tempa\@captype +%%% \caption@setsubtype##1\relax + \else + \caption@Error{##2 inside \@subcaptype}% + \fi}% +% \end{macrocode} +% \begin{macrocode} +% redefine \caption \let\caption\caption@subcaption \let\phantomcaption\caption@subphantom +% \end{macrocode} +% \begin{macrocode} +% restore \@makecaption \if@subfloatrow \caption@Debug{Keeping \string\@makecaption}% \else @@ -2669,6 +2700,18 @@ \caption@ifneedfreeze{% % \end{macrocode} % +% \begin{macro}{\caption@freezetype} +% \changes{v3.3}{2013/05/01}{This macro added} +% |\caption@freezetype|\marg{type}\par +% Used by the \package{fltpage} \& \package{sidecap} package support. +% \begin{macrocode} + \newcommand*\caption@freezetype[1]{% + \caption@settype*{#1}% + \captionsetup*[sub]{hypcap=true}% Note: This is just a (q&d) workaround! + \caption@freeze}% +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\caption@freeze} % \changes{v3.1}{2007/07/22}{This macro added} % \changes{v3.1c}{2007/10/06}{\cs{caption} \& \cs{@caption} revised for enhanced compatibility} @@ -2681,67 +2724,63 @@ % \changes{v3.2b}{2011/08/18}{Redefinition of \cs{label} revised} % \changes{v3.2c}{2011/08/21}{Revised} % \changes{v3.3}{2013/01/06}{Adapted to new switch \cs{caption@caption} etc.} -% |\caption@freeze|\par -% Used by the \package{fltpage} \& \package{sidecap} package support. -% \begin{macrocode} - \newcommand*\caption@freeze[1]{% - \caption@settype*{#1}% - \captionsetup*[sub]{hypcap=true}% Note: This is just a (q&d) workaround! -% \end{macrocode} +% |\caption@freeze|\par +% Used by the \package{bicaption} package. % \begin{macrocode} - \let\caption@frozen@ContinuedFloat\ContinuedFloat - \def\ContinuedFloat{% - \caption@@freeze{\caption@@@ContinuedFloat\@captype}% - \caption@frozen@ContinuedFloat}% + \newcommand*\caption@freeze{% + \let\caption@frozen@ContinuedFloat\ContinuedFloat + \def\ContinuedFloat{% + \caption@@freeze{\caption@@@ContinuedFloat\@captype}% + \caption@frozen@ContinuedFloat}% % \end{macrocode} % \begin{macrocode} - \let\caption@frozen@setup\caption@setup - \def\caption@setup##1{% - \caption@@freeze{\caption@setup{##1}}% - \caption@frozen@setup{##1}}% + \let\caption@frozen@setup\caption@setup + \def\caption@setup##1{% + \caption@@freeze{\caption@setup{##1}}% + \caption@frozen@setup{##1}}% % \end{macrocode} % \begin{macrocode} - \let\caption@frozen@caption\caption - \def\caption{% + \let\caption@frozen@caption\caption \def\caption{% - \caption@Error{% - Only one \noexpand\caption can be placed in this environment}% - \caption@gobble}% - \@ifstar - {\caption@SC@caption*}% - {\let\@currentlabel\caption@SClabel - \caption@withoptargs\caption@SC@caption}}% - \long\def\caption@SC@caption##1##2{% - \caption@@freeze{\caption##1{##2}}% - \ignorespaces}% -% \end{macrocode} -% \begin{macrocode} - \let\caption@frozen@label\label - \def\label{% - \caption@withoptargs\caption@SC@label}% - \def\caption@SC@label##1##2{% - \ifx\@currentlabel\caption@SClabel - \@bsphack - \caption@freeze@label{##1}{##2}% - \@esphack - \else - \caption@frozen@label##1{##2}% - \fi}% - \def\caption@SClabel{\caption@undefinedlabel}% - \def\caption@freeze@label##1##2{% - \caption@@freeze{\label##1{##2}}}% + \def\caption{% + \caption@Error{% + Only one \noexpand\caption can be placed in this environment}% + \caption@gobble}% + \@ifstar + {\caption@SC@caption*}% + {\let\@currentlabel\caption@SClabel + \caption@withoptargs\caption@SC@caption}}% + \long\def\caption@SC@caption##1##2{% + \caption@@freeze{\caption##1{##2}}% + \ignorespaces}% +% \end{macrocode} +% \begin{macrocode} + \let\caption@frozen@label\label + \def\label{% + \caption@withoptargs\caption@SC@label}% + \def\caption@SC@label##1##2{% + \ifx\@currentlabel\caption@SClabel + \@bsphack + \caption@freeze@label{##1}{##2}% + \@esphack + \else + \caption@frozen@label##1{##2}% + \fi}% + \def\caption@SClabel{\caption@undefinedlabel}% + \def\caption@freeze@label##1##2{% + \caption@@freeze{\label##1{##2}}}% % \end{macrocode} % \begin{macrocode} - \global\let\caption@frozen@content\@empty - \long\def\caption@@freeze{% - \g@addto@macro\caption@frozen@content}% + \global\let\caption@frozen@content\@empty + \long\def\caption@@freeze{% + \g@addto@macro\caption@frozen@content}% % \end{macrocode} % \begin{macrocode} - \def\caption@warmup{% - \let\ContinuedFloat\caption@frozen@ContinuedFloat - \let\caption@setup\caption@frozen@setup - \let\caption\caption@frozen@caption - \let\label\caption@frozen@label}}% + \def\caption@warmup{% + \let\ContinuedFloat\caption@frozen@ContinuedFloat + \let\caption@setup\caption@frozen@setup + \let\caption\caption@frozen@caption + \let\label\caption@frozen@label}}% % \end{macrocode} % \end{macro} % @@ -2761,13 +2800,13 @@ % \changes{v3.2c}{2011/08/21}{\cs{caption@defrost@setup} removed} % |\caption@defrost| % \begin{macrocode} - \newcommand*\caption@defrost{% - \ifx\caption@frozen@caption\@undefined - \caption@frozen@content - \else - \caption@Error{Internal Error:\MessageBreak - \noexpand\caption@defrost in same group as \string\caption@freeze}% - \fi}% + \newcommand*\caption@defrost{% + \ifx\caption@frozen@caption\@undefined + \caption@frozen@content + \else + \caption@Error{Internal Error:\MessageBreak + \noexpand\caption@defrost in same group as \string\caption@freeze}% + \fi}% % \end{macrocode} % \end{macro} % @@ -3107,6 +3146,7 @@ % \changes{v3.1k}{2009/10/09}{Bugfix 09-09-11: Missing \cs{ignorespaces} added} % \changes{v3.2c}{2011/08/28}{Adapted to current version of \cs{caption@freeze}} % \changes{v3.2f}{2012/02/19}{Bugfix 12-02-16: \texttt{minipage} environment added} +% \changes{v3.3}{2013/05/01}{Usage of \cs{caption@freeze} replaced by \cs{caption@freezetype}} % Original code: % \begin{verbatim} % \newcommand{\FP@floatBegin}[1]{% @@ -3130,7 +3170,7 @@ \def\FP@captype{#1}% \begin{lrbox}{\FP@floatCorpusBOX}% \minipage\hsize % changes from LR mode to vertical mode - \caption@freeze{#1}% + \caption@freezetype{#1}% \ignorespaces}% % \end{macrocode} % \end{macro} @@ -4108,7 +4148,8 @@ \rotatebox{90}{% \ifdim\captionwidth=\z@ \setcaptionwidth{.8\vsize}% - \l@addto@macro\caption@singleline{\caption@setbox{none}}% + \l@addto@macro\caption@singleline{% + \caption@setup{parbox=none}}% \fi \let\caption@calcmargin\relax \caption@@make{#1}{#2}}% @@ -4132,6 +4173,7 @@ % \changes{v3.0c}{2004/07/16}{Bugfix 04-07-15: Check for \cs{caption@star} removed} % \changes{v3.1c}{2007/10/06}{\cs{caption} will be saved \& restored now} % \changes{v3.2a}{2011/08/17}{Bugfix: Uses \cs{caption@freeze} instead of \cs{caption@freeze*} now} +% \changes{v3.3}{2013/05/01}{Usage of \cs{caption@freeze} replaced by \cs{caption@freezetype}} % This macro will be called at the start of the environment, here is a good % opportunity to do some adaptations to |\caption| and |\captionsetup|. % \begin{macrocode} @@ -4150,7 +4192,7 @@ % which will be executed later on. % Furthermore we need to make |\caption*| work. % \begin{macrocode} - \caption@freeze{#2}% + \caption@freezetype{#2}% % \end{macrocode} % The sidecap package uses |\ifx\label\SC@label| to test if it is just inside a % |SC|\-|figure| or not. So we redefine |\SC@label| here so this test will still work. @@ -4411,8 +4453,8 @@ \let\caption@ORI@threeparttable\threeparttable \renewcommand*\threeparttable{% \caption@settype{table}% - \caption@setposition a% ? - \caption@clearmargin + \caption@setposition a% ? + \caption@clearmargin \caption@setoptions{threeparttable}% \caption@ORI@threeparttable}% % \end{macrocode} @@ -4423,8 +4465,8 @@ \let\caption@ORI@measuredfigure\measuredfigure \renewcommand*\measuredfigure{% \caption@settype{figure}% - \caption@setposition a% ? - \caption@clearmargin + \caption@setposition a% ? + \caption@clearmargin \caption@setoptions{measuredfigure}% \caption@ORI@measuredfigure}% % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/caption/caption3.dtx b/Master/texmf-dist/source/latex/caption/caption3.dtx index 75d79b1a2ca..d1b72258426 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 71 2013-04-14 15:14:26Z sommerfeldt $ +% $Id: caption3.dtx 88 2013-05-02 05:15:09Z sommerfeldt $ % $HeadURL: svn+ssh://sommerfeldt@svn.code.sf.net/p/latex-caption/code/trunk/source/caption3.dtx $ % % Copyright (C) 1994-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) @@ -28,12 +28,12 @@ % and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. % % \fi -% \CheckSum{3477} +% \CheckSum{3543} % % \iffalse %<*driver> \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesFile{caption3.drv}[2011/10/09 v1.5 Implementation of the caption kernel] +\ProvidesFile{caption3.drv}[2013/05/01 v1.6 Implementation of the caption kernel] \hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up. %\errorcontextlines=3 % @@ -102,7 +102,7 @@ % This package has version number \fileversion, last revised \filedate.}}%^^A % {the caption kernel}} % \author{Axel Sommerfeldt\\ -% \url{http://sourceforge.net/projects/latex-caption/}} +% \url{http://sourceforge.net/p/latex-caption/}} % \date{\docdate} % \maketitle % @@ -203,8 +203,8 @@ \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 71 2013-04-14 15:14:26Z sommerfeldt $ -\ProvidesPackage{caption3}[\caption@tempa v1.5-\caption@tempb caption3 kernel (AR)] +\caption@tempa $Id: caption3.dtx 88 2013-05-02 05:15:09Z sommerfeldt $ +\ProvidesPackage{caption3}[\caption@tempa v1.6-\caption@tempb caption3 kernel (AR)] % \end{macrocode} % % \subsection{Generic helpers} @@ -221,16 +221,27 @@ % \end{macro} % % \begin{macro}{\l@addto@macro} +% \changes{v3.3}{2013/04/26}{Revised} % The \LaTeXe\ kernel offers the internal helper macro |\g@addto@macro| which % globally adds tokens to existing macros, like in |\AtBeginDocument|. -% This is the same but it works local, not global -% (using \cs{edef} instead of \cs{xdef}). +% This is the same but it works local, not global. % \begin{macrocode} -\providecommand\l@addto@macro[2]{% - \begingroup - \toks@\expandafter{#1#2}% - \edef\@tempa{\endgroup\def\noexpand#1{\the\toks@}}% - \@tempa} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname currentgrouplevel\endcsname\relax + \PackageInfo{caption3}{TeX engine: TeX} + \let\caption@ifeTeX\@secondoftwo + \providecommand\l@addto@macro[2]{% + \begingroup + \toks@\expandafter{#1#2}% + \xdef\caption@addto@temp{\the\toks@}% + \endgroup + \let#1\caption@addto@temp} +\else + \PackageInfo{caption3}{TeX engine: e-TeX} + \let\caption@ifeTeX\@firstoftwo + \providecommand\l@addto@macro[2]{% + \edef#1{\unexpanded\expandafter{#1#2}}} +\fi % \end{macrocode} % \end{macro} % @@ -1498,12 +1509,13 @@ % \changes{v1.2}{2007/11/17}{Usage of \opt{size=} added} % \changes{v1.2b}{2008/05/06}{Usage of \opt{rule} added} % \changes{v1.5}{2012/03/15}{\opt{box=parbox} added} +% \changes{v1.6}{2013/05/01}{\opt{box=none} added, \opt{box=parbox} changed to \opt{parbox=parbox}} % This resets (nearly) all caption options to the base ones. % \emph{Note that this does not touch the skips and the positioning!} % \begin{macrocode} \newcommand*\caption@resetstyle{% \caption@setup{% - box=parbox,boxcolor=white,% + box=none,boxcolor=white,parbox=parbox,% format=plain,labelformat=default,labelsep=colon,textformat=simple,% justification=justified,font=,size=,labelfont=,textfont=,% margin=0pt,minmargin=0,maxmargin=0,% @@ -1548,23 +1560,37 @@ % \end{macrocode} % \end{macro} % +% \changes{v1.5}{2012/03/15}{Option \opt{box=} added} +% \changes{v1.6}{2013/05/01}{Option \opt{parbox=} added} % \begin{macrocode} \DeclareCaptionOption{box}{\caption@setbox{#1}} +\DeclareCaptionOption{parbox}{\caption@set@box\caption@parbox{#1}} % \end{macrocode} % % \begin{macro}{\caption@setbox} % |\caption@setbox|\marg{name}\par % Selecting a caption box simply means saving the code (in |\caption@box|). % \begin{macrocode} -\newcommand*\caption@setbox[1]{% - \@ifundefined{caption@box@#1}% - {\caption@Error{Undefined box `#1'}}% - {\expandafter\let\expandafter\caption@box\csname caption@box@#1\endcsname}} +\newcommand*\caption@setbox{% + \caption@set@box\caption@box} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@set@box[2]{% + \@ifundefined{caption@box@#2}% + {\caption@Error{Undefined box `#2'}}% + {\expandafter\let\expandafter#1\csname caption@box@#2\endcsname}} % \end{macrocode} % \end{macro} % -% There are four pre-defined label formats, called `empty', `simple', -% `parens', and `brace'. +% There are four pre-defined boxes, called `empty', `none', +% `parbox', and `colorbox'. +% \changes{v1.0i}{2006/05/13}{We define \cs{captionbox} instead of +% \cs{caption@start/endbox}} +% \changes{v1.0l}{2006/03/09}{Bugfix 07-03-09: \cs{captionbox} changed from +% \cs{parbox-t} to \cs{parbox-b}} +% \changes{v1.2}{2007/11/11}{\cs{captionbox} renamed to \cs{caption@parbox}} +% \changes{v1.5}{2012/03/15}{\cs{caption@parbox} adapted to \cs{DeclareCaptionBox}} +% \changes{v1.6}{2013/05/02}{Option \opt{boxsep=} added} % \begin{macrocode} \DeclareCaptionBox{empty}{} \DeclareCaptionBox{none}{#2} @@ -1572,15 +1598,17 @@ %\DeclareCaptionBox{colorbox}{% % \colorbox{\caption@boxcolor}{\caption@box@parbox{\dimexpr #1-2\fboxsep}{#2}}} \DeclareCaptionBox{colorbox}{\colorbox{\caption@boxcolor}{% -% \setlength\caption@tempdima{#1}% + \setlength\caption@tempdima{#1}% \addtolength\caption@tempdima{-2\fboxsep}% - \caption@box@parbox\caption@tempdima{#2}}} + \linewidth=\caption@tempdima\hsize=\caption@tempdima + #2}} \DeclareCaptionOption{boxcolor}{\def\caption@boxcolor{#1}} +\DeclareCaptionOption{boxsep}{\setlength\fboxsep{#1}} % \end{macrocode} % -% `default' usually maps to `parbox'. +% `default' usually maps to `none`. % \begin{macrocode} -\def\caption@box@default{\caption@box@parbox} +\def\caption@box@default{\caption@box@none} % \end{macrocode} % % \subsection{Formats} @@ -2643,6 +2671,7 @@ % \subsubsection{The beamer class (Part one)} % \changes{v1.1}{2007/03/10}{beamer class support added} % \changes{v1.3}{2011/08/06}{beamer class support revised} +% \changes{v3.3}{2013/04/27}{The beamer template \texttt{caption label separator} will be used now} % % \begin{macro}{\caption@ifbeamerclass} % \begin{macrocode} @@ -2673,6 +2702,8 @@ \nobreak\vskip\belowcaptionskip\nobreak}} % \end{macrocode} % \begin{macro}{\caption@ifbeamertemplate} +% |\caption@ifbeamertemplate|\marg{caption template name}\marg{yes-code}\marg{no-code}\\ +% tests if the given beamer caption template was selected by the user (or not). % \begin{macrocode} \newcommand*\caption@ifbeamertemplate[1]{% \begingroup @@ -2691,7 +2722,8 @@ \caption@declarelabelseparator {\caption@ifbeamertemplate{caption name own line}\@gobble\@firstofone} {default} - {\caption@ifbeamertemplate{caption name own line}{\\}{: }} + {\caption@ifbeamertemplate{caption name own line}{\\}% + {\usebeamertemplate{caption label separator}}} \DeclareCaptionDefaultFont{font}{% \usebeamerfont*{caption}% \usebeamercolor[fg]{caption}} @@ -3128,6 +3160,7 @@ % \changes{v1.1e}{2007/10/28}{\cs{caption@stepcounter} added} % \changes{v1.5}{2012/03/15}{Uses \cs{caption@tempdima} instead of \cs{@tempdima}} % \changes{v1.5}{2012/12/26}{max-margin stuff moved to \cs{caption@calcmargin}} +% \changes{v1.6}{2013/05/01}{Usage of \cs{caption@box} added} % |\caption@@make|\marg{caption label}\marg{caption text} % \begin{macrocode} \newcommand\caption@@make[2]{% @@ -3136,20 +3169,25 @@ \caption@beginhook % \end{macrocode} % +% Typeset the outer box |\caption@box| +% \begin{macrocode} + \caption@box\linewidth{% +% \end{macrocode} +% % Special single-line treatment (option |singlelinecheck=|) % \begin{macrocode} - \caption@ifslc{\caption@slc{#1}{#2}\caption@singleline\relax}{}% + \caption@ifslc{\caption@slc{#1}{#2}\caption@singleline\relax}{}% % \end{macrocode} % % Typeset the left margin (option |margin=|) % \begin{macrocode} - \caption@calcmargin - \@tempdima\captionmargin - \ifdim\captionmargin@=\z@ \else - \caption@ifoddpage{}{\advance\@tempdima\captionmargin@}% - \fi - \caption@ifh{\advance\@tempdima\caption@indent}% - \hspace\@tempdima + \caption@calcmargin + \caption@tempdima\captionmargin + \ifdim\captionmargin@=\z@ \else + \caption@ifoddpage{}{\advance\caption@tempdima\captionmargin@}% + \fi + \caption@ifh{\advance\caption@tempdima\caption@indent}% + \hspace\caption@tempdima % \end{macrocode} % % We actually use a |\vbox| of width |\captionwidth - \caption@indent| @@ -3157,35 +3195,40 @@ % \Note{\cs{captionindent} is \emph{not} supported if the caption format % was defined with \cs{DeclareCaptionFormat*}.} % \begin{macrocode} - \caption@tempdima\captionwidth - \caption@ifh{\advance\caption@tempdima-\caption@indent}% - \caption@parbox\caption@tempdima{% + \caption@tempdima\captionwidth + \caption@ifh{\advance\caption@tempdima-\caption@indent}% + \caption@parbox\caption@tempdima{% % \end{macrocode} % % Typeset the indention (option |indention=|)\\ % {\small Bugfix 04-05-05: % |\hskip-\caption@indent| replaced by |\ifdim\caption@indent=\z@|\ldots} % \begin{macrocode} - \caption@ifh{% - \ifdim\caption@indent=\z@ - \leavevmode - \else - \hskip-\caption@indent - \fi}% + \caption@ifh{% + \ifdim\caption@indent=\z@ + \leavevmode + \else + \hskip-\caption@indent + \fi}% % \end{macrocode} % % Typeset the caption itself and close the |\caption@parbox| % \begin{macrocode} - \caption@@@make{#1}{#2}}% + \caption@@@make{#1}{#2}}% % \end{macrocode} % % Typeset the right margin (option |margin=|) % \begin{macrocode} - \@tempdima\captionmargin - \ifdim\captionmargin@=\z@ \else - \caption@ifoddpage{\advance\@tempdima\captionmargin@}{}% - \fi - \hspace\@tempdima + \caption@tempdima\captionmargin + \ifdim\captionmargin@=\z@ \else + \caption@ifoddpage{\advance\caption@tempdima\captionmargin@}{}% + \fi + \hspace\caption@tempdima +% \end{macrocode} +% +% Close the outer box |\caption@box| +% \begin{macrocode} + }% % \end{macrocode} % % \begin{macrocode} @@ -3352,21 +3395,6 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\caption@parbox} -% \changes{v1.0i}{2006/05/13}{We define \cs{caption@parbox} instead of -% \cs{caption@start/endbox}} -% \changes{v1.0l}{2006/03/09}{Bugfix 07-03-09: \cs{caption@parbox} changed from -% \cs{parbox-t} to \cs{parbox-b}} -% \changes{v1.2}{2007/11/11}{Renamed from \cs{captionbox} to \cs{caption@parbox}} -% \changes{v1.5}{2012/03/15}{Adapted to \cs{DeclareCaptionBox}} -% |\caption@parbox|\marg{width}\marg{contents}\par -% This macro defines the box which surrounds the caption paragraph. -% (For compatibility reasons we still use |\caption@par|\-|box| instead of |\caption@box|.) -% \begin{macrocode} -\newcommand*\caption@parbox{\caption@box} -% \end{macrocode} -% \end{macro} -% % \begin{macro}{\caption@applyfont} % \changes{v1.3}{2010/09/04}{This macro added} % |\caption@applyfont|\par @@ -3675,6 +3703,45 @@ % \end{macrocode} % \end{macro} % +% Unfortunately the \class{memoir} document class resets the +% \texttt{subfigure} resp.~\texttt{subtable} counter at the begin +% of floating environments, i.e.~at |\@float|. +% As a side-effect |\Continued|\-|Float| does not work correctly. +% For that reason we need to introduce macros to save and restore +% all sub-caption counters here. +% +% \begin{macro}{\caption@restorecounters} +% \changes{v1.5}{2013/05/01}{This macro added} +% |\caption@restore|\-|counters| restores all counters saved with +% |\caption@save|\-|counter|. +% \begin{macrocode} +\newcommand*\caption@restorecounters{% + \caption@restore@counters + \global\let\caption@restore@counters\@empty} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@restore@counters{} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\caption@savesubcounters} +% \changes{v1.5}{2013/05/01}{This macro added} +% |\caption@save|\-|sub|\-|counters| saves all sub-caption counters, +% so they can be restored with |\caption@restore|\-|counters| later on. +% \begin{macrocode} +\newcommand*\caption@savesubcounters{% + \def\@elt##1{\caption@savecounter{sub##1}}% + \caption@subtypelist + \let\@elt\relax}% +% \end{macrocode} +% \begin{macrocode} +\newcommand*\caption@savecounter[1]{% + \edef\caption@tempa{% + \noexpand\l@addto@macro\noexpand\caption@restore@counters + {\noexpand\setcounter{#1}{\number\value{#1}}}}% + \caption@tempa} +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\caption@For} % \changes{v1.1a}{2007/09/07}{This macro added} % \changes{v1.2}{2007/11/16}{Renamed from \cs{ForFloatingEnvironments} to \cs{caption@For}} diff --git a/Master/texmf-dist/source/latex/caption/newfloat.dtx b/Master/texmf-dist/source/latex/caption/newfloat.dtx index 3522c9bfea1..a3228bc1d69 100644 --- a/Master/texmf-dist/source/latex/caption/newfloat.dtx +++ b/Master/texmf-dist/source/latex/caption/newfloat.dtx @@ -2,10 +2,10 @@ % % This is file `newfloat.dtx'. % -% $Id: newfloat.dtx 63 2013-02-03 13:27:05Z sommerfeldt $ +% $Id: newfloat.dtx 91 2013-05-11 12:25:57Z sommerfeldt $ % $HeadURL: svn+ssh://sommerfeldt@svn.code.sf.net/p/latex-caption/code/trunk/source/newfloat.dtx $ % -% Copyright (C) 2011-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +% Copyright (C) 2011-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) % % -------------------------------------------------------------------------- % @@ -28,13 +28,13 @@ % and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. % % \fi -% \CheckSum{1300} +% \CheckSum{1318} % % \iffalse %<*driver> \NeedsTeXFormat{LaTeX2e}[1994/12/01] \ProvidesFile{newfloat.drv}% - [2012/05/18 v1.0 This package offers a command for defining new floating environments] + [2013/04/27 v1.1 This package offers a command for defining new floating environments] \hbadness=9999 \newcount\hbadness \hfuzz=48pt % Make TeX shut up. % \documentclass{ltxdoc} @@ -77,7 +77,7 @@ % \newcommand*\purerm[1]{{\upshape\mdseries\rmfamily #1}} % \newcommand*\puresf[1]{{\upshape\mdseries\sffamily #1}} % \newcommand*\purett[1]{{\upshape\mdseries\ttfamily #1}} -% \let\package\puresf +% \let\class\puresf \let\package\puresf % \let\env\purett \let\opt\purett % % \def\thispackage{the \package{newfloat} package} @@ -94,10 +94,10 @@ % \GetFileInfo{newfloat.sty} % % \title{\texorpdfstring{\Thispackage\thanks{%^^A -% This package has version number \fileversion, last revised \filedate.}}%^^A +% This package has version number \fileversion.}}%^^A % {The newfloat package}} % \author{Axel Sommerfeldt\\ -% \url{http://sourceforge.net/projects/latex-caption/}} +% \url{http://sourceforge.net/p/latex-caption/}} % \date{\docdate} % \maketitle % @@ -266,7 +266,7 @@ % \section{\cs{ForEachFloatingEnvironment}} % % \begin{quote} -% |\ForEachFloatingEnvironment|\meta{code with \#1} +% |\ForEachFloatingEnvironment|\marg{code with \#1} % \end{quote} % will execute the given \meta{code} for all known floating environments, % and for ones defined with |\Declare|\-|Floating|\-|Environment| later on. @@ -293,6 +293,77 @@ % will typeout the names of all already known floating environments to the terminal % and log file. % +% \pagebreak[3] +% \section{\cs{PrepareListOf}} +% +% Unfortunately there is no standardized way of typesetting and customizing +% lists of floating environments, i.e.~every document class offers it's own stuff here, +% and there are plenty of \LaTeXe\ packages for this purpose. +% +% \pagebreak[3] +% For that reason the \thispackage\ simply typesets the lists of newly +% defined floating environments as ``List of Figure'' internally (using |\list|\-|of|\-|figure|) +% but using a different list (the right one, of course) and using a different list name, +% the one you have specified with either |\Declare|\-|Floating|\-|Environment| or +% |\Setup|\-|Floating|\-|Environment|.\footnote{Please note that this is not the +% fact when using a \KOMAScript\ document class, not \cs{listoffigure} but \cs{listoftoc} +% will be used here, and therefore no problems should occur.} +% +% \pagebreak[3] +% While this usually results in the same layout as the ``List of Figure'' and +% is sufficient for most cases, there are some cases where this might +% lead to an unwanted side effect. +% +% \pagebreak[3] +% Therefore the \thispackage\ offers +% \begin{quote} +% |\PrepareListOf|\marg{floating environment}\marg{code} +% \end{quote} +% which will execute the given \meta{code} right before actually typesetting the list +% with |\list|\-|of|\-|figures| internally. +% +% \pagebreak[3] +% One example: +% \begin{quote} +% |\PrepareListOf{diagram}{%|\\ +% | \renewcommand{\cftfigpresnum}{Diagram~}}| +% \end{quote} +% will change the part typeset in front of the diagram number within the +% ``List of Diagrams'' when using the \package{tocloft} package~\cite{tocloft}. +% Without the code above you will get the part defined for figures instead. +% +% \pagebreak[3] +% However, when dealing with the \package{tocloft} package it's a better +% idea not to use |\Prepare|\-|List|\-|Of| but the customization facilities of that package +% instead, e.g.: +% \begin{quote} +% |\documentclass{book}|\\ +% \ldots\\ +% |\usepackage{newfloat,tocloft}|\\ +% |\newlistof{diagram}{lod}{List of Diagrams}|\\ +% |\DeclareFloatingEnvironment[name=Diagram,fileext=lod]{diagram}|\\ +% | % Note: Due of a bug in tocloft the file extension|\\ +% | % must be repeated at \DeclareFloatingEnvironment,|\\ +% | % otherwise you will get an empty list.|\\ +% ||\\ +% |% Customize `List of Figures'|\\ +% |\renewcommand{\cftfigpresnum}{Figure~}|\\ +% |\setlength{\cftfignumwidth}{2cm}|\\ +% ||\\ +% |% Customize `List of Diagrams'|\\ +% |\renewcommand{\cftdiagrampresnum}{Diagram~}|\\ +% |\setlength{\cftdiagramnumwidth}{2cm}|\\ +% ||\\ +% \ldots\\ +% ||\\ +% |\begin{document}|\\ +% \ldots\\ +% |\listoffigures|\\ +% |\listofdiagrams|\\ +% \ldots\\ +% |\end{document}| +% \end{quote} +% % \iffalse % \pagebreak[3] % \section{For \LaTeX{} package authors} @@ -332,7 +403,7 @@ % \fi % % \StopEventually{%^^A -% \pagebreak[3] +% \pagebreak[4] % \begin{thebibliography}{9} % % \bibitem{memoir} @@ -351,7 +422,7 @@ % Markus Kohm \& Jens-Uwe-Morawski:\\ % \href{http://www.ctan.org/pkg/koma-script}% % {\emph{KOMA-Script -- a versatile \LaTeXe\ bundle}},\\ -% 2007-01-09 +% 2012-07-22 % % \bibitem{float} % Anselm Lingnau:\\ @@ -377,6 +448,12 @@ % {\emph{The sidecap package}},\\ % 2003/06/06 % +% \bibitem{tocloft} +% Peter Wilson, Herries Press, Will Robertson:\\ +% \href{http://www.ctan.org/pkg/tocloft}% +% {\emph{The tocloft package}},\\ +% 2010/10/13 +% % \bibitem{wrapfig} % Donald Arseneau:\\ % \href{http://www.ctan.org/pkg/wrapfig}% @@ -439,6 +516,8 @@ % \setlength{\parskip}{0pt plus 1pt} % \changes{v1.0}{2011/10/30}{First release as \package{newfloat} package, % outsourced from the \package{caption3} package and revised} +% \changes{v1.1}{2013/04/27}{Adapted to the \package{tocloft} package} +% \changes{v1.1}{2013/04/27}{New command \cs{PrepareListOf} added} % % \iffalse % --------------------------------------------------------------------------- % @@ -457,8 +536,8 @@ \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: newfloat.dtx 63 2013-02-03 13:27:05Z sommerfeldt $ -\ProvidesPackage{newfloat}[\caption@tempa v1.0-\caption@tempb Defining new floating environments (AR)] +\caption@tempa $Id: newfloat.dtx 91 2013-05-11 12:25:57Z sommerfeldt $ +\ProvidesPackage{newfloat}[\caption@tempa v1.1-\caption@tempb Defining new floating environments (AR)] % \end{macrocode} % % \begin{macro}{\newfloat@Info} @@ -495,10 +574,45 @@ % \end{macrocode} % % \pagebreak[3] +% \subsection{Helper macros} +% +% \begin{macro}{\newfloat@def} +% \changes{v1.1}{2013/04/27}{This macro added} +% |\newfloat@def|\marg{macro name}\marg{definition} +% \begin{macrocode} +\newcommand*\newfloat@def[2]{% + \newfloat@ifundefined{#1}{% + \@namedef{#1}{#2}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\newfloat@let} +% \changes{v1.1}{2013/04/27}{This macro added} +% |\newfloat@let|\marg{macro name}\marg{macro} +% \begin{macrocode} +\newcommand*\newfloat@let[2]{% + \newfloat@ifundefined{#1}{% + \expandafter\let\csname #1\endcsname#2}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\newfloat@ifundefined} +% \changes{v1.1}{2013/04/27}{This macro added} +% |\newfloat@ifundefined|\marg{macro name}\marg{code} +% \begin{macrocode} +\newcommand*\newfloat@ifundefined[2]{% + \@ifundefined{#1}{#2}{% + \newfloat@Info{% + \expandafter\string\csname#1\endcsname\space is already defined}}} +% \end{macrocode} +% \end{macro} +% +% \pagebreak[3] % \subsection{\cs{DeclareFloatingEnvironment}} % % \begin{macro}{\DeclareFloatingEnvironment} % \changes{v1.0a}{2011/11/16}{Bugfix: Undefines \cs{fst@}\meta{environment} now} +% \changes{v1.1}{2013/04/27}{Revised, only defines stuff yet undefined now} % |\DeclareFloatingEnvironment|\oarg{options}\marg{environment}\oarg{name}\oarg{list name} % \begin{macrocode} \newcommand*\DeclareFloatingEnvironment{% @@ -519,7 +633,7 @@ % \end{macrocode} % Define a counter with the same name as the floating environment % \begin{macrocode} - \newcounter{#2}% + \newfloat@ifundefined{c@#2}{\newcounter{#2}}% % \end{macrocode} % Set |\ftype@|\meta{type} which contains the type number for floats of type \meta{type}\par % (See also \url{http://tex.stackexchange.com/q/32359/2574}) @@ -542,35 +656,50 @@ % \end{macrocode} % Define |\fnum@|\meta{type}, a macro to generate the figure number for a caption % \begin{macrocode} - \@namedef{fnum@#2}{\@nameuse{#2name}\nobreakspace\@nameuse{the#2}}% + \newfloat@def{fnum@#2}% + {\@nameuse{#2name}\nobreakspace\@nameuse{the#2}}% % \end{macrocode} % Define |\|\meta{type}|name| used by |\fnum@|\meta{type} as \meta{type}, % but with first letter capitalized % \begin{macrocode} - \expandafter\newcommand\csname #2name\endcsname{}% - \expandafter\let\csname #2name\endcsname\newfloat@Type - \@namedef{fleg#2}{\@nameuse{#2name}}% legend naming (memoir) + \newfloat@let{#2name}{\newfloat@Type}% + \newfloat@def{fleg#2}{\@nameuse{#2name}}% legend naming (memoir) % \end{macrocode} % Legend name in ToC (memoir document class) % \begin{macrocode} - \@namedef{flegtoc#2}##1{}% + \newfloat@ifundefined{flegtoc#2}{\@namedef{flegtoc#2}##1{}}% % \end{macrocode} -% Define the floating environment +% Define the floating environment\par +% (If the \class{tufte} document class is loaded, +% |\@tufte@float| and |\end@tufte@float| will be used instead of +% |\@float|, |\end@float|, |\@dblfloat|, and |\end@dblfloat|.) % \begin{macrocode} - \newenvironment{#2}{\@float{#2}}{\end@float}% - \newenvironment{#2*}{\@dblfloat{#2}}{\end@dblfloat}% + \ifcsname @tufte@float\endcsname + \newenvironment{#2}[1][htbp]% + {\begin{@tufte@float}[##1]{#2}{}}% + {\end{@tufte@float}}% + \newenvironment{#2*}[1][htbp]% + {\begin{@tufte@float}[##1]{#2}{star}}% + {\end{@tufte@float}}% + \else + \newenvironment{#2}{\@float{#2}}{\end@float}% + \newenvironment{#2*}{\@dblfloat{#2}}{\end@dblfloat}% + \fi % \end{macrocode} % Define the listing command |\listof|\meta{type}(|e|)|s| +% \changes{v1.1}{2013/04/27}{Definition of list hook added} % \begin{macrocode} - \expandafter\newcommand\csname listof#2s\endcsname{\newfloat@listof{#2}}% - \expandafter\newcommand\csname listof#2es\endcsname{\newfloat@listof{#2}}% + \newfloat@def{listof#2}{\newfloat@listof{#2}}% + \newfloat@def{listof#2s}{\@nameuse{listof#2}}% + \newfloat@def{listof#2es}{\@nameuse{listof#2s}}% + \newfloat@def{newfloat@listof#2@hook}{}% \ifdefined\l@figure - \expandafter\let\csname l@#2\endcsname\l@figure + \newfloat@let{l@#2}{\l@figure}% \else - \@namedef{l@#2}{\@dottedtocline{1}{1.5em}{2.3em}}% + \newfloat@def{l@#2}{\@dottedtocline{1}{1.5em}{2.3em}}% \fi - \expandafter\newcommand\csname list#2name\endcsname{}% - \expandafter\xdef\csname list#2name\endcsname{List of \newfloat@Type s}% + \edef\newfloat@tempa{List of \newfloat@Type s}% + \newfloat@let{list#2name}{\newfloat@tempa}% % \end{macrocode} % We undefine |\fst@|\meta{environment} so the new environment % will not be recognized as defined by the \package{float} package. @@ -581,8 +710,8 @@ % \end{macrocode} % Set default parameters % \begin{macrocode} - \newfloat@setplacement{#2}{tbp}% - \newfloat@setfileext{#2}{lo#2}% + \newfloat@ifundefined{fps@#2}{\newfloat@setplacement{#2}{tbp}}% + \newfloat@ifundefined{ext@#2}{\newfloat@setfileext{#2}{lo#2}}% % \end{macrocode} % Apply given options % \begin{macrocode} @@ -611,21 +740,25 @@ % \end{macro} % % \begin{macro}{\newfloat@listof} -% |\newfloat@listof|\marg{float type} typesets the list +% \changes{v1.1}{2013/04/27}{Revised} +% |\newfloat@listof|\marg{float type}\\ +% typesets the list, using |\listoffigure| with patched list name and file extension. % \begin{macrocode} \newcommand*\newfloat@listof[1]{% - \ifcsname listoftoc\endcsname - \expandafter\listoftoc\expandafter{\@nameuse{ext@#1}}% - \else - \begingroup - \expandafter\let\expandafter\listfigurename\csname list#1name\endcsname - \expandafter\let\expandafter\ext@figure\csname ext@#1\endcsname - \let\newfloat@ORI@starttoc\@starttoc - \renewcommand*\@starttoc[1]{% - \expandafter\newfloat@ORI@starttoc\expandafter{\ext@figure}}% - \listoffigures - \endgroup - \fi} + \@expandtwoargs\newfloat@list@of{#1}{\@nameuse{ext@#1}}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*\newfloat@list@of[2]{% + \begingroup + \expandafter\let\expandafter\listfigurename\csname list#1name\endcsname + \def\ext@figure{#2}% + \let\newfloat@starttoc\@starttoc + \def\@starttoc##1{\newfloat@starttoc{#2}}% + \let\newfloat@listoftoc\listoftoc + \def\listoftoc##1{\newfloat@listoftoc{#2}}% + \@nameuse{newfloat@listof#1@hook}% + \listoffigures + \endgroup} % \end{macrocode} % \end{macro} % @@ -864,27 +997,26 @@ \@cons\newfloat@@list{{#1}}% % \end{macrocode} % \begin{macrocode} - \@ifundefined{newfloat@ext@#2}{% + \newfloat@ifundefined{newfloat@ext@#2}{% \@namedef{newfloat@ext@#2}{#1}% % \end{macrocode} % Support of \package{memoir} document class % \begin{macrocode} \ifcsname c@lofdepth\endcsname - \@ifundefined{c@#2depth}{% + \newfloat@ifundefined{c@#2depth}{% \newcounter{#2depth}% - \setcounter{#2depth}{1}% - }{}% + \setcounter{#2depth}{1}}% \fi % \end{macrocode} % Support of \package{tocbasic} package % \begin{macrocode} \ifcsname addtotoclist\endcsname \addtotoclist[float]{#2}% - \@namedef{listof#2name}{\@nameuse{list#1name}}% + \newfloat@def{listof#2name}{\@nameuse{list#1name}}% \fi % \end{macrocode} % \begin{macrocode} - }{}% + }% % \end{macrocode} % Support of \package{titletoc} package % \begin{macrocode} @@ -951,6 +1083,21 @@ % \end{macro} % % \pagebreak[3] +% \subsection{\cs{PrepareListOf}} +% +% \begin{macro}{\PrepareListOf} +% \changes{v1.1}{2013/04/27}{This macro added} +% |\PrepareListOf|\marg{float type}\marg{code}\\ +% adds \meta{code} to the one which prepares typesetting the list, +% just before |\listoffigures|. +% \begin{macrocode} +\newcommand\PrepareListOf[1]{% + \expandafter\g@addto@macro\csname newfloat@listof#1@hook\endcsname} +\@onlypreamble\PrepareListOf +% \end{macrocode} +% \end{macro} +% +% \pagebreak[3] % \subsection{The list of floating environments} % % \begin{macro}{\newfloat@list} @@ -971,8 +1118,7 @@ \ifcsname ext@#1\endcsname \@cons\newfloat@list{{#1}}% \@namedef{newfloat@ext@\@nameuse{ext@#1}}{#1}% - \@ifundefined{@ifchapterlistsgap@#1}{% - \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@iden}{}% + \newfloat@let{@ifchapterlistsgap@#1}{\@iden}% \else \newfloat@Error{`#1' does not seem to be a floating environment}% \fi}} diff --git a/Master/texmf-dist/source/latex/caption/subcaption.dtx b/Master/texmf-dist/source/latex/caption/subcaption.dtx index 9723413040f..2c37dfc6c89 100644 --- a/Master/texmf-dist/source/latex/caption/subcaption.dtx +++ b/Master/texmf-dist/source/latex/caption/subcaption.dtx @@ -2,7 +2,7 @@ % % This is file `subcaption.dtx'. % -% $Id: subcaption.dtx 68 2013-03-10 09:31:58Z sommerfeldt $ +% $Id: subcaption.dtx 75 2013-04-16 17:57:13Z sommerfeldt $ % $HeadURL: svn+ssh://sommerfeldt@svn.code.sf.net/p/latex-caption/code/trunk/source/subcaption.dtx $ % % Copyright (C) 2007-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) @@ -33,7 +33,7 @@ % \iffalse %<*driver> \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesFile{subcaption.drv}[2012/05/18 v1.1 Adds a sub-caption feature to the caption package] +\ProvidesFile{subcaption.drv}[2013/04/16 v1.1 Adds a sub-caption feature to the caption package] \hbadness=9999 \newcount\hbadness \hfuzz=74pt % Make TeX shut up. %\errorcontextlines=3 % @@ -485,9 +485,10 @@ % |\DeclareCaptionSubType|\oarg{numbering scheme}\marg{type}\\ % |\DeclareCaptionSubType*|\oarg{numbering scheme}\marg{type} % \end{quote} -% For the environments |figure| \& |table| (and all the ones -% defined with |\Declare|\-|Floating|\-|Environment|) this will be done automatically -% by this package, but for others (e.g.~defined with |\newfloat| offered by the +% For the environments |figure| \& |table|, and all the ones +% defined with |\Declare|\-|Floating|\-|Environment| offered by the +% \package{newfloat} package, this will be done automatically, +% but for other environments (e.g.~the ones defined with |\newfloat| offered by the % \package{float} package or |\Declare|\-|New|\-|Float|\-|Type| offered by the % \package{floatrow} package) this has to be done manually. % @@ -902,7 +903,7 @@ \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: subcaption.dtx 68 2013-03-10 09:31:58Z sommerfeldt $ +\caption@tempa $Id: subcaption.dtx 75 2013-04-16 17:57:13Z sommerfeldt $ \ProvidesPackage{subcaption}[\caption@tempa v1.1-\caption@tempb Sub-captions (AR)] % \end{macrocode} % diff --git a/Master/texmf-dist/source/latex/caption/totalcount.dtx b/Master/texmf-dist/source/latex/caption/totalcount.dtx index 37e97712806..efc58d56cda 100644 --- a/Master/texmf-dist/source/latex/caption/totalcount.dtx +++ b/Master/texmf-dist/source/latex/caption/totalcount.dtx @@ -2,7 +2,10 @@ % % This is file `totalcount.dtx'. % -% Copyright (C) 2008 Axel Sommerfeldt +% $Id: totalcount.dtx 90 2013-05-11 12:00:30Z sommerfeldt $ +% $HeadURL: svn+ssh://sommerfeldt@svn.code.sf.net/p/latex-caption/code/trunk/source/totalcount.dtx $ +% +% Copyright (C) 2010-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) % % -------------------------------------------------------------------------- % @@ -18,16 +21,16 @@ % % This Current Maintainer of this work is Axel Sommerfeldt. % -% This work consists of the files totalcount.ins and totalcount.dtx, +% This work consists of the file totalcount.dtx, % and the derived file totalcount.sty. % % \fi -% \CheckSum{107} +% \CheckSum{121} % % \iffalse %<*driver> \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesFile{totalcount.drv}[2008/02/25 v1.0 Total values of counters] +\ProvidesFile{totalcount.drv}[2013/05/11 v1.0 Total values of counters] \hbadness=9999 \newcount\hbadness \hfuzz=74pt % Make TeX shut up. %\errorcontextlines=3 % @@ -58,17 +61,12 @@ \newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}} \newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}} \newcommand*\version[2][]{$v#2$} -\newcommand*\x{\discretionary{-}{}{}} -\newcommand*\xx{\discretionary{}{}{}} % \usepackage{marvosym} -\newcommand*\MARGINSYM[1]{\hskip 1sp \marginpar{\raggedleft\textcolor{blue}{{#1}}}} -\newenvironment{info}{\par\bigskip\csname info*\endcsname}{\csname endinfo*\endcsname} -\newenvironment{info*}% - {\small - \MARGINSYM{\vbox to \ht\strutbox{\LARGE\Info}}% - \ignorespaces}% - {\par} +\makeatletter +\newcommand*\INFO{\@ifstar{\@INFO{}}{\@INFO{\vbox to \ht\strutbox}}} +\newcommand*\@INFO[1]{\MARGINSYM{#1{\LARGE\Info}}} +\makeatother % \begin{document} \DocInput{totalcount.dtx} @@ -87,25 +85,110 @@ % This package has version number \fileversion, last revised \filedate.}}%^^A % {The totalcount package}} % \author{Axel Sommerfeldt\\ -% \url{http://sourceforge.net/projects/latex-caption/}} +% \url{http://sourceforge.net/p/latex-caption/}} % \date{\docdate} % \maketitle % % \begin{abstract} -% TODO\ldots +% This package offers commands for typesetting total values of counters. % \end{abstract} % -% \subsection*{Introduction} -% Based on the idea here:\\ -% \url{http://texnik.dante.de/cgi-bin/mainFAQ.cgi?file=counter/counter#number} -% -% TODO\ldots +% \iffalse\clearpage\fi +% \setcounter{tocdepth}{2} +% \tableofcontents +% +% \iffalse\clearpage\fi +% \pagebreak[3] +% \section{Loading the package} +% +% Load this package using +% \begin{quote} +% |\usepackage|\oarg{options}|{totalcount}|\quad, +% \end{quote} +% where \meta{options} is a list of names of \LaTeX\ counters, e.g.: +% \begin{quote} +% |\usepackage[figure,table]{totalcount}|\quad. +% \end{quote} +% \pagebreak[3] +% This way the commands |\total|\-|figures| and |\total|\-|tables| will be defined which +% are typesetting the total number of figures resp.~tables, e.g.: +% \begin{quote} +% |This document contains \totalfigures\ figures.| +% \end{quote} +% \pagebreak[3] +% Furthermore the commands |\if|\-|total|\-|figures| and |\if|\-|total|\-|tables| are offered +% for typesetting text only if the document contains figures resp.~tables at all, e.g.: +% \begin{quote} +% |\iftotalfigures|\\ +% | \listoffigures|\\ +% |\fi| +% \end{quote} +% \pagebreak[3] +% This should work with other counters as well (for example |equation|), +% but please note that using the |page| counter here is not supported. +% +% \pagebreak[3] +% \section{\cs{DeclareTotalCounter}} +% \begin{quote} +% |\DeclareTotalCounter|\marg{counter} +% \end{quote} +% defines the commands |\total|\meta{counter}|s| and |\if|\-|total|\meta{counter}|s|. +% +% \pagebreak[3] +% So in fact +% \begin{quote} +% |\usepackage[figure,table]{totalcount}| +% \end{quote} +% is identical to +% \begin{quote} +% |\usepackage{totalcount}|\\ +% |\DeclareTotalCounter{figure}|\\ +% |\DeclareTotalCounter{table}| +% \end{quote} +% +% \pagebreak[3] +% \section{Spacing} +% The space after all \LaTeX\ commands without (optional or mandatory) arguments +% like |\total|\-|figures| will not be typeset, +% so these commands needs to be finished with an additional backslash or an empty +% pair of curly braces right before the space character, +% or to be finished with a tilde (swung dash), +% so \TeX\ will be prevented from omitting the following space character. +% +% \pagebreak[3] +% This could be avoided by defining new commands with the help of +% the \package{xspace} package~\cite{xspace}. +% When using \thispackage\ with the package option |xspace| this will be actually done, +% so after +% \begin{quote} +% |\usepackage[figure,table,xspace]{totalcount}| +% \end{quote} +% code like +% \begin{quote} +% |This document contains \totalfigures figures.| +% \end{quote} +% will give correct results without a missing space between the total number of figures +% and the word ``figures''. +% +% \pagebreak[3] +% \section{Thanks} +% I would like to thank Herbert Vo\ss\ since the implementation of this package is +% based on an idea from him which could be found at +% \url{http://texnik.dante.de/cgi-bin/mainFAQ.cgi?file=counter/counter#number}. % % \iffalse % --------------------------------------------------------------------------- % % \fi % -% \StopEventually{}%^^A +% \StopEventually{%^^A +% \begin{thebibliography}{9} +% \bibitem{xspace} +% David Carlisle and Morten H\o gholm:\\ +% \href{http://tug.ctan.org/tex-archive/macros/latex/contrib/xspace/}% +% {\emph{The xspace package}}, +% 2009/10/20 +% \end{thebibliography} +% } % % \iffalse % --------------------------------------------------------------------------- % @@ -174,7 +257,7 @@ % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{totalcount}[2008/02/27 v0.7 Total values of counters (AR)] +\ProvidesPackage{totalcount}[2008/03/09 v1.0 Total values of counters (AR)] % \end{macrocode} % % \subsection{Initial code} @@ -185,24 +268,24 @@ \newcommand*\DeclareTotalCounter[1]{% \@ifundefined{c@#1}% {\PackageError{totalcount}{Undefined counter `#1'}\@ehc}% - {\newcounter{total@#1}% + {\newcounter{totalcount@#1}% \@namedef{total#1s}{\nfss@text{\reset@font\bfseries ??}}% - \@namedef{total#1es}{\nfss@text{\reset@font\bfseries ??}}% -% \PackageWarning{totalcounter}{Total counter `#1' on page \thepage -% \space not\MessageBreak available yet}}% - \@cons\total@counters{{#1}}}} + \@namedef{total#1es}{\@nameuse{total#1s}}% + \expandafter\newif\csname iftotal#1s\endcsname + \@namedef{iftotal#1es}{\@nameuse{iftotal#1s}}% + \@cons\totalcount@counters{{#1}}}} \@onlypreamble\DeclareTotalCounter % \end{macrocode} % \begin{macrocode} -\let\total@counters\@empty +\let\totalcount@counters\@empty % \end{macrocode} % \end{macro} % % \subsection{Declaration of options} % % \begin{macrocode} -\newcommand*\total@xspace{} -\DeclareOption{xspace}{\renewcommand*\total@xspace{\xspace}} +\newcommand*\totalcount@xspace{} +\DeclareOption{xspace}{\renewcommand*\totalcount@xspace{\xspace}} % \end{macrocode} % \begin{macrocode} \DeclareOption*{\expandafter\DeclareTotalCounter\expandafter{\CurrentOption}} @@ -212,28 +295,41 @@ % % \begin{macrocode} \ProcessOptions\relax -\ifx\total@xspace\@empty\else +\ifx\totalcount@xspace\@empty\else \RequirePackage{xspace} \fi % \end{macrocode} % % \subsection{Main code} % -% \begin{macro}{\total@addtocounter} -% |\total@addtocounter|\marg{counter name} +% \begin{macro}{\totalcount@addtocounter} +% |\totalcount@addtocounter|\marg{counter name} % \begin{macrocode} -\newcommand*\total@addtocounter[1]{% - \@ifundefined{c@total@#1}{}{% - \addtocounter{total@#1}{\value{#1}}}} +\newcommand*\totalcount@addtocounter[1]{% + \@ifundefined{c@totalcount@#1}{}{% + \addtocounter{totalcount@#1}{\value{#1}}}} % \end{macrocode} % \end{macro} % % \begin{macro}{\@stpelt} % |\@stpelt|\marg{counter name} % \begin{macrocode} -\let\total@stpelt@ORI\@stpelt +\let\totalcount@stpelt@ORI\@stpelt \renewcommand*\@stpelt[1]{% - \total@addtocounter{#1}\total@stpelt@ORI{#1}} + \totalcount@addtocounter{#1}% + \totalcount@stpelt@ORI{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\totalcount@set} +% |\totalcount@set|\marg{counter name}\marg{value} +% \begin{macrocode} +\newcommand*\totalcount@set[2]{% + \@ifundefined{c@totalcount@#1}{}{% + \global\@namedef{total#1s}{#2\totalcount@xspace}% + \ifnum#2=0\relax \else + \global\@nameuse{total#1strue}% + \fi}} % \end{macrocode} % \end{macro} % @@ -241,19 +337,23 @@ \AtBeginDocument{\AtEndDocument{% \begingroup \@tempswafalse + \if@filesw + \immediate\write\@mainaux{% + \string\providecommand\string\totalcount@set[2]{}}% + \fi \def\@elt#1{% - \total@addtocounter{#1}% - \xdef\total@tempa{\the\value{total@#1}}% - \xdef\total@tempb{\total@tempa\noexpand\total@xspace}% - \expandafter\ifx\csname total#1s\endcsname\total@tempb \else + \totalcount@addtocounter{#1}% + \edef\totalcount@tempa{\the\value{totalcount@#1}}% + \expandafter\let\expandafter\totalcount@tempb\csname total#1s\endcsname + \@expandtwoargs\totalcount@set{#1}{\totalcount@tempa}% + \expandafter\ifx\csname total#1s\endcsname\totalcount@tempb \else \@tempswatrue \fi \if@filesw \immediate\write\@mainaux{% - \string\gdef\string\total#1s{\total@tempa\string\total@xspace}% - \string\gdef\string\total#1es{\total@tempa\string\total@xspace}}% + \string\totalcount@set{#1}{\totalcount@tempa}}% \fi}% - \total@counters + \totalcount@counters \if@tempswa \PackageWarningNoLine{totalcount}{% Total counter(s) have changed.\MessageBreak diff --git a/Master/texmf-dist/tex/latex/caption/bicaption.sty b/Master/texmf-dist/tex/latex/caption/bicaption.sty index d6a126aad03..27735cb0998 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-2013 Axel Sommerfeldt +%% Copyright (C) 1994-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% http://sourceforge.net/projects/latex-caption/ %% @@ -39,7 +39,7 @@ \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 68 2013-03-10 09:31:58Z sommerfeldt $ +\caption@tempa $Id: bicaption.dtx 89 2013-05-02 07:05:20Z sommerfeldt $ \ProvidesPackage{bicaption}[\caption@tempa v1.1-\caption@tempb Bilingual Captions (AR)] \RequirePackage{caption}[2012/12/26] % needs v3.3 or newer \caption@AtBeginDocument{\caption@ifcompatibility{% @@ -237,11 +237,6 @@ \l@addto@macro\caption@warmup{% \let\bicaption\caption@frozen@bicaption}}% \fi} -\newcommand*\bicaption@declarelist[1]{% - \@namedef{listof#1}{\bicaption@listof#1}} -\@onlypreamble\bicaption@declarelist -\def\bicaption@listof#1 {\@nameuse{listof#1}} -\caption@ForEachType{\bicaption@declarelist{#1}} \endinput %% %% End of file `bicaption.sty'. diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty index efabb8d19d0..26e461fd682 100644 --- a/Master/texmf-dist/tex/latex/caption/caption.sty +++ b/Master/texmf-dist/tex/latex/caption/caption.sty @@ -40,9 +40,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: caption.sty 73 2013-04-14 19:40:46Z sommerfeldt $ +\caption@tempa $Id: caption.dtx 89 2013-05-02 07:05:20Z sommerfeldt $ \ProvidesPackage{caption}[\caption@tempa v3.3-\caption@tempb Customizing captions (AR)] -\RequirePackage{caption3}[2012/12/26] % needs v1.5 or newer +\RequirePackage{caption3}[2013/05/01] % needs v1.6 or newer \caption@ifbool{documentclass}{}{% \caption@WarningNoLine{% Unsupported document class (or package) detected,\MessageBreak @@ -709,6 +709,10 @@ } \caption@AtBeginDocument{\caption@redefine} \let\@makecaption\caption@makecaption +\newcommand\phantomcaption{% + \caption@iftype + {\caption@refstepcounter\@captype}% + {\caption@Error{\noexpand\phantomcaption outside float}}}% \caption@AtBeginDocument{% \DeclareCaptionOption{type}{\setcaptiontype{#1}}% \DeclareCaptionOption{type*}{\setcaptiontype*{#1}}% @@ -764,12 +768,7 @@ \newcommand*\caption@typehook{} \newcommand*\caption@iftype{% \caption@ifundefined\@captype\@secondoftwo\@firstoftwo} -\begingroup\expandafter\expandafter\expandafter\endgroup -\expandafter\ifx\csname currentgrouplevel\endcsname\relax - \caption@Debug{TeX engine: TeX} - \let\caption@checkgrouplevel\@gobbletwo -\else - \caption@Debug{TeX engine: e-TeX} +\caption@ifeTeX{% \newcommand*\caption@checkgrouplevel[2]{% \@ifundefined{#1caption@grouplevel}{% \caption@ifundefined\caption@grouplevel{\let\caption@grouplevel\z@}{}% @@ -779,8 +778,10 @@ \else \caption@Warning{\string#2\MessageBreak outside box or environment}% \fi - }{}} -\fi + }{}}% +}{% + \let\caption@checkgrouplevel\@gobbletwo +} \newcommand*\caption@undefinedlabel{% \protect\caption@xref{\caption@labelname}{\on@line}} \DeclareRobustCommand*\caption@xref[2]{% @@ -861,6 +862,7 @@ \newcommand*\caption@Continued@Float[1]{% \edef\caption@tempa{#1}% \ifx\caption@tempa\caption@CFtype + \caption@restorecounters \caption@@ContinuedFloat{#1}% \else \caption@Error{Continued `#1' after `\caption@CFtype'}% @@ -883,10 +885,8 @@ \newcommand*\caption@resetContinuedFloat[1]{% \xdef\caption@CFtype{#1}% \@stpelt{ContinuedFloat}} -\newcommand\phantomcaption{% - \caption@iftype - {\caption@refstepcounter\@captype}% - {\caption@Error{\noexpand\phantomcaption outside float}}}% +\caption@ifundefined\donemaincaptionfalse{}{% + \g@addto@macro\donemaincaptionfalse\caption@savesubcounters} \newcommand*\caption@refstepcounter[1]{% \@ifundefined{c@#1}% {\caption@Error{No float type '#1' defined}}% @@ -1007,11 +1007,19 @@ \fi \c@ContinuedFloat=0\relax \let\caption@setfloatcapt\@firstofone - \caption@setbox{parbox}% + \caption@setbox{none}% \caption@clearmargin \caption@iflist{}{\let\caption@setlist\@gobble}% \caption@setoptions{sub}% \caption@setoptions{subfloat}% for subfig-package compatibility + \def\caption@settype{\caption@withoptargs\caption@sub@settype}% + \def\caption@sub@settype##1##2{% + \def\caption@tempa{##2}% + \ifx\caption@tempa\@captype +%%% \caption@setsubtype##1\relax + \else + \caption@Error{##2 inside \@subcaptype}% + \fi}% \let\caption\caption@subcaption \let\phantomcaption\caption@subphantom \if@subfloatrow @@ -1162,61 +1170,63 @@ \caption@setbool{needfreeze}{0} \caption@AtBeginDocument*{% \caption@ifneedfreeze{% - \newcommand*\caption@freeze[1]{% - \caption@settype*{#1}% - \captionsetup*[sub]{hypcap=true}% Note: This is just a (q&d) workaround! - \let\caption@frozen@ContinuedFloat\ContinuedFloat - \def\ContinuedFloat{% - \caption@@freeze{\caption@@@ContinuedFloat\@captype}% - \caption@frozen@ContinuedFloat}% - \let\caption@frozen@setup\caption@setup - \def\caption@setup##1{% - \caption@@freeze{\caption@setup{##1}}% - \caption@frozen@setup{##1}}% - \let\caption@frozen@caption\caption - \def\caption{% + \newcommand*\caption@freezetype[1]{% + \caption@settype*{#1}% + \captionsetup*[sub]{hypcap=true}% Note: This is just a (q&d) workaround! + \caption@freeze}% + \newcommand*\caption@freeze{% + \let\caption@frozen@ContinuedFloat\ContinuedFloat + \def\ContinuedFloat{% + \caption@@freeze{\caption@@@ContinuedFloat\@captype}% + \caption@frozen@ContinuedFloat}% + \let\caption@frozen@setup\caption@setup + \def\caption@setup##1{% + \caption@@freeze{\caption@setup{##1}}% + \caption@frozen@setup{##1}}% + \let\caption@frozen@caption\caption \def\caption{% - \caption@Error{% - Only one \noexpand\caption can be placed in this environment}% - \caption@gobble}% - \@ifstar - {\caption@SC@caption*}% - {\let\@currentlabel\caption@SClabel - \caption@withoptargs\caption@SC@caption}}% - \long\def\caption@SC@caption##1##2{% - \caption@@freeze{\caption##1{##2}}% - \ignorespaces}% - \let\caption@frozen@label\label - \def\label{% - \caption@withoptargs\caption@SC@label}% - \def\caption@SC@label##1##2{% - \ifx\@currentlabel\caption@SClabel - \@bsphack - \caption@freeze@label{##1}{##2}% - \@esphack - \else - \caption@frozen@label##1{##2}% - \fi}% - \def\caption@SClabel{\caption@undefinedlabel}% - \def\caption@freeze@label##1##2{% - \caption@@freeze{\label##1{##2}}}% - \global\let\caption@frozen@content\@empty - \long\def\caption@@freeze{% - \g@addto@macro\caption@frozen@content}% - \def\caption@warmup{% - \let\ContinuedFloat\caption@frozen@ContinuedFloat - \let\caption@setup\caption@frozen@setup - \let\caption\caption@frozen@caption - \let\label\caption@frozen@label}}% + \def\caption{% + \caption@Error{% + Only one \noexpand\caption can be placed in this environment}% + \caption@gobble}% + \@ifstar + {\caption@SC@caption*}% + {\let\@currentlabel\caption@SClabel + \caption@withoptargs\caption@SC@caption}}% + \long\def\caption@SC@caption##1##2{% + \caption@@freeze{\caption##1{##2}}% + \ignorespaces}% + \let\caption@frozen@label\label + \def\label{% + \caption@withoptargs\caption@SC@label}% + \def\caption@SC@label##1##2{% + \ifx\@currentlabel\caption@SClabel + \@bsphack + \caption@freeze@label{##1}{##2}% + \@esphack + \else + \caption@frozen@label##1{##2}% + \fi}% + \def\caption@SClabel{\caption@undefinedlabel}% + \def\caption@freeze@label##1##2{% + \caption@@freeze{\label##1{##2}}}% + \global\let\caption@frozen@content\@empty + \long\def\caption@@freeze{% + \g@addto@macro\caption@frozen@content}% + \def\caption@warmup{% + \let\ContinuedFloat\caption@frozen@ContinuedFloat + \let\caption@setup\caption@frozen@setup + \let\caption\caption@frozen@caption + \let\label\caption@frozen@label}}% \newcommand*\caption@prepare@defrost{% \let\caption@settype\caption@set@type} - \newcommand*\caption@defrost{% - \ifx\caption@frozen@caption\@undefined - \caption@frozen@content - \else - \caption@Error{Internal Error:\MessageBreak - \noexpand\caption@defrost in same group as \string\caption@freeze}% - \fi}% + \newcommand*\caption@defrost{% + \ifx\caption@frozen@caption\@undefined + \caption@frozen@content + \else + \caption@Error{Internal Error:\MessageBreak + \noexpand\caption@defrost in same group as \string\caption@freeze}% + \fi}% }{}% \caption@undefbool{needfreeze}} \let\caption@warmup\relax @@ -1303,7 +1313,7 @@ \def\FP@captype{#1}% \begin{lrbox}{\FP@floatCorpusBOX}% \minipage\hsize % changes from LR mode to vertical mode - \caption@freeze{#1}% + \caption@freezetype{#1}% \ignorespaces}% \renewcommand*\FP@floatEnd{% \endminipage @@ -1601,7 +1611,8 @@ \rotatebox{90}{% \ifdim\captionwidth=\z@ \setcaptionwidth{.8\vsize}% - \l@addto@macro\caption@singleline{\caption@setbox{none}}% + \l@addto@macro\caption@singleline{% + \caption@setup{parbox=none}}% \fi \let\caption@calcmargin\relax \caption@@make{#1}{#2}}% @@ -1613,7 +1624,7 @@ \def\SC@zfloat#1#2#3[#4]{% \caption@ORI@SC@zfloat{#1}{#2}{#3}[#4]% \SC@RestoreCommands - \caption@freeze{#2}% + \caption@freezetype{#2}% \let\SC@label\label}% \providecommand*\SC@RestoreCommands{% \let\caption=\SC@orig@caption \let\label=\SC@orig@label}% @@ -1700,15 +1711,15 @@ \let\caption@ORI@threeparttable\threeparttable \renewcommand*\threeparttable{% \caption@settype{table}% - \caption@setposition a% ? - \caption@clearmargin + \caption@setposition a% ? + \caption@clearmargin \caption@setoptions{threeparttable}% \caption@ORI@threeparttable}% \let\caption@ORI@measuredfigure\measuredfigure \renewcommand*\measuredfigure{% \caption@settype{figure}% - \caption@setposition a% ? - \caption@clearmargin + \caption@setposition a% ? + \caption@clearmargin \caption@setoptions{measuredfigure}% \caption@ORI@measuredfigure}% \def\TPT@caption#1[#2]#3{% diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty index c6b49254cd9..c621116bf6e 100644 --- a/Master/texmf-dist/tex/latex/caption/caption3.sty +++ b/Master/texmf-dist/tex/latex/caption/caption3.sty @@ -39,15 +39,26 @@ \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.sty 71 2013-04-14 15:14:26Z sommerfeldt $ -\ProvidesPackage{caption3}[\caption@tempa v1.5-\caption@tempb caption3 kernel (AR)] +\caption@tempa $Id: caption3.dtx 88 2013-05-02 05:15:09Z sommerfeldt $ +\ProvidesPackage{caption3}[\caption@tempa v1.6-\caption@tempb caption3 kernel (AR)] \providecommand*\@nameundef[1]{% \expandafter\let\csname #1\endcsname\@undefined} -\providecommand\l@addto@macro[2]{% - \begingroup - \toks@\expandafter{#1#2}% - \edef\@tempa{\endgroup\def\noexpand#1{\the\toks@}}% - \@tempa} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname currentgrouplevel\endcsname\relax + \PackageInfo{caption3}{TeX engine: TeX} + \let\caption@ifeTeX\@secondoftwo + \providecommand\l@addto@macro[2]{% + \begingroup + \toks@\expandafter{#1#2}% + \xdef\caption@addto@temp{\the\toks@}% + \endgroup + \let#1\caption@addto@temp} +\else + \PackageInfo{caption3}{TeX engine: e-TeX} + \let\caption@ifeTeX\@firstoftwo + \providecommand\l@addto@macro[2]{% + \edef#1{\unexpanded\expandafter{#1#2}}} +\fi \def\bothIfFirst#1#2{% \protected@edef\caption@tempa{#1}% \ifx\caption@tempa\@empty \else @@ -552,7 +563,7 @@ \expandafter{\caption@sls}}} \newcommand*\caption@resetstyle{% \caption@setup{% - box=parbox,boxcolor=white,% + box=none,boxcolor=white,parbox=parbox,% format=plain,labelformat=default,labelsep=colon,textformat=simple,% justification=justified,font=,size=,labelfont=,textfont=,% margin=0pt,minmargin=0,maxmargin=0,% @@ -569,18 +580,24 @@ \global\long\@namedef{caption@box@#1}##1##2{#2}} \@onlypreamble\DeclareCaptionBox \DeclareCaptionOption{box}{\caption@setbox{#1}} -\newcommand*\caption@setbox[1]{% - \@ifundefined{caption@box@#1}% - {\caption@Error{Undefined box `#1'}}% - {\expandafter\let\expandafter\caption@box\csname caption@box@#1\endcsname}} +\DeclareCaptionOption{parbox}{\caption@set@box\caption@parbox{#1}} +\newcommand*\caption@setbox{% + \caption@set@box\caption@box} +\newcommand*\caption@set@box[2]{% + \@ifundefined{caption@box@#2}% + {\caption@Error{Undefined box `#2'}}% + {\expandafter\let\expandafter#1\csname caption@box@#2\endcsname}} \DeclareCaptionBox{empty}{} \DeclareCaptionBox{none}{#2} \DeclareCaptionBox{parbox}{\parbox[b]{#1}{#2}} \DeclareCaptionBox{colorbox}{\colorbox{\caption@boxcolor}{% + \setlength\caption@tempdima{#1}% \addtolength\caption@tempdima{-2\fboxsep}% - \caption@box@parbox\caption@tempdima{#2}}} + \linewidth=\caption@tempdima\hsize=\caption@tempdima + #2}} \DeclareCaptionOption{boxcolor}{\def\caption@boxcolor{#1}} -\def\caption@box@default{\caption@box@parbox} +\DeclareCaptionOption{boxsep}{\setlength\fboxsep{#1}} +\def\caption@box@default{\caption@box@none} \newcommand*\DeclareCaptionFormat{% \caption@teststar\caption@declareformat\@gobble\@firstofone} \@onlypreamble\DeclareCaptionFormat @@ -1069,7 +1086,8 @@ \caption@declarelabelseparator {\caption@ifbeamertemplate{caption name own line}\@gobble\@firstofone} {default} - {\caption@ifbeamertemplate{caption name own line}{\\}{: }} + {\caption@ifbeamertemplate{caption name own line}{\\}% + {\usebeamertemplate{caption label separator}}} \DeclareCaptionDefaultFont{font}{% \usebeamerfont*{caption}% \usebeamercolor[fg]{caption}} @@ -1312,29 +1330,31 @@ \begingroup \caption@stepthecounter \caption@beginhook - \caption@ifslc{\caption@slc{#1}{#2}\caption@singleline\relax}{}% - \caption@calcmargin - \@tempdima\captionmargin - \ifdim\captionmargin@=\z@ \else - \caption@ifoddpage{}{\advance\@tempdima\captionmargin@}% - \fi - \caption@ifh{\advance\@tempdima\caption@indent}% - \hspace\@tempdima - \caption@tempdima\captionwidth - \caption@ifh{\advance\caption@tempdima-\caption@indent}% - \caption@parbox\caption@tempdima{% - \caption@ifh{% - \ifdim\caption@indent=\z@ - \leavevmode - \else - \hskip-\caption@indent - \fi}% - \caption@@@make{#1}{#2}}% - \@tempdima\captionmargin - \ifdim\captionmargin@=\z@ \else - \caption@ifoddpage{\advance\@tempdima\captionmargin@}{}% - \fi - \hspace\@tempdima + \caption@box\linewidth{% + \caption@ifslc{\caption@slc{#1}{#2}\caption@singleline\relax}{}% + \caption@calcmargin + \caption@tempdima\captionmargin + \ifdim\captionmargin@=\z@ \else + \caption@ifoddpage{}{\advance\caption@tempdima\captionmargin@}% + \fi + \caption@ifh{\advance\caption@tempdima\caption@indent}% + \hspace\caption@tempdima + \caption@tempdima\captionwidth + \caption@ifh{\advance\caption@tempdima-\caption@indent}% + \caption@parbox\caption@tempdima{% + \caption@ifh{% + \ifdim\caption@indent=\z@ + \leavevmode + \else + \hskip-\caption@indent + \fi}% + \caption@@@make{#1}{#2}}% + \caption@tempdima\captionmargin + \ifdim\captionmargin@=\z@ \else + \caption@ifoddpage{\advance\caption@tempdima\captionmargin@}{}% + \fi + \hspace\caption@tempdima + }% \caption@endhook \endgroup \global\caption@starfalse} @@ -1410,7 +1430,6 @@ \endgroup} \newcommand*\caption@l@stepcounter[1]{% \advance\csname c@#1\endcsname\@ne\relax} -\newcommand*\caption@parbox{\caption@box} \newcommand*\caption@applyfont{% \caption@hj\captionfont\captionsize} \newcommand\caption@@@make[2]{% @@ -1559,6 +1578,19 @@ \fi} \@onlypreamble\caption@@@@@@declaresublistentry \newcommand*\caption@subtypelist{} +\newcommand*\caption@restorecounters{% + \caption@restore@counters + \global\let\caption@restore@counters\@empty} +\newcommand*\caption@restore@counters{} +\newcommand*\caption@savesubcounters{% + \def\@elt##1{\caption@savecounter{sub##1}}% + \caption@subtypelist + \let\@elt\relax}% +\newcommand*\caption@savecounter[1]{% + \edef\caption@tempa{% + \noexpand\l@addto@macro\noexpand\caption@restore@counters + {\noexpand\setcounter{#1}{\number\value{#1}}}}% + \caption@tempa} \newcommand*\caption@For{\caption@withoptargs\caption@@For} \newcommand\caption@@For[3]{% \caption@AtBeginDocument#1{% diff --git a/Master/texmf-dist/tex/latex/caption/newfloat.sty b/Master/texmf-dist/tex/latex/caption/newfloat.sty index b945f492bbb..c72ffd9ab61 100644 --- a/Master/texmf-dist/tex/latex/caption/newfloat.sty +++ b/Master/texmf-dist/tex/latex/caption/newfloat.sty @@ -6,7 +6,7 @@ %% %% newfloat.dtx (with options: `package') %% -%% Copyright (C) 1994-2013 Axel Sommerfeldt +%% Copyright (C) 1994-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% http://sourceforge.net/projects/latex-caption/ %% @@ -24,17 +24,23 @@ %% %% 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, subcaption.dtx, and newfloat.dtx, -%% the derived files caption.sty, caption2.sty, caption3.sty, -%% bicaption.sty, ltcaption.sty, subcaption.sty, and newfloat.sty, -%% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. +%% This work consists of the files +%% CHANGELOG, README, SUMMARY, caption.ins, +%% caption.dtx, caption2.dtx, caption3.dtx, +%% bicaption.dtx, ltcaption.dtx, subcaption.dtx, +%% newfloat.dtx, and totalcount.dtx +%% the derived files +%% caption.sty, caption2.sty, caption3.sty, +%% bicaption.sty, ltcaption.sty, subcaption.sty, +%% newfloat.sty, and totalcount.sty +%% and the user manuals +%% caption-deu.tex, caption-eng.tex, and caption-rus.tex. %% \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: newfloat.sty 62 2013-02-03 10:40:15Z sommerfeldt $ -\ProvidesPackage{newfloat}[\caption@tempa v1.0-\caption@tempb Defining new floating environments (AR)] +\caption@tempa $Id: newfloat.sty 91 2013-05-11 12:25:57Z sommerfeldt $ +\ProvidesPackage{newfloat}[\caption@tempa v1.1-\caption@tempb Defining new floating environments (AR)] \newcommand*\newfloat@Info[1]{% \PackageInfo{newfloat}{#1}} \newcommand*\newfloat@InfoNoLine[1]{% @@ -45,6 +51,16 @@ If you do not understand this error, please take a closer look\MessageBreak at the documentation of the `newfloat' package.\MessageBreak\@ehc} \RequirePackage{keyval}[1997/11/10] +\newcommand*\newfloat@def[2]{% + \newfloat@ifundefined{#1}{% + \@namedef{#1}{#2}}} +\newcommand*\newfloat@let[2]{% + \newfloat@ifundefined{#1}{% + \expandafter\let\csname #1\endcsname#2}} +\newcommand*\newfloat@ifundefined[2]{% + \@ifundefined{#1}{#2}{% + \newfloat@Info{% + \expandafter\string\csname#1\endcsname\space is already defined}}} \newcommand*\DeclareFloatingEnvironment{% \@testopt\@DeclareFloatingEnvironment{}} \@onlypreamble\DeclareFloatingEnvironment @@ -55,7 +71,7 @@ \edef\@tempa{% \noexpand\g@addto@macro\noexpand\newfloat@Type{\@cdr#2\@nil}}% \@tempa - \newcounter{#2}% + \newfloat@ifundefined{c@#2}{\newcounter{#2}}% \ifdefined\c@float@type % from float package \expandafter\edef\csname ftype@#2\endcsname{\the\value{float@type}}% \addtocounter{float@type}{\value{float@type}}% @@ -71,25 +87,36 @@ \advance\newfloat@ftype\newfloat@ftype \fi\fi \newfloat@Info{float type `#2'=\@nameuse{ftype@#2}}% - \@namedef{fnum@#2}{\@nameuse{#2name}\nobreakspace\@nameuse{the#2}}% - \expandafter\newcommand\csname #2name\endcsname{}% - \expandafter\let\csname #2name\endcsname\newfloat@Type - \@namedef{fleg#2}{\@nameuse{#2name}}% legend naming (memoir) - \@namedef{flegtoc#2}##1{}% - \newenvironment{#2}{\@float{#2}}{\end@float}% - \newenvironment{#2*}{\@dblfloat{#2}}{\end@dblfloat}% - \expandafter\newcommand\csname listof#2s\endcsname{\newfloat@listof{#2}}% - \expandafter\newcommand\csname listof#2es\endcsname{\newfloat@listof{#2}}% + \newfloat@def{fnum@#2}% + {\@nameuse{#2name}\nobreakspace\@nameuse{the#2}}% + \newfloat@let{#2name}{\newfloat@Type}% + \newfloat@def{fleg#2}{\@nameuse{#2name}}% legend naming (memoir) + \newfloat@ifundefined{flegtoc#2}{\@namedef{flegtoc#2}##1{}}% + \ifcsname @tufte@float\endcsname + \newenvironment{#2}[1][htbp]% + {\begin{@tufte@float}[##1]{#2}{}}% + {\end{@tufte@float}}% + \newenvironment{#2*}[1][htbp]% + {\begin{@tufte@float}[##1]{#2}{star}}% + {\end{@tufte@float}}% + \else + \newenvironment{#2}{\@float{#2}}{\end@float}% + \newenvironment{#2*}{\@dblfloat{#2}}{\end@dblfloat}% + \fi + \newfloat@def{listof#2}{\newfloat@listof{#2}}% + \newfloat@def{listof#2s}{\@nameuse{listof#2}}% + \newfloat@def{listof#2es}{\@nameuse{listof#2s}}% + \newfloat@def{newfloat@listof#2@hook}{}% \ifdefined\l@figure - \expandafter\let\csname l@#2\endcsname\l@figure + \newfloat@let{l@#2}{\l@figure}% \else - \@namedef{l@#2}{\@dottedtocline{1}{1.5em}{2.3em}}% + \newfloat@def{l@#2}{\@dottedtocline{1}{1.5em}{2.3em}}% \fi - \expandafter\newcommand\csname list#2name\endcsname{}% - \expandafter\xdef\csname list#2name\endcsname{List of \newfloat@Type s}% + \edef\newfloat@tempa{List of \newfloat@Type s}% + \newfloat@let{list#2name}{\newfloat@tempa}% \expandafter\let\csname fst@#2\endcsname\@undefined - \newfloat@setplacement{#2}{tbp}% - \newfloat@setfileext{#2}{lo#2}% + \newfloat@ifundefined{fps@#2}{\newfloat@setplacement{#2}{tbp}}% + \newfloat@ifundefined{ext@#2}{\newfloat@setfileext{#2}{lo#2}}% \newfloat@setoptions*{#2}{#1}% \@expandtwoargs\newfloat@announce{#2}{\@nameuse{ext@#2}}% \@ifnextchar[\newfloat@DFE@setname\relax} @@ -102,18 +129,18 @@ \KV@@newfloat@listname{#1}} \@onlypreamble\newfloat@DFE@setlistname \newcommand*\newfloat@listof[1]{% - \ifcsname listoftoc\endcsname - \expandafter\listoftoc\expandafter{\@nameuse{ext@#1}}% - \else - \begingroup - \expandafter\let\expandafter\listfigurename\csname list#1name\endcsname - \expandafter\let\expandafter\ext@figure\csname ext@#1\endcsname - \let\newfloat@ORI@starttoc\@starttoc - \renewcommand*\@starttoc[1]{% - \expandafter\newfloat@ORI@starttoc\expandafter{\ext@figure}}% - \listoffigures - \endgroup - \fi} + \@expandtwoargs\newfloat@list@of{#1}{\@nameuse{ext@#1}}} +\newcommand*\newfloat@list@of[2]{% + \begingroup + \expandafter\let\expandafter\listfigurename\csname list#1name\endcsname + \def\ext@figure{#2}% + \let\newfloat@starttoc\@starttoc + \def\@starttoc##1{\newfloat@starttoc{#2}}% + \let\newfloat@listoftoc\listoftoc + \def\listoftoc##1{\newfloat@listoftoc{#2}}% + \@nameuse{newfloat@listof#1@hook}% + \listoffigures + \endgroup} \newcommand*\newfloat@setoptions{% \@ifstar {\newfloat@@setoptions\@firstofone}% @@ -235,19 +262,18 @@ \newcommand*\newfloat@announce[2]{% \@cons\newfloat@list{{#1}}% \@cons\newfloat@@list{{#1}}% - \@ifundefined{newfloat@ext@#2}{% + \newfloat@ifundefined{newfloat@ext@#2}{% \@namedef{newfloat@ext@#2}{#1}% \ifcsname c@lofdepth\endcsname - \@ifundefined{c@#2depth}{% + \newfloat@ifundefined{c@#2depth}{% \newcounter{#2depth}% - \setcounter{#2depth}{1}% - }{}% + \setcounter{#2depth}{1}}% \fi \ifcsname addtotoclist\endcsname \addtotoclist[float]{#2}% - \@namedef{listof#2name}{\@nameuse{list#1name}}% + \newfloat@def{listof#2name}{\@nameuse{list#1name}}% \fi - }{}% + }% \ifcsname contentsuse\endcsname \contentsuse{#1}{#2}% \fi @@ -271,14 +297,16 @@ \edef\@tempa{\def\noexpand\newfloat@hook####1{\the\toks@}}% \@tempa} \providecommand*\newfloat@hook[1]{} +\newcommand\PrepareListOf[1]{% + \expandafter\g@addto@macro\csname newfloat@listof#1@hook\endcsname} +\@onlypreamble\PrepareListOf \newcommand*\newfloat@list{} \newcommand*\newfloat@addtolist[1]{% \newfloat@ifinlist{#1}{}{% \ifcsname ext@#1\endcsname \@cons\newfloat@list{{#1}}% \@namedef{newfloat@ext@\@nameuse{ext@#1}}{#1}% - \@ifundefined{@ifchapterlistsgap@#1}{% - \expandafter\let\csname @ifchapterlistsgap@#1\endcsname\@iden}{}% + \newfloat@let{@ifchapterlistsgap@#1}{\@iden}% \else \newfloat@Error{`#1' does not seem to be a floating environment}% \fi}} diff --git a/Master/texmf-dist/tex/latex/caption/totalcount.sty b/Master/texmf-dist/tex/latex/caption/totalcount.sty index 350bbb2f815..e609df916cf 100644 --- a/Master/texmf-dist/tex/latex/caption/totalcount.sty +++ b/Master/texmf-dist/tex/latex/caption/totalcount.sty @@ -6,7 +6,7 @@ %% %% totalcount.dtx (with options: `package') %% -%% Copyright (C) 1994-2013 Axel Sommerfeldt +%% Copyright (C) 1994-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% http://sourceforge.net/projects/latex-caption/ %% @@ -37,45 +37,58 @@ %% caption-deu.tex, caption-eng.tex, and caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{totalcount}[2008/02/27 v0.7 Total values of counters (AR)] +\ProvidesPackage{totalcount}[2008/03/09 v1.0 Total values of counters (AR)] \newcommand*\DeclareTotalCounter[1]{% \@ifundefined{c@#1}% {\PackageError{totalcount}{Undefined counter `#1'}\@ehc}% - {\newcounter{total@#1}% + {\newcounter{totalcount@#1}% \@namedef{total#1s}{\nfss@text{\reset@font\bfseries ??}}% - \@namedef{total#1es}{\nfss@text{\reset@font\bfseries ??}}% - \@cons\total@counters{{#1}}}} + \@namedef{total#1es}{\@nameuse{total#1s}}% + \expandafter\newif\csname iftotal#1s\endcsname + \@namedef{iftotal#1es}{\@nameuse{iftotal#1s}}% + \@cons\totalcount@counters{{#1}}}} \@onlypreamble\DeclareTotalCounter -\let\total@counters\@empty -\newcommand*\total@xspace{} -\DeclareOption{xspace}{\renewcommand*\total@xspace{\xspace}} +\let\totalcount@counters\@empty +\newcommand*\totalcount@xspace{} +\DeclareOption{xspace}{\renewcommand*\totalcount@xspace{\xspace}} \DeclareOption*{\expandafter\DeclareTotalCounter\expandafter{\CurrentOption}} \ProcessOptions\relax -\ifx\total@xspace\@empty\else +\ifx\totalcount@xspace\@empty\else \RequirePackage{xspace} \fi -\newcommand*\total@addtocounter[1]{% - \@ifundefined{c@total@#1}{}{% - \addtocounter{total@#1}{\value{#1}}}} -\let\total@stpelt@ORI\@stpelt +\newcommand*\totalcount@addtocounter[1]{% + \@ifundefined{c@totalcount@#1}{}{% + \addtocounter{totalcount@#1}{\value{#1}}}} +\let\totalcount@stpelt@ORI\@stpelt \renewcommand*\@stpelt[1]{% - \total@addtocounter{#1}\total@stpelt@ORI{#1}} + \totalcount@addtocounter{#1}% + \totalcount@stpelt@ORI{#1}} +\newcommand*\totalcount@set[2]{% + \@ifundefined{c@totalcount@#1}{}{% + \global\@namedef{total#1s}{#2\totalcount@xspace}% + \ifnum#2=0\relax \else + \global\@nameuse{total#1strue}% + \fi}} \AtBeginDocument{\AtEndDocument{% \begingroup \@tempswafalse + \if@filesw + \immediate\write\@mainaux{% + \string\providecommand\string\totalcount@set[2]{}}% + \fi \def\@elt#1{% - \total@addtocounter{#1}% - \xdef\total@tempa{\the\value{total@#1}}% - \xdef\total@tempb{\total@tempa\noexpand\total@xspace}% - \expandafter\ifx\csname total#1s\endcsname\total@tempb \else + \totalcount@addtocounter{#1}% + \edef\totalcount@tempa{\the\value{totalcount@#1}}% + \expandafter\let\expandafter\totalcount@tempb\csname total#1s\endcsname + \@expandtwoargs\totalcount@set{#1}{\totalcount@tempa}% + \expandafter\ifx\csname total#1s\endcsname\totalcount@tempb \else \@tempswatrue \fi \if@filesw \immediate\write\@mainaux{% - \string\gdef\string\total#1s{\total@tempa\string\total@xspace}% - \string\gdef\string\total#1es{\total@tempa\string\total@xspace}}% + \string\totalcount@set{#1}{\totalcount@tempa}}% \fi}% - \total@counters + \totalcount@counters \if@tempswa \PackageWarningNoLine{totalcount}{% Total counter(s) have changed.\MessageBreak |