texlive[72614] Master/texmf-dist: fontscale (21oct24)

commits+karl at tug.org commits+karl at tug.org
Mon Oct 21 22:25:26 CEST 2024


Revision: 72614
          https://tug.org/svn/texlive?view=revision&revision=72614
Author:   karl
Date:     2024-10-21 22:25:25 +0200 (Mon, 21 Oct 2024)
Log Message:
-----------
fontscale (21oct24)

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-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	2024-10-21 20:25:16 UTC (rev 72613)
+++ trunk/Master/texmf-dist/doc/latex/fontscale/CHANGELOG.md	2024-10-21 20:25:25 UTC (rev 72614)
@@ -7,6 +7,12 @@
 
 ## [Unreleased]
 
+## [v3.0.1] - 2024-10-20
+
+### Changed
+- Improved the error message when the font size is not a positive length.
+- Documentation improvements.
+
 ## [v3.0.0] - 2024-10-05
 
 ### Added

Modified: trunk/Master/texmf-dist/doc/latex/fontscale/beery.cls
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fontscale/beery.cls	2024-10-21 20:25:16 UTC (rev 72613)
+++ trunk/Master/texmf-dist/doc/latex/fontscale/beery.cls	2024-10-21 20:25:25 UTC (rev 72614)
@@ -4,7 +4,7 @@
 \NeedsTeXFormat{LaTeX2e}[2023-11-01]
 \ProvidesExplClass
   {beery}
-  {2024-10-05}
+  {2024-10-20}
   {}
   {}
 

Modified: trunk/Master/texmf-dist/doc/latex/fontscale/fontscale-table-classic.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fontscale/fontscale-table-classic.tex	2024-10-21 20:25:16 UTC (rev 72613)
+++ trunk/Master/texmf-dist/doc/latex/fontscale/fontscale-table-classic.tex	2024-10-21 20:25:25 UTC (rev 72614)
@@ -1,4 +1,4 @@
-\ProvidesFile{fontscale-table-classic.tex}[2024-10-05]
+\ProvidesFile{fontscale-table-classic.tex}[2024-10-20]
 
 \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	2024-10-21 20:25:16 UTC (rev 72613)
+++ trunk/Master/texmf-dist/doc/latex/fontscale/fontscale-table-font-steps.tex	2024-10-21 20:25:25 UTC (rev 72614)
@@ -1,4 +1,4 @@
-\ProvidesFile{fontscale-table-font-steps.tex}[2024-10-05]
+\ProvidesFile{fontscale-table-font-steps.tex}[2024-10-20]
 
 \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	2024-10-21 20:25:16 UTC (rev 72613)
+++ trunk/Master/texmf-dist/doc/latex/fontscale/fontscale-table-musical.tex	2024-10-21 20:25:25 UTC (rev 72614)
@@ -1,4 +1,4 @@
-\ProvidesFile{fontscale-table-musical.tex}[2024-10-05]
+\ProvidesFile{fontscale-table-musical.tex}[2024-10-20]
 
 \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	2024-10-21 20:25:16 UTC (rev 72613)
+++ trunk/Master/texmf-dist/doc/latex/fontscale/fontscale.tex	2024-10-21 20:25:25 UTC (rev 72614)
@@ -14,7 +14,7 @@
 
 Oliver Beery
 
-Version 3.0.0\quad{}5 October 2024
+Version 3.0.1\quad{}20 October 2024
 
 
 \section{Introduction}
@@ -36,7 +36,7 @@
   \item
   Provides additional font size commands, including setting the font size by setting the font step or font scale and setting the font size relative to the current font size using more powerful tools than the \pkg{scalefnt} and \pkg{relsize} packages (\S\ref{subsec:fontsize}).
   \item
-  For \LaTeX3 programmers, this package defines public \pkg{expl3} variables that store the font step, font scale, font size, and font baselineskip of each font size command from \cs{tiny} to \cs{Huge} and the current font step, font scale, font size, and font baselineskip (\S\ref{sec:programming}).
+  For \LaTeX3 programmers, this package defines public \pkg{expl3} variables that store the font step, font scale, font size, and font baselineskip of each font size command from \cs{tiny} to \cs{Huge} and the current font step, font scale, font size, and font baselineskip (\S\ref{subsec:publicvariables}).
 \end{itemize}
 
 \subsection{Loading the package}
@@ -63,7 +63,7 @@
 Many \LaTeX{} document classes have a font size option (e.g.\ \Key{10pt}, \Key{11pt}, \Key{12pt}) which not only changes the set of document font sizes, but also modifies additional settings such as the page layout and vertical spacing which were specifically designed to work with those font sizes.
 For this reason, you may want to set the document class font size option close to the font size of \cs{normalsize} set by this package.
 
