texlive[75069] Master/texmf-dist: figureversions (30apr25)
commits+karl at tug.org
commits+karl at tug.org
Wed Apr 30 21:32:31 CEST 2025
Revision: 75069
https://tug.org/svn/texlive?view=revision&revision=75069
Author: karl
Date: 2025-04-30 21:32:31 +0200 (Wed, 30 Apr 2025)
Log Message:
-----------
figureversions (30apr25)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/figureversions/README.md
trunk/Master/texmf-dist/doc/latex/figureversions/figureversions.pdf
trunk/Master/texmf-dist/source/latex/figureversions/figureversions.dtx
trunk/Master/texmf-dist/tex/latex/figureversions/figureversions.sty
Modified: trunk/Master/texmf-dist/doc/latex/figureversions/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/figureversions/README.md 2025-04-30 19:32:22 UTC (rev 75068)
+++ trunk/Master/texmf-dist/doc/latex/figureversions/README.md 2025-04-30 19:32:31 UTC (rev 75069)
@@ -17,8 +17,7 @@
\usepackage{figureversions}
-in the preamble of your LaTeX document. See the
-[PDF documentation](figureversions.pdf) for details.
+in the preamble of your LaTeX document. See the PDF documentation for details.
## License
Modified: trunk/Master/texmf-dist/doc/latex/figureversions/figureversions.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/figureversions/figureversions.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/figureversions/figureversions.dtx 2025-04-30 19:32:22 UTC (rev 75068)
+++ trunk/Master/texmf-dist/source/latex/figureversions/figureversions.dtx 2025-04-30 19:32:31 UTC (rev 75069)
@@ -53,7 +53,8 @@
\end{document}
%</driver>
%<*package>
-\ProvidesExplPackage {figureversions} {2025-04-05} {1.0} {Figure versions}
+\NeedsTeXFormat{LaTeX2e}[2024-11-01]
+\ProvidesExplPackage {figureversions} {2025-04-29} {1.0.1} {Figure versions}
%</package>
% \fi
%
@@ -291,7 +292,7 @@
% \cs{figureversions_new_figurestyle:nnn} \marg{name} \marg{proportional suffixes} \marg{tabular suffixes}
% \end{syntax}
% Defines a new figure style named \meta{name} with corresponding font family
-% suffixes (given as comma-separated lists, maybe empty) for proportional and
+% suffixes (given as comma-separated lists) for proportional and
% tabular figure alignment. For instance, the existing figure style `text'
% is defined by
% \begin{quote}
@@ -318,7 +319,7 @@
% \item \meta{family}|-|\meta{suffix} where the suffix is e.g. |OsF| for
% proportional text figures or |TLF| for tabular lining figures.
% \item \meta{family}\meta{style} where the family is given by a
-% three-letter lowercase identifier and and \emph{style} is either
+% three-letter lowercase identifier and \emph{style} is either
% |j| for text figures or |x| for lining figures.\footnote{Note that
% this scheme does not support different figure alignments.}
% \end{enumerate}
@@ -333,15 +334,15 @@
% \subsection{Interplay with other packages}
%
% Since this package defines the \cs{tbfigures} command to switch to tabular
-% figures, this package plays well and -- in some sense -- enables the
+% figures, it plays well and -- in some sense -- enables the
% \pkg{tabfigures} package\footnote{https://ctan.org/pkg/tabfigures}, which
% patches several \LaTeX\ commands and environments to use tabular figures. If
% you are a document author who uses a font with proportional figures by
-% default, the \pkg{tabfigures} package is warmly recommended (also used in
-% this document for e.g.\ the table of contents).
+% default, then the \pkg{tabfigures} package is warmly recommended (also used
+% in this document for e.g.\ the table of contents).
%
% As mentioned in the introduction, this package replaces the \pkg{fontaxes}
-% package, which -- as of version~1.1 -- is just a wrapper around
+% package, which -- as of version~2 -- is just a wrapper around
% this package, adding some internal commands that
% have historically been used by package authors to define new figure styles.
% If you are the author of a package that depends on \pkg{fontaxes}, please
@@ -501,18 +502,25 @@
% |#1|. Since some figure styles may only exist in a tabular version, use that
% as a fallback. Finally, fall back to |LF|, |OsF|, |TLF| and |TOsF| (in that
% order).
+% \changes{v1.0.1}{2025-04-28}{Fix bug that could lead to infinite loop}
% \begin{macrocode}
\cs_new_protected:Nn \@@_encode_suffix_proportional:N
{
- \prop_get:NVNF \g_@@_figurestyles_proportional_prop
- \l_@@_fontfigurestyle_str \l_tmpa_str
+ \seq_clear:N #1
+ \prop_get:NVN \g_@@_figurestyles_proportional_prop
+ \l_@@_fontfigurestyle_str \l_tmpa_clist
+ \tl_if_eq:NNF \l_tmpa_clist \q_no_value
{
- \prop_get:NVNF \g_@@_figurestyles_tabular_prop
- \l_@@_fontfigurestyle_str \l_tmpa_str
+ \clist_map_inline:Nn \l_tmpa_clist
+ { \seq_if_in:NnF #1 {##1} { \seq_put_right:Nn #1 {##1} } }
}
- \tl_if_eq:NNTF \l_tmpa_str \q_no_value
- { \seq_set_eq:NN #1 \c_empty_seq }
- { \seq_set_from_clist:NN #1 \l_tmpa_str }
+ \prop_get:NVN \g_@@_figurestyles_tabular_prop
+ \l_@@_fontfigurestyle_str \l_tmpa_clist
+ \tl_if_eq:NNF \l_tmpa_clist \q_no_value
+ {
+ \clist_map_inline:Nn \l_tmpa_clist
+ { \seq_if_in:NnF #1 {##1} { \seq_put_right:Nn #1 {##1} } }
+ }
% \end{macrocode}
% Since any given font family might have only a restricted number of figure
% versions (maybe even only tabular ones), we add the well-known suffixes
@@ -534,15 +542,21 @@
% \begin{macrocode}
\cs_new_protected:Nn \@@_encode_suffix_tabular:N
{
- \prop_get:NVNF \g_@@_figurestyles_tabular_prop
- \l_@@_fontfigurestyle_str \l_tmpa_str
+ \seq_clear:N #1
+ \prop_get:NVN \g_@@_figurestyles_tabular_prop
+ \l_@@_fontfigurestyle_str \l_tmpa_clist
+ \tl_if_eq:NNF \l_tmpa_clist \q_no_value
{
- \prop_get:NVN \g_@@_figurestyles_proportional_prop
- \l_@@_fontfigurestyle_str \l_tmpa_str
+ \clist_map_inline:Nn \l_tmpa_clist
+ { \seq_if_in:NnF #1 {##1} { \seq_put_right:Nn #1 {##1} } }
}
- \tl_if_eq:NNTF \l_tmpa_str \q_no_value
- { \seq_set_eq:NN #1 \c_empty_seq }
- { \seq_set_from_clist:NN #1 \l_tmpa_str }
+ \prop_get:NVN \g_@@_figurestyles_proportional_prop
+ \l_@@_fontfigurestyle_str \l_tmpa_clist
+ \tl_if_eq:NNF \l_tmpa_clist \q_no_value
+ {
+ \clist_map_inline:Nn \l_tmpa_clist
+ { \seq_if_in:NnF #1 {##1} { \seq_put_right:Nn #1 {##1} } }
+ }
% \end{macrocode}
% Since any given font family might have only a restricted number of figure
% versions (maybe even only proportional ones), we add the well-known suffixes
@@ -641,8 +655,7 @@
% suffixes corresponding to the proportional version of a figure style
% before it iterates through all suffixes corresponding to the tabular
% versions until the given suffix is found. Does not alter the current
-% figure alignment if a figure style has no tabular version or the suffix
-% is ambiguous.
+% figure alignment the suffix is ambiguous.
% \begin{macrocode}
\cs_new_protected:Nn \@@_decode_suffix:n
{
@@ -650,19 +663,21 @@
\bool_set_false:N \l_tmpa_bool
\prop_map_inline:Nn \g_@@_figurestyles_proportional_prop
{
- \seq_set_from_clist:Nn \l_tmpa_seq {##2}
- \seq_if_in:NVT \l_tmpa_seq \l_tmpa_str
+ \clist_if_in:nVT {##2} \l_tmpa_str
{
\str_set:Nn \l_@@_fontfigurestyle_str {##1}
- \prop_get:NnNT \g_@@_figurestyles_tabular_prop {##1} \l_tmpb_str
+ \prop_get:NnNTF \g_@@_figurestyles_tabular_prop {##1} \l_tmpa_clist
{
- \seq_set_from_clist:NN \l_tmpa_seq \l_tmpb_str
- \seq_if_in:NVF \l_tmpa_seq \l_tmpa_str
+ \clist_if_in:NVF \l_tmpa_clist \l_tmpa_str
{
\str_set_eq:NN \l_@@_fontfigurealignment_str
\c_@@_proportional_str
}
}
+ {
+ \str_set_eq:NN \l_@@_fontfigurealignment_str
+ \c_@@_proportional_str
+ }
\prop_map_break:n { \bool_set_true:N \l_tmpa_bool }
}
}
@@ -670,8 +685,7 @@
{
\prop_map_inline:Nn \g_@@_figurestyles_tabular_prop
{
- \seq_set_from_clist:Nn \l_tmpa_seq {##2}
- \seq_if_in:NVT \l_tmpa_seq \l_tmpa_str
+ \clist_if_in:nVT {##2} \l_tmpa_str
{
\str_set:Nn \l_@@_fontfigurestyle_str {##1}
\str_set_eq:NN \l_@@_fontfigurealignment_str
@@ -995,13 +1009,21 @@
% \begin{macrocode}
\cs_new_protected:Nn \@@_new_figurestyle_proportional:nn
{
- \prop_gput_if_not_in:Nne \g_@@_figurestyles_proportional_prop {#1}
- { \tl_to_str:n {#2} }
+ \clist_set:Ne \l_tmpa_clist { \tl_to_str:n {#2} }
+ \clist_if_empty:NF \l_tmpa_clist
+ {
+ \prop_gput_if_not_in:NnV \g_@@_figurestyles_proportional_prop {#1}
+ \l_tmpa_clist
+ }
}
\cs_new_protected:Nn \@@_new_figurestyle_tabular:nn
{
- \prop_gput_if_not_in:Nne \g_@@_figurestyles_tabular_prop {#1}
- { \tl_to_str:n {#2} }
+ \clist_set:Ne \l_tmpa_clist { \tl_to_str:n {#2} }
+ \clist_if_empty:NF \l_tmpa_clist
+ {
+ \prop_gput_if_not_in:NnV \g_@@_figurestyles_tabular_prop {#1}
+ \l_tmpa_clist
+ }
}
\cs_new_protected:Nn \figureversions_new_figurestyle:nnn
{
Modified: trunk/Master/texmf-dist/tex/latex/figureversions/figureversions.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/figureversions/figureversions.sty 2025-04-30 19:32:22 UTC (rev 75068)
+++ trunk/Master/texmf-dist/tex/latex/figureversions/figureversions.sty 2025-04-30 19:32:31 UTC (rev 75069)
@@ -23,7 +23,8 @@
%% This work consists of the files figureversions.dtx, figureversions.ins and
%% the derived file figureversions.sty.
%%
-\ProvidesExplPackage {figureversions} {2025-04-05} {1.0} {Figure versions}
+\NeedsTeXFormat{LaTeX2e}[2024-11-01]
+\ProvidesExplPackage {figureversions} {2025-04-29} {1.0.1} {Figure versions}
\str_const:Nn \c__figureversions_text_str {text}
\str_const:Nn \c__figureversions_lining_str {lining}
\str_const:Nn \c__figureversions_proportional_str {proportional}
@@ -91,15 +92,21 @@
}
\cs_new_protected:Nn \__figureversions_encode_suffix_proportional:N
{
- \prop_get:NVNF \g__figureversions_figurestyles_proportional_prop
- \l__figureversions_fontfigurestyle_str \l_tmpa_str
+ \seq_clear:N #1
+ \prop_get:NVN \g__figureversions_figurestyles_proportional_prop
+ \l__figureversions_fontfigurestyle_str \l_tmpa_clist
+ \tl_if_eq:NNF \l_tmpa_clist \q_no_value
{
- \prop_get:NVNF \g__figureversions_figurestyles_tabular_prop
- \l__figureversions_fontfigurestyle_str \l_tmpa_str
+ \clist_map_inline:Nn \l_tmpa_clist
+ { \seq_if_in:NnF #1 {##1} { \seq_put_right:Nn #1 {##1} } }
}
- \tl_if_eq:NNTF \l_tmpa_str \q_no_value
- { \seq_set_eq:NN #1 \c_empty_seq }
- { \seq_set_from_clist:NN #1 \l_tmpa_str }
+ \prop_get:NVN \g__figureversions_figurestyles_tabular_prop
+ \l__figureversions_fontfigurestyle_str \l_tmpa_clist
+ \tl_if_eq:NNF \l_tmpa_clist \q_no_value
+ {
+ \clist_map_inline:Nn \l_tmpa_clist
+ { \seq_if_in:NnF #1 {##1} { \seq_put_right:Nn #1 {##1} } }
+ }
\seq_if_in:NVF #1 \c__figureversions_lf_str { \seq_put_right:NV #1 \c__figureversions_lf_str }
\seq_if_in:NVF #1 \c__figureversions_osf_str { \seq_put_right:NV #1 \c__figureversions_osf_str }
\seq_if_in:NVF #1 \c__figureversions_tlf_str { \seq_put_right:NV #1 \c__figureversions_tlf_str }
@@ -107,15 +114,21 @@
}
\cs_new_protected:Nn \__figureversions_encode_suffix_tabular:N
{
- \prop_get:NVNF \g__figureversions_figurestyles_tabular_prop
- \l__figureversions_fontfigurestyle_str \l_tmpa_str
+ \seq_clear:N #1
+ \prop_get:NVN \g__figureversions_figurestyles_tabular_prop
+ \l__figureversions_fontfigurestyle_str \l_tmpa_clist
+ \tl_if_eq:NNF \l_tmpa_clist \q_no_value
{
- \prop_get:NVN \g__figureversions_figurestyles_proportional_prop
- \l__figureversions_fontfigurestyle_str \l_tmpa_str
+ \clist_map_inline:Nn \l_tmpa_clist
+ { \seq_if_in:NnF #1 {##1} { \seq_put_right:Nn #1 {##1} } }
}
- \tl_if_eq:NNTF \l_tmpa_str \q_no_value
- { \seq_set_eq:NN #1 \c_empty_seq }
- { \seq_set_from_clist:NN #1 \l_tmpa_str }
+ \prop_get:NVN \g__figureversions_figurestyles_proportional_prop
+ \l__figureversions_fontfigurestyle_str \l_tmpa_clist
+ \tl_if_eq:NNF \l_tmpa_clist \q_no_value
+ {
+ \clist_map_inline:Nn \l_tmpa_clist
+ { \seq_if_in:NnF #1 {##1} { \seq_put_right:Nn #1 {##1} } }
+ }
\seq_if_in:NVF #1 \c__figureversions_tlf_str { \seq_put_right:NV #1 \c__figureversions_tlf_str }
\seq_if_in:NVF #1 \c__figureversions_tosf_str { \seq_put_right:NV #1 \c__figureversions_tosf_str }
\seq_if_in:NVF #1 \c__figureversions_lf_str { \seq_put_right:NV #1 \c__figureversions_lf_str }
@@ -170,19 +183,21 @@
\bool_set_false:N \l_tmpa_bool
\prop_map_inline:Nn \g__figureversions_figurestyles_proportional_prop
{
- \seq_set_from_clist:Nn \l_tmpa_seq {##2}
- \seq_if_in:NVT \l_tmpa_seq \l_tmpa_str
+ \clist_if_in:nVT {##2} \l_tmpa_str
{
\str_set:Nn \l__figureversions_fontfigurestyle_str {##1}
- \prop_get:NnNT \g__figureversions_figurestyles_tabular_prop {##1} \l_tmpb_str
+ \prop_get:NnNTF \g__figureversions_figurestyles_tabular_prop {##1} \l_tmpa_clist
{
- \seq_set_from_clist:NN \l_tmpa_seq \l_tmpb_str
- \seq_if_in:NVF \l_tmpa_seq \l_tmpa_str
+ \clist_if_in:NVF \l_tmpa_clist \l_tmpa_str
{
\str_set_eq:NN \l__figureversions_fontfigurealignment_str
\c__figureversions_proportional_str
}
}
+ {
+ \str_set_eq:NN \l__figureversions_fontfigurealignment_str
+ \c__figureversions_proportional_str
+ }
\prop_map_break:n { \bool_set_true:N \l_tmpa_bool }
}
}
@@ -190,8 +205,7 @@
{
\prop_map_inline:Nn \g__figureversions_figurestyles_tabular_prop
{
- \seq_set_from_clist:Nn \l_tmpa_seq {##2}
- \seq_if_in:NVT \l_tmpa_seq \l_tmpa_str
+ \clist_if_in:nVT {##2} \l_tmpa_str
{
\str_set:Nn \l__figureversions_fontfigurestyle_str {##1}
\str_set_eq:NN \l__figureversions_fontfigurealignment_str
@@ -394,13 +408,21 @@
}
\cs_new_protected:Nn \__figureversions_new_figurestyle_proportional:nn
{
- \prop_gput_if_not_in:Nne \g__figureversions_figurestyles_proportional_prop {#1}
- { \tl_to_str:n {#2} }
+ \clist_set:Ne \l_tmpa_clist { \tl_to_str:n {#2} }
+ \clist_if_empty:NF \l_tmpa_clist
+ {
+ \prop_gput_if_not_in:NnV \g__figureversions_figurestyles_proportional_prop {#1}
+ \l_tmpa_clist
+ }
}
\cs_new_protected:Nn \__figureversions_new_figurestyle_tabular:nn
{
- \prop_gput_if_not_in:Nne \g__figureversions_figurestyles_tabular_prop {#1}
- { \tl_to_str:n {#2} }
+ \clist_set:Ne \l_tmpa_clist { \tl_to_str:n {#2} }
+ \clist_if_empty:NF \l_tmpa_clist
+ {
+ \prop_gput_if_not_in:NnV \g__figureversions_figurestyles_tabular_prop {#1}
+ \l_tmpa_clist
+ }
}
\cs_new_protected:Nn \figureversions_new_figurestyle:nnn
{
More information about the tex-live-commits
mailing list.