texlive[73760] Master/texmf-dist: fontscale (7feb25)

commits+karl at tug.org commits+karl at tug.org
Fri Feb 7 23:14:45 CET 2025


Revision: 73760
          https://tug.org/svn/texlive?view=revision&revision=73760
Author:   karl
Date:     2025-02-07 23:14:44 +0100 (Fri, 07 Feb 2025)
Log Message:
-----------
fontscale (7feb25)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/fontscale/CHANGELOG.md
    trunk/Master/texmf-dist/doc/latex/fontscale/beery.cls
    trunk/Master/texmf-dist/doc/latex/fontscale/fontscale-code.pdf
    trunk/Master/texmf-dist/doc/latex/fontscale/fontscale-code.tex
    trunk/Master/texmf-dist/doc/latex/fontscale/fontscale-table-classic.tex
    trunk/Master/texmf-dist/doc/latex/fontscale/fontscale-table-font-steps.tex
    trunk/Master/texmf-dist/doc/latex/fontscale/fontscale-table-musical.tex
    trunk/Master/texmf-dist/doc/latex/fontscale/fontscale.pdf
    trunk/Master/texmf-dist/doc/latex/fontscale/fontscale.tex
    trunk/Master/texmf-dist/tex/latex/fontscale/fontscale.sty

Modified: trunk/Master/texmf-dist/doc/latex/fontscale/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fontscale/CHANGELOG.md	2025-02-07 22:14:15 UTC (rev 73759)
+++ trunk/Master/texmf-dist/doc/latex/fontscale/CHANGELOG.md	2025-02-07 22:14:44 UTC (rev 73760)
@@ -7,6 +7,13 @@
 
 ## [Unreleased]
 
+## [v3.1.1] - 2025-02-06
+
+### Changed
+- The package no longer removes extra trailing tokens from user input into an
+  integer expression. (This feature had relied on exploiting an implementation
+  detail.)
+
 ## [v3.1.0] - 2025-02-03
 
 ### Added

Modified: trunk/Master/texmf-dist/doc/latex/fontscale/beery.cls
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fontscale/beery.cls	2025-02-07 22:14:15 UTC (rev 73759)
+++ trunk/Master/texmf-dist/doc/latex/fontscale/beery.cls	2025-02-07 22:14:44 UTC (rev 73760)
@@ -6,7 +6,7 @@
 \NeedsTeXFormat{LaTeX2e}[2023-11-01]
 \ProvidesExplClass
   {beery}
-  {2025-02-03}
+  {2025-02-06}
   {0.0.0}
   {}
 
@@ -15,13 +15,13 @@
 % l3kernel version 2023-10-10 added many 'e'-variants.
 \IfExplAtLeastTF { 2023-10-10 } { }
   {
-    \msg_new:nnn { beery } { expl3-out-of-date }
+    \msg_new:nnn { beery } { l3kernel-out-of-date }
       {
         The~ beery~ class~ could~ not~ load.~
         This~ class~ requires~
         L3~ programming~ layer~ version~ 2023-10-10~ or~ newer.
       }
-    \msg_critical:nn { beery } { expl3-out-of-date }
+    \msg_critical:nn { beery } { l3kernel-out-of-date }
   }
 
 \sys_if_engine_luatex:F
@@ -101,16 +101,6 @@
       \hbox:n { initial \ensuremath { \,=\, } #3 }
     \group_end:
   }
