Skip to content

Commit

Permalink
fix for #1622
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankMittelbach committed Jan 13, 2025
1 parent afc5bf6 commit bee4690
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
19 changes: 19 additions & 0 deletions base/doc/ltnews41.tex
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,25 @@ \subsection{\pkg{array}:\ Improve preamble setup code for \texttt{p} and friends
\githubissue{1585}


\subsection[\pkg{varioref}:\ How to make \cs{reftex...}\ empty]
{\pkg{varioref}:\ How to make \cs{reftexafter} and friends empty}

In the unusual case that one wants to make a command such as
\cs{reftextafter} produce nothing one has o get rid of the space that
is automatically placed in front of it. This can be done by simply
defining the command to remove it, e.g.,
\begin{verbatim}
\renewcommand\reftextafter{\unskip}
\end{verbatim}
The \pkg{varioref} package does not test if such strings are empty,
because that would require a lot of tests each time \cs{vref} is used,
and it would nearly always find that the text is not empty. However,
as shown above, the solution for this uncommon case is simple, and it
is now explicitly documented in the package documentation.
%
\githubissue{1622}




%\section{Changes to files in the \pkg{cyrillic} category}
Expand Down
5 changes: 5 additions & 0 deletions required/tools/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
=======================================================================

2025-01-14 Frank Mittelbach <[email protected]>

* varioref.dtx: Describe how to make any of the \reftext...
text strings empty, by using \unskip (gh/1622)

2024-12-27 Frank Mittelbach <[email protected]>

* multicol.dtx (subsection{Tagging support}):
Expand Down
7 changes: 6 additions & 1 deletion required/tools/varioref.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
%<package>\DeclareCurrentRelease{}{2019-10-01}
%<package>
%<package>\ProvidesPackage{varioref}
%<package> [2024/05/23 v1.6g package for extended references (FMi)]
%<package> [2025/01/14 v1.6g package for extended references (FMi)]
% \fi
%
%%
Expand Down Expand Up @@ -452,6 +452,11 @@
% one argument, the symbolic reference string, so that one can make
% use of |\pageref| in its replacement text.
%
% In the somewhat unusual case that you want to make some or all of
% the |\reftext...| texts empty it is necessary to get rid of the
% space that is automatically put in front of them. You can do this by
% defining them to expand to |\unskip|.
%
%
%\DescribeMacro\reftextvario To allow a bit random variation in the
% generated strings one can use the command |\reftextvario| inside the
Expand Down

0 comments on commit bee4690

Please sign in to comment.