-\listheading{Internally, this package defines each font size command from \cs{tiny} to \cs{Huge} using the low\-/level font commands \cs{fontsize} and \cs{selectfont}\---they have no additional functionality beyond that of \cs{fontsize} and \cs{selectfont}, except that they:}
+\listheading{This package defines each font size command from \cs{tiny} to \cs{Huge} using the low\-/level font commands \cs{fontsize} and \cs{selectfont}\---they have no additional functionality beyond that of \cs{fontsize} and \cs{selectfont}, except that they:}
 \begin{itemize}
   \item
   Set the kernel command \cs{@currsize} equal to the font size command.
@@ -103,7 +103,13 @@
 This package has no package options.
 Set the package keys using \cs{fontscalesetup}\marg{key\-/value list} (\S\ref{subsec:fontscalesetup}).
 
-\subsection{The typographic scale}
+\subsection
+  {%
+    The key
+    \texorpdfstring
+      {\texttt{typographic-scale}}
+      {typographic-scale}%
+  }
 \label{subsec:typographicscale}
 
 The font sizes of the font size commands from \cs{tiny} to \cs{Huge} are initially set by the key \Key{typographic-scale}.
@@ -172,7 +178,13 @@
 
 \input{./fontscale-table-musical.tex}
 
-\subsection{The baselineskip-size-ratio}
+\subsection
+  {%
+    The key
+    \texorpdfstring
+      {\texttt{baselineskip-size-ratio}}
+      {baselineskip-size-ratio}%
+  }
 \label{subsec:baselineskipsizeratio}
 
 The font baselineskips of the font size commands from \cs{tiny} to \cs{Huge} are initially set by the key \Key{baselineskip-size-ratio}.
@@ -238,12 +250,13 @@
 
 Sets and processes the \pkg{fontscale} package keys (\S\ref{sec:keys}) in \meta{key\-/value list} and then uses \cs{normalsize}.
 Adding the optional star first resets all the \pkg{fontscale} package keys to their initial values.
+The order of the keys in \meta{key\-/value list} does not affect how the keys are processed (unless a key is set more than once).
 Can be used mid\-/document.
 The effect is local to the current group.
 Does nothing, except issue a warning, if used in math mode.
 \cs{fontscalesetup} should typically be used only once in the preamble or omitted if the user is satisfied with the initial font sizes and font baselineskips.
 
-\subsection{Expandable commands}
+\subsection{Expandable font size parameters}
 \label{subsec:expandable}
 
 \cs{CurrentFontStep}
@@ -256,6 +269,7 @@
 
 This package provides expandable commands that expand to the current font step, font scale, font size, or font baselineskip.
 They can be used for printing or within calculations.
+These commands do not rely on the current definition of the kernel commands \cs{f at size} and \cs{f at baselineskip}; instead, they rely on public \pkg{expl3} variables that are set in the \texttt{selectfont} hook (\S\ref{subsec:publicvariables}).
 
 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}).
@@ -378,17 +392,14 @@
 
 \cs{text_purify:n} will correctly remove the formatting commands defined by this package, including the commands documented in \S\ref{subsec:fontscalesetup}, \S\ref{subsec:fontsize}, and \S\ref{subsec:setfontbaselineskip}.
 
-\subsection{Public functions and variables}
-\label{subsec:publicexpl3}
+\subsection{Public functions}
+\label{subsec:publicfunctions}
 
 This package does not define any public \pkg{expl3} functions.
 
-This package defines public \pkg{expl3} variables that store the font step, font scale, font size, and font baselineskip of each font size command from \cs{tiny} to \cs{Huge}.
-These variables, excluding the constants, are set by \cs{fontscalesetup}.
-They should never be modified directly.
+\subsection{Public variables}
+\label{subsec:publicvariables}
 
-Each takes the form:
-
 \verb|\c_fontscale_|\meta{font size command}\verb|_step_fp|
 \nopagebreak\newline
 \verb|\l_fontscale_|\meta{font size command}\verb|_scale_fp|
@@ -397,12 +408,11 @@
 \nopagebreak\newline
 \verb|\l_fontscale_|\meta{font size command}\verb|_baselineskip_skip|
 
+Stores the font step, font scale, font size, and font baselineskip of each font size command from \cs{tiny} to \cs{Huge}.
 Exception:
 \cs{l_fontscale_normalsize_scale_fp} is not defined.
 The font scale of \cs{normalsize} is stored in \cs{c_fontscale_normalsize_scale_fp}.