-\NewDocumentCommand \Value { >{ \TrimSpaces } m }
-  {
-    \mode_if_math:TF
-      {
-        \msg_error:nne { beery } { math-mode-error }
-          { \token_to_str:N \Value }
-      }
-      { \__beery_print_value:n {#1} }
-  }
-\cs_new_protected:Npn \__beery_print_value:n #1 { \texttt {#1} \@ }
 \NewDocumentCommand \cs { >{ \TrimSpaces } m }
   {
     \mode_if_math:TF
@@ -189,12 +179,12 @@
   }
 \cs_new_protected:Npn \__beery_print_latin:n #1 { \textit {#1} }
 
-\NewDocumentCommand \AllCaps { O { 50 } >{ \TrimSpaces } m }
+\NewDocumentCommand \allcaps { O { 50 } >{ \TrimSpaces } m }
   {
     \mode_if_math:TF
       {
         \msg_error:nne { beery } { math-mode-error }
-          { \token_to_str:N \AllCaps }
+          { \token_to_str:N \allcaps }
       }
       { \__beery_text_all_caps:nn {#1} {#2} }
   }
@@ -203,13 +193,13 @@
     \textls [ \int_eval:n {#1} ] { \text_uppercase:n {#2} }
     \regex_match:NnT \c__beery_ends_in_letter_regex {#2} { \@ }
   }
-\NewDocumentCommand \AllSmallCaps
+\NewDocumentCommand \allsmallcaps
   { >{ \ReverseBoolean } s O { 50 } >{ \TrimSpaces } m }
   {
     \mode_if_math:TF
       {
         \msg_error:nne { beery } { math-mode-error }
-          { \token_to_str:N \AllSmallCaps }
+          { \token_to_str:N \allsmallcaps }
       }
       {
         \IfBooleanTF #1
@@ -374,12 +364,12 @@
 
 % list headings
 % https://tex.stackexchange.com/questions/2644/how-to-prevent-a-page-break-before-an-itemize-list
-\NewDocumentCommand \KeepNextPar { > { \ReverseBoolean } s }
+\NewDocumentCommand \keepnextpar { > { \ReverseBoolean } s }
   {
     \mode_if_math:TF
       {
         \msg_error:nne { beery } { math-mode-error }
-          { \token_to_str:N \KeepNextPar }
+          { \token_to_str:N \keepnextpar }
       }
       {
         \IfBooleanTF #1

Modified: trunk/Master/texmf-dist/doc/latex/fontscale/fontscale-code.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/fontscale/fontscale-code.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fontscale/fontscale-code.tex	2025-02-07 22:14:15 UTC (rev 73759)
+++ trunk/Master/texmf-dist/doc/latex/fontscale/fontscale-code.tex	2025-02-07 22:14:44 UTC (rev 73760)
@@ -20,7 +20,7 @@
 
 Oliver Beery
 
-Version 3.1.0\quad{}3 February 2025
+Version 3.1.1\quad{}6 February 2025
 
 \dochighinput[language=latex/latex3]{fontscale.sty}
 

Modified: trunk/Master/texmf-dist/doc/latex/fontscale/fontscale-table-classic.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fontscale/fontscale-table-classic.tex	2025-02-07 22:14:15 UTC (rev 73759)
+++ trunk/Master/texmf-dist/doc/latex/fontscale/fontscale-table-classic.tex	2025-02-07 22:14:44 UTC (rev 73760)
@@ -1,4 +1,4 @@
-\ProvidesFile{fontscale-table-classic.tex}[2025-02-03]
+\ProvidesFile{fontscale-table-classic.tex}[2025-02-06]
 
 \begin{table}
   \centering

Modified: trunk/Master/texmf-dist/doc/latex/fontscale/fontscale-table-font-steps.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fontscale/fontscale-table-font-steps.tex	2025-02-07 22:14:15 UTC (rev 73759)
+++ trunk/Master/texmf-dist/doc/latex/fontscale/fontscale-table-font-steps.tex	2025-02-07 22:14:44 UTC (rev 73760)
@@ -1,4 +1,4 @@
-\ProvidesFile{fontscale-table-font-steps.tex}[2025-02-03]
+\ProvidesFile{fontscale-table-font-steps.tex}[2025-02-06]
 
 \begin{table}
   \centering

Modified: trunk/Master/texmf-dist/doc/latex/fontscale/fontscale-table-musical.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fontscale/fontscale-table-musical.tex	2025-02-07 22:14:15 UTC (rev 73759)
+++ trunk/Master/texmf-dist/doc/latex/fontscale/fontscale-table-musical.tex	2025-02-07 22:14:44 UTC (rev 73760)
@@ -1,4 +1,4 @@
-\ProvidesFile{fontscale-table-musical.tex}[2025-02-03]
+\ProvidesFile{fontscale-table-musical.tex}[2025-02-06]
 
 \begin{table}
   \centering

Modified: trunk/Master/texmf-dist/doc/latex/fontscale/fontscale.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/fontscale/fontscale.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fontscale/fontscale.tex	2025-02-07 22:14:15 UTC (rev 73759)
+++ trunk/Master/texmf-dist/doc/latex/fontscale/fontscale.tex	2025-02-07 22:14:44 UTC (rev 73760)
@@ -14,7 +14,7 @@
 
 Oliver Beery
 
-Version 3.1.0\quad{}3 February 2025
+Version 3.1.1\quad{}6 February 2025
 
 
 \section{Introduction}
@@ -136,8 +136,8 @@
   \Key{musical}
 \end{mydisplaycode}
 
-The value of the key \Key{typographic-scale} must be \Value{classic-10pt}, \Value{classic-11pt}, \Value{classic-12pt}, or \Value{musical}.
-The initial value is \Value{classic-10pt}.
+The value of the key \Key{typographic-scale} must be \texttt{classic-10pt}, \texttt{classic-11pt}, \texttt{classic-12pt}, or \texttt{musical}.
+The initial value is \texttt{classic-10pt}.
 Sets the font size of each font size command from \cs{tiny} to \cs{Huge} using a classic or musical typographic scale.
 These are common methods of choosing a set of document font sizes.
 The keys \Key{classic-10pt}, \Key{classic-11pt}, \Key{classic-12pt}, and \Key{musical} set the key \Key{typographic-scale} to the corresponding value.
@@ -299,7 +299,7 @@
 
 For clarity, \cs{CurrentFontStep} will be explained in detail.
 If the current font size equals the font size of any font size command from \cs{tiny} to \cs{Huge}, then \cs{CurrentFontStep} expands to the font step of that font size command (Table \ref{table:fontsteps}).
-If not and if the value of the key \Key{typographic-scale} is \Value{musical}, \cs{CurrentFontStep} expands to the font step calculated from the musical typographic scale (Equation \ref{eq:musical}).
+If not and if the value of the key \Key{typographic-scale} is \texttt{musical}, \cs{CurrentFontStep} expands to the font step calculated from the musical typographic scale (Equation \ref{eq:musical}).
 Otherwise, the current font step is undefined and \cs{CurrentFontStep} expands to nothing.
 
 \subsection{More font size commands}
@@ -327,7 +327,7 @@
     }
   \item
   \cs{SetFontStep} will issue an error if the font step is undefined (as explained for \cs{CurrentFontStep} in \S\ref{subsec:expandable}).
-  The font step must equal the font step of any font size command from \cs{tiny} to \cs{Huge} unless the value of the key \Key{typographic-scale} is \Value{musical}.%
+  The font step must equal the font step of any font size command from \cs{tiny} to \cs{Huge} unless the value of the key \Key{typographic-scale} is \texttt{musical}.%
   \footnote{See Footnote \ref{fn:setfontstep}.}
   \cs{SetFontStep*} will always issue an error if the current font step is undefined.
   \item

Modified: trunk/Master/texmf-dist/tex/latex/fontscale/fontscale.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fontscale/fontscale.sty	2025-02-07 22:14:15 UTC (rev 73759)
+++ trunk/Master/texmf-dist/tex/latex/fontscale/fontscale.sty	2025-02-07 22:14:44 UTC (rev 73760)
@@ -10,24 +10,22 @@
 \NeedsTeXFormat{LaTeX2e}[2023-11-01]
 \ProvidesExplPackage
   {fontscale}
-  {2025-02-03}
-  {3.1.0}
+  {2025-02-06}
+  {3.1.1}
   {A flexible interface for setting font sizes}
 
 % l3kernel version 2023-10-10 added many 'e'-variants.
 \IfExplAtLeastTF { 2023-10-10 } { }
   {
-    \msg_new:nnn { fontscale } { expl3-out-of-date }
+    \msg_new:nnn { fontscale } { l3kernel-out-of-date }
       {
         The~ fontscale~ package~ could~ not~ load.~
         This~ package~ requires~
         L3~ programming~ layer~ version~ 2023-10-10~ or~ newer.
       }
-    \msg_critical:nn { fontscale } { expl3-out-of-date }
+    \msg_critical:nn { fontscale } { l3kernel-out-of-date }
   }
 
-% This package does not require any other packages!
-
 %%> \section{Messages}
 
 \msg_new:nnn { fontscale } { key-musical-base-out-of-bounds }
@@ -305,38 +303,31 @@
 
 % Variants of l3kernel functions
 \cs_generate_variant:Nn \msg_error:nnnn { nnv , nne }
-% Used to process user input. Sets an integer/dimen/skip variable from an
-% integer/dimen/skip expression and removes extra trailing tokens, if any. A
-% default unit of 'pt' is appended in the dimen and skip expressions.
-\cs_new_protected:Npn \__fontscale_int_set_from_user:Nn #1#2
+% Sets a dimen/skip variable from a dimen/skip expression, appending a default
+% unit 'pt', and removes extra trailing tokens, if any.
+\cs_new_protected:Npn \__fontscale_dim_set_default_pt:Nn #1#2
   {
     \afterassignment \use_none_delimit_by_q_stop:w
-      #1 = \numexpr #2 \relax
-    \q_stop
-  }
-\cs_new_protected:Npn \__fontscale_dim_set_from_user:Nn #1#2
-  {
-    \afterassignment \use_none_delimit_by_q_stop:w
       #1 = \dimexpr #2 pt \relax
     \q_stop
   }
-\cs_generate_variant:Nn \__fontscale_dim_set_from_user:Nn { c }
-\cs_new_protected:Npn \__fontscale_skip_set_from_user:Nn #1#2
+\cs_generate_variant:Nn \__fontscale_dim_set_default_pt:Nn { c }
+\cs_new_protected:Npn \__fontscale_skip_set_default_pt:Nn #1#2
   {
     \afterassignment \use_none_delimit_by_q_stop:w
       #1 = \glueexpr #2 pt \relax
     \q_stop
   }
-\cs_generate_variant:Nn \__fontscale_skip_set_from_user:Nn { c }
+\cs_generate_variant:Nn \__fontscale_skip_set_default_pt:Nn { c }
 % Argument processors
 \cs_new_protected:Npn \__fontscale_arg_process_dim:n #1
   {
-    \__fontscale_dim_set_from_user:Nn \l__fontscale_tmp_dim {#1}
+    \__fontscale_dim_set_default_pt:Nn \l__fontscale_tmp_dim {#1}
     \tl_set:NV \ProcessedArgument \l__fontscale_tmp_dim
   }
 \cs_new_protected:Npn \__fontscale_arg_process_skip:n #1
   {
-    \__fontscale_skip_set_from_user:Nn \l__fontscale_tmp_skip {#1}
+    \__fontscale_skip_set_default_pt:Nn \l__fontscale_tmp_skip {#1}
     \tl_set:NV \ProcessedArgument \l__fontscale_tmp_skip
   }
 % Used to define \tiny to \Huge. Sets \@currsize only for compatibility. Need
@@ -389,22 +380,14 @@
 
 %%> \section{Define keys}
 
-% Variables not defined with \keys_define:nn.
 \str_new:N \l__fontscale_typographic_scale_str
 \dim_new:N \l__fontscale_musical_base_dim
-\int_new:N \l__fontscale_musical_notes_int
 
-% Used to define .code:n keys.
 \cs_new_protected:Npn \__fontscale_keys_code_musical_base:
   {
-    \__fontscale_dim_set_from_user:Nn \l__fontscale_musical_base_dim
+    \__fontscale_dim_set_default_pt:Nn \l__fontscale_musical_base_dim
       { \l_keys_value_tl }
   }
-\cs_new_protected:Npn \__fontscale_keys_code_musical_notes:
-  {
-    \__fontscale_int_set_from_user:Nn \l__fontscale_musical_notes_int
-      { \l_keys_value_tl }
-  }
 \cs_new_protected:Npn \__fontscale_keys_code_name:
   {
     \tl_if_in:NnTF \l_keys_value_tl { / }
@@ -451,7 +434,7 @@
     , ratio .fp_set:N = \l__fontscale_musical_ratio_fp
     , ratio .value_required:n = true
 
-    , notes .code:n = \__fontscale_keys_code_musical_notes:
+    , notes .int_set:N = \l__fontscale_musical_notes_int
     , notes .value_required:n = true
   }
 \keys_define:nn { fontscale / normalsize }
@@ -717,7 +700,7 @@
           }
       }
       {
-        \__fontscale_dim_set_from_user:Nn \l_fontscale_normalsize_size_dim
+        \__fontscale_dim_set_default_pt:Nn \l_fontscale_normalsize_size_dim
           { \l__fontscale_normalsize_size_tl }
         \dim_compare:nNnF \l_fontscale_normalsize_size_dim > \c_zero_dim
           {
@@ -740,7 +723,7 @@
           }
       }
       {
-        \__fontscale_skip_set_from_user:Nn
+        \__fontscale_skip_set_default_pt:Nn
           \l_fontscale_normalsize_baselineskip_skip
           { \l__fontscale_normalsize_baselineskip_tl }
       }
@@ -868,7 +851,7 @@
       }
     \quark_if_no_value:cF { l__fontscale_#1_size_tl }
       {
-        \__fontscale_dim_set_from_user:cn { l_fontscale_#1_size_dim }
+        \__fontscale_dim_set_default_pt:cn { l_fontscale_#1_size_dim }
           { \use:c { l__fontscale_#1_size_tl } }
         \dim_compare:nNnF { \use:c { l_fontscale_#1_size_dim } } > \c_zero_dim
           {
@@ -906,7 +889,8 @@
           }
       }
       {
-        \__fontscale_skip_set_from_user:cn { l_fontscale_#1_baselineskip_skip }
+        \__fontscale_skip_set_default_pt:cn
+          { l_fontscale_#1_baselineskip_skip }
           { \use:c { l__fontscale_#1_baselineskip_tl } }
       }
   }



More information about the tex-live-commits mailing list.