diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/caption/caption3.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/caption/caption3.dtx | 131 |
1 files changed, 115 insertions, 16 deletions
diff --git a/Master/texmf-dist/source/latex/caption/caption3.dtx b/Master/texmf-dist/source/latex/caption/caption3.dtx index d6f89bd77d7..86e4e10dea8 100644 --- a/Master/texmf-dist/source/latex/caption/caption3.dtx +++ b/Master/texmf-dist/source/latex/caption/caption3.dtx @@ -25,12 +25,12 @@ % and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. % % \fi -% \CheckSum{3671} +% \CheckSum{3848} % % \iffalse %<*driver> \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesFile{caption3.drv}[2015/09/15 v1.7 Implementation of the caption kernel] +\ProvidesFile{caption3.drv}[2015/09/15 v1.8 Implementation of the caption kernel] \hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up. %\errorcontextlines=3 % @@ -57,7 +57,7 @@ \ifpdf\usepackage{hypdestopt}\fi \hypersetup{pdfkeywords={LaTeX, package, caption},pdfstartpage={},pdfstartview={}} % -\usepackage[debug]{caption3}[2013/01/01] +\usepackage[debug]{caption3}[2018/05/01] % \DeclareRobustCommand*\eTeX{\texorpdfstring {\leavevmode\hbox{$\varepsilon$}-\TeX}% @@ -99,7 +99,7 @@ % This package has version number \fileversion, last revised \filedate.}}%^^A % {the caption kernel}} % \author{Axel Sommerfeldt\\ -% \url{https://github.com/axelsommerfeldt/latex-caption}} +% \url{https://github.com/axelsommerfeldt/caption}} % \date{\docdate} % \maketitle % @@ -198,7 +198,7 @@ % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption3}[2018/04/15 v1.7-167 caption3 kernel (AR)] +\ProvidesPackage{caption3}[2018/05/27 v1.8a caption3 kernel (AR)] % \end{macrocode} % % \subsection{Workaround for bug in package \package{arabtex}} @@ -866,7 +866,7 @@ \expandafter\caption@ifempty@list\csname caption@opt@#2\endcsname {\caption@removefromoptlist{#2}}{}% \caption@tempa{\caption@Warning{% - Option `#1' was not in list `#2'\MessageBreak}}} + Option `#1' was not in list `#2'}}} % \end{macrocode} % \end{macro} % @@ -1751,14 +1751,16 @@ % \changes{v1.2}{2007/12/16}{Caption label format \opt{brace} added} % \changes{v1.7}{2015/09/16}{Caption label format \opt{autodot} added} % \changes{v1.7}{2016/05/22}{Caption label format \opt{autodot} fixed} -% There are five pre-defined label formats, called `empty', `simple', -% `parens', `brace', and `autodot'. +% \changes{v1.8}{2016/05/22}{Caption label format \opt{unnumbered} added} +% There are six pre-defined label formats, called `empty', `simple', +% `parens', `brace', `autodot', and `unnumbered'. % \begin{macrocode} \DeclareCaptionLabelFormat{empty}{} \DeclareCaptionLabelFormat{simple}{\bothIfFirst{#1}{\nobreakspace}#2} \DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{\nobreakspace}(#2)} \DeclareCaptionLabelFormat{brace}{\bothIfFirst{#1}{\nobreakspace}#2)} \DeclareCaptionLabelFormat{autodot}{\bothIfFirst{#1}{\nobreakspace}#2\autodot} +\DeclareCaptionLabelFormat{unnumbered}{#1} % \end{macrocode} % % `default' usually maps to `simple'. @@ -2059,13 +2061,80 @@ \DeclareCaptionFont{tt}{\ttfamily} % \end{macrocode} % +% \changes{v1.7}{2018/05/01}{Missing font sizes \texttt{tiny}, \texttt{LARGE}, \texttt{huge}, and \texttt{Huge} added} % \begin{macrocode} +\DeclareCaptionFont{tiny}{\tiny} \DeclareCaptionFont{scriptsize}{\scriptsize} \DeclareCaptionFont{footnotesize}{\footnotesize} \DeclareCaptionFont{small}{\small} \DeclareCaptionFont{normalsize}{\normalsize} \DeclareCaptionFont{large}{\large} \DeclareCaptionFont{Large}{\Large} +\DeclareCaptionFont{LARGE}{\LARGE} +\DeclareCaptionFont{huge}{\huge} +\DeclareCaptionFont{Huge}{\Huge} +% \end{macrocode} +% +% \changes{v1.8}{2018/05/01}{Font size \texttt{smaller} added} +% \begin{macrocode} +\newcommand\caption@smaller{% + \ifx\@currsize\tiny + \relax + \else\ifx\@currsize\scriptsize + \tiny + \else\ifx\@currsize\footnotesize + \scriptsize + \else\ifx\@currsize\small + \footnotesize + \else\ifx\@currsize\normalsize + \small + \else\ifx\@currsize\large + \normalsize + \else\ifx\@currsize\Large + \large + \else\ifx\@currsize\LARGE + \Large + \else\ifx\@currsize\huge + \LARGE + \else\ifx\@currsize\Huge + \huge + \else + \caption@Warning{% + Cannot determine current font size.\MessageBreak + Try setting it with `size=' explicitly}% + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} +\DeclareCaptionFont{smaller}{\caption@smaller} +% \end{macrocode} +% +% \changes{v1.8}{2018/05/02}{Font size \texttt{larger} added} +% \begin{macrocode} +\newcommand\caption@larger{% + \ifx\@currsize\tiny + \scriptsize + \else\ifx\@currsize\scriptsize + \footnotesize + \else\ifx\@currsize\footnotesize + \small + \else\ifx\@currsize\small + \normalsize + \else\ifx\@currsize\normalsize + \large + \else\ifx\@currsize\large + \Large + \else\ifx\@currsize\Large + \LARGE + \else\ifx\@currsize\LARGE + \huge + \else\ifx\@currsize\huge + \Huge + \else\ifx\@currsize\Huge + \relax + \else + \caption@Warning{% + Cannot determine current font size.\MessageBreak + Try setting it with `size=' explicitly}% + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} +\DeclareCaptionFont{larger}{\caption@larger} % \end{macrocode} % % \changes{v1.3}{2011/01/01}{\package{sansmath} package support added} @@ -2742,6 +2811,7 @@ % \changes{v1.5}{2013/04/27}{The \package{beamer} template \texttt{caption label separator} will be used now} % \changes{v1.7}{2016/05/22}{Re-definition of label format \texttt{simpleMagyar} added to \package{beamer} class support} % \changes{v1.7}{2018/04/15}{Re-definition of label format \texttt{simpleMagyar} revised} +% \changes{v1.7}{2018/05/01}{Definition of \package{beamer} default label font revised} % % \begin{macro}{\caption@ifbeamerclass} % \begin{macrocode} @@ -2790,15 +2860,19 @@ % % \begin{macrocode} \DeclareCaptionLabelFormat{default}{% - \caption@ifbeamertemplate{numbered}{% - \caption@lfmt@simple{#1}{#2}}{#1}} + \caption@ifbeamertemplate{numbered}% + \caption@lfmt@simple + \caption@lfmt@unnumbered + {#1}{#2}} % \end{macrocode} % The \package{magyar} babel package redefines the current label format to a one called |simple|\-|Magyar|, % defined within |\@@magyar@caption|\-|fix| which will be executed |\At|\-|Begin|\-|Document|. % \begin{macrocode} \DeclareCaptionLabelFormat{default@magyar}{% - \caption@ifbeamertemplate{numbered}{% - \caption@lfmt@simple@magyar{#1}{#2}}{#1}} + \caption@ifbeamertemplate{numbered}% + \caption@lfmt@simple@magyar + \caption@lfmt@unnumbered + {#1}{#2}} \@ifundefined{@@magyar@captionfix}\AtBeginDocument\@firstofone{% \@ifundefined{@@magyar@captionfix}{}{% \g@addto@macro\@@magyar@captionfix{% @@ -2815,8 +2889,10 @@ \usebeamerfont*{caption}% \usebeamercolor[fg]{caption}} \DeclareCaptionDefaultFont{labelfont}{% + \setbeamercolor*{caption}{}% avoid setting "caption" color additionally \usebeamercolor[fg]{caption name}% - \usebeamerfont*{caption name}} + \setbeamerfont*{caption}{}% avoid setting "caption" font additionally + \usebeamerfont{caption name}} \DeclareCaptionDefaultJustification{\raggedright} % \end{macrocode} % \begin{macrocode} @@ -3443,15 +3519,20 @@ % \changes{v1.1}{2007/06/13}{Redefinition of \cs{(H@)refstepcounter} added} % \changes{v1.1}{2007/08/12}{Redefinition of \cs{label} improved} % \changes{v1.1c}{2007/10/06}{Definition of \cs{caption@l@stepcounter} added} -% |\caption@prepareslc|\par % \changes{v1.3}{2011/07/07}{Bugfix 11-07-06: Redefinition of \cs{footnote} and \cs{footnotemark} added, redefinition of \cs{stepcounter} and \cs{refstepcounter} dropped} % \changes{v1.4a}{2011/10/21}{Redefinition of \cs{pagenote} from \textsf{memoir} document class added} % \changes{v1.4a}{2011/10/22}{Redefinition of \cs{footnote} revised} % \changes{v1.5}{2013/04/13}{Redefinition os \cs{glsunset} added} +% \changes{v1.8}{2018/01/21}{Redefinition of \cs{endnote} added (thanks to Markus Kohm)} +% \changes{v1.8}{2018/05/16}{Redefinition of \cs{acused} added} +% \changes{v1.8}{2018/05/26}{Definition method changed so it can be pre-defined by other packages} +% \changes{v1.8}{2018/05/27}{Redefinition of \cs{hypertarget} added} +% |\caption@prepareslc|\par % Re-define anything which would disturb the single-line-check. % \begin{macrocode} -\newcommand*\caption@prepareslc{% +\@ifundefined{caption@prepareslc}\def\g@addto@macro\caption@prepareslc{% \let\label\caption@gobble + \let\hypertarget\@gobbletwo % \end{macrocode} % \begin{macrocode} \let\caption@footnotemark@ORI\footnotemark @@ -3460,18 +3541,27 @@ \let\@footnotetext\caption@gobble % \end{macrocode} % \begin{macrocode} + \let\caption@endnotemark@ORI\endnotemark + \def\endnote{\caption@withoptargs\caption@endnote}% + \def\endnotemark{\caption@withoptargs\caption@endnotemark}% \let\@endnotetext\caption@gobble % \end{macrocode} % \begin{macrocode} \let\pagenote\caption@gobble % \end{macrocode} +% Adaption to the \package{acronym} package.\par +% See also \url{https://tex.stackexchange.com/questions/428788} +% \begin{macrocode} + \let\acused\@gobble + \let\AC@placelabel\@gobble +% \end{macrocode} % Adaption to the \package{glossaries} package.\par % Please note that while this adaption is usually sufficient % it could give incorrect measuring results if \cs{gls} is both used % for the very first time and more than once (for a particular acronym). % The alternative would be using internal macros of the % \package{glossaries} package which I would like to avoid.\par -% See also \url{http://tex.stackexchange.com/questions/108368} +% See also \url{https://tex.stackexchange.com/questions/108368} % \begin{macrocode} \let\glsunset\@gobble % \end{macrocode} @@ -3488,6 +3578,15 @@ \endgroup} % \end{macrocode} % \begin{macrocode} +\newcommand\caption@endnote[2]{% + \caption@endnotemark{#1}} +\newcommand\caption@endnotemark[1]{% + \begingroup + \let\stepcounter\caption@l@stepcounter + \caption@endnotemark@ORI#1 + \endgroup} +% \end{macrocode} +% \begin{macrocode} \newcommand*\caption@l@stepcounter[1]{% \advance\csname c@#1\endcsname\@ne\relax} % \end{macrocode} |