[latex3-commits] [git/LaTeX3-latex3-latex2e] varioref: dropped \Ref, \labelformat and change of \refstepcounter (now in kernel) (a6e81865)

Frank Mittelbach frank.mittelbach at latex-project.org
Fri Aug 23 16:19:09 CEST 2019


Repository : https://github.com/latex3/latex2e
On branch  : varioref
Link       : https://github.com/latex3/latex2e/commit/a6e81865e5213425c8e33dc4b3422f2ca02c7a25

>---------------------------------------------------------------

commit a6e81865e5213425c8e33dc4b3422f2ca02c7a25
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Fri Aug 23 16:19:09 2019 +0200

    dropped \Ref, \labelformat and change of \refstepcounter (now in kernel)


>---------------------------------------------------------------

a6e81865e5213425c8e33dc4b3422f2ca02c7a25
 required/tools/varioref.dtx | 74 +++++++++------------------------------------
 required/tools/varioref.ins |  2 +-
 2 files changed, 16 insertions(+), 60 deletions(-)

diff --git a/required/tools/varioref.dtx b/required/tools/varioref.dtx
index e7c81499..a9b894ec 100644
--- a/required/tools/varioref.dtx
+++ b/required/tools/varioref.dtx
@@ -14,7 +14,7 @@
 % The latest version of this license is in
 %    https://www.latex-project.org/lppl.txt
 % and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later.
+% version 2008 or later.
 %
 % The list of all files belonging to the LaTeX `Tools Bundle' is
 % given in the file `manifest.txt'.
@@ -246,47 +246,29 @@
 %
 %
 %
-% \DescribeMacro\labelformat
-% \NewIn{2002}
-% A reference via |\ref| produces by default the data associated with
-% the corresponding |\label| command (typically a number); any
-% additional formatting has to be provided by the user. If, for
-% example, references to equations are always to be typeset as
-% ``equation (\textit{number})'', one has to code
-% ``\verb=equation (\ref{=\textit{key}\verb=})=''.  With |\labelformat|
-% the \texttt{varioref} package offers a possibility to generate such
-% frills automatically. The command takes two arguments: the first is
-% the name of a counter and the second is its representation when
-% referenced. This means that for a successful usage, one has to know
-% the counter name being used for generating the label, though in
-% practice this should not pose a problem. The current counter number
-% is picked up as an argument.
-% Here are two examples:
-%\begin{verbatim}
-%  \labelformat{section}{section~#1}
-%  \labelformat{equation}{equation~(#1)}}
-%\end{verbatim}
-%
 %
 % \DescribeMacro\Vref
 % \DescribeMacro\Ref
 % A side effect of using |\labelformat| is that, depending on the
 % defined formatting, it becomes impossible to use |\ref| at the
 % beginning of a sentence (if its replacement text starts with a
-% lowercase letter). To overcome this problem \texttt{varioref}
-% introduces the commands |\Ref| and |\Vref| that behave like
+% lowercase letter).
+% These days the \LaTeX{} kernel provides |\Ref| for this purpose
+% and  \texttt{varioref} additionaly adds |\Vref|.  They behave like
 % |\ref| and |\{vref| except that they uppercase the first token
 % of the generated string.
 %
-% To make |\Ref| or |\Vref| work properly the very first token in
-% the second argument of |\labelformat| has to be a simple \textsc{ascii}
-% letter, otherwise the capitalization will fail or worse, you will end
-% up with some error messages. If you actually need something more
-% complicated in this place (e.g., an accented letter)
-% you have to explicitly surround it with braces, to
-% identify the part that needs to be capitalized. For example, for
-% figure references in the Hungarian language you might want to write
-% |\labelformat{figure}{{\'a}bra~\thefigure}|.
+% To make |\Ref| or |\Vref| work properly the very first token in the
+% second argument of |\labelformat| has to be a simple \textsc{ascii}
+% or UTF-8 letter, otherwise the capitalization will fail or worse,
+% you will end up with some error messages. If you actually need
+% something more complicated in this place (e.g., an accented letter
+% not written as a UTF-8 character) you have to explicitly surround it
+% with braces, to identify the part that needs to be capitalized. For
+% example, for figure references in the Hungarian language you might
+% want to write |\labelformat{figure}{{\'a}bra~\thefigure}| or use
+% |\labelformat{figure}{ábra~\thefigure}| which avoids the brace
+% problem.
 %
 % \DescribeMacro\vpagerefnum
 % If you like to have |\vref| suppress the page number on pages where
@@ -2091,32 +2073,6 @@
 %   |\the...| and surrounding glyphs.
 %  \end{macro}
 %
-%  \begin{macro}{\labelformat}
-%  \changes{v1.4a}{2002/02/24}{Macro added}
-%    A shortcut to set the |\p at ...| macro for a counter. It will pick
-%    up the counter representation as an argument so that it can be
-%    specially formatted.
-%    \begin{macrocode}
-\def\labelformat#1{\expandafter\def\csname p@#1\endcsname##1}
-%    \end{macrocode}
-%  \end{macro}
-%
-%  \begin{macro}{\Ref}
-%  \changes{v1.4a}{2002/02/24}{Macro added}
-%    This macro expands the result of |\ref| and then uppercases the
-%    first token. Only useful if the label was generated via
-%    |\labelformat| and contains some lower case letter at its start. If
-%    the label starts with a complicated construct (e.g., an accented
-%    letter) one has to surround everything that needs uppercasing in
-%    a brace group in the definition of |\labelformat|.\footnote{There
-%    is one problem with this approach: the braces are kept in a
-%    normal \texttt{\textbackslash ref} which might spoil kerning.
-%    Perhaps one day this needs redoing.}
-%    \begin{macrocode}
-\DeclareRobustCommand\Ref[1]{\protected at edef\@tempa{\ref{#1}}%
-   \expandafter\MakeUppercase\@tempa}
-%    \end{macrocode}
-%  \end{macro}
 %
 %  \begin{macro}{\Vref}
 %  \changes{v1.4a}{2002/02/24}{Macro added}
diff --git a/required/tools/varioref.ins b/required/tools/varioref.ins
index 9c705e9f..e436202e 100644
--- a/required/tools/varioref.ins
+++ b/required/tools/varioref.ins
@@ -16,7 +16,7 @@
 %% The latest version of this license is in
 %%    https://www.latex-project.org/lppl.txt
 %% and version 1.3c or later is part of all distributions of LaTeX 
-%% version 2005/12/01 or later.
+%% version 2008 or later.
 %% 
 %% As this file contains legal notices, it is NOT PERMITTED to modify
 %% this file in any way that the legal information placed into





More information about the latex3-commits mailing list