-
-This package also defines public \pkg{expl3} variables that store the current font step, font scale, font size, and font baselineskip.
-These variables are set in the \texttt{selectfont} hook.
+These variables, excluding the constants, are set by \cs{fontscalesetup}.
 They should never be modified directly.
 
 \cs{l_fontscale_step_fp}
@@ -413,7 +423,10 @@
 \nopagebreak\newline
 \cs{l_fontscale_baselineskip_skip}
 
+Stores the current font step, font scale, font size, and font baselineskip.
 \cs{l_fontscale_step_fp} equals \texttt{nan} (not a number) if the current font step is undefined (as explained for \cs{CurrentFontStep} in \S\ref{subsec:expandable}).
+These variables are set in the \texttt{selectfont} hook.
+They should never be modified directly.
 
 
 \end{document}
\ No newline at end of file

Modified: trunk/Master/texmf-dist/tex/latex/fontscale/fontscale.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fontscale/fontscale.sty	2024-10-21 20:25:16 UTC (rev 72613)
+++ trunk/Master/texmf-dist/tex/latex/fontscale/fontscale.sty	2024-10-21 20:25:25 UTC (rev 72614)
@@ -8,8 +8,8 @@
 \NeedsTeXFormat{LaTeX2e}[2023-11-01]
 \ProvidesExplPackage
   {fontscale}
-  {2024-10-05}
-  {3.0.0}
+  {2024-10-20}
+  {3.0.1}
   {A flexible interface for setting font sizes}
 
 % l3kernel version 2023-10-10 added many 'e'-variants.
@@ -186,9 +186,9 @@
       }
       { \__fontscale_hook_selectfont_auxii: }
   }
-% For speed, \f at size is used here instead of \l_fontscale_size_dim. The case
-% where the base font size of the musical typographic scale equals the font
-% size of \normalsize is optimized further.
+% For speed, \__fontscale_hook_selectfont_auxii: uses \f at size instead of
+% \l_fontscale_size_dim. The case where the base font size of the musical
+% typographic scale equals the font size of \normalsize is optimized further.
 \cs_new_protected:Npn \__fontscale_hook_selectfont_auxii:
   {
     \fp_set:Nn \l_fontscale_scale_fp
@@ -342,8 +342,8 @@
 \msg_new:nnn { fontscale } { font-sizes-out-of-order }
   {
     The~ font~ sizes~ are~ not~ in~ the~ correct~ order~ \msg_line_context:. \\
-    The~ lengths~ of~ the~ font~ sizes~
-    should~ be~ ordered~ from~ \iow_char:N \\tiny~ to~ \iow_char:N \\Huge.
+    The~ lengths~ of~ the~ font~ sizes~ should~ be~ ordered~ from~
+    \iow_char:N \\tiny~ to~ \iow_char:N \\Huge.
   }
 
 \msg_new:nnn { fontscale } { math-mode-warning }
@@ -351,7 +351,10 @@
 \msg_new:nnn { fontscale } { math-mode-error }
   { '#1'~ cannot~ be~ used~ in~ math~ mode~ \msg_line_context:. }
 \msg_new:nnn { fontscale } { font-size-out-of-bounds }
-  { The~ font~ size~ '#1'~ must~ be~ a~ positive~ length~ \msg_line_context:. }
+  {
+    Invalid~ font~ size~ '#1'~ \msg_line_context:. \\
+    The~ font~ size~ must~ be~ a~ positive~ length.
+  }
 \msg_new:nnn { fontscale } { font-step-out-of-bounds }
   {
     Invalid~ font~ step~ '#1'~ \msg_line_context:. \\
@@ -659,7 +662,8 @@
         \prg_break:
       }
   }
-% Sets the font size and font baselineskip of \normalsize.
+% Sets the font size and font baselineskip of \normalsize. Its font size must
+% be set before doing any processing involving the font scale.
 \cs_new_protected:Npn \__fontscale_keys_process_normalsize:
   {
     \quark_if_no_value:NTF \l__fontscale_normalsize_size_tl
@@ -895,8 +899,8 @@
 % DOCUMENT COMMANDS
 
 % Defines the standard LaTeX font size commands from \tiny to \Huge and
-% initializes to \normalsize. The corresponding internal functions are not used
-% elsewhere in the code for compatibility with hooks such as
+% initializes to \normalsize. Their internal functions are not used elsewhere
+% in the code for compatibility with hooks such as
 % \AddToHook{cmd/<font size command>/after}{<code>}.
 \DeclareDocumentCommand \tiny { }
   {



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