summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/tools
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/tools')
-rw-r--r--Master/texmf-dist/source/latex/tools/array.dtx83
-rw-r--r--Master/texmf-dist/source/latex/tools/varioref.dtx276
-rw-r--r--Master/texmf-dist/source/latex/tools/verbatim.dtx31
-rw-r--r--Master/texmf-dist/source/latex/tools/xr.dtx13
4 files changed, 362 insertions, 41 deletions
diff --git a/Master/texmf-dist/source/latex/tools/array.dtx b/Master/texmf-dist/source/latex/tools/array.dtx
index acfa5609373..ff963d7f514 100644
--- a/Master/texmf-dist/source/latex/tools/array.dtx
+++ b/Master/texmf-dist/source/latex/tools/array.dtx
@@ -29,10 +29,11 @@
%<+package>\providecommand\DeclareCurrentRelease[2]{}
%<+package>
%<+package>\DeclareRelease{}{2016-10-06}{array-2016-10-06.sty}
-%<+package>\DeclareCurrentRelease{}{2019-10-01}
+%<+package>\DeclareRelease{v2.4}{2020-02-10}{array-2020-02-10.sty}
+%<+package>\DeclareCurrentRelease{}{2020-10-01}
%<+package>
%<+package>\ProvidesPackage{array}
-%<+package> [2019/08/31 v2.4l Tabular extension package (FMi)]
+%<+package> [2020/10/01 v2.5c Tabular extension package (FMi)]
%
% \fi
%
@@ -551,14 +552,16 @@
% \item rules can be placed between columns or rows thereby enlarging
% the table.
% \end{enumerate}
-% \texttt{array.sty} implements the second possibility while the
-% default implementation in the \LaTeX{} kernel implements the first
-% concept. Both concepts have their merits but one has to be aware of
-% the individual implications.
+% For vertical rules \texttt{array.sty} implements the second
+% possibility while the default implementation in the \LaTeX{} kernel
+% implements the first concept.
+% Both concepts have their merits but
+% one has to be aware of the individual implications.
% \begin{itemize}
% \item
-% With standard \LaTeX{} adding rules to a table will not affect the
-% width or height of the table (unless double rules are used), e.g.,
+% With standard \LaTeX{} adding vertical rules to a table will
+% not affect the
+% width of the table (unless double rules are used), e.g.,
% changing a preamble from \verb=lll= to \verb=l|l|l= does not
% affect the document other than adding rules to the table. In
% contrast, with \texttt{array.sty} a table that just fit the
@@ -601,6 +604,12 @@
% \end{center}
% \end{itemize}
%
+% Horizontal rules produced with \cs{hline} add to the table height in
+% both implementations but they differ in handling double \cs{hline}s.
+% In contrast a \cs{cline} does not change the table
+% height.\footnote{All a bit inconsistent, but nothing that can be
+% changed after being 30+ years in existence.}
+%
% \subsection{Comparisons with older versions of \texttt{array.sty}}
%
% There are some differences in the way version 2.1 treats incorrect
@@ -730,7 +739,11 @@
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\documentclass{ltxdoc}
-\AtBeginDocument{\DeleteShortVerb{\|}} % undo the default is not used
+% undo the default is not used:
+
+\IfFormatAtLeastTF {2020/10/01}
+ {\AtBeginDocument[ltxdoc]{\DeleteShortVerb{\|}} }
+ {\AtBeginDocument{\DeleteShortVerb{\|}} }
\usepackage{array}
@@ -746,6 +759,7 @@
%\OnlyDescription % comment out for implementation details
%\OldMakeindex % use if your MakeIndex is pre-v2.9
+
\begin{document}
\DocInput{array.dtx}
\end{document}
@@ -2206,8 +2220,13 @@
\let\do@row@strut\relax
% \end{macrocode}
%
+% \cs{@yargarraycr} is the same as in the \LaTeX{} kernel
+% (depending on the date of the kernel with one of the two
+% definitions below). We therefore do not define it again.
+% \changes{v2.5b}{2020/04/22}{Don't define \cs{@yargarraycr} unnecessarily}
% \begin{macrocode}
-\def\@yargarraycr#1{\cr\noalign{\vskip #1}}
+%\def\@yargarraycr#1{\cr\noalign{\@vspace@calcify{#1}}} % 2020-10-01
+%\def\@yargarraycr#1{\cr\noalign{\vskip #1}}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2916,10 +2935,13 @@
%
% We start by producing a single tabular row without any visible
% content that will produce the external reference point in case
-% "[t]" is used.
+% "[t]" is used. We need to suppress the \cs{tabcolsep} in the
+% \cs{multicolumn} in case there wasn't any in the real column.
+%
+% \changes{v2.5c}{2020/07/20}{Suppress all column space (gh/322)}
% \begin{macrocode}
\newcommand{\firsthline}{%
- \multicolumn1c{%
+ \multicolumn1{@{}c@{}}{%
% \end{macrocode}
% Within this row we calculate "\backup@length" to be the height
% plus depth of a standard line. In addition we have to add the
@@ -2936,6 +2958,10 @@
% \begin{macrocode}
\raise\extratabsurround\copy\@arstrutbox
% \end{macrocode}
+% And we should also cancel the guard otherwise we end up with two.
+% \begin{macrocode}
+ \kern-1sp%
+% \end{macrocode}
% Having done all this we end the line and back up by the value of
% "\backup@length" and then finally place our "\hline". This should
% place the line exactly at the right place but keep the reference
@@ -2957,9 +2983,12 @@
% depth of this last line increased by "\extratabsurround" without
% changing the placement "\hline".
%
-% We start by placing the rule followed by an invisible row.
+% We start by placing the rule followed by an invisible row. We
+% need to suppress the \cs{tabcolsep} in the multicol in case there
+% wasn't any in the real column.
+% \changes{v2.5c}{2020/07/20}{Suppress all column space (gh/322)}
% \begin{macrocode}
-\newcommand{\lasthline}{\hline\multicolumn1c{%
+\newcommand{\lasthline}{\hline\multicolumn1{@{}c@{}}{%
% \end{macrocode}
% We now calculate "\backup@length" to be the height and depth of
% two lines plus the width of the rule.
@@ -2977,8 +3006,9 @@
% reference for the whole tabular). Since this row is invisible we
% can enlarge its depth by the desired amount.
% \begin{macrocode}
- \multicolumn1c{%
+ \multicolumn1{@{}c@{}}{%
\lower\extratabsurround\copy\@arstrutbox
+ \kern-1sp%
}%
}
% \end{macrocode}
@@ -3034,14 +3064,18 @@
% alignment which is either "l", "c", or "r" and the second is the
% nominal width of the column.
% \changes{v2.4f}{2017/11/07}{Column type added}
+% \changes{v2.5a}{2020/04/06}{Use \cs{d@llarbegin} and \cs{d@llarend} so
+% that cell is typeset in math mode inside \texttt{array} (gh/297)}
% \begin{macrocode}
\newcolumntype{w}[2]{%
% \end{macrocode}
% Before the cell content we start an "lrbox"-environment to
% collect the cell material into the previously allocated box
-% "\ar@cellbox".
+% "\ar@cellbox". We add \cs{d@llarbegin} (and later \cs{d@llarend})
+% so that the content is typeset in math mode if we are in an
+% \texttt{array} environment.
% \begin{macrocode}
- >{\begin{lrbox}\ar@cellbox}%
+ >{\begin{lrbox}\ar@cellbox\d@llarbegin}%
% \end{macrocode}
% Then comes a specifier for the cell content. We use "c", but
% that doesn't matter as in the end we will always put a box of a
@@ -3056,10 +3090,13 @@
% of the cell content is now in box "\ar@cellbox". As a final step we
% put that box into a "\makebox" using the optional arguments of
% that command to achieve the correct width and the desired
-% alignment within that width.
+% alignment within that width. We unbox the collected material so
+% that any stretchable glue inside can interact with the alignment.
+% \changes{v2.4m}{2020/02/10}{Unbox collected material so that
+% stretchable glue inside can act (gh/270)}
% \begin{macrocode}
- <{\end{lrbox}%
- \makebox[#2][#1]{\usebox\ar@cellbox}}}
+ <{\d@llarend \end{lrbox}%
+ \makebox[#2][#1]{\unhbox\ar@cellbox}}}
% \end{macrocode}
% \end{macro}
@@ -3069,11 +3106,13 @@
% The \texttt{W} is similar but in this case we want a warning if
% the cell content is too wide.
% \changes{v2.4f}{2017/11/07}{Column type added}
+% \changes{v2.5a}{2020/04/06}{Use \cs{d@llarbegin} and \cs{d@llarend} so
+% that cell is typeset in mathmode inside \texttt{array} (gh/297)}
% \begin{macrocode}
\newcolumntype{W}[2]
- {>{\begin{lrbox}\ar@cellbox}%
+ {>{\begin{lrbox}\ar@cellbox\d@llarbegin}%
c%
- <{\end{lrbox}%
+ <{\d@llarend\end{lrbox}%
\let\hss\hfil
\makebox[#2][#1]{\unhbox\ar@cellbox}}}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/tools/varioref.dtx b/Master/texmf-dist/source/latex/tools/varioref.dtx
index 077103eb97a..2bba60465e0 100644
--- a/Master/texmf-dist/source/latex/tools/varioref.dtx
+++ b/Master/texmf-dist/source/latex/tools/varioref.dtx
@@ -40,7 +40,7 @@
%<package>\DeclareCurrentRelease{}{2019-10-01}
%<package>
%<package>\ProvidesPackage{varioref}
-%<package> [2020/01/23 v1.6c package for extended references (FMi)]
+%<package> [2020/08/11 v1.6e package for extended references (FMi)]
% \fi
%
%%
@@ -70,7 +70,7 @@
% \PackageWarning{inputenc}{Unicode character \expandafter
% \UTFviii@splitcsname\string##1\relax
% \MessageBreak
-% not set up for use with LaTeX}^^A
+% not set up for use with LaTeX -- ignored}^^A
% \raisebox{.8pt}{\fboxsep1pt\kern.1pt\fbox{$\cdot$}\kern.1pt}^^A
% }}
% \makeatother
@@ -390,6 +390,8 @@
%\end{verbatim}
% textual references can be suppressed.
%
+%
+%
% \section{Multi-lingual usage}
%
% The package works well together with the babel system if it is
@@ -475,6 +477,19 @@
% describes the range of figures, tables, or whatever the labels refer
% to, the default for English is ``|\ref{#1} to~\ref{#2}|''.
%
+%
+% \NewIn{2020}
+% \DescribeMacro\vrefformat
+% \DescribeMacro\Vrefformat
+% \DescribeMacro\vrefrangeformat
+% \DescribeMacro\fullrefformat
+% In some languages (currently only for Japanese) the generated text
+% has to typeset in different word order to most other (Western) languages.
+% To accomodate for this \cs{vrefformat}, etc.\ has been
+% added to allow to alter this on a per language basis.
+% There should be normally no need to alter the setup. For details see
+% the code section.
+%
% \subsection{\ldots\ if Babel is used}
%
% \begin{itshape} If babel is being used then the above commands need to be
@@ -556,6 +571,7 @@
% |\fullref| is also provided. This command can be used whenever you
% know for sure that label and reference can't fall onto nearby pages.
%
+%
% \StopEventually{\PrintIndex\PrintChanges}
%
%
@@ -708,6 +724,10 @@
\def\reftextfaraway#1{op bladsy~\pageref{#1}}%
\def\reftextpagerange#1#2{op bladsye~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} tot~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
%
@@ -723,6 +743,10 @@
\def\reftextfaraway#1{on page~\pageref{#1}}%
\def\reftextpagerange#1#2{on pages~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} to~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Arabic option text was contributed by Ihab Samir Mattar
@@ -743,6 +767,10 @@
\def\reftextfaraway#1{بالصفحة رقم~\pageref{#1}}%
\def\reftextpagerange#1#2{بالصفحات~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} حتى~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% \end{allowtofu}
@@ -759,6 +787,7 @@
\def\reftextfaraway#1{auf Seite~\pageref{#1}}%
\def\reftextpagerange#1#2{auf Seiten~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} bis~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% \changes{v1.2d}{2000/01/11}{Added naustrian defaults (identical to german)}
@@ -774,6 +803,10 @@
\def\reftextfaraway#1{auf Seite~\pageref{#1}}%
\def\reftextpagerange#1#2{auf Seiten~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} bis~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Text for basque defaults was contributed by
@@ -791,6 +824,10 @@
\def\reftextfaraway#1{~\pageref{#1}. orrialdean}%
\def\reftextpagerange#1#2{~\pageref{#1}--\pageref{#2} orrialdeetan}%
\def\reftextlabelrange#1#2{\ref{#1}.etik \ref{#2}.eraino}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Text for the Bahasa Malaysia defaults was contributed by
@@ -815,6 +852,10 @@
\def\reftextfaraway#1{pada muka surat~\pageref{#1}}%
\def\reftextpagerange#1#2{pada muka surat~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1}--\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Text for brazil defaults was contributed by
@@ -837,6 +878,10 @@
\def\reftextfaraway#1{na p\'agina~\pageref{#1}}%
\def\reftextpagerange#1#2{nas p\'aginas~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Text for Breton defaults was contributed by
@@ -858,6 +903,10 @@
on pages~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\vref@stringwarning\reflabelpagerange
\ref{#1} to~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Text for Bulgarian defaults was contributed by
@@ -892,6 +941,10 @@
\cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyri
~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} \cyrd\cyro~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Text for catalan defaults was contributed by Robert Fuster\\
@@ -910,6 +963,10 @@
\def\reftextpagerange#1#2{a les
p\`agines~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Text for croatian defaults was contributed by \v{S}ime Ungar
@@ -926,6 +983,10 @@
\def\reftextfaraway#1{na stranici~\pageref{#1}}%
\def\reftextpagerange#1#2{na stranicama~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} do~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Defaults for the Czech option provided by Milan Vancura
@@ -943,6 +1004,10 @@
\def\reftextfaraway#1{na stran\v{e}~\pageref{#1}}%
\def\reftextpagerange#1#2{na stran\'ach~\pageref{#1}\--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a\v{z}~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Defaults for Danish provided by Torsten Martinsen
@@ -965,6 +1030,10 @@
\def\reftextfaraway#1{p\aa{} side~\pageref{#1}}%
\def\reftextpagerange#1#2{p\aa{} side~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} til~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Default string for dutch have been contributed by Frank Poppe
@@ -1004,6 +1073,10 @@
% \begin{macrocode}
\def\reftextpagerange#1#2{op pagina's~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1}--\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% \changes{v1.2a}{1998/08/22}{Added english defaults for
@@ -1021,6 +1094,10 @@
\def\reftextfaraway#1{on page~\pageref{#1}}%
\def\reftextpagerange#1#2{on pages~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} to~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
%
@@ -1041,6 +1118,10 @@
\def\reftextfaraway#1{en pa\^go~\pageref{#1}}%
\def\reftextpagerange#1#2{en pa\^goj~\pageref{#1} \^gis \pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} \^gis~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% The finnish strings were suggested by Matti Rintala
@@ -1064,6 +1145,10 @@
% Can't combine numbers with the necessary suffix well.
% \begin{macrocode}
\def\reftextlabelrange#1#2{\ref{#1}--\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% French defaults are provided by Daniel Flippo
@@ -1083,6 +1168,10 @@
\def\reftextfaraway#1{page~\pageref{#1}}%
\def\reftextpagerange#1#2{pages~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} \`a~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Galician defaults are provided by Matthias Moebius\\
@@ -1104,6 +1193,10 @@
\def\reftextpagerange#1#2{%
nas p\'axinas~\pageref{#1}-\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% There are no good variants for German (I think and still think but
@@ -1138,6 +1231,10 @@
\def\reftextfaraway#1{auf Seite~\pageref{#1}}%
\def\reftextpagerange#1#2{auf den Seiten~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} bis~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% \changes{v1.2d}{2000/01/11}{Added ngerman defaults (identical to german)}
@@ -1155,6 +1252,10 @@
\def\reftextfaraway#1{auf Seite~\pageref{#1}}%
\def\reftextpagerange#1#2{auf den Seiten~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} bis~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Defaults for greek suggested by Apostolos Syropoulos\\
@@ -1174,6 +1275,10 @@
\def\reftextpagerange#1#2{stis sel'ides\nobreakspace
\pageref{#1}---\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} ws\nobreakspace\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Icelandic defaults suggested by Thorhallur Sverrisson
@@ -1194,6 +1299,10 @@
\def\reftextfaraway#1{\'{a} s\'{i}{\dh}u~\pageref{#1}}%
\def\reftextpagerange#1#2{\'{a} s\'{i}{\dh}um~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} til~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Defaults for Italian suggested by Giovanni Pensa
@@ -1218,8 +1327,44 @@
\def\reftextfaraway#1{a pagina~\pageref{#1}}%
\def\reftextpagerange#1#2{nelle pagine~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{da~\ref{#1} a~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
+% Defaults for Japanese. It needs a special \cs{vrefformat},
+% \cs{Vrefformat}, \cs{fullrefformat} and \cs{vrefrangeformat}
+% for gramatical reasons. As our standard documentation
+% workflow uses pdf\TeX{} the Japanese letters can't be displayed
+% easily, so you will see missing glyphs below. To see the real
+% letters you have to look at the source or package file.
+% \changes{v1.6d}{2020/07/20}{Option japanese added (gh/352)}
+% \changes{v1.6e}{2020/07/25}{Option japanese changed (gh/352)}
+% \begin{allowtofu}
+% \begin{macrocode}
+\DeclareOption{japanese}
+ {\vref@addto\extrasjapanese{%
+ \def\reftextfaceafter {\reftextvario{見開き}{次}ページ}%
+ \def\reftextfacebefore{\reftextvario{見開き}{前}ページ}%
+ \def\reftextafter {\reftextvario{直後の}{次}ページ}%
+ \def\reftextbefore {\reftextvario{直前の}{前}ページ}%
+ \def\reftextcurrent {\reftextvario{この}{現}ページ}%
+ \def\reftextfaraway#1{\pageref{#1}ページ}%
+ \def\reftextpagerange#1#2{\pageref{#1}から\pageref{#2}ページ}%
+ \def\reftextlabelrange#1#2{\ref{#1}から\ref{#2}}%
+% \end{macrocode}
+% Note that the parentheses beow are not normal ones but full width
+% ones U+FF08 and U+FF09!
+% \begin{macrocode}
+ \def\vrefformat#1#2{\ref{#2}(\vpageref[#1]{#2})}%
+ \def\Vrefformat#1#2{\Ref{#2}(\vpageref[#1]{#2})}%
+ \def\fullrefformat#1{\ref{#1}(\reftextfaraway{#1})}%
+ \def\vrefrangeformat#1#2#3{\reftextlabelrange{#2}{#3}%
+ (\vpagerefrange[{#1}]{#2}{#3})}%
+ }}
+% \end{macrocode}
+% \end{allowtofu}
% Defaults for Hungarian by Jeff Goldberg
% (\verb=jeffrey@goldmark.org=).
% There is a problem with the use of the definite article
@@ -1264,6 +1409,10 @@
on pages~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\vref@stringwarning\reflabelpagerange
\ref{#1} to~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}%
% \end{macrocode}
% The |\AtBeginDocument| needs to be executed when the option is
@@ -1304,6 +1453,10 @@
\def\reftextfaraway#1{p\aa{} side~\pageref{#1}}%
\def\reftextpagerange#1#2{p\aa{} side~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} til~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{nynorsk}
{\vref@addto\extrasnynorsk{%
@@ -1315,6 +1468,10 @@
\def\reftextfaraway#1{p\aa{} side~\pageref{#1}}%
\def\reftextpagerange#1#2{p\aa{} side~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} til~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% The polish translations have been provided by
@@ -1342,6 +1499,10 @@
\def\reftextfaraway#1{na stronie~\pageref{#1}}%
\def\reftextpagerange#1#2{na stronach~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{od~\ref{#1} do~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% The portuguese default text has been provided by
@@ -1362,6 +1523,10 @@
\def\reftextfaraway#1{na p\'agina~\pageref{#1}}%
\def\reftextpagerange#1#2{nas p\'aginas~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Updates to the default text for Romanian have been suggested by Florin Oprina
@@ -1381,6 +1546,10 @@
\def\reftextfaraway#1{pe pagina~\pageref{#1}}%
\def\reftextpagerange#1#2{pe paginile~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} la~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% The text for russian was taken from the book in Russian by
@@ -1414,6 +1583,10 @@
\def\reftextpagerange#1#2{\cyrn\cyra\ \cyrs\cyrt\cyrr\cyra\cyrn
\cyri\cyrc\cyra\cyrh~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\cyrs~\ref{#1}\ \cyrp\cyro~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% The text for slovak defaults was contributed by Miroslav Sedivy\\
@@ -1434,6 +1607,10 @@
\def\reftextfaraway#1{na strane~\pageref{#1}}%
\def\reftextpagerange#1#2{na stran\'ach~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a\v z~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% The text for slovene defaults was contributed by Roman Maurer\\
@@ -1450,6 +1627,10 @@
\def\reftextfaraway#1{na strani~\pageref{#1}}%
\def\reftextpagerange#1#2{na straneh~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{od~\ref{#1} do~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% Text for spanish defaults was contributed by Julio Sanchez
@@ -1470,6 +1651,10 @@
\def\reftextpagerange#1#2{en las p\'aginas~\pageref{#1}%
-\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% The text for swedish was contributed by Mats Dahlgren
@@ -1492,6 +1677,10 @@
\def\reftextpagerange#1#2{p\aa\
sidorna~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} till~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{turkish}
{\vref@excuse{turkish}%
@@ -1505,6 +1694,7 @@
\def\reftextfaraway#1{on page~\pageref{#1}}%
\def\reftextpagerange#1#2{on pages~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} to~\ref{#2}}%
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% The text for Ukrainian defaults was contributed by Mykola Lyakhovych\\
@@ -1532,6 +1722,10 @@
\def\reftextpagerange#1#2{\cyrn\cyra\ \cyrs\cyrt\cyro\cyrr\cyrii
\cyrn\cyrk\cyra\cyrh~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\cyrz~\ref{#1}\ \cyrd\cyro~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
+ \let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
% We support francais as an alternative to french since people
@@ -1585,7 +1779,6 @@
% \pkg{babel} package).
% \begin{macrocode}
\ExecuteOptions{english,final,space}
-\ProcessOptions*
% \end{macrocode}
%
%
@@ -2062,11 +2255,26 @@
% |\vpageref|, it that is needed one has to call both commands
% explicitly
% \changes{v1.6a}{2019/08/25}{Command added to support hyperref better}
+% \changes{v1.6e}{2020/07/25}{Changed for Japanese (gh/352)}
+% \begin{macrocode}
+\newcommand\vref@star[1][]{\vrefformat{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\vrefformat,\vrefdefaultformat}
+% Japanese needs a different word order in \cs{vref@star} so this
+% is separated out o that it can be changed on language level.
+% \changes{v1.6e}{2020/07/25}{Macro added (gh/352)}
% \begin{macrocode}
-\newcommand\vref@star[2][]{%
+\def\vrefdefaultformat#1#2{%
\ref{#2}
\vpageref[#1]{#2}}
% \end{macrocode}
+% Most languages need the above definition.
+% \begin{macrocode}
+\let\vrefformat\vrefdefaultformat
+% \end{macrocode}
% \end{macro}
% \begin{macro}{\vr@f}
@@ -2172,8 +2380,24 @@
% \begin{macro}{\fullref}
% And here is the primitive command that always produces a |\ref|
% and a |\pageref|.
+% \changes{v1.6e}{2020/07/25}{Changed for Japanese (gh/352)}
+% \begin{macrocode}
+\newcommand\fullref{\fullrefformat}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\fullrefformat,\fullrefdefaultformat}
+% Japanese needs a different word order in \cs{fullref} so this
+% is separated out o that it can be changed on language level.
+% \changes{v1.6e}{2020/07/25}{Macro added (gh/352)}
% \begin{macrocode}
-\def\fullref#1{\ref{#1} \reftextfaraway{#1}}
+\def\fullrefdefaultformat#1{%
+ \ref{#1} \reftextfaraway{#1}}
+% \end{macrocode}
+% Most languages need the above definition.
+% \begin{macrocode}
+\let\fullrefformat\fullrefdefaultformat
% \end{macrocode}
% \end{macro}
%
@@ -2286,13 +2510,28 @@
% \changes{v1.2a}{1998/08/01}{Macro added}
% \changes{v1.4s}{2006/08/07}
% {Prevent loss of brackets}
+% \changes{v1.6d}{2020/07/20}{Changed for Japanese (gh/352)}
+% Argument two and three are implicitly picked up.
% \begin{macrocode}
-\newcommand\vrefrange[3][\reftextcurrent]
- {\reftextlabelrange{#2}{#3} \vpagerefrange[{#1}]{#2}{#3}}
+\newcommand\vrefrange[1][\reftextcurrent]{\vrefrangeformat{#1}}
% \end{macrocode}
+%
% \end{macro}
%
%
+% \begin{macro}{\vrefrangeformat,\vrefrangedefaultformat}
+% Japanese needs a different word order in \cs{vrefrange} so this
+% is separated out o that it can be changed on language level.
+% \changes{v1.6d}{2020/07/20}{Macro added (gh/352)}
+% \begin{macrocode}
+\def\vrefrangedefaultformat#1#2#3{%
+ \reftextlabelrange{#2}{#3} \vpagerefrange[{#1}]{#2}{#3}}
+% \end{macrocode}
+% Most languages need the above definition.
+% \begin{macrocode}
+\let\vrefrangeformat\vrefrangedefaultformat
+% \end{macrocode}
+% \end{macro}
%
% \begin{macro}{\Vref}
% \changes{v1.4a}{2002/02/24}{Macro added}
@@ -2308,11 +2547,26 @@
%
% \begin{macro}{\Vref@star}
% \changes{v1.6a}{2019/08/25}{Command added to support hyperref better}
+% \changes{v1.6e}{2020/07/25}{Changed for Japanese (gh/352)}
% \begin{macrocode}
-\newcommand\Vref@star[2][]{%
+\newcommand\Vref@star[1][]{\Vrefformat{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\Vrefformat,\Vrefdefaultformat}
+% Japanese needs a different word order in \cs{Vref} so this
+% is separated out o that it can be changed on language level.
+% \changes{v1.6e}{2020/07/25}{Macro added (gh/352)}
+% \begin{macrocode}
+\def\Vrefdefaultformat#1#2{%
\Ref{#2}
\vpageref[#1]{#2}}
% \end{macrocode}
+% Most languages need the above definition.
+% \begin{macrocode}
+\let\Vrefformat\Vrefdefaultformat
+% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\Vr@f}
@@ -2443,6 +2697,12 @@
% \end{macro}
% \end{macro}
%
+% \changes{v1.6e}{2020/07/25}{Move to handle
+% the language-specific reference formats. (gh/352)}
+% \begin{macrocode}
+\ProcessOptions*
+% \end{macrocode}
+%
% \begin{macrocode}
%</package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/tools/verbatim.dtx b/Master/texmf-dist/source/latex/tools/verbatim.dtx
index 121e2d4b39c..e62886e0033 100644
--- a/Master/texmf-dist/source/latex/tools/verbatim.dtx
+++ b/Master/texmf-dist/source/latex/tools/verbatim.dtx
@@ -69,6 +69,8 @@
%\fi
%
%
+% \changes{v1.5u}{2020-07-07}{Typo repair and added a missing comment
+% character}
% \changes{v1.5q}{2003/08/22}{Reintroduced \cs{@noligs}, by popular
% request.}
% \changes{v1.5i}{1996/06/04}{Move setting of verbatim font and
@@ -462,9 +464,12 @@
% the spacing.
% Then we open the file and set the category codes of all special
% characters:
+% \changes{v1.5t}{2020-07-05}{Added quotes around the filename in
+% order to allow a filename with spaces; also added a space and
+% comment-character to allow for thespace dlimited argument.}
% \begin{verbatim}
% \@bsphack
-% \immediate\openout \verbatim@out #1
+% \immediate\openout \verbatim@out "#1" %
% \let\do\@makeother\dospecials
% \catcode`\^^M\active
%\end{verbatim}
@@ -503,7 +508,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{verbatim}
- [2019/11/10 v1.5r LaTeX2e package for verbatim enhancements]
+ [2020-07-07 v1.5u LaTeX2e package for verbatim enhancements]
\@ifundefined{verbatim@@@}{}{\endinput}
% \end{macrocode}
%
@@ -1567,19 +1572,31 @@
% existence of file.}
% |\verbatim@input| first checks whether the file exists, using
% the standard macro |\IfFileExists| which leaves the name of the
-% file found in |\@filef@und|.
-% Then everything is set up as in the |\verbatim| macro.
+% file found in |\@filef@und|.
+% Then everything is set up as in the |\verbatim| macro. But, as
+% |\@verbatim| contains a call to |\every@verbatim| which
+% \emph{might} contain an |\input| statement, which would overwrite
+% the contents of |\@filef@und|, we need to save it by expanding it
+% first. The use of |\@swaptwoargs| makes it so that the
+% \emph{expansion} of |\@filef@und| gets to be the second argument
+% of |\verbatim@readfile|.
+% \changes{v1.5t}{2020-07-06}{Expand \cs{@filef@und} before the call
+% of \cs{@verbatim} (gh/222)}m
% \begin{macrocode}
\def\verbatim@input#1#2{%
- \IfFileExists {#2}{\@verbatim #1\relax
+ \IfFileExists {#2}{%
+ \expandafter\@swaptwoargs\expandafter
+ {\expandafter{\@filef@und}}%
+ {\@verbatim #1\relax
% \end{macrocode}
% Then it reads in the file, finishes off the \texttt{trivlist}
% environment started by |\@verbatim| and closes the group.
% This restores everything to its normal settings.
% \begin{macrocode}
- \verbatim@readfile{\@filef@und}\endtrivlist\endgroup\@doendpe}%
+ \verbatim@readfile}%
+ \endtrivlist\endgroup\@doendpe}%
% \end{macrocode}
-% If the file is not found a more or less helpful message is
+% If the file is not found a more or less helpful message is
% printed. The final |\endgroup| is needed to close the group
% started in |\verbatiminput| above.
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/tools/xr.dtx b/Master/texmf-dist/source/latex/tools/xr.dtx
index a6b2ffd8193..a963886cde7 100644
--- a/Master/texmf-dist/source/latex/tools/xr.dtx
+++ b/Master/texmf-dist/source/latex/tools/xr.dtx
@@ -25,7 +25,7 @@
%
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{xr}
-%<package> [2019/07/22 v5.05 eXternal References (DPC)]
+%<package> [2020-05-10 v5.06 eXternal References (DPC)]
%
%<*driver>
\documentclass{ltxdoc}
@@ -103,12 +103,15 @@
\let\externalcitedocument\externaldocument
% \end{macrocode}
%
-% Save the optional prefix. Start processing the first |aux| file.
+% Save the optional prefix. Start processing the first |aux| file.
+% \changes{v5.06}{2020-05-10}{Remove leading and trailing sapces from
+% the filename (gh/2223)}
% \begin{macrocode}
\def\XR@[#1]#2{{%
\makeatletter
\def\XR@prefix{#1}%
- \XR@next#2.aux\relax\\}}
+ \set@curr@file{#2}%
+ \expandafter\XR@next\@curr@file.aux\relax\\}}
% \end{macrocode}
%
% Process the next |aux| file in the list and remove it from the head of
@@ -135,8 +138,10 @@
% If the |aux| file exists, loop through line by line, looking for
% |\newlabel| and |\@input|. Otherwise process the next file in the
% list.
+% \changes{v5.06}{2020-05-10}{Add braces around the filename to
+% support filenames with spaces (gh/223)}
% \begin{macrocode}
-\def\XR@loop#1{\openin\@inputcheck#1\relax
+\def\XR@loop#1{\openin\@inputcheck{#1}\relax
\ifeof\@inputcheck
\PackageWarning{xr}{^^JNo file #1^^JLABELS NOT IMPORTED.^^J}%
\expandafter\XR@aux