summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/fontscale
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/fontscale')
-rw-r--r--macros/latex/contrib/fontscale/fontscale-manual.pdfbin129404 -> 129635 bytes
-rw-r--r--macros/latex/contrib/fontscale/fontscale-manual.tex13
-rw-r--r--macros/latex/contrib/fontscale/fontscale.sty29
3 files changed, 35 insertions, 7 deletions
diff --git a/macros/latex/contrib/fontscale/fontscale-manual.pdf b/macros/latex/contrib/fontscale/fontscale-manual.pdf
index e90ca7b92d..67af2fa36c 100644
--- a/macros/latex/contrib/fontscale/fontscale-manual.pdf
+++ b/macros/latex/contrib/fontscale/fontscale-manual.pdf
Binary files differ
diff --git a/macros/latex/contrib/fontscale/fontscale-manual.tex b/macros/latex/contrib/fontscale/fontscale-manual.tex
index f7d475cd7b..bb08e2eff9 100644
--- a/macros/latex/contrib/fontscale/fontscale-manual.tex
+++ b/macros/latex/contrib/fontscale/fontscale-manual.tex
@@ -13,7 +13,7 @@ A user interface for setting document font sizes
Oliver Beery
-Version 1.0.3\quad{}26 March 2024
+Version 1.1.0\quad{}31 March 2024
\section{Introduction}
@@ -346,8 +346,15 @@ The key \Key{reset}[preamble] sets all the keys to their values at the end of th
\section{Programming}
\label{sec:programming}
-For \LaTeX3 programmers, the \pkg{fontscale} package provides some public \pkg{expl3} variables.
-No public \pkg{expl3} functions are provided.
+This section is relevant to \LaTeX3 programmers.
+
+The user commands \cs{SetFontStep}, \cs{SetFontScale}, \cs{SetFontSize}, \cs{ScaleFont}, and \cs{SetFontSizeBaselineskip} are set up to work with \cs{text_purify:n}.
+\cs{text_purify:n} will correctly remove these commands and their arguments.
+This includes the starred versions \cs{SetFontStep*}, \cs{SetFontScale*}, and \cs{SetFontSize*}.
+
+This package does not provide any public \pkg{expl3} functions.
+
+This package provides some public \pkg{expl3} variables.
The package stores in public variables the step, scale, size, and baselineskip of each font size command.
These variables should not be modified directly.
Instead, they should be modified only indirectly via the command \cs{fontscalesetup}.
diff --git a/macros/latex/contrib/fontscale/fontscale.sty b/macros/latex/contrib/fontscale/fontscale.sty
index 3a6d63676a..2047438621 100644
--- a/macros/latex/contrib/fontscale/fontscale.sty
+++ b/macros/latex/contrib/fontscale/fontscale.sty
@@ -8,8 +8,8 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{fontscale}
- {2024-03-26}
- {1.0.3}
+ {2024-03-31}
+ {1.1.0}
{A user interface for setting document font sizes}
% The 2023-10-10 l3kernel update added many 'e'-variants.
@@ -452,7 +452,7 @@
}
\cs_new_protected:Npn \__fontscale_keys_name_code_split:ww #1 / #2 \q_stop
{
- \tl_set:cn { l__fontscale_ \l_keys_key_str _size _tl } {#1}
+ \tl_set:cn { l__fontscale_ \l_keys_key_str _size_tl } {#1}
\tl_set:cn { l__fontscale_ \l_keys_key_str _baselineskip_tl } {#2}
}
@@ -1284,4 +1284,25 @@
}
}
{ UNDEFINED \@ }
- } \ No newline at end of file
+ }
+
+% TEXT PURIFY
+
+\cs_new:Npn \__fontscale_text_purify_equivalent:n #1
+ {
+ \bool_lazy_all:nT
+ {
+ { \tl_if_single_p:n {#1} }
+ { \tl_if_single_token_p:n #1 }
+ { \token_if_eq_meaning_p:NN #1 * }
+ }
+ { \use_none:n }
+ }
+\text_declare_purify_equivalent:Nn \SetFontStep
+ { \__fontscale_text_purify_equivalent:n }
+\text_declare_purify_equivalent:Nn \SetFontScale
+ { \__fontscale_text_purify_equivalent:n }
+\text_declare_purify_equivalent:Nn \SetFontSize
+ { \__fontscale_text_purify_equivalent:n }
+\text_declare_purify_equivalent:Nn \ScaleFont { \use_none:n }
+\text_declare_purify_equivalent:Nn \SetFontSizeBaselineskip { \use_none:nn } \ No newline at end of file