summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/abraces/README.md4
-rw-r--r--macros/latex/contrib/abraces/abraces-doc.pdfbin245502 -> 245461 bytes
-rw-r--r--macros/latex/contrib/abraces/abraces-doc.tex13
-rw-r--r--macros/latex/contrib/abraces/abraces.sty7
-rw-r--r--macros/latex/contrib/easybook/README.md2
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx6
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin628156 -> 628163 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex6
-rw-r--r--macros/latex/contrib/fontscale/CHANGELOG.md46
-rw-r--r--macros/latex/contrib/fontscale/README.txt2
-rw-r--r--macros/latex/contrib/fontscale/beery.cls133
-rw-r--r--macros/latex/contrib/fontscale/fontscale-manual-table-classic.tex39
-rw-r--r--macros/latex/contrib/fontscale/fontscale-manual-table-font-steps.tex38
-rw-r--r--macros/latex/contrib/fontscale/fontscale-manual-table-modular-musical.tex38
-rw-r--r--macros/latex/contrib/fontscale/fontscale-manual.pdfbin117192 -> 0 bytes
-rw-r--r--macros/latex/contrib/fontscale/fontscale-manual.tex390
-rw-r--r--macros/latex/contrib/fontscale/fontscale-table-classic.tex41
-rw-r--r--macros/latex/contrib/fontscale/fontscale-table-font-steps.tex39
-rw-r--r--macros/latex/contrib/fontscale/fontscale-table-musical.tex39
-rw-r--r--macros/latex/contrib/fontscale/fontscale.pdfbin0 -> 104110 bytes
-rw-r--r--macros/latex/contrib/fontscale/fontscale.sty998
-rw-r--r--macros/latex/contrib/fontscale/fontscale.tex398
-rw-r--r--macros/latex/contrib/tagpdf/README.md4
-rw-r--r--macros/latex/contrib/tagpdf/ex-AF-file.pdf56
-rw-r--r--macros/latex/contrib/tagpdf/ex-alt-actualtext.pdfbin34295 -> 34295 bytes
-rw-r--r--macros/latex/contrib/tagpdf/ex-attribute.pdf14
-rw-r--r--macros/latex/contrib/tagpdf/ex-formula-problem.pdf14
-rw-r--r--macros/latex/contrib/tagpdf/ex-list.pdf14
-rw-r--r--macros/latex/contrib/tagpdf/ex-mc-manual-para-split-obsolete.pdf14
-rw-r--r--macros/latex/contrib/tagpdf/ex-softhyphen.pdf14
-rw-r--r--macros/latex/contrib/tagpdf/ex-spaceglyph-listings.pdf14
-rw-r--r--macros/latex/contrib/tagpdf/ex-structure-obsolete.pdf14
-rw-r--r--macros/latex/contrib/tagpdf/ex-tagpdf-template.pdf16
-rw-r--r--macros/latex/contrib/tagpdf/link-figure-input.tex6
-rw-r--r--macros/latex/contrib/tagpdf/pac2024-report.pngbin0 -> 60301 bytes
-rw-r--r--macros/latex/contrib/tagpdf/pac2024-version.pngbin0 -> 29032 bytes
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-backend.dtx91
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-checks.dtx4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-code.pdfbin1716291 -> 1737121 bytes
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-data.dtx16
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx6
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx6
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-roles.dtx4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-space.dtx4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-struct.dtx6
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-tree.dtx4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-user.dtx4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.dtx26
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.pdfbin1172067 -> 1124473 bytes
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.tex75
-rw-r--r--macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty167
-rw-r--r--macros/latex/contrib/tagpdf/tagpdfsetup-keys.tex3
-rw-r--r--macros/latex/required/l3kernel/CHANGELOG.md15
-rw-r--r--macros/latex/required/l3kernel/README.md2
-rw-r--r--macros/latex/required/l3kernel/expl3.dtx4
-rw-r--r--macros/latex/required/l3kernel/expl3.pdfbin610409 -> 610110 bytes
-rw-r--r--macros/latex/required/l3kernel/interface3.pdfbin1800435 -> 1790077 bytes
-rw-r--r--macros/latex/required/l3kernel/interface3.tex2
-rw-r--r--macros/latex/required/l3kernel/l3basics.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3bitset.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3bootstrap.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3box.dtx6
-rw-r--r--macros/latex/required/l3kernel/l3cctab.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3clist.dtx14
-rw-r--r--macros/latex/required/l3kernel/l3coffins.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3color.dtx30
-rw-r--r--macros/latex/required/l3kernel/l3debug.dtx4
-rw-r--r--macros/latex/required/l3kernel/l3deprecation.dtx8
-rw-r--r--macros/latex/required/l3kernel/l3doc.dtx4
-rw-r--r--macros/latex/required/l3kernel/l3doc.pdfbin565557 -> 565298 bytes
-rw-r--r--macros/latex/required/l3kernel/l3docstrip.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3docstrip.pdfbin151323 -> 151011 bytes
-rw-r--r--macros/latex/required/l3kernel/l3expan.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3file.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3flag.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3fp-assign.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3fp-aux.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3fp-basics.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3fp-convert.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3fp-expo.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3fp-extended.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3fp-functions.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3fp-logic.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3fp-parse.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3fp-random.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3fp-round.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3fp-symbolic.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3fp-traps.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3fp-trig.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3fp-types.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3fp.dtx4
-rw-r--r--macros/latex/required/l3kernel/l3fparray.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3int.dtx17
-rw-r--r--macros/latex/required/l3kernel/l3intarray.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3kernel-functions.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3keys.dtx41
-rw-r--r--macros/latex/required/l3kernel/l3legacy.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3luatex.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3msg.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3names.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3news.pdfbin396223 -> 396223 bytes
-rw-r--r--macros/latex/required/l3kernel/l3news01.pdfbin122959 -> 122959 bytes
-rw-r--r--macros/latex/required/l3kernel/l3news02.pdfbin150919 -> 150919 bytes
-rw-r--r--macros/latex/required/l3kernel/l3news03.pdfbin148747 -> 148747 bytes
-rw-r--r--macros/latex/required/l3kernel/l3news04.pdfbin114754 -> 114754 bytes
-rw-r--r--macros/latex/required/l3kernel/l3news05.pdfbin112524 -> 112524 bytes
-rw-r--r--macros/latex/required/l3kernel/l3news06.pdfbin151591 -> 151591 bytes
-rw-r--r--macros/latex/required/l3kernel/l3news07.pdfbin128344 -> 128344 bytes
-rw-r--r--macros/latex/required/l3kernel/l3news08.pdfbin163484 -> 163484 bytes
-rw-r--r--macros/latex/required/l3kernel/l3news09.pdfbin250161 -> 250161 bytes
-rw-r--r--macros/latex/required/l3kernel/l3news10.pdfbin150302 -> 150302 bytes
-rw-r--r--macros/latex/required/l3kernel/l3news11.pdfbin170102 -> 170102 bytes
-rw-r--r--macros/latex/required/l3kernel/l3news12.pdfbin205020 -> 205020 bytes
-rw-r--r--macros/latex/required/l3kernel/l3pdf.dtx14
-rw-r--r--macros/latex/required/l3kernel/l3prefixes.csv7
-rw-r--r--macros/latex/required/l3kernel/l3prefixes.pdfbin82843 -> 83064 bytes
-rw-r--r--macros/latex/required/l3kernel/l3prg.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3prop.dtx42
-rw-r--r--macros/latex/required/l3kernel/l3quark.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3regex.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3seq.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3skip.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3sort.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3str-convert.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3str.dtx4
-rw-r--r--macros/latex/required/l3kernel/l3styleguide.pdfbin296602 -> 296298 bytes
-rw-r--r--macros/latex/required/l3kernel/l3styleguide.tex2
-rw-r--r--macros/latex/required/l3kernel/l3syntax-changes.pdfbin231447 -> 231148 bytes
-rw-r--r--macros/latex/required/l3kernel/l3syntax-changes.tex2
-rw-r--r--macros/latex/required/l3kernel/l3sys.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3term-glossary.pdfbin242247 -> 241946 bytes
-rw-r--r--macros/latex/required/l3kernel/l3term-glossary.tex2
-rw-r--r--macros/latex/required/l3kernel/l3text-case.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3text-map.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3text-purify.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3text.dtx16
-rw-r--r--macros/latex/required/l3kernel/l3tl-analysis.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3tl-build.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3tl.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3token.dtx2
-rw-r--r--macros/latex/required/l3kernel/l3unicode.dtx2
-rw-r--r--macros/latex/required/l3kernel/source3.pdfbin7618338 -> 7610534 bytes
-rw-r--r--macros/latex/required/l3kernel/source3.tex2
144 files changed, 1760 insertions, 1415 deletions
diff --git a/macros/latex/contrib/abraces/README.md b/macros/latex/contrib/abraces/README.md
index b26a225d8c..5234134d05 100644
--- a/macros/latex/contrib/abraces/README.md
+++ b/macros/latex/contrib/abraces/README.md
@@ -1,11 +1,11 @@
-`abraces` 2022/11/06 v2.1
+`abraces` 2024/08/02 v2.2
----------------------------------------
A package that provides a character key-driven interface to
supplement new constructions of the traditional `\overbrace`
and `\underbrace` pairs in an asymmetric or arbitrary way.
-Copyright (c) 2021 Werner Grundlingh
+Copyright (c) 2024 Werner Grundlingh
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/latex/contrib/abraces/abraces-doc.pdf b/macros/latex/contrib/abraces/abraces-doc.pdf
index c0becaadde..a2161dafb5 100644
--- a/macros/latex/contrib/abraces/abraces-doc.pdf
+++ b/macros/latex/contrib/abraces/abraces-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/abraces/abraces-doc.tex b/macros/latex/contrib/abraces/abraces-doc.tex
index 970cf74eab..04178c2de7 100644
--- a/macros/latex/contrib/abraces/abraces-doc.tex
+++ b/macros/latex/contrib/abraces/abraces-doc.tex
@@ -1,4 +1,4 @@
-% $Id: abraces-doc.tex,v 2.1 2022/11/06 00:00:00 wgrundlingh stable $
+% $Id: abraces-doc.tex,v 2.2 2024/08/02 00:00:00 wgrundlingh stable $
\RequirePackage{xcolor}% http://ctan.org/pkg/xcolor (required to "overload" color package)
\documentclass[10pt]{ltxdockit}[2011/03/25]
@@ -7,7 +7,7 @@
\usepackage{booktabs,shortvrb,amsmath,xfp}
\MakeShortVerb{\|}
-\rcsid{$Id: abraces.tex,v 2.1 2022/11/06 00:00:00 wgrundlingh stable $}
+\rcsid{$Id: abraces.tex,v 2.2 2024/08/02 00:00:00 wgrundlingh stable $}
%\setcounter{secnumdepth}{2}
%\setcounter{tocdepth}{4}
@@ -305,11 +305,18 @@ This material is released under and subject to the \href{https://latex-project.o
\section{Acknowledgements}
-Thanks to Frank Mittlebach who stepped in and suggested an improvement in the original way \sty{abraces} functioned. Expansions included the use of \LaTeX3 command interface (via the \href{http://ctan.org/pkg/xparse}{\sty{xparse} package}).
+Thanks to Frank Mittlebach who stepped in and suggested an improvement in the original way \sty{abraces} functioned. Expansions included the use of \LaTeX3 command interface.
\section{Change log}
\begin{itemize}
+ \item v2.2 (2024-08-02) Minor update
+
+ \begin{itemize}
+ \item
+ Added \href{http://ctan.org/pkg/xcolor}{\sty{xcolor}} dependency to always have \lstinline|\bracecolor| available.
+ \end{itemize}
+
\item v2.1 (2022-11-06) Minor update
\begin{itemize}
diff --git a/macros/latex/contrib/abraces/abraces.sty b/macros/latex/contrib/abraces/abraces.sty
index af146826ce..3b096e7ab7 100644
--- a/macros/latex/contrib/abraces/abraces.sty
+++ b/macros/latex/contrib/abraces/abraces.sty
@@ -1,5 +1,5 @@
%% abraces.sty
-%% Copyright 2021 Werner Grundlingh
+%% Copyright 2024 Werner Grundlingh
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -16,9 +16,12 @@
% This work consists of the file abraces.sty.
\ProvidesPackage{abraces}% http://ctan.org/pkg/abraces
- [2022/11/06 v2.1 Arbitrary and asymmetric braces]
+ [2024/08/02 v2.2 Arbitrary and asymmetric braces]
+% xparse definitions now form part of the LaTeX core. However, keeping this in for those using older versions.
\RequirePackage{xparse}
+% Since abraces defines \bracecolor, add xcolor as dependency
+\RequirePackage{xcolor}
\newif\if@overload
\DeclareOption{overload}{\@overloadtrue}
diff --git a/macros/latex/contrib/easybook/README.md b/macros/latex/contrib/easybook/README.md
index f6a54fe8bf..ae05afb8d1 100644
--- a/macros/latex/contrib/easybook/README.md
+++ b/macros/latex/contrib/easybook/README.md
@@ -1,5 +1,5 @@
# The `easybook` document class
-Easily typesetting Chinese theses or books (v2024dc)
+Easily typesetting Chinese theses or books (v2024dd)
## Abstract
`easybook` is a pure academic template created based on the `ctexbook` book document class. It also has the functions of `book` and `article` document class. Combined with the general framework design of the theses of many universities in China, providing multiple commands and interfaces allows users to easily customize the theses templates. Its basic macro package `easybase` can also be used with `ctex` and standard document classes.
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 6901466a86..4904e90a21 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -14,7 +14,7 @@
% This work has the LPPL maintenance status `maintained'.
%<class|package>\NeedsTeXFormat{LaTeX2e}[2021/11/15]
%<*class>
-\ProvidesExplClass{easybook}{2024/08/01}{2024dc}
+\ProvidesExplClass{easybook}{2024/08/02}{2024dd}
{Easily typesetting Chinese theses or books}
\bool_new:N \l__eb_compile_draft_bool
@@ -301,7 +301,7 @@
%</class>
%<*package>
\RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2024/08/01}{2024dc}
+\ProvidesExplPackage{easybase}{2024/08/02}{2024dd}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -2731,7 +2731,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2024/08/01}{2024dc}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2024/08/02}{2024dd}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index 1d605e38cd..03b9b72b3f 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex
index 1e4a7d58cc..114610e5f9 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -23,8 +23,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK使用手册,
- version = v2024dc,
- date = 2024/08/01,
+ version = v2024dd,
+ date = 2024/08/02,
authors = 瞿毅,
info = 简便地排版中文学位论文或书籍,
email = toquyi@163.com,
@@ -300,7 +300,7 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\newCJKfontfamily[song]\songti{SimSun}
\end{ctexexam}
- 如果用 \pkg*{overleaf} 或 \pkg*{TexPage} 等在线平台编译文档,则只有 \code{fandol} 字体可用。使用其它字体可将字体文件上传至项目文件夹,例如上传至 \code{font} 文件夹设置正文和无衬线字体:
+ 如果用 \textsf{overleaf} 或 \textsf{TexPage} 等在线平台编译文档,则只有 \code{fandol} 字体可用。使用其它字体可将字体文件上传至项目文件夹,例如上传至 \code{font} 文件夹设置正文和无衬线字体:
\begin{ctexexam}
\setCJKmainfont{simsun.ttc}[Path = ./font/]
\setCJKsansfont{simhei.ttf}[Path = ./font/]
diff --git a/macros/latex/contrib/fontscale/CHANGELOG.md b/macros/latex/contrib/fontscale/CHANGELOG.md
index 9706fbbe09..e330a07eb7 100644
--- a/macros/latex/contrib/fontscale/CHANGELOG.md
+++ b/macros/latex/contrib/fontscale/CHANGELOG.md
@@ -7,6 +7,50 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
## [Unreleased]
+## [v2.0.0] - 2024-08-02
+
+### Changed
+- This update includes many changes that are backwards incompatible.
+- The documentation has been completely rewritten.
+- Package description changed from "A user interface for setting document font
+ sizes" to "A flexible interface for setting font sizes".
+- The code no longer uses `\@setfontsize`.
+- The font size commands provided by this package now do nothing, except issue
+ a warning, if used in math mode.
+- The base font size of the musical typographic scale is now set by the new key
+ `musical/base`.
+- `\PrintFontParameters` renamed to `\PrintFontSizeParameters`.
+- `\PrintAllFontParameters` renamed to `\PrintAllFontSizeParameters`.
+- `\PrintSampleText` uses a `+m`- instead of an `O`-type argument.
+- `\PrintFontSizeCommand` prints `\undefined` instead of `UNDEFINED`.
+- `\fontscalesetup` is now removed in `\text_purify:n`.
+
+### Removed
+- Keys `typographic-scale=modular` and `modular`.
+- Key `ignore-order` (no support for using `\tiny` to `\Huge` in the wrong
+ order).
+- Key `reset` (very rarely used).
+- Public `prop` variables for each font size command from `\tiny` to `\Huge`.
+ (They are redundant with the other public variables and programmers will very
+ likely prefer using their own `prop` variables.)
+
+### Added
+- `\fontscalesetup` now has an optional starred argument which first resets the
+ keys to their initial values.
+- Key `musical/base` (explained earlier).
+- The package commands now issue a user-friendly error message if the font size
+ is a zero or negative length.
+- The package commands now issue an error if the font baselineskip is less than
+ the font size.
+- The package commands that would produce a low-level error if used in math
+ mode now issue a user-friendly error message instead.
+
+### Fixed
+- Now correctly checks that the package requires `LaTeX2e` version 2023-11-01
+ or newer.
+- The keys `<font size command>` no longer incorrectly treat a `/` within a
+ brace group as the delimiter.
+
## [v1.3.0] - 2024-05-17
### Added
@@ -18,7 +62,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
### Changed
- The code now regularly uses `V`- and `v`-type arguments to get the value of a
variable.
-- The code now uses private `expl3` wrappers around the LaTeX2e commands
+- The code now uses private `expl3` wrappers around the `LaTeX2e` commands
`\@setfontsize`, `\fontsize`, and `\selectfont`.
## [v1.2.2] - 2024-04-29
diff --git a/macros/latex/contrib/fontscale/README.txt b/macros/latex/contrib/fontscale/README.txt
index 292cfada9b..d6c9224ee0 100644
--- a/macros/latex/contrib/fontscale/README.txt
+++ b/macros/latex/contrib/fontscale/README.txt
@@ -1,4 +1,4 @@
-Package: fontscale -- A user interface for setting document font sizes
+Package: fontscale -- A flexible interface for setting font sizes
Copyright: 2024 (c) Oliver Beery <beeryoliver@gmail.com>
CTAN: https://ctan.org/pkg/fontscale
Repository: https://github.com/beeryoliver/fontscale
diff --git a/macros/latex/contrib/fontscale/beery.cls b/macros/latex/contrib/fontscale/beery.cls
index 4777c06a8e..45a3b95982 100644
--- a/macros/latex/contrib/fontscale/beery.cls
+++ b/macros/latex/contrib/fontscale/beery.cls
@@ -1,71 +1,83 @@
-% Note: This documentclass is designed ONLY for the document 'fontscale-manual'. Compiled using LuaLaTeX.
+% Note: This class is designed ONLY for 'fontscale.tex'. Compiled with LuaTeX.
-% The 2023-06-01 LaTeX kernel update added the 'shipout' hook.
-\NeedsTeXFormat{LaTeX2e}[2023-06-01]
+% LaTeX2e version 2023-11-01 added \IfExplAtLeastTF.
+\NeedsTeXFormat{LaTeX2e}[2023-11-01]
\ProvidesExplClass
{beery}
- {2024-04-21}
+ {2024-08-02}
{}
{}
-\RequirePackage { fix-cm }
\LoadClass { article }
+
+\box_new:N \l__beery_tmp_box
+
\RequirePackage { fontscale }
\fontscalesetup { musical }
-\RequirePackage [ list-final-separator = { ,~ and~ } ] { siunitx }
+\RequirePackage { siunitx }
+\sisetup { list-final-separator = { ,~ and~ } , mode = match }
\RequirePackage { mathtools }
\RequirePackage [ shortcuts , allowbreakbefore ] { extdash }
\RequirePackage { csquotes }
+\RequirePackage { lmodern }
% CUSTOM MACROS
+\NewExpandableDocumentCommand \alphabet { } { abcdefghijklmnopqrstuvwxyz }
\NewDocumentCommand \Key { m o o }
{
+ \mode_leave_vertical:
\group_begin:
\ttfamily
- \bool_case:nF
+ \IfNoValueTF {#3}
{
- {
- \bool_lazy_and_p:nn
- { \tl_if_novalue_p:n {#2} }
- { \tl_if_novalue_p:n {#3} }
- }
- {#1}
- {
- \bool_lazy_and_p:nn
- { ! \tl_if_novalue_p:n {#2} }
- { \tl_if_novalue_p:n {#3} }
- }
- { #1~ =~ #2 }
- {
- \bool_lazy_and_p:nn
- { ! \tl_if_novalue_p:n {#2} }
- { ! \tl_if_novalue_p:n {#3} }
- }
- { #1~ =~ #2 \hspace* { \fill } \makebox { initial~ =~ #3 } }
+ \IfNoValueTF {#2}
+ {#1}
+ { #1 $\,=\,$ \allowbreak #2 }
}
- { \errmessage { invalid } }
+ { #1 $\,=\,$ #2 \hspace* { \fill } \hbox:n { initial $\,=\,$ #3 } }
\group_end:
}
+\NewDocumentCommand \Value { m } { \texttt {#1} }
\NewDocumentCommand \cmd { m } { \texttt { \token_to_str:N #1 } \@ }
\NewDocumentCommand \cs { m } { \texttt { \token_to_str:c {#1} } \@ }
\NewDocumentCommand \marg { m }
- { \allowbreak \texttt { \c_left_brace_str #1 \c_right_brace_str } }
-\NewDocumentCommand \oarg { m } { \allowbreak \texttt { [ #1 ] } }
-\NewDocumentCommand \meta { m } { \texttt { \textlangle #1 \textrangle } }
+ {
+ \allowbreak
+ \texttt { \c_left_brace_str }
+ $\langle$
+ { \normalfont \itshape #1 }
+ $\rangle$
+ \texttt { \c_right_brace_str }
+ }
+\NewDocumentCommand \oarg { m }
+ {
+ \allowbreak
+ \texttt { [ }
+ $\langle$
+ { \normalfont \itshape #1 }
+ $\rangle$
+ \texttt { ] }
+ }
+\NewDocumentCommand \sarg { } { $\langle$ \texttt {*} $\rangle$ }
+\NewDocumentCommand \meta { m }
+ {
+ $\langle$
+ { \normalfont \itshape #1 }
+ $\rangle$
+ }
\NewDocumentCommand \cls { m } { \textsf {#1} }
\NewDocumentCommand \env { m } { \texttt {#1} }
\NewDocumentCommand \pkg { m } { \textsf {#1} }
-\NewDocumentCommand \filex { m } { \texttt {#1} \@ }
\NewDocumentCommand \latin { m } { \textit {#1} }
% PAGE STYLE
-\hbox_set:Nn \l_tmpa_box { abcdefghijklmnopqrstuvwxyz }
-\dim_const:Nn \c_beery_alphabet_dim { \box_wd:N \l_tmpa_box }
+\hbox_set:Nn \l__beery_tmp_box { abcdefghijklmnopqrstuvwxyz }
+\dim_const:Nn \c_beery_alphabet_dim { \box_wd:N \l__beery_tmp_box }
+\dim_log:N \c_beery_alphabet_dim
-\dim_const:Nn \c_beery_big_dim
- { \fp_to_dim:n { \l_fontscale_normalsize_size_dim * 10 / 7 } }
+\dim_const:Nn \c_beery_big_dim { \l_fontscale_normalsize_baselineskip_skip }
\dim_const:Nn \c_beery_medium_dim { \c_beery_big_dim / 2 }
\dim_const:Nn \c_beery_small_dim { \c_beery_big_dim / 4 }
\skip_const:Nn \c_beery_big_skip
@@ -85,12 +97,15 @@
\skip_set:Nn \topskip { \l_fontscale_normalsize_size_dim }
\skip_set_eq:NN \splittopskip \topskip
-\RequirePackage
- [
- letterpaper
- , textwidth = \dim_eval:n { \fp_use:N \c_e_fp \c_beery_alphabet_dim }
+\RequirePackage { geometry }
+\geometry
+ {
+ a4paper
+ , textwidth =
+ \dim_eval:n { \fp_to_dim:n { \c_e_fp * \c_beery_alphabet_dim } }
, textheight =
- \dim_eval:n { \fp_eval:n { \c_e_fp * 1.6180 } \c_beery_alphabet_dim }
+ \dim_eval:n
+ { \fp_to_dim:n { 1.6180 * \c_e_fp * \c_beery_alphabet_dim } }
, heightrounded
, centering
, headheight = \l_fontscale_footnotesize_baselineskip_skip
@@ -98,8 +113,7 @@
, footskip =
\dim_eval:n
{ \c_beery_big_dim + \l_fontscale_footnotesize_baselineskip_skip }
- ]
- { geometry }
+ }
\RequirePackage { fancyhdr }
\pagestyle { fancy }
@@ -111,14 +125,21 @@
% PARAGRAPH STYLE
\nonfrenchspacing
-\linespread { \fp_eval:n { 25 / 21 } }
+\linespread { 1 }
\RequirePackage [ skip = \c_beery_medium_skip ] { parskip }
\RequirePackage [ raggedrightboxes ] { ragged2e }
\skip_set:Nn \RaggedRightRightskip { 0pt plus 0.5 \linewidth }
+\dim_zero:N \RaggedRightParindent
+\dim_set_eq:NN \JustifyingParindent \RaggedRightParindent
\RaggedRight
+\int_set:Nn \pretolerance { -1 }
+\int_set:Nn \tolerance { 200 }
+\dim_zero:N \emergencystretch
\int_set:Nn \widowpenalty { 10000 }
\int_set_eq:NN \clubpenalty \widowpenalty
\int_set_eq:NN \displaywidowpenalty \widowpenalty
+\int_set:Nn \hyphenpenalty { 99 }
+\int_set_eq:NN \exhyphenpenalty \hyphenpenalty
% HEADINGS, TABLE OF CONTENTS
@@ -129,9 +150,9 @@
\titlespacing* \section % section
{ 0pt } % indent
{
- \fp_eval:n { 4 / 3 } \c_beery_medium_dim
- plus \fp_eval:n { 1 / 2 * 4 } \c_beery_medium_dim
- minus \fp_eval:n { 1 / 3 / 4 } \c_beery_medium_dim
+ \c_beery_big_dim
+ plus \fp_eval:n { 1 / 2 * 4 } \c_beery_big_dim
+ minus \fp_eval:n { 1 / 3 / 4 } \c_beery_big_dim
} % before
{ \c_beery_medium_skip } % after
\titlespacing* \subsection
@@ -146,15 +167,15 @@
\titleformat \section % section
[ block ] % shape
{ \raggedright \large \bfseries } % format
- { \thesection . } % label
- { 0.5em } % the horizontal separation between label and title body
+ { \thesection } % label
+ { 1em } % the horizontal separation between label and title body
{ } % before code
{ } % after code
\titleformat \subsection
[ block ]
{ \raggedright \normalsize \bfseries }
- { \thesubsection . }
- { 0.5em }
+ { \thesubsection }
+ { 1em }
{ }
{ }
@@ -215,7 +236,10 @@
\coffin_new:N \l__beery_footnote_coffin
% 1.2 = baselineskip-size-ratio
\dim_const:Nn \c_beery_footnote_baselineheight_dim
- { \fp_eval:n { 1.2 * \f@linespread - 1 } \l_fontscale_footnotesize_size_dim }
+ {
+ \fp_to_dim:n
+ { ( 1.2 * \f@linespread - 1 ) * \l_fontscale_footnotesize_size_dim }
+ }
\RenewDocumentCommand \@makefntext { +m }
{
\vcoffin_set:Nnn \l__beery_footnote_coffin { \textwidth }
@@ -224,8 +248,10 @@
{
\dim_set:Nn \leftmargin
{
- \fp_eval:n { ( 1 - \l_fontscale_footnotesize_scale_fp ) / 2 }
- \textwidth
+ \fp_to_dim:n
+ {
+ ( 1 - \l_fontscale_footnotesize_scale_fp ) / 2 * \textwidth
+ }
}
\dim_set_eq:NN \rightmargin \leftmargin
\dim_set:Nn \labelsep { 0.5em }
@@ -242,4 +268,5 @@
\AddToHook { shipout / lastpage } { \label { LastPage } }
\RequirePackage { xurl }
-\RequirePackage [ bookmarksnumbered , hidelinks , linktoc = page ] { hyperref } \ No newline at end of file
+\RequirePackage { hyperref }
+\hypersetup { bookmarksnumbered , hidelinks , linktoc = page } \ No newline at end of file
diff --git a/macros/latex/contrib/fontscale/fontscale-manual-table-classic.tex b/macros/latex/contrib/fontscale/fontscale-manual-table-classic.tex
deleted file mode 100644
index 029d304d82..0000000000
--- a/macros/latex/contrib/fontscale/fontscale-manual-table-classic.tex
+++ /dev/null
@@ -1,39 +0,0 @@
-\ProvidesFile
- {fontscale-manual-table-classic.tex}
- [2024-04-15]
-
-\begin{table}
- \centering
- \caption
- {%
- The size of each font size command in \unit{pt} when using a classic typographic scale.%
- \label{table:classicscales}%
- }
- \bigskip
- \begin{tblr}
- {
- colspec=
- {
- l
- Q[si={table-format=3.2},c]
- Q[si={table-format=3.2},c]
- Q[si={table-format=3.2},c]
- }
- , cell{1}{2-Z}={guard}
- }
- \toprule
- Command & \Key{classic-10pt} & \Key{classic-11pt} & \Key{classic-12pt} \\
- \midrule
- \cs{tiny} & 6 & 7 & 8 \\
- \cs{scriptsize} & 7 & 8 & 9 \\
- \cs{footnotesize} & 8 & 9 & 10 \\
- \cs{small} & 9 & 10 & 11 \\
- \cs{normalsize} & 10 & 11 & 12 \\
- \cs{large} & 11 & 12 & 14 \\
- \cs{Large} & 12 & 14 & 16 \\
- \cs{LARGE} & 14 & 16 & 18 \\
- \cs{huge} & 16 & 18 & 21 \\
- \cs{Huge} & 18 & 21 & 24 \\
- \bottomrule
- \end{tblr}
-\end{table} \ No newline at end of file
diff --git a/macros/latex/contrib/fontscale/fontscale-manual-table-font-steps.tex b/macros/latex/contrib/fontscale/fontscale-manual-table-font-steps.tex
deleted file mode 100644
index 8c5cc8c141..0000000000
--- a/macros/latex/contrib/fontscale/fontscale-manual-table-font-steps.tex
+++ /dev/null
@@ -1,38 +0,0 @@
-\ProvidesFile
- {fontscale-manual-table-font-steps.tex}
- [2024-04-15]
-
-\begin{table}
- \centering
- \caption
- {%
- The step of each font size command.
- These are constants and cannot be changed.%
- \label{table:fontsteps}%
- }
- \bigskip
- \begin{tblr}
- {
- colspec=
- {
- l
- Q[si={table-format=3.2},c]
- }
- , cell{1}{2}={guard}
- }
- \toprule
- Command & Step \\
- \midrule
- \cs{tiny} & -4 \\
- \cs{scriptsize} & -3 \\
- \cs{footnotesize} & -2 \\
- \cs{small} & -1 \\
- \cs{normalsize} & 0 \\
- \cs{large} & 1 \\
- \cs{Large} & 2 \\
- \cs{LARGE} & 3 \\
- \cs{huge} & 4 \\
- \cs{Huge} & 5 \\
- \bottomrule
- \end{tblr}
-\end{table} \ No newline at end of file
diff --git a/macros/latex/contrib/fontscale/fontscale-manual-table-modular-musical.tex b/macros/latex/contrib/fontscale/fontscale-manual-table-modular-musical.tex
deleted file mode 100644
index 306578ec35..0000000000
--- a/macros/latex/contrib/fontscale/fontscale-manual-table-modular-musical.tex
+++ /dev/null
@@ -1,38 +0,0 @@
-\ProvidesFile
- {fontscale-manual-table-modular-musical.tex}
- [2024-04-15]
-
-\begin{table}
- \centering
- \caption
- {%
- The size of each font size command when using a modular or musical typographic scale with the initial settings.
- The font sizes are in \unit{pt} and rounded to two decimal places.%
- }
- \bigskip
- \begin{tblr}
- {
- colspec=
- {
- l
- Q[si={table-format=3.2},c]
- Q[si={table-format=3.2},c]
- }
- , cell{1}{2-3}={guard}
- }
- \toprule
- Command & \Key{modular} & \Key{musical} \\
- \midrule
- \cs{tiny} & 6.24 & 5.74 \\
- \cs{scriptsize} & 7.02 & 6.60 \\
- \cs{footnotesize} & 7.90 & 7.58 \\
- \cs{small} & 8.89 & 8.71 \\
- \cs{normalsize} & 10 & 10 \\
- \cs{large} & 11.25 & 11.49 \\
- \cs{Large} & 12.66 & 13.20 \\
- \cs{LARGE} & 14.24 & 15.16 \\
- \cs{huge} & 16.02 & 17.41 \\
- \cs{Huge} & 18.02 & 20 \\
- \bottomrule
- \end{tblr}
-\end{table} \ No newline at end of file
diff --git a/macros/latex/contrib/fontscale/fontscale-manual.pdf b/macros/latex/contrib/fontscale/fontscale-manual.pdf
deleted file mode 100644
index 2637ef9c1f..0000000000
--- a/macros/latex/contrib/fontscale/fontscale-manual.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/fontscale/fontscale-manual.tex b/macros/latex/contrib/fontscale/fontscale-manual.tex
deleted file mode 100644
index 9917636a04..0000000000
--- a/macros/latex/contrib/fontscale/fontscale-manual.tex
+++ /dev/null
@@ -1,390 +0,0 @@
-\documentclass{beery}
-
-\begin{document}
-
-
-\section*
- {%
- \SetFontStep*{1}%
- The \pkg{fontscale} package%
- }
-
-A user interface for setting document font sizes
-
-Oliver Beery
-
-Version 1.3.0\quad{}17 May 2024
-
-
-\section{Introduction}
-\label{sec:intro}
-
-\subsection{About}
-\label{subsec:about}
-
-\listheading{The \pkg{fontscale} package provides the following functionalities:}
-\begin{itemize}
- \item
- Set font sizes via a classic, modular, or musical typographic scale.
- \item
- Set arbitrary sizes and baselineskips for the standard font size commands \cs{tiny}, \cs{scriptsize}, \cs{footnotesize}, \cs{small}, \cs{normalsize}, \cs{large}, \cs{Large}, \cs{LARGE}, \cs{huge}, and \cs{Huge}.
- \item
- Set the font size settings mid\-/document or within a local group.
- \item
- Set the font size by setting the font step, scale, or size.
- \item
- Set the font size relative to the current font size.
- \item
- Use the current font step, scale, size, and baselineskip directly, for example, for printing or within calculations.
- \item
- Print sample text to test different font sizes.
- \item
- For advanced users, store the step, scale, size, and baselineskip of each font size command in \pkg{expl3} variables.
-\end{itemize}
-
-\subsection{Loading the package}
-\label{subsec:loading}
-
-This package requires the 10 October 2023 \pkg{l3kernel} update.
-You may need to ensure that your \LaTeX{} installation is up\-/to\-/date before using this package.
-
-This package lets the user set arbitrary font sizes.
-This works with most fonts produced today, but, for historical reasons, the default Computer Modern font is available only in a number of fixed sizes.
-If you get a warning that Computer Modern is not available in the requested size, you may need to add the code \cs{RequirePackage{fix-cm}} before \cs{documentclass} to make Computer Modern available at arbitrary font sizes.
-
-\cs{usepackage}\marg{fontscale}
-\nopagebreak\newline
-\cs{fontscalesetup}\marg{\meta{keyval list}}
-
-Load the \pkg{fontscale} package via the usual command in the document preamble.
-This package has no package options.
-Instead, the package keys are set up via the command \cs{fontscalesetup}\marg{\meta{keyval list}}.
-\meta{keyval list} must receive a comma\-/separated list of keys and their associated values.
-The package keys are documented in \S\ref{sec:choosing} and \S\ref{sec:overwriting}.
-
-Many \LaTeX{} document classes have a font size option (\Key{10pt}, \Key{11pt}, \Key{12pt}, etc.\@) 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 value of \cs{normalsize} set by this package.
-
-Internally, this package sets up each font size command from \cs{tiny} to \cs{Huge} using the kernel command \cs{@setfontsize}\---they have no additional functionality beyond that of \cs{@setfontsize}.
-Unlike the standard document classes, the font size commands set up by this package do not change the vertical spacing for displayed math and list structures.
-If the user would like to add this functionality or perhaps other features to the font size commands, they can do so via hooks, which are documented in the \LaTeX{} kernel.
-
-\subsection{Terminology}
-\label{subsec:terminology}
-
-When using the \pkg{fontscale} package, each font size, including the standard font size commands from \cs{tiny} to \cs{Huge}, has a step, scale, size, and baselineskip.
-The latter two parameters are the familiar first and second arguments to the low\-/level font command \cs{fontsize}\marg{\meta{dimen}}\marg{\meta{skip}}.
-The font scale is the relative font size; the ratio of the font size to \cs{normalsize}.
-The font step is the number of font size gradations from \cs{normalsize}, which has a step of \num{0}.
-Table~\ref{table:fontsteps} lists the font step of each font size command.
-
-\input{./fontscale-manual-table-font-steps.tex}
-
-This package defines many keys and commands that take as a value or argument a \meta{dim expr}, \meta{skip expr}, \meta{fp expr}, or \meta{int expr}.
-This syntax is short for a dimen, skip, floating point, or integer expression, respectively.
-See \pkg{usrguide} \S5 for more information.%
-\footnote{\url{https://ctan.org/pkg/usrguide}}
-
-
-\section{Choosing the typographic scale}
-\label{sec:choosing}
-
-\Key{typographic-scale}
- [classic-10pt, classic-11pt, classic-12pt, modular, musical]
- [classic-10pt]
-\newline
-\Key{modular/ratio}[\meta{fp expr}][1.125]
-\newline
-\Key{musical/ratio}[\meta{fp expr}][2]%
-\nopagebreak\newline
-\Key{musical/notes}[\meta{int expr}][5]
-
-The key \Key{typographic\-/scale} sets the font sizes using a classic, modular, or musical typographic scale.
-These are common methods of choosing a set of document font sizes.
-The choice of typographic scale initializes to \Key{classic\-/10pt}.
-
-The key \Key{typographic\-/scale} can also be set in a condensed format via the keys \Key{classic\-/10pt}, \Key{classic\-/11pt}, \Key{classic\-/12pt}, \Key{modular}, or \Key{musical}, which set the key \Key{typographic\-/scale} to the corresponding value.
-
-The classic typographic scale consists of the traditional font sizes
-\numlist{6;7;8;9;10;11;12;14;16;18;21;24;36;48;60;72}.%
-\footnote{See \S{}3.1 of \textit{The Elements of Typographic Style} by Robert Bringhurst.}
-They have been used since the sixteenth century and are the default font sizes on most computer software.
-The keys \Key{classic-10pt, classic-11pt, classic-12pt} set the size of each font size command to values based on their position in the classic typographic scale.
-The size of \cs{normalsize} is the named point size.
-The sizes of the other font size commands are the adjacent font sizes in the scale.
-Table~\ref{table:classicscales} lists the size of each font size command when using a classic typographic scale.
-
-\input{./fontscale-manual-table-classic.tex}
-
-The key \Key{modular} sets the font sizes from \cs{tiny} to \cs{Huge} using a modular typographic scale.
-In a modular scale, each font size is a fixed ratio from the adjacent font sizes.%
-\footnote{\url{https://alistapart.com/article/more-meaningful-typography/}}
-Here, the base font size is the size of \cs{normalsize}, which can be set via the key \Key{normalsize/size}[\meta{dim expr}], more documented in \S\ref{sec:overwriting}.
-If not set, \cs{normalsize} initializes to \qty{10}{pt}.
-The modular ratio can be set via the key \Key{modular\slash{}ratio}.
-The initial modular ratio is \num{1.125}.
-
-\input{./fontscale-manual-table-modular-musical.tex}
-
-The key \Key{musical} sets the font sizes according to their position in a musical typographic scale.
-The font size is calculated using the formula:%
-\footnote
- {%
- I have referenced this article by Spencer Mortensen:
- \newline
- \url{https://spencermortensen.com/articles/typographic-scale/}%
- }
-\[ f_i = f_0 \times r ^ { i / n } \]
-$f_0$ is the base font size, the size of \cs{normalsize}.
-$f_i$ is the font size with font step~$i$.
-$n$ is the number of notes in the musical scale\---the number of font size gradations or steps above \cs{normalsize}.
-$r$ is the ratio of the musical scale, the ratio of the highest to the lowest note $ f_n / f_0 $.
-(The modular typographic scale is actually a special case of the musical typographic scale where $n=1$.)
-
-The musical ratio~$r$ and the number of notes~$n$ can be set via the keys \Key{musical\slash{}ratio} and \Key{musical\slash{}notes}.
-The initial musical ratio\---\num{2}\---and the initial number of notes\---\num{5}\---are the same as that of the classic typographic scale.%
-\footnote{Ibid.}
-Conveniently, \cs{Huge} is \num{5} steps above \cs{normalsize}.
-The font size of \cs{normalsize}~$f_0$ can be set using the key \Key{normalsize/size}[\meta{dim expr}], more documented in \S\ref{sec:overwriting}.
-When using a musical typographic scale, \cs{normalsize} initializes to \qty{10}{pt}.%
-\footnote {I have set the initial value to \qty{10}{pt} instead of the \qty{12}{pt} recommended by the Spencer Mortensen article because this matches the default settings of the standard \LaTeXe{} document classes.}
-
-\Key{baselineskip-size-ratio}[\meta{fp expr}][1.2]
-\KeepNextPar*
-
-The key \Key{baselineskip\-/size\-/ratio} sets the ratio of the font baselineskip to the font size.
-By default, the font baselineskip of each font size command equals its font size times \meta{fp expr}.
-Users should not set this key unless they really know what they are doing.
-When using increased line spacing, users should prefer the low\-/level font command \cs{linespread} or the \pkg{setspace} package.
-
-
-\section{Overwriting the typographic scale}
-\label{sec:overwriting}
-
-In some situations, users may need to explicitly set the scale, size, or baselineskip of a font size command, overwriting the value set by the keys in \S\ref{sec:choosing}.
-Note that the font steps and the scale of \cs{normalsize} are constants and cannot be changed.
-
-\Key{\meta{font size command}/scale}[\meta{fp expr}]
-\KeepNextPar*
-
-The keys \Key{\meta{font size command}\slash{}scale} set the scale of \meta{font size command} to \meta{fp expr}, ignoring the value set by the key \Key{typographic\-/scale}.
-The key \Key{normalsize\slash{}scale} is not defined.
-
-\Key{\meta{font size command}/size}[\meta{dim expr}]
-\KeepNextPar*
-
-The keys \Key{\meta{font size command}\slash{}size} set the size of \meta{font size command} to \meta{dim expr}, ignoring the values set by the keys \Key{typographic\-/scale} and \Key{\meta{font size command}\slash{}scale}.
-\meta{dim expr} supplies a default unit of \unit{pt}.
-
-The package will issue a warning if the user sets the keys \Key{\meta{font size command}\slash{}size} and \Key{\meta{font size command}\slash{}scale} for the same \meta{font size command} since the latter key will be ignored.
-
-\Key{\meta{font size command}/baselineskip}[\meta{skip expr}]
-\KeepNextPar*
-
-The keys \Key{\meta{font size command}\slash{}baselineskip} set the font baselineskip of \meta{font size command} to \meta{skip expr} instead of calculating it from the size of \meta{font size command} and \Key{baselineskip\-/size\-/ratio}.
-\meta{skip expr} supplies a default unit of \unit{pt}.
-
-\Key{\meta{font size command}}[\meta{dim expr}]
-\nopagebreak\newline
-\Key{\meta{font size command}}[\meta{dim expr}/\meta{skip expr}]
-
-The keys \Key{\meta{font size command}} set the keys \Key{\meta{font size command}\slash{}size} or \Key{\meta{font size command}\slash{}baselineskip} in a condensed format.
-The latter format resembles traditional typographic notation where the size and leading of a text can be expressed as, for example, $10/12$ or $11/13$.
-The number before/after the slash is the size/leading in \unit{pts}.
-
-\Key{ignore-order}[true, false][false]
-\KeepNextPar*
-
-The user should take care to ensure that the font sizes and font baselineskips remain in the correct order when directly setting the scales, sizes, or baselineskips of the different font size commands.
-The magnitudes of the font sizes and font baselineskips should be ordered from \cs{tiny} to \cs{normalsize} to \cs{Huge}.
-This is important for typographic and syntactic consistency.
-This package will issue a warning if they are not in the correct order.
-The user can disable this warning via the key \Key{ignore\-/order}[true] or just \Key{ignore\-/order}.
-
-
-\section{User commands}
-\label{sec:usercommands}
-
-\subsection{Expandable font parameters}
-\label{subsec:fontparameters}
-
-\cs{CurrentFontStep}
-\nopagebreak\newline
-\cs{CurrentFontScale}
-\newline
-\cs{CurrentFontSize}
-\nopagebreak\newline
-\cs{CurrentFontBaselineskip}
-
-These are fully expandable commands that expand to the current font step, scale, size, or baselineskip.
-They can be used for printing or within calculations.
-Caution: \cs{CurrentFontStep} will expand to nothing if the current font step is undefined.
-
-Internally, \cs{CurrentFontStep}, \cs{CurrentFontScale}, and \cs{CurrentFontSize} use the kernel command \cs{f@size}.
-\cs{CurrentFontSize} expands to \texttt{f@size pt}.
-\cs{CurrentFontBaselineskip} expands to the kernel command \cs{f@baselineskip}.
-Note that the low\-/level font command \cs{fontsize}\marg{\meta{dimen}}\marg{\meta{skip}} sets \cs{f@size} to the new font size before expanding its second argument.
-This means that \cs{CurrentFontStep}, \cs{CurrentFontScale}, and \cs{CurrentFontSize} may need to be first expanded if used in \meta{skip}.
-This package provides the command \cs{SetFontSizeBaselineskip} as an alternative to \cs{fontsize} + \cs{selectfont} that avoids this issue (\S\ref{subsec:fontsize}).
-
-\subsection{More font sizing commands}
-\label{subsec:fontsize}
-
-The \pkg{fontscale} package provides the commands \cs{SetFontStep}, \cs{SetFontScale}, \cs{SetFontSize}, \cs{ScaleFont}, and \cs{SetFontSizeBaselineskip} which set the font size in different ways.
-The first three commands have a starred version which sets the font size relative to the current font size.
-Internally, these commands all use the low\-/level font commands \cs{fontsize} and \cs{selectfont}.
-These commands should be used only in special cases.
-Generally, users should prefer the font size commands from \cs{tiny} to \cs{Huge} for typographic and syntactic consistency, although \cs{SetFontStep*}\marg{\meta{integer}} can use a font size command directly.
-
-\cs{SetFontStep}\marg{\meta{fp expr}}
-\nopagebreak\newline
-\cs{SetFontStep*}\marg{\meta{fp expr}}
-
-\cs{SetFontStep} sets the font size by setting the font step to \meta{fp expr}.
-The starred version \cs{SetFontStep*} adds \meta{fp expr} to the current font step.
-If the choice of typographic scale is not modular or musical, then the only valid values for \meta{fp expr} are the integers from \num{-4} to \num{5}, corresponding to the font size commands from \cs{tiny} to \cs{Huge}.
-\cs{SetFontStep} will issue an error if the calculated font step is invalid.
-The starred version \cs{SetFontStep*} will also issue an error if the current font step is invalid.
-\cs{SetFontStep} sets the font baselineskip to the calculated font size \texttimes{} \Key{baselineskip\-/size\-/ratio}.
-If the calculated font step matches the step of any font size command, then that font size command will be used directly.
-
-\listheading{Examples:}
-\begin{itemize}
- \item
- For example, \cs{SetFontStep}\marg{-2} and \cs{SetFontStep}\marg{2} use \cs{footnotesize} and \cs{Large}.
- Note that it is typically better to use the equivalent font size command in place of \cs{SetFontStep}\marg{\meta{integer}}.
- \item
- If the current font size is \cs{normalsize}, \cs{SetFontStep*}\marg{1} and \cs{SetFontStep*}\marg{-1} use \cs{large} and \cs{small}.
- This is useful for moving up or down a note on the typographic scale.
- \item
- If the choice of typographic scale is modular or musical, \cs{SetFontStep*}\marg{-0.5} sets the font size and font baselineskip to values between that of \cs{normalsize} and \cs{small}.
- Otherwise, it produces an error.
-\end{itemize}
-
-\cs{SetFontScale}\marg{\meta{fp expr}}
-\nopagebreak\newline
-\cs{SetFontScale*}\marg{\meta{fp expr}}
-
-\cs{SetFontScale} sets the font size by setting the font scale to \meta{fp expr}.
-The font baselineskip is set to the calculated font size \texttimes{} \Key{baselineskip\-/size\-/ratio}.
-The starred version \cs{SetFontScale*} adds \meta{fp expr} to the current font scale.
-For example, \cs{SetFontScale}\marg{1.25} makes the font size 25\% larger than \cs{normalsize}.
-If the current font size is \cs{normalsize}, \cs{SetFontScale*}\marg{0.2} is equivalent to \cs{SetFontScale}\marg{1.2}.
-
-\cs{SetFontSize}\marg{\meta{dim expr}}
-\nopagebreak\newline
-\cs{SetFontSize*}\marg{\meta{dim expr}}
-
-\cs{SetFontSize} sets the font size to \meta{dim expr}.
-\meta{dim expr} supplies a default unit of \unit{pt}.
-The font baselineskip is set to the calculated font size \texttimes{} \Key{baselineskip\-/size\-/ratio}.
-The starred version \cs{SetFontSize*} adds \meta{dim expr} to the current font size.
-For example, \cs{SetFontSize*}\marg{1} and \cs{SetFontSize*}\marg{-1pt} increase and decrease the current font size by a \unit{pt}.
-
-\cs{ScaleFont}\marg{\meta{fp expr}}
-\KeepNextPar*
-
-Scales the current font size and the current font baselineskip by a factor of \meta{fp expr}.
-For example, if the current font size and font baselineskip are \qty{10}{pt} and \qty{12}{pt}, using \cs{ScaleFont}\marg{0.8} will reduce them proportionally to \qty{8}{pt} and \qty{9.6}{pt}.
-
-\cs{SetFontSizeBaselineskip}\marg{\meta{dim expr}}\marg{\meta{skip expr}}
-\KeepNextPar*
-
-Sets the font size to \meta{dim expr} and the font baselineskip to \meta{skip expr}.
-Both arguments supply a default unit of \unit{pt}.
-\cs{SetFontSizeBaselineskip} can be used as an alternative to \cs{fontsize} + \cs{selectfont} as it avoids the issue with \cs{f@size} discussed in \S\ref{subsec:fontparameters}.
-
-\subsection{Testing and debugging}
-\label{subsec:debug}
-
-The commands documented here are intended primarily for testing and debugging.
-I have used them often when developing this package so I think users will find them helpful.
-
-\cs{PrintFontParameters}
-\nopagebreak\newline
-\cs{PrintAllFontParameters}
-
-\cs{PrintFontParameters} prints the current font step, scale, size, and baselineskip in this order in a comma\-/separated list of key = value pairs.
-If the current font step is undefined (as explained for \cs{SetFontStep} in \S\ref{subsec:fontsize}), it will be left blank.
-\cs{PrintAllFontParameters} prints the step, scale, size, and baselineskip of each font size command.
-
-\cs{PrintSampleText}\oarg{\meta{text}}
-\nopagebreak\newline
-\cs{PrintSampleText*}\oarg{\meta{text}}
-
-\cs{PrintSampleText} prints \meta{text} in each font size ordered from \cs{tiny} to \cs{Huge} each followed by a paragraph break.
-The starred version \cs{PrintSampleText*} reverses the sizing order.
-The \meta{text} can be changed via the optional argument, but cannot contain \cs{par} tokens.
-The default \meta{text} is \enquote{The \texttt{fontscale} package: A user interface for setting document font sizes}.
-One useful way of printing example text is by using
-\cs{PrintSampleText}\oarg{\cs{PrintFontSizeCommand}:\textvisiblespace{}\cs{PrintFontParameters}}.
-
-\cs{PrintFontSizeCommand}
-\KeepNextPar*
-
-\cs{PrintFontSizeCommand} tests whether the current font size and the current font baselineskip match the font size and font baselineskip of any font size command from \cs{tiny} to \cs{Huge}.
-If so, it prints the name of that font size command, including the backslash character.
-If not, it instead prints \enquote{UNDEFINED\@}.
-\vfill\pagebreak%manual
-
-\subsection
- {%
- \texorpdfstring
- {More on \cs{fontscalesetup}}
- {More on \textbackslash{}fontscalesetup}%
- }
-\label{subsec:fontscalesetup}
-
-\cs{fontscalesetup}\marg{\meta{keyval list}}
-\KeepNextPar*
-
-Sets and processes the \pkg{fontscale} package keys and then uses \cs{normalsize}.
-\cs{fontscalesetup} can be applied mid\-/document or locally within the current \TeX{} group.
-
-\Key{reset}[initial, preamble]
-\KeepNextPar*
-
-The key \Key{reset} is also available.
-Its value must be either \texttt{initial} or \texttt{preamble}.
-The key \Key{reset}[initial] or just \Key{reset} sets all the keys to their initial values.
-The key \Key{reset}[preamble] sets all the keys to their values at the end of the preamble (or does nothing if used before the end of the preamble).
-
-
-\section{Programming}
-\label{sec:programming}
-
-This section is relevant to \LaTeX3 programmers.
-
-The document 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}.
-
-Each takes the form:
-
-\begingroup
- \ttfamily
- \textbackslash{}c\_fontscale\_\meta{font size command}\_step\_fp
- \nopagebreak\newline
- \textbackslash{}l\_fontscale\_\meta{font size command}\_scale\_fp
- \newline
- \textbackslash{}l\_fontscale\_\meta{font size command}\_size\_dim
- \nopagebreak\newline
- \textbackslash{}l\_fontscale\_\meta{font size command}\_baselineskip\_skip
-\endgroup
-
-Exception:
-\cs{l_fontscale_normalsize_scale_fp} is not defined.
-The scale of \cs{normalsize} is instead stored as the constant \cs{c_fontscale_normalsize_scale_fp}, which always equals \num{1}.
-
-The step, scale, size, and baselineskip of each font size command are also stored in property lists, one for each font size command:
-
-\texttt{\textbackslash{}l\_fontscale\_\meta{font size command}\_prop}
-
-\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/fontscale/fontscale-table-classic.tex b/macros/latex/contrib/fontscale/fontscale-table-classic.tex
new file mode 100644
index 0000000000..b1d98834c6
--- /dev/null
+++ b/macros/latex/contrib/fontscale/fontscale-table-classic.tex
@@ -0,0 +1,41 @@
+\ProvidesFile
+ {fontscale-table-classic.tex}
+ [2024-08-02]
+
+\begin{table}
+ \centering
+ \caption
+ {%
+ The font size of each font size command from \cs{tiny} to \cs{Huge} in units of \unit{pt} when using a classic typographic scale.%
+ \label{table:classic}%
+ }
+ \bigskip
+ \begin{tblr}
+ {
+ colspec=
+ {
+ l
+ Q[si={table-format=3.2},c]
+ Q[si={table-format=3.2},c]
+ Q[si={table-format=3.2},c]
+ }
+ , cell{1}{2-Z}={guard}
+ , cell{2-Z}{1}={cmd=\cs}
+ , cell{1}{2-Z}={cmd=\Key}
+ }
+ \toprule
+ font size command & classic-10pt & classic-11pt & classic-12pt \\
+ \midrule
+ tiny & 6 & 7 & 8 \\
+ scriptsize & 7 & 8 & 9 \\
+ footnotesize & 8 & 9 & 10 \\
+ small & 9 & 10 & 11 \\
+ normalsize & 10 & 11 & 12 \\
+ large & 11 & 12 & 14 \\
+ Large & 12 & 14 & 16 \\
+ LARGE & 14 & 16 & 18 \\
+ huge & 16 & 18 & 21 \\
+ Huge & 18 & 21 & 24 \\
+ \bottomrule
+ \end{tblr}
+\end{table} \ No newline at end of file
diff --git a/macros/latex/contrib/fontscale/fontscale-table-font-steps.tex b/macros/latex/contrib/fontscale/fontscale-table-font-steps.tex
new file mode 100644
index 0000000000..7b0a7fca87
--- /dev/null
+++ b/macros/latex/contrib/fontscale/fontscale-table-font-steps.tex
@@ -0,0 +1,39 @@
+\ProvidesFile
+ {fontscale-table-font-steps.tex}
+ [2024-08-02]
+
+\begin{table}
+ \centering
+ \caption
+ {%
+ The font step of each font size command from \cs{tiny} to \cs{Huge}.
+ These are constants and cannot be changed.%
+ \label{table:fontsteps}%
+ }
+ \bigskip
+ \begin{tblr}
+ {
+ colspec=
+ {
+ l
+ Q[si={table-format=3.2},c]
+ }
+ , cell{1}{2}={guard}
+ , cell{2-Z}{1}={cmd=\cs}
+ }
+ \toprule
+ font size command & font step \\
+ \midrule
+ tiny & -4 \\
+ scriptsize & -3 \\
+ footnotesize & -2 \\
+ small & -1 \\
+ normalsize & 0 \\
+ large & 1 \\
+ Large & 2 \\
+ LARGE & 3 \\
+ huge & 4 \\
+ Huge & 5 \\
+ \bottomrule
+ \end{tblr}
+\end{table} \ No newline at end of file
diff --git a/macros/latex/contrib/fontscale/fontscale-table-musical.tex b/macros/latex/contrib/fontscale/fontscale-table-musical.tex
new file mode 100644
index 0000000000..aac7c60ebc
--- /dev/null
+++ b/macros/latex/contrib/fontscale/fontscale-table-musical.tex
@@ -0,0 +1,39 @@
+\ProvidesFile
+ {fontscale-table-musical.tex}
+ [2024-08-02]
+
+\begin{table}
+ \centering
+ \caption
+ {%
+ The font size of each font size command from \cs{tiny} to \cs{Huge} when using a musical typographic scale with the initial values.
+ The font sizes are in units of \unit{pt} and rounded to two decimal places.%
+ \label{table:musical}%
+ }
+ \bigskip
+ \begin{tblr}
+ {
+ colspec=
+ {
+ l
+ Q[si={table-format=3.2},c]
+ }
+ , cell{1}{2}={guard}
+ , cell{2-Z}{1}={cmd=\cs}
+ }
+ \toprule
+ font size command & \Key{musical} \\
+ \midrule
+ tiny & 5.74 \\
+ scriptsize & 6.60 \\
+ footnotesize & 7.58 \\
+ small & 8.71 \\
+ normalsize & 10 \\
+ large & 11.49 \\
+ Large & 13.20 \\
+ LARGE & 15.16 \\
+ huge & 17.41 \\
+ Huge & 20 \\
+ \bottomrule
+ \end{tblr}
+\end{table} \ No newline at end of file
diff --git a/macros/latex/contrib/fontscale/fontscale.pdf b/macros/latex/contrib/fontscale/fontscale.pdf
new file mode 100644
index 0000000000..0ac3be30ee
--- /dev/null
+++ b/macros/latex/contrib/fontscale/fontscale.pdf
Binary files differ
diff --git a/macros/latex/contrib/fontscale/fontscale.sty b/macros/latex/contrib/fontscale/fontscale.sty
index d032e49860..314c337e3e 100644
--- a/macros/latex/contrib/fontscale/fontscale.sty
+++ b/macros/latex/contrib/fontscale/fontscale.sty
@@ -1,33 +1,32 @@
-% Package : fontscale -- A user interface for setting document font sizes
+% Package : fontscale -- A flexible interface for setting font sizes
% Copyright : 2024 (c) Oliver Beery <beeryoliver@gmail.com>
% CTAN : https://ctan.org/pkg/fontscale
% Repository: https://github.com/beeryoliver/fontscale
% License : The LaTeX Project Public License 1.3c
-% The 2022-06-01 LaTeX kernel update added \ProcessKeyOptions.
-\NeedsTeXFormat{LaTeX2e}[2022-06-01]
+% LaTeX2e version 2023-11-01 added \IfExplAtLeastTF.
+\NeedsTeXFormat{LaTeX2e}[2023-11-01]
\ProvidesExplPackage
{fontscale}
- {2024-05-17}
- {1.3.0}
- {A user interface for setting document font sizes}
+ {2024-08-02}
+ {2.0.0}
+ {A flexible interface for setting font sizes}
-% The 2023-10-10 l3kernel update added many 'e'-variants.
-\IfExplAtLeastTF { 2023-10-10 }
- { }
+% l3kernel version 2023-10-10 added many 'e'-variants.
+\IfExplAtLeastTF { 2023-10-10 } { }
{
\msg_new:nnn { fontscale } { expl3-out-of-date }
{
- The~ package~ could~ not~ load.~
- The~ fontscale~ package~ requires~
- L3~ programming~ layer~ version~ 2023-10-10~ or~ later.
+ 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 }
}
% This package does not require any other packages!
-% DECLARE FONT PARAMETER VARIABLES
+% DECLARE FONT SIZE PARAMETER VARIABLES
\fp_const:Nn \c_fontscale_tiny_step_fp { -4 }
\fp_const:Nn \c_fontscale_scriptsize_step_fp { -3 }
@@ -74,31 +73,7 @@
\skip_new:N \l_fontscale_huge_baselineskip_skip
\skip_new:N \l_fontscale_Huge_baselineskip_skip
-\prop_new:N \l_fontscale_tiny_prop
-\prop_new:N \l_fontscale_scriptsize_prop
-\prop_new:N \l_fontscale_footnotesize_prop
-\prop_new:N \l_fontscale_small_prop
-\prop_new:N \l_fontscale_normalsize_prop
-\prop_new:N \l_fontscale_large_prop
-\prop_new:N \l_fontscale_Large_prop
-\prop_new:N \l_fontscale_LARGE_prop
-\prop_new:N \l_fontscale_huge_prop
-\prop_new:N \l_fontscale_Huge_prop
-
-\prop_put:Nnn \l_fontscale_tiny_prop { step } { -4 }
-\prop_put:Nnn \l_fontscale_scriptsize_prop { step } { -3 }
-\prop_put:Nnn \l_fontscale_footnotesize_prop { step } { -2 }
-\prop_put:Nnn \l_fontscale_small_prop { step } { -1 }
-\prop_put:Nnn \l_fontscale_normalsize_prop { step } { 0 }
-\prop_put:Nnn \l_fontscale_large_prop { step } { 1 }
-\prop_put:Nnn \l_fontscale_Large_prop { step } { 2 }
-\prop_put:Nnn \l_fontscale_LARGE_prop { step } { 3 }
-\prop_put:Nnn \l_fontscale_huge_prop { step } { 4 }
-\prop_put:Nnn \l_fontscale_Huge_prop { step } { 5 }
-
-\prop_put:Nnn \l_fontscale_normalsize_prop { scale } { 1 }
-
-% INITIALIZE FONT PARAMETER VARIABLES
+% INITIALIZE FONT SIZE PARAMETER VARIABLES
\fp_set:Nn \l_fontscale_tiny_scale_fp { 0.6 }
\fp_set:Nn \l_fontscale_scriptsize_scale_fp { 0.7 }
@@ -132,177 +107,219 @@
\skip_set:Nn \l_fontscale_huge_baselineskip_skip { 19.2pt }
\skip_set:Nn \l_fontscale_Huge_baselineskip_skip { 21.6pt }
-\prop_put:Nnn \l_fontscale_tiny_prop { scale } { 0.6 }
-\prop_put:Nnn \l_fontscale_scriptsize_prop { scale } { 0.7 }
-\prop_put:Nnn \l_fontscale_footnotesize_prop { scale } { 0.8 }
-\prop_put:Nnn \l_fontscale_small_prop { scale } { 0.9 }
-\prop_put:Nnn \l_fontscale_large_prop { scale } { 1.1 }
-\prop_put:Nnn \l_fontscale_Large_prop { scale } { 1.2 }
-\prop_put:Nnn \l_fontscale_LARGE_prop { scale } { 1.4 }
-\prop_put:Nnn \l_fontscale_huge_prop { scale } { 1.6 }
-\prop_put:Nnn \l_fontscale_Huge_prop { scale } { 1.8 }
-
-\prop_put:Nnn \l_fontscale_tiny_prop { size } { 6pt }
-\prop_put:Nnn \l_fontscale_scriptsize_prop { size } { 7pt }
-\prop_put:Nnn \l_fontscale_footnotesize_prop { size } { 8pt }
-\prop_put:Nnn \l_fontscale_small_prop { size } { 9pt }
-\prop_put:Nnn \l_fontscale_normalsize_prop { size } { 10pt }
-\prop_put:Nnn \l_fontscale_large_prop { size } { 11pt }
-\prop_put:Nnn \l_fontscale_Large_prop { size } { 12pt }
-\prop_put:Nnn \l_fontscale_LARGE_prop { size } { 14pt }
-\prop_put:Nnn \l_fontscale_huge_prop { size } { 16pt }
-\prop_put:Nnn \l_fontscale_Huge_prop { size } { 18pt }
-
-\prop_put:Nnn \l_fontscale_tiny_prop { baselineskip } { 7.2pt }
-\prop_put:Nnn \l_fontscale_scriptsize_prop { baselineskip } { 8.4pt }
-\prop_put:Nnn \l_fontscale_footnotesize_prop { baselineskip } { 9.6pt }
-\prop_put:Nnn \l_fontscale_small_prop { baselineskip } { 10.8pt }
-\prop_put:Nnn \l_fontscale_normalsize_prop { baselineskip } { 12 pt }
-\prop_put:Nnn \l_fontscale_large_prop { baselineskip } { 13.2pt }
-\prop_put:Nnn \l_fontscale_Large_prop { baselineskip } { 14.4pt }
-\prop_put:Nnn \l_fontscale_LARGE_prop { baselineskip } { 16.8pt }
-\prop_put:Nnn \l_fontscale_huge_prop { baselineskip } { 19.2pt }
-\prop_put:Nnn \l_fontscale_Huge_prop { baselineskip } { 21.6pt }
-
% SOME VARIABLES
-% Used for mapping.
-\tl_const:Nn \c__fontscale_names_tl
- {
- {tiny} {scriptsize} {footnotesize} {small} {normalsize}
- {large} {Large} {LARGE} {huge} {Huge}
- }
-\tl_const:Nn \c__fontscale_names_other_tl
- {
- {tiny} {scriptsize} {footnotesize} {small}
- {large} {Large} {LARGE} {huge} {Huge}
- }
-
% Used to speed up floating point calculations.
\fp_new:N \l__fontscale_normalsize_size_fp
\fp_set:Nn \l__fontscale_normalsize_size_fp { 10 }
+\fp_new:N \l__fontscale_musical_base_fp
\fp_new:N \l__fontscale_musical_notes_fp
-% Temporary variables
-\tl_new:N \l__fontscale_step_tl
-\tl_new:N \l__fontscale_scale_tl
-\dim_new:N \l__fontscale_size_dim
+% Scratch variables
+\tl_new:N \l__fontscale_tmp_tl
+\dim_new:N \l__fontscale_tmp_dim
+\fp_new:N \l__fontscale_tmp_fp
% SOME HELPER FUNCTIONS
-% Sets a dimen/skip variable from a dimen/skip expression, supplying a default
+% Sets a dimen/skip variable from a dimen/skip expression, appending a default
% unit of pt.
-\cs_new_protected:Npn \__fontscale_dim_set_with_default_pt:Nn #1#2
+\cs_new_protected:Npn \__fontscale_dim_set_default_pt:Nn #1#2
{ \@defaultunits #1 = \dimexpr #2 pt \relax \relax \@nnil }
-\cs_generate_variant:Nn \__fontscale_dim_set_with_default_pt:Nn { c }
-\cs_new_protected:Npn \__fontscale_skip_set_with_default_pt: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
{ \@defaultunits #1 = \glueexpr #2 pt \relax \@nnil }
-\cs_generate_variant:Nn \__fontscale_skip_set_with_default_pt:Nn { c }
-% Used to define \tiny to \Huge. Need \dim_use:N for compatibility with the
-% microtype package. Otherwise the following would do:
-% \cs_new_protected:Npn \__fontscale_fontsize:NNN { \@setfontsize }
-\cs_new_protected:Npn \__fontscale_fontsize:NNN #1#2
- { \@setfontsize #1 { \dim_use:N #2 } }
-% Similar to \fontsize + \selectfont, except that it takes dimen and skip
-% expressions as arguments and avoids the issue where \f@size is set to the new
-% font size before the second argument is expanded.
+\cs_generate_variant:Nn \__fontscale_skip_set_default_pt:Nn { c }
+% Similar to \@setfontsize. Used to define \tiny to \Huge. Need \dim_use:N for
+% compatibility with the microtype package.
+\cs_new_protected:Npn \__fontscale_fontsize:NNN #1#2#3
+ {
+ \mode_if_math:TF
+ {
+ \msg_warning:nne { fontscale } { math-mode-warning }
+ { \token_to_str:N #1 }
+ }
+ {
+ \cs_set_eq:NN \@currsize #1
+ \fontsize { \dim_use:N #2 } #3 \selectfont
+ }
+ }
+% Similar to \fontsize + \selectfont, except that it:
+% (1) Takes dimen and skip expressions as arguments.
+% (2) Avoids the issue where \f@size is set to the new font size before the
+% second argument is expanded.
+% (3) Provides error checking for the font size and font baselineskip.
+\dim_new:N \l__fontscale_fontsize_dim
\skip_new:N \l__fontscale_fontsize_skip
\cs_new_protected:Npn \__fontscale_fontsize:nn #1#2
{
- \__fontscale_skip_set_with_default_pt:Nn \l__fontscale_fontsize_skip {#2}
- \fontsize { = \dimexpr #1 pt \relax \relax } \l__fontscale_fontsize_skip
- \selectfont
+ \__fontscale_dim_set_default_pt:Nn \l__fontscale_fontsize_dim {#1}
+ \__fontscale_skip_set_default_pt:Nn \l__fontscale_fontsize_skip {#2}
+ \dim_compare:nNnTF \l__fontscale_fontsize_dim > \c_zero_dim
+ {
+ \dim_compare:nNnTF \l__fontscale_fontsize_skip <
+ \l__fontscale_fontsize_dim
+ { \msg_error:nn { fontscale } { font-baselineskip-out-of-bounds } }
+ {
+ \fontsize \l__fontscale_fontsize_dim \l__fontscale_fontsize_skip
+ \selectfont
+ }
+ }
+ { \msg_error:nn { fontscale } { font-size-out-of-bounds } }
}
% Similar to the above function, except that it sets the font baselineskip
% equal to the new font size times the baselineskip-size-ratio.
\cs_new_protected:Npn \__fontscale_fontsize:n #1
{
- \fontsize { = \dimexpr #1 pt \relax \relax }
- { \fp_to_dim:n { \f@size * \l__fontscale_baselineskip_size_ratio_fp } }
- \selectfont
+ \__fontscale_dim_set_default_pt:Nn \l__fontscale_fontsize_dim {#1}
+ \dim_compare:nNnTF \l__fontscale_fontsize_dim > \c_zero_dim
+ {
+ \fontsize \l__fontscale_fontsize_dim
+ {
+ \fp_to_dim:n
+ {
+ \l__fontscale_fontsize_dim
+ * \l__fontscale_baselineskip_size_ratio_fp
+ }
+ }
+ \selectfont
+ }
+ { \msg_error:nn { fontscale } { font-size-out-of-bounds } }
}
% MESSAGES
-\msg_new:nnn { fontscale } { modular-ratio-out-of-bounds }
+\msg_new:nnn { fontscale } { key-baselineskip-size-ratio-out-of-bounds }
{
- The~ value~ for~ the~ key~ 'modular / ratio'~
+ The~ value~ of~ the~ key~ 'baselineskip-size-ratio'~
\msg_line_context: \c_space_tl
- must~ be~ greater~ than~ 1.
+ must~ be~ at~ least~ 1.
}
-\msg_new:nnn { fontscale } { musical-ratio-out-of-bounds }
+\msg_new:nnn { fontscale } { key-musical-base-out-of-bounds }
{
- The~ value~ for~ the~ key~ 'musical / ratio'~
+ The~ value~ of~ the~ key~ 'musical / base'~
+ \msg_line_context: \c_space_tl
+ must~ be~ a~ positive~ length.
+ }
+\msg_new:nnn { fontscale } { key-musical-ratio-out-of-bounds }
+ {
+ The~ value~ of~ the~ key~ 'musical / ratio'~
\msg_line_context: \c_space_tl
must~ be~ greater~ than~ 1.
}
-\msg_new:nnn { fontscale } { musical-notes-out-of-bounds }
+\msg_new:nnn { fontscale } { key-musical-notes-out-of-bounds }
{
- The~ value~ for~ the~ key~ 'musical / notes'~
+ The~ value~ of~ the~ key~ 'musical / notes'~
\msg_line_context: \c_space_tl
must~ be~ a~ positive~ integer.
}
-\msg_new:nnn { fontscale } { key-font-scale-ignored }
+\msg_new:nnn { fontscale } { key-font-scale-out-of-bounds }
{
- Key~ '#1 / scale'~
+ The~ value~ of~ the~ key~ '#1 / scale'~
\msg_line_context: \c_space_tl
- ignored.~
- Setting~ the~ scale~ and~ size~ keys~ for~ the~ same~
- font~ size~ command~ ignores~ the~ scale~ key.
+ must~ be~ positive.
+ }
+\msg_new:nnn { fontscale } { key-font-size-out-of-bounds }
+ {
+ The~ value~ of~ the~ key~ '#1 / size'~
+ \msg_line_context: \c_space_tl
+ must~ be~ a~ positive~ length.
+ }
+\msg_new:nnn { fontscale } { key-font-scale-overwritten }
+ {
+ The~ font~ size~ set~ by~ the~ key~ '#1 / scale'~
+ has~ been~ overwritten~ by~ the~ key~ '#1 / size'~
+ \msg_line_context:.
+ }
+\msg_new:nnn { fontscale } { key-font-baselineskip-out-of-bounds }
+ {
+ The~ value~ of~ the~ key~ '#1 / baselineskip'~
+ \msg_line_context: \c_space_tl
+ must~ be~ greater~ than~ or~ equal~ to~
+ the~ font~ size~ of~ '\iow_char:N \\#1'.
}
\msg_new:nnn { fontscale } { font-sizes-out-of-order }
{
The~ font~ sizes~
\msg_line_context: \c_space_tl
are~ not~ in~ the~ correct~ order.~
- The~ magnitude~ of~ the~ font~ sizes~ should~ be~ ordered~ from~
- '\iow_char:N \\tiny'~ to~ '\iow_char:N \\normalsize'~ 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 } { font-baselineskips-out-of-order }
{
The~ font~ baselineskips~
\msg_line_context: \c_space_tl
are~ not~ in~ the~ correct~ order.~
- The~ magnitude~ of~ the~ font~ baselineskips~ should~ be~ ordered~ from~
- '\iow_char:N \\tiny'~ to~ '\iow_char:N \\normalsize'~ to~
- '\iow_char:N \\Huge'.
+ The~ lengths~ of~ the~ font~ baselineskips~ should~ be~ ordered~ from~
+ '\iow_char:N \\tiny'~ to~ '\iow_char:N \\Huge'.
+ }
+
+\msg_new:nnn { fontscale } { math-mode-warning }
+ {
+ '#1'~
+ \msg_line_context: \c_space_tl
+ does~ nothing~ if~ used~ in~ math~ mode.
+ }
+\msg_new:nnn { fontscale } { math-mode-error }
+ {
+ '#1'~
+ \msg_line_context: \c_space_tl
+ cannot~ be~ used~ in~ math~ mode.
+ }
+\msg_new:nnn { fontscale } { font-size-out-of-bounds }
+ {
+ The~ font~ size~
+ \msg_line_context: \c_space_tl
+ must~ be~ a~ positive~ length.
+ }
+\msg_new:nnn { fontscale } { font-baselineskip-out-of-bounds }
+ {
+ The~ font~ baselineskip~
+ \msg_line_context: \c_space_tl
+ must~ be~ greater~ than~ or~ equal~ to~ the~ font~ size.
}
\msg_new:nnn { fontscale } { font-step-out-of-bounds }
{
The~ font~ step~
\msg_line_context: \c_space_tl
- must~ be~ an~ integer~ from~ -4~ to~ 5,~
- unless~ the~ value~ for~ the~ choice~ key~ 'typographic-scale'~
- is~ 'modular'~ or~ 'musical'.
+ must~ equal~ an~ integer~ from~ -4~ to~ 5,~
+ unless~ the~ value~ of~ the~ key~ 'typographic-scale'~ is~ 'musical'.
}
\msg_new:nnn { fontscale } { current-font-step-out-of-bounds }
{
'\iow_char:N \\SetFontStep*'~
\msg_line_context: \c_space_tl
could~ not~ calculate~ the~ new~ font~ step~ because~
- the~ current~ font~ step~ is~ undefined.
+ the~ current~ font~ step~ is~ undefined.~
+ \msg_see_documentation_text:n { fontscale }
}
% DEFINE KEYS
\str_new:N \l__fontscale_typographic_scale_str
+\dim_new:N \l__fontscale_musical_base_dim
-\keys_define:nn { fontscale }
+\cs_new_protected:Npn \__fontscale_keys_name:n #1
{
- reset .choices:nn = { initial , preamble }
- { \use:c { __fontscale_keys_precompile_#1: } }
- , reset .default:n = initial
-
- , ignore-order .bool_set:N = \l__fontscale_ignore_order_bool
- , ignore-order .default:n = true
+ \tl_if_in:nnTF {#1} { / }
+ { \__fontscale_keys_name_split:ww #1 \q_stop }
+ { \tl_set:cn { l__fontscale_ \l_keys_key_str _size_tl } {#1} }
+ }
+\cs_new_protected:Npn \__fontscale_keys_name_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 _baselineskip_tl } {#2}
+ }
- , baselineskip-size-ratio .fp_set:N =
+\keys_define:nn { fontscale }
+ {
+ baselineskip-size-ratio .fp_set:N =
\l__fontscale_baselineskip_size_ratio_fp
, baselineskip-size-ratio .value_required:n = true
, typographic-scale .choices:nn =
- { classic-10pt , classic-11pt , classic-12pt , modular , musical }
+ { classic-10pt , classic-11pt , classic-12pt , musical }
{ \str_set:Nn \l__fontscale_typographic_scale_str {#1} }
, typographic-scale .value_required:n = true
@@ -315,18 +332,16 @@
, classic-12pt .meta:n = { typographic-scale = classic-12pt }
, classic-12pt .value_forbidden:n = true
- , modular .meta:n = { typographic-scale = modular }
- , modular .value_forbidden:n = true
-
, musical .meta:n = { typographic-scale = musical }
, musical .value_forbidden:n = true
-
- , modular / ratio .fp_set:N = \l__fontscale_modular_ratio_fp
- , modular / ratio .value_required:n = true
}
\keys_define:nn { fontscale / musical }
{
- ratio .fp_set:N = \l__fontscale_musical_ratio_fp
+ base .code:n =
+ \__fontscale_dim_set_default_pt:Nn \l__fontscale_musical_base_dim {#1}
+ , base .value_required:n = true
+
+ , ratio .fp_set:N = \l__fontscale_musical_ratio_fp
, ratio .value_required:n = true
, notes .int_set:N = \l__fontscale_musical_notes_int
@@ -441,58 +456,46 @@
}
\keys_define:nn { fontscale }
{
- tiny .code:n = \__fontscale_keys_name_code:n {#1}
+ tiny .code:n = \__fontscale_keys_name:n {#1}
, tiny .value_required:n = true
- , scriptsize .code:n = \__fontscale_keys_name_code:n {#1}
+ , scriptsize .code:n = \__fontscale_keys_name:n {#1}
, scriptsize .value_required:n = true
- , footnotesize .code:n = \__fontscale_keys_name_code:n {#1}
+ , footnotesize .code:n = \__fontscale_keys_name:n {#1}
, footnotesize .value_required:n = true
- , small .code:n = \__fontscale_keys_name_code:n {#1}
+ , small .code:n = \__fontscale_keys_name:n {#1}
, small .value_required:n = true
- , normalsize .code:n = \__fontscale_keys_name_code:n {#1}
+ , normalsize .code:n = \__fontscale_keys_name:n {#1}
, normalsize .value_required:n = true
- , large .code:n = \__fontscale_keys_name_code:n {#1}
+ , large .code:n = \__fontscale_keys_name:n {#1}
, large .value_required:n = true
- , Large .code:n = \__fontscale_keys_name_code:n {#1}
+ , Large .code:n = \__fontscale_keys_name:n {#1}
, Large .value_required:n = true
- , LARGE .code:n = \__fontscale_keys_name_code:n {#1}
+ , LARGE .code:n = \__fontscale_keys_name:n {#1}
, LARGE .value_required:n = true
- , huge .code:n = \__fontscale_keys_name_code:n {#1}
+ , huge .code:n = \__fontscale_keys_name:n {#1}
, huge .value_required:n = true
- , Huge .code:n = \__fontscale_keys_name_code:n {#1}
+ , Huge .code:n = \__fontscale_keys_name:n {#1}
, Huge .value_required:n = true
}
-\cs_new_protected:Npn \__fontscale_keys_name_code:n #1
- {
- \str_if_in:nnTF {#1} { / }
- { \__fontscale_keys_name_code_split:ww #1 \q_stop }
- { \tl_set:cn { l__fontscale_ \l_keys_key_str _size_tl } {#1} }
- }
-\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 _baselineskip_tl } {#2}
- }
-% PRE-COMPILE KEYS
+% INITIALIZE AND PRE-COMPILE KEYS
% Pre-compiles the keys with their initial values and then sets the keys to
% their initial values. This is done by hand for speed.
-\cs_new_protected:Npn \__fontscale_keys_precompile_initial:
+\cs_new_protected:Npn \__fontscale_keys_set_initial:
{
- \bool_set_false:N \l__fontscale_ignore_order_bool
\fp_set:Nn \l__fontscale_baselineskip_size_ratio_fp { 1.2 }
\str_set:Nn \l__fontscale_typographic_scale_str { classic-10pt }
- \fp_set:Nn \l__fontscale_modular_ratio_fp { 1.125 }
+ \dim_set:Nn \l__fontscale_musical_base_dim { 10pt }
\fp_set:Nn \l__fontscale_musical_ratio_fp { 2 }
\int_set:Nn \l__fontscale_musical_notes_int { 5 }
@@ -528,98 +531,23 @@
\tl_set:Nn \l__fontscale_huge_baselineskip_tl { \q_no_value }
\tl_set:Nn \l__fontscale_Huge_baselineskip_tl { \q_no_value }
}
-\__fontscale_keys_precompile_initial:
+\__fontscale_keys_set_initial:
+
+% SET AND PROCESS KEYS
-% Pre-compiles the keys with their values at the end of the preamble. The keys
-% are pre-compiled by hand for speed.
-\cs_new_eq:NN \__fontscale_keys_precompile_preamble: \prg_do_nothing:
-% \AddToHook is passed only a single token for speed.
-\AddToHook { begindocument / before }
- { \__fontscale_keys_precompile_preamble_set: }
-\cs_new_protected:Npn \__fontscale_keys_precompile_preamble_set:
+\NewDocumentCommand \fontscalesetup { s m }
{
- \cs_set_protected:Npe \__fontscale_keys_precompile_preamble:
+ \mode_if_math:TF
{
- \bool_if:NTF \l__fontscale_ignore_order_bool
- { \bool_set_true:N } { \bool_set_false:N }
- \exp_not:N \l__fontscale_ignore_order_bool
- \fp_set:Nn \exp_not:N \l__fontscale_baselineskip_size_ratio_fp
- { \exp_not:V \l__fontscale_baselineskip_size_ratio_fp }
- \str_set:Nn \exp_not:N \l__fontscale_typographic_scale_str
- { \l__fontscale_typographic_scale_str }
- \fp_set:Nn \exp_not:N \l__fontscale_modular_ratio_fp
- { \exp_not:V \l__fontscale_modular_ratio_fp }
- \fp_set:Nn \exp_not:N \l__fontscale_musical_ratio_fp
- { \exp_not:V \l__fontscale_musical_ratio_fp }
- \int_set:Nn \exp_not:N \l__fontscale_musical_notes_int
- { \int_use:N \l__fontscale_musical_notes_int }
-
- \tl_set:Nn \exp_not:N \l__fontscale_tiny_scale_tl
- { \exp_not:V \l__fontscale_tiny_scale_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_scriptsize_scale_tl
- { \exp_not:V \l__fontscale_scriptsize_scale_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_footnotesize_scale_tl
- { \exp_not:V \l__fontscale_footnotesize_scale_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_small_scale_tl
- { \exp_not:V \l__fontscale_small_scale_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_large_scale_tl
- { \exp_not:V \l__fontscale_large_scale_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_Large_scale_tl
- { \exp_not:V \l__fontscale_Large_scale_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_LARGE_scale_tl
- { \exp_not:V \l__fontscale_LARGE_scale_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_huge_scale_tl
- { \exp_not:V \l__fontscale_huge_scale_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_Huge_scale_tl
- { \exp_not:V \l__fontscale_Huge_scale_tl }
-
- \tl_set:Nn \exp_not:N \l__fontscale_tiny_size_tl
- { \exp_not:V \l__fontscale_tiny_size_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_scriptsize_size_tl
- { \exp_not:V \l__fontscale_scriptsize_size_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_footnotesize_size_tl
- { \exp_not:V \l__fontscale_footnotesize_size_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_small_size_tl
- { \exp_not:V \l__fontscale_small_size_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_normalsize_size_tl
- { \exp_not:V \l__fontscale_normalsize_size_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_large_size_tl
- { \exp_not:V \l__fontscale_large_size_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_Large_size_tl
- { \exp_not:V \l__fontscale_Large_size_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_LARGE_size_tl
- { \exp_not:V \l__fontscale_LARGE_size_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_huge_size_tl
- { \exp_not:V \l__fontscale_huge_size_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_Huge_size_tl
- { \exp_not:V \l__fontscale_Huge_size_tl }
-
- \tl_set:Nn \exp_not:N \l__fontscale_tiny_baselineskip_tl
- { \exp_not:V \l__fontscale_tiny_baselineskip_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_scriptsize_baselineskip_tl
- { \exp_not:V \l__fontscale_scriptsize_baselineskip_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_footnotesize_baselineskip_tl
- { \exp_not:V \l__fontscale_footnotesize_baselineskip_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_small_baselineskip_tl
- { \exp_not:V \l__fontscale_small_baselineskip_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_normalsize_baselineskip_tl
- { \exp_not:V \l__fontscale_normalsize_baselineskip_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_large_baselineskip_tl
- { \exp_not:V \l__fontscale_large_baselineskip_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_Large_baselineskip_tl
- { \exp_not:V \l__fontscale_Large_baselineskip_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_LARGE_baselineskip_tl
- { \exp_not:V \l__fontscale_LARGE_baselineskip_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_huge_baselineskip_tl
- { \exp_not:V \l__fontscale_huge_baselineskip_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_Huge_baselineskip_tl
- { \exp_not:V \l__fontscale_Huge_baselineskip_tl }
+ \msg_warning:nne { fontscale } { math-mode-warning }
+ { \token_to_str:N \fontscalesetup }
+ }
+ {
+ \IfBooleanTF #1
+ { \__fontscale_keys_reset:n {#2} }
+ { \__fontscale_keys_set:n {#2} }
}
}
-
-% PROCESS KEYS
-
-\NewDocumentCommand \fontscalesetup { m } { \__fontscale_keys_set:n {#1} }
\cs_new_protected:Npn \__fontscale_keys_set:n #1
{
\keys_set:nn { fontscale } {#1}
@@ -628,55 +556,65 @@
\prg_break:
\prg_break_point:
}
+\cs_new_protected:Npn \__fontscale_keys_reset:n
+ { \__fontscale_keys_set_initial: \__fontscale_keys_set:n }
\cs_new_protected:Npn \__fontscale_keys_process:
{
- \__fontscale_keys_process_check_modular_musical:
+ \__fontscale_keys_process_start:
\__fontscale_keys_process_normalsize:
\__fontscale_keys_process_other:
\__fontscale_keys_process_check_order:
}
-% Issues an error if the key 'modular/ratio', 'musical/ratio', or
-% 'musical/notes' is set to an impossible value.
-\cs_new_protected:Npn \__fontscale_keys_process_check_modular_musical:
+\cs_new_protected:Npn \__fontscale_keys_process_start:
{
- \fp_compare:nNnF \l__fontscale_modular_ratio_fp > \c_one_fp
+ \fp_compare:nNnT \l__fontscale_baselineskip_size_ratio_fp < \c_one_fp
{
- \msg_error:nn { fontscale } { modular-ratio-out-of-bounds }
+ \msg_error:nn { fontscale }
+ { key-baselineskip-size-ratio-out-of-bounds }
+ \prg_break:
+ }
+ \dim_compare:nNnF \l__fontscale_musical_base_dim > \c_zero_dim
+ {
+ \msg_error:nn { fontscale } { key-musical-base-out-of-bounds }
\prg_break:
}
\fp_compare:nNnF \l__fontscale_musical_ratio_fp > \c_one_fp
{
- \msg_error:nn { fontscale } { musical-ratio-out-of-bounds }
+ \msg_error:nn { fontscale } { key-musical-ratio-out-of-bounds }
\prg_break:
}
\int_compare:nNnF \l__fontscale_musical_notes_int > 0
{
- \msg_error:nn { fontscale } { musical-notes-out-of-bounds }
+ \msg_error:nn { fontscale } { key-musical-notes-out-of-bounds }
\prg_break:
}
}
-% Sets the size and baselineskip of \normalsize and updates their property list
-% entries.
+% Sets the font size and font baselineskip of \normalsize.
\cs_new_protected:Npn \__fontscale_keys_process_normalsize:
{
\quark_if_no_value:NTF \l__fontscale_normalsize_size_tl
{
\dim_set:Nn \l_fontscale_normalsize_size_dim
{
- \str_case:VnF \l__fontscale_typographic_scale_str
+ \str_case:Vn \l__fontscale_typographic_scale_str
{
+ { classic-10pt } { 10pt }
{ classic-11pt } { 11pt }
{ classic-12pt } { 12pt }
+ { musical } { \l__fontscale_musical_base_dim }
}
- { 10pt }
}
}
{
- \__fontscale_dim_set_with_default_pt:Nn
- \l_fontscale_normalsize_size_dim { \l__fontscale_normalsize_size_tl }
+ \__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
+ {
+ \msg_error:nnn { fontscale } { key-font-size-out-of-bounds }
+ { normalsize }
+ \prg_break:
+ }
}
- \prop_put:NnV \l_fontscale_normalsize_prop { size }
- \l_fontscale_normalsize_size_dim
\fp_set:Nn \l__fontscale_normalsize_size_fp
{ \l_fontscale_normalsize_size_dim }
\quark_if_no_value:NTF \l__fontscale_normalsize_baselineskip_tl
@@ -691,12 +629,17 @@
}
}
{
- \__fontscale_skip_set_with_default_pt:Nn
+ \__fontscale_skip_set_default_pt:Nn
\l_fontscale_normalsize_baselineskip_skip
{ \l__fontscale_normalsize_baselineskip_tl }
+ \dim_compare:nNnT \l_fontscale_normalsize_baselineskip_skip <
+ \l_fontscale_normalsize_size_dim
+ {
+ \msg_error:nnn { fontscale }
+ { key-font-baselineskip-out-of-bounds } { normalsize }
+ \prg_break:
+ }
}
- \prop_put:NnV \l_fontscale_normalsize_prop { baselineskip }
- \l_fontscale_normalsize_baselineskip_skip
}
% Auxiliary functions that expand to the font size depending on the name of the
% font size command.
@@ -745,57 +688,55 @@
{ Huge } { 24pt }
}
}
-\cs_new:Npn \__fontscale_keys_process_other_modular:n #1
- {
- \fp_to_dim:n
- {
- \l__fontscale_normalsize_size_fp * \l__fontscale_modular_ratio_fp
- ^ \use:c { c_fontscale_#1_step_fp }
- }
- }
\cs_new:Npn \__fontscale_keys_process_other_musical:n #1
{
\fp_to_dim:n
{
- \l__fontscale_normalsize_size_fp * \l__fontscale_musical_ratio_fp
+ \l__fontscale_musical_base_fp * \l__fontscale_musical_ratio_fp
^ ( \use:c { c_fontscale_#1_step_fp }
/ \l__fontscale_musical_notes_fp )
}
}
-% Sets the size, scale, and baselineskip of the other font size commands and
-% updates their property list entries. Issues a warning if the user sets both
-% the scale and size keys for the same font size command.
+% Sets the font size, font scale, and font baselineskip of the other font size
+% commands.
\cs_new_protected:Npn \__fontscale_keys_process_other:
{
- \cs_set_eq:Nc \__fontscale_keys_process_other_typographic_scale:n
+ \str_case:Vn \l__fontscale_typographic_scale_str
{
- \str_case:Vn \l__fontscale_typographic_scale_str
- {
- { classic-10pt } { __fontscale_keys_process_other_classic_xpt:n }
- { classic-11pt } { __fontscale_keys_process_other_classic_xipt:n }
- { classic-12pt } { __fontscale_keys_process_other_classic_xiipt:n }
- { modular } { __fontscale_keys_process_other_modular:n }
- { musical } { __fontscale_keys_process_other_musical:n }
- }
+ { classic-10pt }
+ {
+ \cs_set_eq:NN \__fontscale_keys_process_other_fn_aux:n
+ \__fontscale_keys_process_other_classic_xpt:n
+ }
+ { classic-11pt }
+ {
+ \cs_set_eq:NN \__fontscale_keys_process_other_fn_aux:n
+ \__fontscale_keys_process_other_classic_xipt:n
+ }
+ { classic-12pt }
+ {
+ \cs_set_eq:NN \__fontscale_keys_process_other_fn_aux:n
+ \__fontscale_keys_process_other_classic_xiipt:n
+ }
+ { musical }
+ {
+ \cs_set_eq:NN \__fontscale_keys_process_other_fn_aux:n
+ \__fontscale_keys_process_other_musical:n
+ \fp_set:Nn \l__fontscale_musical_base_fp
+ { \l__fontscale_musical_base_dim }
+ \fp_set:Nn \l__fontscale_musical_notes_fp
+ { \l__fontscale_musical_notes_int }
+ }
}
- \str_if_eq:VnT \l__fontscale_typographic_scale_str { musical }
+ \tl_map_function:nN
{
- \fp_set:Nn \l__fontscale_musical_notes_fp
- { \l__fontscale_musical_notes_int }
+ {tiny} {scriptsize} {footnotesize} {small}
+ {large} {Large} {LARGE} {huge} {Huge}
}
- \tl_map_function:NN \c__fontscale_names_other_tl
- \__fontscale_keys_process_other_aux:n
+ \__fontscale_keys_process_other_fn:n
}
-\cs_new_protected:Npn \__fontscale_keys_process_other_aux:n #1
+\cs_new_protected:Npn \__fontscale_keys_process_other_fn:n #1
{
- \quark_if_no_value:cF { l__fontscale_#1_size_tl }
- {
- \__fontscale_dim_set_with_default_pt:cn { l_fontscale_#1_size_dim }
- { \use:c { l__fontscale_#1_size_tl } }
- \quark_if_no_value:cF { l__fontscale_#1_scale_tl }
- { \msg_warning:nnn { fontscale } { key-font-scale-ignored } {#1} }
- \prg_break:
- }
\quark_if_no_value:cF { l__fontscale_#1_scale_tl }
{
\dim_set:cn { l_fontscale_#1_size_dim }
@@ -806,17 +747,42 @@
* ( \use:c { l__fontscale_#1_scale_tl } )
}
}
+ \dim_compare:nNnF { \use:c { l_fontscale_#1_size_dim } } > \c_zero_dim
+ {
+ \tl_map_break:n
+ {
+ \msg_error:nnn { fontscale } { key-font-scale-out-of-bounds }
+ {#1}
+ \prg_break:
+ }
+ }
+ \quark_if_no_value:cT { l__fontscale_#1_size_tl } { \prg_break: }
+ }
+ \quark_if_no_value:cF { l__fontscale_#1_size_tl }
+ {
+ \__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
+ {
+ \tl_map_break:n
+ {
+ \msg_error:nnn { fontscale } { key-font-size-out-of-bounds }
+ {#1}
+ \prg_break:
+ }
+ }
+ \quark_if_no_value:cF { l__fontscale_#1_scale_tl }
+ {
+ \msg_warning:nnn { fontscale } { key-font-scale-overwritten } {#1}
+ }
\prg_break:
}
\dim_set:cn { l_fontscale_#1_size_dim }
- { \__fontscale_keys_process_other_typographic_scale:n {#1} }
+ { \__fontscale_keys_process_other_fn_aux:n {#1} }
\prg_break:
\prg_break_point:
\fp_set:cn { l_fontscale_#1_scale_fp }
{ \use:c { l_fontscale_#1_size_dim } / \l__fontscale_normalsize_size_fp }
- \prop_put:cne { l_fontscale_#1_prop } { scale }
- { \fp_use:c { l_fontscale_#1_scale_fp } }
- \prop_put:cnv { l_fontscale_#1_prop } { size } { l_fontscale_#1_size_dim }
\quark_if_no_value:cTF { l__fontscale_#1_baselineskip_tl }
{
\skip_set:cn { l_fontscale_#1_baselineskip_skip }
@@ -829,122 +795,113 @@
}
}
{
- \__fontscale_skip_set_with_default_pt:cn
+ \__fontscale_skip_set_default_pt:cn
{ l_fontscale_#1_baselineskip_skip }
{ \use:c { l__fontscale_#1_baselineskip_tl } }
+ \dim_compare:nNnT { \use:c { l_fontscale_#1_baselineskip_skip } } <
+ { \use:c { l_fontscale_#1_size_dim } }
+ {
+ \tl_map_break:n
+ {
+ \msg_error:nnn { fontscale }
+ { key-font-baselineskip-out-of-bounds } {#1}
+ \prg_break:
+ }
+ }
}
- \prop_put:cnv { l_fontscale_#1_prop } { baselineskip }
- { l_fontscale_#1_baselineskip_skip }
}
% Issues a warning if the font sizes or font baselineskips (ignoring the
-% stretch and shrink components) are not in the correct order unless the value
-% for the key 'ignore-order' is 'true'.
+% stretch and shrink components) are not in the correct order.
\cs_new_protected:Npn \__fontscale_keys_process_check_order:
{
- \bool_if:NF \l__fontscale_ignore_order_bool
+ \dim_compare:nF
{
- \dim_compare:nF
- {
- \l_fontscale_tiny_size_dim
- < \l_fontscale_scriptsize_size_dim
- < \l_fontscale_footnotesize_size_dim
- < \l_fontscale_small_size_dim
- < \l_fontscale_normalsize_size_dim
- < \l_fontscale_large_size_dim
- < \l_fontscale_Large_size_dim
- < \l_fontscale_LARGE_size_dim
- < \l_fontscale_huge_size_dim
- < \l_fontscale_Huge_size_dim
- }
- { \msg_warning:nn { fontscale } { font-sizes-out-of-order } }
- \dim_compare:nF
- {
- \l_fontscale_tiny_baselineskip_skip
- < \l_fontscale_scriptsize_baselineskip_skip
- < \l_fontscale_footnotesize_baselineskip_skip
- < \l_fontscale_small_baselineskip_skip
- < \l_fontscale_normalsize_baselineskip_skip
- < \l_fontscale_large_baselineskip_skip
- < \l_fontscale_Large_baselineskip_skip
- < \l_fontscale_LARGE_baselineskip_skip
- < \l_fontscale_huge_baselineskip_skip
- < \l_fontscale_Huge_baselineskip_skip
- }
- { \msg_warning:nn { fontscale } { font-baselineskips-out-of-order } }
+ \l_fontscale_tiny_size_dim
+ < \l_fontscale_scriptsize_size_dim
+ < \l_fontscale_footnotesize_size_dim
+ < \l_fontscale_small_size_dim
+ < \l_fontscale_normalsize_size_dim
+ < \l_fontscale_large_size_dim
+ < \l_fontscale_Large_size_dim
+ < \l_fontscale_LARGE_size_dim
+ < \l_fontscale_huge_size_dim
+ < \l_fontscale_Huge_size_dim
+ }
+ { \msg_warning:nn { fontscale } { font-sizes-out-of-order } }
+ \dim_compare:nF
+ {
+ \l_fontscale_tiny_baselineskip_skip
+ < \l_fontscale_scriptsize_baselineskip_skip
+ < \l_fontscale_footnotesize_baselineskip_skip
+ < \l_fontscale_small_baselineskip_skip
+ < \l_fontscale_normalsize_baselineskip_skip
+ < \l_fontscale_large_baselineskip_skip
+ < \l_fontscale_Large_baselineskip_skip
+ < \l_fontscale_LARGE_baselineskip_skip
+ < \l_fontscale_huge_baselineskip_skip
+ < \l_fontscale_Huge_baselineskip_skip
}
+ { \msg_warning:nn { fontscale } { font-baselineskips-out-of-order } }
}
% DOCUMENT COMMANDS
-% The internal functions of each font size command are not used elsewhere in
-% the code for compatibility with user-defined hooks
-% (e.g. \AddToHook{cmd/normalsize/after}{<user-defined-function>}).
-\DeclareDocumentCommand \tiny { } { \__fontscale_tiny: }
-\cs_new_protected:Npn \__fontscale_tiny:
+% Defines the standard LaTeX font size commands from \tiny to \Huge and
+% initializes to \normalsize.
+\DeclareDocumentCommand \tiny { }
{
\__fontscale_fontsize:NNN \tiny \l_fontscale_tiny_size_dim
\l_fontscale_tiny_baselineskip_skip
}
-\DeclareDocumentCommand \scriptsize { } { \__fontscale_scriptsize: }
-\cs_new_protected:Npn \__fontscale_scriptsize:
+\DeclareDocumentCommand \scriptsize { }
{
\__fontscale_fontsize:NNN \scriptsize \l_fontscale_scriptsize_size_dim
\l_fontscale_scriptsize_baselineskip_skip
}
-\DeclareDocumentCommand \footnotesize { } { \__fontscale_footnotesize: }
-\cs_new_protected:Npn \__fontscale_footnotesize:
+\DeclareDocumentCommand \footnotesize { }
{
\__fontscale_fontsize:NNN \footnotesize \l_fontscale_footnotesize_size_dim
\l_fontscale_footnotesize_baselineskip_skip
}
-\DeclareDocumentCommand \small { } { \__fontscale_small: }
-\cs_new_protected:Npn \__fontscale_small:
+\DeclareDocumentCommand \small { }
{
\__fontscale_fontsize:NNN \small \l_fontscale_small_size_dim
\l_fontscale_small_baselineskip_skip
}
-\DeclareDocumentCommand \normalsize { } { \__fontscale_normalsize: }
-\cs_new_protected:Npn \__fontscale_normalsize:
+\DeclareDocumentCommand \normalsize { }
{
\__fontscale_fontsize:NNN \normalsize \l_fontscale_normalsize_size_dim
\l_fontscale_normalsize_baselineskip_skip
}
-\DeclareDocumentCommand \large { } { \__fontscale_large: }
-\cs_new_protected:Npn \__fontscale_large:
+\DeclareDocumentCommand \large { }
{
\__fontscale_fontsize:NNN \large \l_fontscale_large_size_dim
\l_fontscale_large_baselineskip_skip
}
-\DeclareDocumentCommand \Large { } { \__fontscale_Large: }
-\cs_new_protected:Npn \__fontscale_Large:
+\DeclareDocumentCommand \Large { }
{
\__fontscale_fontsize:NNN \Large \l_fontscale_Large_size_dim
\l_fontscale_Large_baselineskip_skip
}
-\DeclareDocumentCommand \LARGE { } { \__fontscale_LARGE: }
-\cs_new_protected:Npn \__fontscale_LARGE:
+\DeclareDocumentCommand \LARGE { }
{
\__fontscale_fontsize:NNN \LARGE \l_fontscale_LARGE_size_dim
\l_fontscale_LARGE_baselineskip_skip
}
-\DeclareDocumentCommand \huge { } { \__fontscale_huge: }
-\cs_new_protected:Npn \__fontscale_huge:
+\DeclareDocumentCommand \huge { }
{
\__fontscale_fontsize:NNN \huge \l_fontscale_huge_size_dim
\l_fontscale_huge_baselineskip_skip
}
-\DeclareDocumentCommand \Huge { } { \__fontscale_Huge: }
-\cs_new_protected:Npn \__fontscale_Huge:
+\DeclareDocumentCommand \Huge { }
{
\__fontscale_fontsize:NNN \Huge \l_fontscale_Huge_size_dim
\l_fontscale_Huge_baselineskip_skip
}
-% Initializes to \normalsize.
\normalsize
-\NewExpandableDocumentCommand \CurrentFontStep { }
- { \__fontscale_current_font_step: }
-\cs_new:Npn \__fontscale_current_font_step:
+\NewExpandableDocumentCommand \CurrentFontStep { } { \__fontscale_step: }
+\cs_new:Npn \__fontscale_step:
{
\dim_case:nnF { \f@size pt }
{
@@ -960,47 +917,41 @@
{ \l_fontscale_Huge_size_dim } { 5 }
}
{
- \str_case:Vn \l__fontscale_typographic_scale_str
+ \str_if_eq:VnT \l__fontscale_typographic_scale_str { musical }
{
- { modular }
- {
- \fp_eval:n
- {
- ln ( \f@size / \l__fontscale_normalsize_size_fp )
- / ln ( \l__fontscale_modular_ratio_fp )
- }
- }
- { musical }
- {
- \fp_eval:n
- {
- \l__fontscale_musical_notes_fp
- * ln ( \f@size / \l__fontscale_normalsize_size_fp )
- / ln ( \l__fontscale_musical_ratio_fp )
- }
- }
+ \fp_eval:n
+ {
+ \l__fontscale_musical_notes_fp
+ * ln ( \f@size / \l__fontscale_musical_base_fp )
+ / ln ( \l__fontscale_musical_ratio_fp )
+ }
}
}
}
-\NewExpandableDocumentCommand \CurrentFontScale { }
- { \__fontscale_current_font_scale: }
-\cs_new:Npn \__fontscale_current_font_scale:
+\NewExpandableDocumentCommand \CurrentFontScale { } { \__fontscale_scale: }
+\cs_new:Npn \__fontscale_scale:
{ \fp_eval:n { \f@size / \l__fontscale_normalsize_size_fp } }
-\NewExpandableDocumentCommand \CurrentFontSize { }
- { \__fontscale_current_font_size: }
-\cs_new:Npn \__fontscale_current_font_size: { \f@size pt }
+\NewExpandableDocumentCommand \CurrentFontSize { } { \__fontscale_size: }
+\cs_new:Npn \__fontscale_size: { \f@size pt }
\NewExpandableDocumentCommand \CurrentFontBaselineskip { }
- { \__fontscale_current_font_baselineskip: }
-\cs_new:Npn \__fontscale_current_font_baselineskip: { \f@baselineskip }
+ { \__fontscale_baselineskip: }
+\cs_new:Npn \__fontscale_baselineskip: { \f@baselineskip }
\NewDocumentCommand \SetFontStep { s m }
{
- \IfBooleanTF #1
- { \__fontscale_add_font_step:n {#2} }
- { \__fontscale_set_font_step:n {#2} }
+ \mode_if_math:TF
+ {
+ \msg_warning:nne { fontscale } { math-mode-warning }
+ { \token_to_str:N \SetFontStep }
+ }
+ {
+ \IfBooleanTF #1
+ { \__fontscale_add_font_step:n {#2} }
+ { \__fontscale_set_font_step:n {#2} }
+ }
}
% Using \str_case: here is significantly faster (and easier to write) than
% repeatedly testing \fp_compare:.
@@ -1020,49 +971,42 @@
{ 5 } { \Huge }
}
{
- \str_case:VnF \l__fontscale_typographic_scale_str
+ \str_if_eq:VnTF \l__fontscale_typographic_scale_str { musical }
{
- { modular }
- {
- \__fontscale_fontsize:n
- {
- \fp_to_dim:n
- {
- \l__fontscale_normalsize_size_fp
- * \l__fontscale_modular_ratio_fp ^ (#1)
- }
- }
- }
- { musical }
- {
- \__fontscale_fontsize:n
- {
- \fp_to_dim:n
- {
- \l__fontscale_normalsize_size_fp
- * \l__fontscale_musical_ratio_fp
- ^ ( (#1) / \l__fontscale_musical_notes_fp )
- }
- }
- }
+ \__fontscale_fontsize:n
+ {
+ \fp_to_dim:n
+ {
+ \l__fontscale_musical_base_fp
+ * \l__fontscale_musical_ratio_fp
+ ^ ( (#1) / \l__fontscale_musical_notes_fp )
+ }
+ }
}
{ \msg_error:nn { fontscale } { font-step-out-of-bounds } }
}
}
\cs_new_protected:Npn \__fontscale_add_font_step:n #1
{
- \tl_set:Ne \l__fontscale_step_tl { \__fontscale_current_font_step: }
- \tl_if_empty:NTF \l__fontscale_step_tl
+ \tl_set:Ne \l__fontscale_tmp_tl { \__fontscale_step: }
+ \tl_if_empty:NTF \l__fontscale_tmp_tl
{ \msg_error:nn { fontscale } { current-font-step-out-of-bounds } }
- { \__fontscale_add_font_step_aux:n { (#1) + \l__fontscale_step_tl } }
+ { \__fontscale_add_font_step_aux:n { (#1) + \l__fontscale_tmp_tl } }
}
\cs_new_eq:NN \__fontscale_add_font_step_aux:n \__fontscale_set_font_step:n
\NewDocumentCommand \SetFontScale { s m }
{
- \IfBooleanTF #1
- { \__fontscale_add_font_scale:n {#2} }
- { \__fontscale_set_font_scale:n {#2} }
+ \mode_if_math:TF
+ {
+ \msg_warning:nne { fontscale } { math-mode-warning }
+ { \token_to_str:N \SetFontScale }
+ }
+ {
+ \IfBooleanTF #1
+ { \__fontscale_add_font_scale:n {#2} }
+ { \__fontscale_set_font_scale:n {#2} }
+ }
}
\cs_new_protected:Npn \__fontscale_set_font_scale:n #1
{
@@ -1077,70 +1021,150 @@
\NewDocumentCommand \SetFontSize { s m }
{
- \IfBooleanTF #1
- { \__fontscale_add_font_size:n {#2} }
- { \__fontscale_set_font_size:n {#2} }
+ \mode_if_math:TF
+ {
+ \msg_warning:nne { fontscale } { math-mode-warning }
+ { \token_to_str:N \SetFontSize }
+ }
+ {
+ \IfBooleanTF #1
+ { \__fontscale_add_font_size:n {#2} }
+ { \__fontscale_set_font_size:n {#2} }
+ }
}
\cs_new_eq:NN \__fontscale_set_font_size:n \__fontscale_fontsize:n
\cs_new_protected:Npn \__fontscale_add_font_size:n #1
{
- \__fontscale_dim_set_with_default_pt:Nn \l__fontscale_size_dim {#1}
- \dim_add:Nn \l__fontscale_size_dim { \f@size pt }
- \__fontscale_fontsize:n { \l__fontscale_size_dim }
+ \__fontscale_dim_set_default_pt:Nn \l__fontscale_tmp_dim {#1}
+ \__fontscale_fontsize:n { \l__fontscale_tmp_dim + \f@size pt }
}
\NewDocumentCommand \ScaleFont { m }
- { \__fontscale_scale_font_size_baselineskip:n {#1} }
-\cs_new_protected:Npn \__fontscale_scale_font_size_baselineskip:n #1
{
+ \mode_if_math:TF
+ {
+ \msg_warning:nne { fontscale } { math-mode-warning }
+ { \token_to_str:N \ScaleFont }
+ }
+ { \__fontscale_scale_font:n {#1} }
+ }
+\cs_new_protected:Npn \__fontscale_scale_font:n #1
+ {
+ \fp_set:Nn \l__fontscale_tmp_fp {#1}
\__fontscale_fontsize:nn
- { \fp_to_dim:n { \f@size * (#1) } }
- { \fp_to_dim:n { \dim_to_fp:n { \f@baselineskip } * (#1) } }
+ { \fp_to_dim:n { \f@size * \l__fontscale_tmp_fp } }
+ {
+ \fp_to_dim:n
+ { \dim_to_fp:n { \f@baselineskip } * \l__fontscale_tmp_fp }
+ }
}
\NewDocumentCommand \SetFontSizeBaselineskip { m m }
- { \__fontscale_set_font_size_baselineskip:nn {#1} {#2} }
+ {
+ \mode_if_math:TF
+ {
+ \msg_warning:nne { fontscale } { math-mode-warning }
+ { \token_to_str:N \SetFontSizeBaselineskip }
+ }
+ { \__fontscale_set_font_size_baselineskip:nn {#1} {#2} }
+ }
\cs_new_eq:NN \__fontscale_set_font_size_baselineskip:nn
\__fontscale_fontsize:nn
-\NewDocumentCommand \PrintFontParameters { }
- { \__fontscale_print_font_parameters: }
-\cs_new_protected:Npn \__fontscale_print_font_parameters:
+\NewDocumentCommand \PrintFontSizeParameters { }
+ { \__fontscale_print_font_size_parameters: }
+\cs_new_protected:Npn \__fontscale_print_font_size_parameters:
{
- step ~=~ \__fontscale_current_font_step: ,~
- scale ~=~ \__fontscale_current_font_scale: ,~
- size ~=~ \__fontscale_current_font_size: ,~
- baselineskip ~=~ \__fontscale_current_font_baselineskip:
+ step ~=~ \__fontscale_step: ,~
+ scale ~=~ \__fontscale_scale: ,~
+ size ~=~ \__fontscale_size: ,~
+ baselineskip ~=~ \__fontscale_baselineskip:
}
-\NewDocumentCommand \PrintAllFontParameters { }
- { \__fontscale_print_all_font_parameters: }
-\cs_new_protected:Npn \__fontscale_print_all_font_parameters:
+\NewDocumentCommand \PrintAllFontSizeParameters { }
{
- \tl_map_inline:Nn \c__fontscale_names_tl
+ \mode_if_math:TF
{
- \prop_get:cnN { l_fontscale_##1_prop } { step } \l__fontscale_step_tl
- \prop_get:cnN { l_fontscale_##1_prop } { scale } \l__fontscale_scale_tl
- \token_to_str:c {##1} \@ \c_colon_str \c_space_tl
- step ~=~ \l__fontscale_step_tl ,~
- scale ~=~ \l__fontscale_scale_tl ,~
- size ~=~ \dim_use:c { l_fontscale_##1_size_dim } ,~
- baselineskip ~=~ \skip_use:c { l_fontscale_##1_baselineskip_skip }
- \str_if_eq:nnF {##1} { Huge } { \newline }
+ \msg_error:nne { fontscale } { math-mode-error }
+ { \token_to_str:N \PrintAllFontSizeParameters }
+ }
+ { \__fontscale_print_all_font_size_parameters: }
+ }
+\cs_new_protected:Npn \__fontscale_print_all_font_size_parameters:
+ {
+ \token_to_str:N \tiny \c_colon_str \c_space_tl
+ step ~=~ -4 ,~
+ scale ~=~ \fp_use:N \l_fontscale_tiny_scale_fp ,~
+ size ~=~ \dim_use:N \l_fontscale_tiny_size_dim ,~
+ baselineskip ~=~ \skip_use:N \l_fontscale_tiny_baselineskip_skip
+ \newline
+ \token_to_str:N \scriptsize \c_colon_str \c_space_tl
+ step ~=~ -3 ,~
+ scale ~=~ \fp_use:N \l_fontscale_scriptsize_scale_fp ,~
+ size ~=~ \dim_use:N \l_fontscale_scriptsize_size_dim ,~
+ baselineskip ~=~ \skip_use:N \l_fontscale_scriptsize_baselineskip_skip
+ \newline
+ \token_to_str:N \footnotesize \c_colon_str \c_space_tl
+ step ~=~ -2 ,~
+ scale ~=~ \fp_use:N \l_fontscale_footnotesize_scale_fp ,~
+ size ~=~ \dim_use:N \l_fontscale_footnotesize_size_dim ,~
+ baselineskip ~=~ \skip_use:N \l_fontscale_footnotesize_baselineskip_skip
+ \newline
+ \token_to_str:N \small \c_colon_str \c_space_tl
+ step ~=~ -1 ,~
+ scale ~=~ \fp_use:N \l_fontscale_small_scale_fp ,~
+ size ~=~ \dim_use:N \l_fontscale_small_size_dim ,~
+ baselineskip ~=~ \skip_use:N \l_fontscale_small_baselineskip_skip
+ \newline
+ \token_to_str:N \normalsize \c_colon_str \c_space_tl
+ step ~=~ 0 ,~
+ scale ~=~ 1 ,~
+ size ~=~ \dim_use:N \l_fontscale_normalsize_size_dim ,~
+ baselineskip ~=~ \skip_use:N \l_fontscale_normalsize_baselineskip_skip
+ \newline
+ \token_to_str:N \large \c_colon_str \c_space_tl
+ step ~=~ 1 ,~
+ scale ~=~ \fp_use:N \l_fontscale_large_scale_fp ,~
+ size ~=~ \dim_use:N \l_fontscale_large_size_dim ,~
+ baselineskip ~=~ \skip_use:N \l_fontscale_large_baselineskip_skip
+ \newline
+ \token_to_str:N \Large \c_colon_str \c_space_tl
+ step ~=~ 2 ,~
+ scale ~=~ \fp_use:N \l_fontscale_Large_scale_fp ,~
+ size ~=~ \dim_use:N \l_fontscale_Large_size_dim ,~
+ baselineskip ~=~ \skip_use:N \l_fontscale_Large_baselineskip_skip
+ \newline
+ \token_to_str:N \LARGE \@ \c_colon_str \c_space_tl
+ step ~=~ 3 ,~
+ scale ~=~ \fp_use:N \l_fontscale_LARGE_scale_fp ,~
+ size ~=~ \dim_use:N \l_fontscale_LARGE_size_dim ,~
+ baselineskip ~=~ \skip_use:N \l_fontscale_LARGE_baselineskip_skip
+ \newline
+ \token_to_str:N \huge \c_colon_str \c_space_tl
+ step ~=~ 4 ,~
+ scale ~=~ \fp_use:N \l_fontscale_huge_scale_fp ,~
+ size ~=~ \dim_use:N \l_fontscale_huge_size_dim ,~
+ baselineskip ~=~ \skip_use:N \l_fontscale_huge_baselineskip_skip
+ \newline
+ \token_to_str:N \Huge \c_colon_str \c_space_tl
+ step ~=~ 5 ,~
+ scale ~=~ \fp_use:N \l_fontscale_Huge_scale_fp ,~
+ size ~=~ \dim_use:N \l_fontscale_Huge_size_dim ,~
+ baselineskip ~=~ \skip_use:N \l_fontscale_Huge_baselineskip_skip
+ }
+
+\NewDocumentCommand \PrintSampleText { s +m }
+ {
+ \mode_if_math:TF
+ {
+ \msg_error:nne { fontscale } { math-mode-error }
+ { \token_to_str:N \PrintSampleText }
+ }
+ {
+ \IfBooleanTF #1
+ { \__fontscale_print_sample_text_descending_order:n {#2} }
+ { \__fontscale_print_sample_text_ascending_order:n {#2} }
}
- }
-
-\NewDocumentCommand \PrintSampleText
- { s O
- {
- The~ \texttt { fontscale }~ package \c_colon_str \c_space_tl
- A~ user~ interface~ for~ setting~ document~ font~ sizes
- }
- }
- {
- \IfBooleanTF #1
- { \__fontscale_print_sample_text_descending_order:n {#2} }
- { \__fontscale_print_sample_text_ascending_order:n {#2} }
}
\cs_new_protected:Npn \__fontscale_print_sample_text_ascending_order:n #1
{
@@ -1169,7 +1193,15 @@
{ \tiny #1 \par }
}
-\NewDocumentCommand \PrintFontSizeCommand { } { \__fontscale_print_name: }
+\NewDocumentCommand \PrintFontSizeCommand { }
+ {
+ \mode_if_math:TF
+ {
+ \msg_error:nne { fontscale } { math-mode-error }
+ { \token_to_str:N \PrintFontSizeCommand }
+ }
+ { \__fontscale_print_name: }
+ }
\cs_new_protected:Npn \__fontscale_print_name:
{
\dim_case:nn { \f@size pt }
@@ -1235,14 +1267,14 @@
{ \token_to_str:N \Huge \prg_break: }
}
}
- UNDEFINED \@
+ \token_to_str:N \undefined
\prg_break:
\prg_break_point:
}
% TEXT PURIFY
-\cs_new:Npn \__fontscale_text_purify_equivalent:n #1
+\cs_new:Npn \__fontscale_remove_arg_spec_sm:n #1
{
\bool_lazy_all:nT
{
@@ -1252,11 +1284,13 @@
}
{ \use_none:n }
}
+\text_declare_purify_equivalent:Nn \fontscalesetup
+ { \__fontscale_remove_arg_spec_sm:n }
\text_declare_purify_equivalent:Nn \SetFontStep
- { \__fontscale_text_purify_equivalent:n }
+ { \__fontscale_remove_arg_spec_sm:n }
\text_declare_purify_equivalent:Nn \SetFontScale
- { \__fontscale_text_purify_equivalent:n }
+ { \__fontscale_remove_arg_spec_sm:n }
\text_declare_purify_equivalent:Nn \SetFontSize
- { \__fontscale_text_purify_equivalent:n }
+ { \__fontscale_remove_arg_spec_sm: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
diff --git a/macros/latex/contrib/fontscale/fontscale.tex b/macros/latex/contrib/fontscale/fontscale.tex
new file mode 100644
index 0000000000..9178542c3a
--- /dev/null
+++ b/macros/latex/contrib/fontscale/fontscale.tex
@@ -0,0 +1,398 @@
+\documentclass{beery}
+
+
+\begin{document}
+
+
+\section*
+ {%
+ \SetFontStep*{1}%
+ The \pkg{fontscale} package%
+ }
+
+A flexible interface for setting font sizes
+
+Oliver Beery
+
+Version 2.0.0\quad{}2 August 2024
+
+
+\section{Introduction}
+\label{sec:intro}
+
+\subsection{About}
+\label{subsec:about}
+
+\listheading{The \pkg{fontscale} package provides the following functionalities:}
+\begin{itemize}
+ \item
+ Set font sizes using a classic or musical typographic scale (\S\ref{subsec:typographicscale}).
+ \item
+ Set arbitrary font sizes and font baselineskips for the standard \LaTeX{} font size commands \cs{tiny}, \cs{scriptsize}, \cs{footnotesize}, \cs{small}, \cs{normalsize}, \cs{large}, \cs{Large}, \cs{LARGE}, \cs{huge}, and \cs{Huge} (\S\ref{subsec:overwriting}).
+ \item
+ Set the font sizes and font baselineskips of the standard \LaTeX{} font size commands mid\-/document or within a local group (\S\ref{subsec:fontscalesetup}).
+ \item
+ Provides expandable commands that expand to the current font step, font scale, font size, or font baselineskip (\S\ref{subsec:expandable}).
+ \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{relsize} package (\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} (\S\ref{sec:programming}).
+\end{itemize}
+
+\subsection{Loading the package}
+\label{subsec:loading}
+
+\listheading{The \pkg{fontscale} package requires:}
+\begin{itemize}
+ \item \LaTeXe{} version 2023-11-01 or newer
+ \item \pkg{l3kernel} version 2023-10-10 or newer
+\end{itemize}
+
+You may need to ensure that your \LaTeX{} installation is up\-/to\-/date before using this package.
+
+This package lets the user set arbitrary font sizes.
+This works with most fonts produced today, but, for historical reasons, the default Computer Modern font is available only in a number of discrete font sizes.
+If you get a warning that Computer Modern is not available in the requested font size, you may need to add the code \cs{RequirePackage}\allowbreak\verb|{fix-cm}| before \cs{documentclass} to make Computer Modern available at arbitrary font sizes.
+Alternatively, you can use the Latin Modern font by loading the \pkg{lmodern} package.
+
+The \pkg{fontscale} package has no package options.
+Instead, this package provides the command \cs{fontscalesetup}\marg{key\-/value list} (\S\ref{subsec:fontscalesetup}) which sets the package keys (\S\ref{sec:keys}).
+
+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:}
+\begin{itemize}
+ \item
+ Set the kernel command \cs{@currsize} equal to the font size command.
+ This is needed only for compatibility.
+ \item
+ Do nothing, except issue a warning, if used in math mode.
+\end{itemize}
+
+Unlike the standard \LaTeX{} document classes, the font size commands from \cs{tiny} to \cs{Huge} defined by this package do not change the vertical spacing for displayed math and list structures.
+If the user would like to add this functionality or perhaps other features to the font size commands, they can use hooks, which are documented in the \LaTeXe{} kernel.
+
+When loaded, this package uses \cs{normalsize} after initializing the font size commands from \cs{tiny} to \cs{Huge}.
+
+\subsection{The font size parameters}
+\label{subsec:fontsizeparameters}
+
+When using the \pkg{fontscale} package, each font size, including the standard \LaTeX{} font size commands from \cs{tiny} to \cs{Huge}, has a font step, font scale, font size, and font baselineskip.
+The latter two parameters are the familiar first and second arguments to the low\-/level font command \cs{fontsize}\marg{dimen}\marg{skip}.
+(The font baselineskip, stored in the kernel command \cs{f@baselineskip}, should not be confused with the paragraph baselineskip \cs{baselineskip}.)
+The font scale and font step are different ways of describing the font size.
+The font scale is the relative font size; the ratio of the font size to \cs{normalsize}, which has a font scale of \num{1}.
+The font step is the number of font size gradations from \cs{normalsize}, which has a font step of \num{0}.
+Table~\ref{table:fontsteps} displays the font step of each font size command.
+
+\input{./fontscale-table-font-steps.tex}
+
+\subsection{Syntax}
+\label{subsec:syntax}
+
+This package defines some keys and commands that take as a value or argument a \meta{floating point expression}, \meta{integer expression}, \meta{dimen expression}, or \meta{skip expression}.
+This syntax has the same representation as the arguments to \cs{fpeval}, \cs{inteval}, \cs{dimeval}, and \cs{skipeval}, documented in \pkg{usrguide}.%
+\footnote{\url{https://ctan.org/pkg/usrguide}}
+
+
+\section{Keys}
+\label{sec:keys}
+
+This section documents the keys provided by the \pkg{fontscale} package.
+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}
+\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}.
+
+\Key{typographic-scale}
+ [%
+ classic-10pt$\,\vert\,$\allowbreak
+ classic-11pt$\,\vert\,$\allowbreak
+ classic-12pt$\,\vert\,$\allowbreak\hspace*{1.5em}%
+ musical%
+ ]
+ [classic-10pt]
+\newline
+\Key{classic-10pt}
+\newline
+\Key{classic-11pt}
+\newline
+\Key{classic-12pt}
+\nopagebreak\newline
+\Key{musical}
+
+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}.
+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.
+
+\input{./fontscale-table-classic.tex}
+
+The classic typographic scale consists of the traditional font sizes
+\numlist{6;7;8;9;10;11;12;14;16;18;21;24;36;48;60;72}.%
+\footnote{See \S3.1 of \textit{The Elements of Typographic Style} by Robert Bringhurst.}
+They have been used since the sixteenth century and are the default font sizes on most computer software.
+Setting the value of the key \Key{typographic\-/scale} to \Key{classic\-/10pt}, \Key{classic\-/11pt}, or \Key{classic\-/12pt} sets the font size of each font size command from \cs{tiny} to \cs{Huge} to values based on their position in the classic typographic scale.
+The named point size\---\qtylist[list-final-separator={, or }]{10;11;12}{pt}\---is the font size of \cs{normalsize}.
+The font sizes of the other font size commands are the adjacent font sizes in the classic typographic scale.
+Table~\ref{table:classic} displays the font size of each font size command when using a classic typographic scale.
+
+\Key{musical/base}[\meta{dimen expression}][10pt]%
+\nopagebreak\newline
+\Key{musical/ratio}[\meta{floating point expression}][2]%
+\nopagebreak\newline
+\Key{musical/notes}[\meta{integer expression}][5]
+
+The key \Key{typographic\-/scale}[musical] sets the font size of each font size command from \cs{tiny} to \cs{Huge} using a musical typographic scale.
+The font sizes are calculated using the formula:%
+\footnote
+ {%
+ I have referenced this article by Spencer Mortensen:
+ \newline
+ \url{https://spencermortensen.com/articles/typographic-scale/}%
+ }
+\begin{equation}\label{eq:musical}
+ f_i = f_0 \times r ^ { i / n }
+\end{equation}
+$f_i$ is the font size with font step~$i$.
+$f_0$ is the base font size.
+$n$ is the number of musical notes\---the number of font size gradations or steps above $f_0$.
+$r$ is the musical ratio, the ratio of the highest to the lowest note $ f_n / f_0 $.
+
+The key \Key{musical\slash{}base} sets the base font size to the value of \meta{dimen expression}, appending a default unit of \unit{pt}.
+The base font size is the font size of \cs{normalsize}.
+The key \Key{musical\slash{}ratio} sets the musical ratio to the result of computing the \meta{floating point expression}.
+The key \Key{musical\slash{}notes} sets the number of musical notes to the value of \meta{integer expression}.
+Table~\ref{table:musical} displays the font size of each font size command when using a musical typographic scale with the initial values.
+
+\input{./fontscale-table-musical.tex}
+
+\subsection{The 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}.
+
+\Key{baselineskip-size-ratio}[\meta{floating point expression}][1.2]
+\KeepNextPar*
+
+Sets the ratio of the font baselineskip to the font size to the result of computing the \meta{floating point expression}.
+The font baselineskip of each font size command equals its font size times this number.
+The value of this key must be at least \num{1}.
+
+
+\subsection{Overwriting the previous keys}
+\label{subsec:overwriting}
+
+This subsection documents keys for directly setting the font scales, font sizes, and font baselineskips of the font size commands from \cs{tiny} to \cs{Huge}.
+When doing so, the user should take care to ensure that the lengths of the font sizes and font baselineskips remain correctly ordered from \cs{tiny} to \cs{Huge}.
+This is important for typographic and syntactic consistency.
+If the font size commands are in the wrong order, this package will issue a warning and some package features may not work correctly.
+
+\Key{\meta{font size command}/scale}[\meta{floating point expression}][\meta{not set}]
+\KeepNextPar*
+
+Sets the font size of \meta{font size command} by setting its font scale to the result of computing the \meta{floating point expression}.
+Overwrites the font size set by the key \Key{typographic\-/scale}.
+The key \Key{normalsize\slash{}scale} is not defined.
+
+\Key{\meta{font size command}/size}[\meta{dimen expression}][\meta{not set}]
+\KeepNextPar*
+
+Sets the font size of \meta{font size command} to the value of \meta{dimen expression}, appending a default unit of \unit{pt}.
+Overwrites the font size set by the keys \Key{typographic\-/scale} and \Key{\meta{font size command}\slash{}scale}.
+
+\Key{\meta{font size command}/baselineskip}[\meta{skip expression}][\meta{not set}]
+\KeepNextPar*
+
+Sets the font baselineskip of \meta{font size command} to the value of \meta{skip expression}, appending a default unit of \unit{pt}.
+The font baselineskip of \meta{font size command} must be greater than or equal to its font size.
+Overwrites the font baselineskip set by the key \Key{baselineskip\-/size\-/ratio}.
+
+\Key{\meta{font size command}}[\meta{dimen expression}]
+\nopagebreak\newline
+\Key{\meta{font size command}}[\meta{dimen expression}/\meta{skip expression}]
+
+Sets the keys \Key{\meta{font size command}\slash{}size}[\meta{dimen expression}] or \Key{\meta{font size command}\slash{}baselineskip}[\meta{skip expression}] in a condensed format.
+The latter format resembles traditional typographic notation where the size and leading of a text can be expressed as, for example, \num{10}/\num{12} or \num{11}/\num{13}.
+The number before\slash{}after the slash is the size\slash{}leading in units of \unit{pt}.
+
+
+\section{Commands}
+\label{sec:commands}
+
+This section documents the commands provided by the \pkg{fontscale} package.
+
+\subsection{Setting the keys}
+\label{subsec:fontscalesetup}
+
+\cs{fontscalesetup} \sarg{} \marg{key-value list}
+\KeepNextPar*
+
+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 the keys to their initial values.
+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 font size parameters}
+\label{subsec:expandable}
+
+\cs{CurrentFontStep}
+\nopagebreak\newline
+\cs{CurrentFontScale}
+\newline
+\cs{CurrentFontSize}
+\nopagebreak\newline
+\cs{CurrentFontBaselineskip}
+
+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.
+
+For clarity, \cs{CurrentFontStep} will be explained in detail.
+\cs{CurrentFontStep} initially tests if the current font size equals the font size of any font size command from \cs{tiny} to \cs{Huge}.
+If so, it 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 current 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.
+
+Internally, \cs{CurrentFontStep}, \cs{CurrentFontScale}, and \cs{CurrentFontSize} rely on the kernel command \cs{f@size}.
+(\cs{f@size} stores the current font size in units of \unit{pt}, omitting the unit.)
+The low\-/level font command \cs{fontsize}\marg{dimen}\marg{skip} sets \cs{f@size} to the new font size before expanding its second argument.
+This means that, if used in \meta{skip}, \cs{CurrentFontStep}, \cs{CurrentFontScale}, and \cs{CurrentFontSize} will expand to the new value\---unless they are first expanded.
+This package provides \cs{SetFontSizeBaselineskip} as an alternative to \cs{fontsize} + \cs{selectfont} that avoids this issue (\S\ref{subsec:fontsize}).
+
+\subsection{More font size commands}
+\label{subsec:fontsize}
+
+This package provides additional font size commands for use only in special cases.
+Users should prefer the standard \LaTeX{} font size commands from \cs{tiny} to \cs{Huge} for typographic and syntactic consistency.
+
+\cs{SetFontStep} \sarg{} \marg{floating point expression}
+\KeepNextPar*
+
+Sets the font size by setting the font step to the result of computing the \meta{floating point expression}.
+Adding the optional star instead increases the current font step by the result of computing the \meta{floating point expression} or issues an error if the current font step is undefined (as explained for \cs{CurrentFontStep} in \S\ref{subsec:expandable}).
+Sets the font baselineskip equal to the new font size \texttimes{} the value of the key \Key{baselineskip\-/size\-/ratio}.
+
+\listheading{Three exceptions:}
+\begin{itemize}
+ \item
+ The font step must equal an integer from \num{-4} to \num{5} unless the value of the key \Key{typographic\-/scale} is \Value{musical}.
+ \cs{SetFontStep} will issue an error if the font step is undefined (as explained for \cs{CurrentFontStep} in \S\ref{subsec:expandable}).
+ \item
+ If the font step equals the font step of any font size command from \cs{tiny} to \cs{Huge} (Table~\ref{table:fontsteps}), then that font size command will be used directly.
+ \item
+ Does nothing, except issue a warning, if used in math mode.
+\end{itemize}
+
+\cs{SetFontScale} \sarg{} \marg{floating point expression}
+\KeepNextPar*
+
+Sets the font size by setting the font scale to the result of computing the \meta{floating point expression}.
+Adding the optional star instead increases the current font scale by the result of computing the \meta{floating point expression}.
+Sets the font baselineskip equal to the new font size \texttimes{} the value of the key \Key{baselineskip\-/size\-/ratio}.
+Does nothing, except issue a warning, if used in math mode.
+
+\cs{SetFontSize} \sarg{} \marg{dimen expression}
+\KeepNextPar*
+
+Sets the font size to the value of \meta{dimen expression}, appending a default unit of \unit{pt}.
+Adding the optional star instead increases the current font size by the result of \meta{dimen expression}, appending a default unit of \unit{pt}.
+Sets the font baselineskip equal to the new font size \texttimes{} the value of the key \Key{baselineskip\-/size\-/ratio}.
+Does nothing, except issue a warning, if used in math mode.
+
+\cs{ScaleFont} \marg{floating point expression}
+\KeepNextPar*
+
+Sets the font size equal to the current font size \texttimes{} the result of computing the \meta{floating point expression}.
+Sets the font baselineskip equal to the current font baselineskip \texttimes{} the result of computing the \meta{floating point expression}.
+Does nothing, except issue a warning, if used in math mode.
+
+\cs{SetFontSizeBaselineskip} \marg{dimen expression} \marg{skip expression}
+\KeepNextPar*
+
+Sets the font size to the value of \meta{dimen expression}, appending a default unit of \unit{pt}.
+Sets the font baselineskip to the value of \meta{skip expression}, appending a default unit of \unit{pt}.
+The font baselineskip must be greater than or equal to the font size.
+Does nothing, except issue a warning, if used in math mode.
+Can be used as an alternative to \cs{fontsize} + \cs{selectfont} as discussed in \S\ref{subsec:expandable}.
+
+\subsection{Testing and debugging}
+\label{subsec:debug}
+
+The commands documented here are intended primarily for testing and debugging.
+I have used them often when developing this package so I think users will find them helpful.
+
+\cs{PrintFontSizeParameters}
+\KeepNextPar*
+
+Prints the current font size parameters\---the font step, font scale, font size, and font baselineskip.
+The current font step will be left blank if it is undefined (as explained for \cs{CurrentFontStep} in \S\ref{subsec:expandable}).
+
+\cs{PrintAllFontSizeParameters}
+\KeepNextPar*
+
+Prints the font step, font scale, font size, and font baselineskip of each font size command from \cs{tiny} to \cs{Huge}.
+
+\cs{PrintSampleText} \sarg{} \marg{text}
+\KeepNextPar*
+
+Prints \meta{text} in each font size ordered from \cs{tiny} to \cs{Huge} each followed by a paragraph break.
+\meta{text} can contain \cs{par} tokens.
+Adding the optional star reverses the order of the font sizes.
+One useful way of printing example text is \cs{PrintSampleText}\allowbreak\texttt{\{\cs{PrintFontSizeCommand}:\allowbreak\textvisiblespace\allowbreak\cs{PrintFontSizeParameters}\}}.
+
+\cs{PrintFontSizeCommand}
+\KeepNextPar*
+
+Tests if the current font size and current font baselineskip equal the font size and font baselineskip, respectively, of any font size command from \cs{tiny} to \cs{Huge}.
+If so, prints the name of that font size command, including the backslash character.
+If not, prints \enquote{\string\undefined}.
+
+
+\section{Programming}
+\label{sec:programming}
+
+This section is for \LaTeX3 programmers.
+
+\subsection
+ {%
+ Compatibility with
+ \texorpdfstring
+ {\cs{text_purify:n}}
+ {\textbackslash{}text\_purify:n}%
+ }
+\label{subsec:textpurify}
+
+\cs{text_purify:n} will correctly remove the formatting commands defined by this package, including \cs{fontscalesetup} and the commands documented in \S\ref{subsec:fontsize}.
+
+\subsection{Public functions and variables}
+\label{subsec:publicexpl3}
+
+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 should never be modified directly.
+Their values should be changed only by \cs{fontscalesetup}.
+
+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|
+\newline
+\verb|\l_fontscale_|\meta{font size command}\verb|_size_dim|
+\nopagebreak\newline
+\verb|\l_fontscale_|\meta{font size command}\verb|_baselineskip_skip|
+
+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}.
+
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/tagpdf/README.md b/macros/latex/contrib/tagpdf/README.md
index 9602302c2a..edcdc6b5e6 100644
--- a/macros/latex/contrib/tagpdf/README.md
+++ b/macros/latex/contrib/tagpdf/README.md
@@ -1,6 +1,6 @@
#tagpdf — A package to create tagged pdf
-Packageversion: 0.99c
-Packagedate: 2024/06/20
+Packageversion: 0.99d
+Packagedate: 2024/08/02
Author: Ulrike Fischer, LaTeX Project Team
## License
diff --git a/macros/latex/contrib/tagpdf/ex-AF-file.pdf b/macros/latex/contrib/tagpdf/ex-AF-file.pdf
index 37673eac26..9ba962e1e3 100644
--- a/macros/latex/contrib/tagpdf/ex-AF-file.pdf
+++ b/macros/latex/contrib/tagpdf/ex-AF-file.pdf
@@ -1,11 +1,11 @@
%PDF-2.0
%
22 0 obj
-<< /Subtype /application#2Fx-tex/Type /EmbeddedFile /Params<</ModDate (D:20240620175033+02'00') /Size 151 /CheckSum (4C0D15859D9BA750E65BE6F420DEA972) >> /Length 151 >>
+<< /Subtype /application#2Fx-tex/Type /EmbeddedFile /Params<</ModDate (D:20240802125547+02'00') /Size 151 /CheckSum (D4716966C44F441B4E4C1D2DD929683B) >> /Length 151 >>
stream
%% LaTeX2e file `example-input-file.tex'
%% generated by the `filecontents' environment
-%% from source `ex-AF-file' on 2024/06/20.
+%% from source `ex-AF-file' on 2024/08/02.
%%
Additional info!
@@ -15,7 +15,7 @@ endobj
<< /Type /Filespec /AFRelationship /Unspecified /F (example-input-file.tex) /UF <FEFF006500780061006D0070006C0065002D0069006E007000750074002D00660069006C0065002E007400650078> /EF<</F 22 0 R/UF 22 0 R>> >>
endobj
25 0 obj
-<< /Subtype /text#2Fplain/Type /EmbeddedFile /Params<</ModDate (D:20240620) >> /Length 19 >>
+<< /Subtype /text#2Fplain/Type /EmbeddedFile /Params<</ModDate (D:20240802) >> /Length 19 >>
stream
Bär with teh shirt
endstream
@@ -24,7 +24,7 @@ endobj
<< /Type /Filespec /AFRelationship /Supplement /F (tag-AFfile1.txt) /UF <FEFF007400610067002D0041004600660069006C00650031002E007400780074> /EF<</F 25 0 R/UF 25 0 R>> >>
endobj
28 0 obj
-<< /Subtype /text#2Fplain/Type /EmbeddedFile /Params<</ModDate (D:20240620) >> /Length 4 >>
+<< /Subtype /text#2Fplain/Type /EmbeddedFile /Params<</ModDate (D:20240802) >> /Length 4 >>
stream
Duck
endstream
@@ -242,17 +242,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-06-20T17:50:54+02:00</rdf:li>
+ <rdf:li>2024-08-02T12:56:09+02:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-AF-file.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-06-20T17:50:54+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-06-20T17:50:54+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-06-20T17:50:54+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-08-02T12:56:09+02:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-08-02T12:56:09+02:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-08-02T12:56:09+02:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:38d5a844-2217-4081-87cc-b2129dc357a6</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:9859f422-c856-46c6-8928-4dfab5f8790c</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:3ff2b426-7c06-4861-8f14-4e8e04ac9b4c</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -347,7 +347,7 @@ endobj
<< /Type /Namespace /NS (https://www.latex-project.org/ns/book/2022) /RoleMapNS 18 0 R >>
endobj
19 0 obj
-<< /Type /Namespace /NS (data:,15379C35-DB3-5B3E-89A5-42149DCFB2F) >>
+<< /Type /Namespace /NS (data:,BBA64916-90D9-A0B9-F592-8E68FD20F532) >>
endobj
8 0 obj
[ 9 0 R 11 0 R 13 0 R 15 0 R 17 0 R 19 0 R ]
@@ -449,7 +449,7 @@ endobj
<< /Type /Catalog /Pages 36 0 R /MarkInfo 37 0 R/Lang (de-DE)/Metadata 31 0 R/StructTreeRoot 5 0 R >>
endobj
46 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240620175054+02'00')/ModDate (D:20240620175054+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240802125609+02'00')/ModDate (D:20240802125609+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 47
@@ -458,10 +458,10 @@ xref
0000000003 00000 f
0000000004 00000 f
0000000010 00000 f
-0000016360 00000 n
+0000016362 00000 n
0000013627 00000 n
0000013838 00000 n
-0000015790 00000 n
+0000015792 00000 n
0000014417 00000 n
0000000012 00000 f
0000014485 00000 n
@@ -474,34 +474,34 @@ xref
0000015425 00000 n
0000015703 00000 n
0000000000 00000 f
-0000015851 00000 n
+0000015853 00000 n
0000000020 00000 n
0000000382 00000 n
-0000015964 00000 n
+0000015966 00000 n
0000000603 00000 n
0000000758 00000 n
-0000016096 00000 n
+0000016098 00000 n
0000000943 00000 n
0000001083 00000 n
-0000016228 00000 n
+0000016230 00000 n
0000001268 00000 n
0000013481 00000 n
0000013346 00000 n
0000012740 00000 n
-0000020113 00000 n
-0000020467 00000 n
+0000020115 00000 n
+0000020469 00000 n
0000013591 00000 n
0000013684 00000 n
0000013801 00000 n
-0000016480 00000 n
-0000018929 00000 n
-0000016666 00000 n
-0000019150 00000 n
-0000020267 00000 n
-0000020529 00000 n
-0000020647 00000 n
+0000016482 00000 n
+0000018931 00000 n
+0000016668 00000 n
+0000019152 00000 n
+0000020269 00000 n
+0000020531 00000 n
+0000020649 00000 n
trailer
-<< /Size 47 /Root 45 0 R /Info 46 0 R /ID [ <CB0601DB4D9A68774E7E29190E0D5823> <CB0601DB4D9A68774E7E29190E0D5823> ] >>
+<< /Size 47 /Root 45 0 R /Info 46 0 R /ID [ <E2F9D94DBDFC11D2EE5801BA51FD5C99> <E2F9D94DBDFC11D2EE5801BA51FD5C99> ] >>
startxref
-20870
+20872
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-alt-actualtext.pdf b/macros/latex/contrib/tagpdf/ex-alt-actualtext.pdf
index 8bbbbcc16c..f64d4e66bf 100644
--- a/macros/latex/contrib/tagpdf/ex-alt-actualtext.pdf
+++ b/macros/latex/contrib/tagpdf/ex-alt-actualtext.pdf
Binary files differ
diff --git a/macros/latex/contrib/tagpdf/ex-attribute.pdf b/macros/latex/contrib/tagpdf/ex-attribute.pdf
index 172ce02990..feda9e252a 100644
--- a/macros/latex/contrib/tagpdf/ex-attribute.pdf
+++ b/macros/latex/contrib/tagpdf/ex-attribute.pdf
@@ -216,17 +216,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-06-20T17:51:49+02:00</rdf:li>
+ <rdf:li>2024-08-02T12:57:08+02:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-attribute.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-06-20T17:51:49+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-06-20T17:51:49+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-06-20T17:51:49+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-08-02T12:57:08+02:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-08-02T12:57:08+02:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-08-02T12:57:08+02:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:7a9cf910-1c19-429a-8f24-339c62d8a57f</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:d4b89449-5e1d-43cf-83af-3903105d1b3f</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:b262e437-7e89-4c42-8e29-bedae4c498b6</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -450,7 +450,7 @@ endobj
<< /Type /Catalog /Pages 26 0 R /MarkInfo 27 0 R/Lang (de_DE)/Metadata 21 0 R/StructTreeRoot 5 0 R >>
endobj
38 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/Title (Title)/CreationDate (D:20240620175149+02'00')/ModDate (D:20240620175149+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/Title (Title)/CreationDate (D:20240802125708+02'00')/ModDate (D:20240802125708+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 39
@@ -494,7 +494,7 @@ xref
0000017721 00000 n
0000017839 00000 n
trailer
-<< /Size 39 /Root 37 0 R /Info 38 0 R /ID [ <658202793A4D39DC44497E1203173F04> <658202793A4D39DC44497E1203173F04> ] >>
+<< /Size 39 /Root 37 0 R /Info 38 0 R /ID [ <2033D8BFB67E1F1EDFB190E1DEC10A2C> <2033D8BFB67E1F1EDFB190E1DEC10A2C> ] >>
startxref
18076
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-formula-problem.pdf b/macros/latex/contrib/tagpdf/ex-formula-problem.pdf
index 9ac7a851bc..637338d16f 100644
--- a/macros/latex/contrib/tagpdf/ex-formula-problem.pdf
+++ b/macros/latex/contrib/tagpdf/ex-formula-problem.pdf
@@ -239,17 +239,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-06-20T17:52:18+02:00</rdf:li>
+ <rdf:li>2024-08-02T12:57:37+02:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-formula-problem.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-06-20T17:52:18+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-06-20T17:52:18+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-06-20T17:52:18+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-08-02T12:57:37+02:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-08-02T12:57:37+02:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-08-02T12:57:37+02:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:8eb2ce1d-b2ec-440a-8bc2-73733eb3eeb0</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:b48ac58a-5b57-46ab-8ab8-087479364eeb</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:8fbc3896-5f57-401a-81d8-1fdb02abac8a</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>2</prism:pageCount>
</rdf:Description>
@@ -425,7 +425,7 @@ endobj
<< /Type /Catalog /Pages 16 0 R /MarkInfo 23 0 R/Lang (de-DE)/Metadata 19 0 R/StructTreeRoot 5 0 R >>
endobj
33 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240620175218+02'00')/ModDate (D:20240620175218+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240802125737+02'00')/ModDate (D:20240802125737+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 34
@@ -464,7 +464,7 @@ xref
0000018886 00000 n
0000019004 00000 n
trailer
-<< /Size 34 /Root 32 0 R /Info 33 0 R /ID [ <4A2EBD4B9A1971E2BAF6A530303DF07B> <4A2EBD4B9A1971E2BAF6A530303DF07B> ] >>
+<< /Size 34 /Root 32 0 R /Info 33 0 R /ID [ <84EDE341B761805B059537E407E8C0CD> <84EDE341B761805B059537E407E8C0CD> ] >>
startxref
19227
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-list.pdf b/macros/latex/contrib/tagpdf/ex-list.pdf
index 2346b0398a..381477d829 100644
--- a/macros/latex/contrib/tagpdf/ex-list.pdf
+++ b/macros/latex/contrib/tagpdf/ex-list.pdf
@@ -210,17 +210,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-06-20T17:52:47+02:00</rdf:li>
+ <rdf:li>2024-08-02T12:58:08+02:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-list.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-06-20T17:52:47+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-06-20T17:52:47+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-06-20T17:52:47+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-08-02T12:58:08+02:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-08-02T12:58:08+02:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-08-02T12:58:08+02:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:4c749825-1de7-414c-879f-29e4d0bef66e</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:843c5ce9-108a-49d8-86ef-881382f178ee</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:0803684d-fad7-4d08-8dc2-c5108f24d889</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -654,7 +654,7 @@ endobj
<< /Type /Catalog /Pages 54 0 R /MarkInfo 55 0 R/Lang (en)/Metadata 48 0 R/StructTreeRoot 5 0 R >>
endobj
72 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240620175247+02'00')/ModDate (D:20240620175247+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240802125808+02'00')/ModDate (D:20240802125808+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 73
@@ -732,7 +732,7 @@ xref
0000029590 00000 n
0000029705 00000 n
trailer
-<< /Size 73 /Root 71 0 R /Info 72 0 R /ID [ <14B40F363BE2C4EFB96EAE91DC2CE4F7> <14B40F363BE2C4EFB96EAE91DC2CE4F7> ] >>
+<< /Size 73 /Root 71 0 R /Info 72 0 R /ID [ <0EE2DD31789AD5C7E80F8407D72CF075> <0EE2DD31789AD5C7E80F8407D72CF075> ] >>
startxref
29928
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-mc-manual-para-split-obsolete.pdf b/macros/latex/contrib/tagpdf/ex-mc-manual-para-split-obsolete.pdf
index 70cfe5e793..6d60e10736 100644
--- a/macros/latex/contrib/tagpdf/ex-mc-manual-para-split-obsolete.pdf
+++ b/macros/latex/contrib/tagpdf/ex-mc-manual-para-split-obsolete.pdf
@@ -243,17 +243,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-06-20T17:53:22+02:00</rdf:li>
+ <rdf:li>2024-08-02T12:58:35+02:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-mc-manual-para-split-obsolete.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-06-20T17:53:22+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-06-20T17:53:22+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-06-20T17:53:22+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-08-02T12:58:35+02:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-08-02T12:58:35+02:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-08-02T12:58:35+02:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:c33d64b4-96ec-4e48-8f27-0b3edc831547</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:36712ce3-22f3-4c4a-8418-0427448d178a</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:075c36f4-757d-4e0f-8258-3c0a3e372d69</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>2</prism:pageCount>
</rdf:Description>
@@ -413,7 +413,7 @@ endobj
<< /Type /Catalog /Pages 14 0 R /Lang (de)/Metadata 15 0 R >>
endobj
25 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240620175322+02'00')/ModDate (D:20240620175322+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240802125835+02'00')/ModDate (D:20240802125835+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 26
@@ -444,7 +444,7 @@ xref
0000023894 00000 n
0000023972 00000 n
trailer
-<< /Size 26 /Root 24 0 R /Info 25 0 R /ID [ <2A141E41EDA78C2ADA31A952D041C439> <2A141E41EDA78C2ADA31A952D041C439> ] >>
+<< /Size 26 /Root 24 0 R /Info 25 0 R /ID [ <1A7EFBAD198841A82D20467F858B3B6C> <1A7EFBAD198841A82D20467F858B3B6C> ] >>
startxref
24195
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-softhyphen.pdf b/macros/latex/contrib/tagpdf/ex-softhyphen.pdf
index 5f96db2bdb..09a8d8aca0 100644
--- a/macros/latex/contrib/tagpdf/ex-softhyphen.pdf
+++ b/macros/latex/contrib/tagpdf/ex-softhyphen.pdf
@@ -210,17 +210,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-06-20T17:53:55+02:00</rdf:li>
+ <rdf:li>2024-08-02T12:59:01+02:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-softhyphen.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-06-20T17:53:55+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-06-20T17:53:55+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-06-20T17:53:55+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-08-02T12:59:01+02:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-08-02T12:59:01+02:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-08-02T12:59:01+02:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:aa82e685-4098-469d-861c-3c45dfc700c7</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:9c8a342f-f758-4367-8d05-7621809f3e05</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:994c7ab3-d509-4a5b-88b5-92bca5031c75</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -393,7 +393,7 @@ endobj
<< /Type /Catalog /Pages 19 0 R /MarkInfo 20 0 R/Lang (de)/Metadata 14 0 R/StructTreeRoot 5 0 R >>
endobj
30 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240620175355+02'00')/ModDate (D:20240620175355+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240802125901+02'00')/ModDate (D:20240802125901+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 31
@@ -429,7 +429,7 @@ xref
0000018113 00000 n
0000018228 00000 n
trailer
-<< /Size 31 /Root 29 0 R /Info 30 0 R /ID [ <5BCC76B86A64606D9B117AF50FFA18AE> <5BCC76B86A64606D9B117AF50FFA18AE> ] >>
+<< /Size 31 /Root 29 0 R /Info 30 0 R /ID [ <EECF5F575625EC21F0BEE870E572FEB1> <EECF5F575625EC21F0BEE870E572FEB1> ] >>
startxref
18451
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-spaceglyph-listings.pdf b/macros/latex/contrib/tagpdf/ex-spaceglyph-listings.pdf
index 21b11b9346..35e1d0609a 100644
--- a/macros/latex/contrib/tagpdf/ex-spaceglyph-listings.pdf
+++ b/macros/latex/contrib/tagpdf/ex-spaceglyph-listings.pdf
@@ -210,17 +210,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-06-20T17:54:22+02:00</rdf:li>
+ <rdf:li>2024-08-02T12:59:25+02:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-spaceglyph-listings.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-06-20T17:54:22+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-06-20T17:54:22+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-06-20T17:54:22+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-08-02T12:59:25+02:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-08-02T12:59:25+02:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-08-02T12:59:25+02:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:acdc2435-bf29-4e54-8d09-1c9b6dc32038</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:ad8487cb-8dcc-4cab-8542-55106010deec</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:c59181fc-bb69-430b-8f90-90206d3ba579</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -354,7 +354,7 @@ endobj
<< /Type /Catalog /Pages 15 0 R /MarkInfo 16 0 R/Lang (de)/Metadata 10 0 R/StructTreeRoot 5 0 R >>
endobj
26 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240620175422+02'00')/ModDate (D:20240620175422+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240802125925+02'00')/ModDate (D:20240802125925+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 27
@@ -386,7 +386,7 @@ xref
0000015485 00000 n
0000015600 00000 n
trailer
-<< /Size 27 /Root 25 0 R /Info 26 0 R /ID [ <50A5738B4CABF76A4CC27558811B7E58> <50A5738B4CABF76A4CC27558811B7E58> ] >>
+<< /Size 27 /Root 25 0 R /Info 26 0 R /ID [ <EC0A5DEABF5EE1A293FAD60891A0BF63> <EC0A5DEABF5EE1A293FAD60891A0BF63> ] >>
startxref
15823
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-structure-obsolete.pdf b/macros/latex/contrib/tagpdf/ex-structure-obsolete.pdf
index 7c9c135bf7..73ce1c0602 100644
--- a/macros/latex/contrib/tagpdf/ex-structure-obsolete.pdf
+++ b/macros/latex/contrib/tagpdf/ex-structure-obsolete.pdf
@@ -210,17 +210,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-06-20T17:54:47+02:00</rdf:li>
+ <rdf:li>2024-08-02T12:59:50+02:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-structure-obsolete.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-06-20T17:54:47+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-06-20T17:54:47+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-06-20T17:54:47+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-08-02T12:59:50+02:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-08-02T12:59:50+02:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-08-02T12:59:50+02:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:bf5e4a2b-cfa9-4fc5-878c-8f9d2ee95445</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:971e1e25-37c4-4af9-8523-72714a87dea7</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:2ccba557-e5ae-4703-80db-28b73a88c1cd</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -526,7 +526,7 @@ endobj
<< /Type /Catalog /Pages 26 0 R /MarkInfo 27 0 R/Lang (de)/Metadata 20 0 R/StructTreeRoot 5 0 R >>
endobj
43 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240620175447+02'00')/ModDate (D:20240620175447+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240802125950+02'00')/ModDate (D:20240802125950+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 44
@@ -575,7 +575,7 @@ xref
0000023423 00000 n
0000023538 00000 n
trailer
-<< /Size 44 /Root 42 0 R /Info 43 0 R /ID [ <ADB87D57539D5CE2A8FC3A4721B94DA0> <ADB87D57539D5CE2A8FC3A4721B94DA0> ] >>
+<< /Size 44 /Root 42 0 R /Info 43 0 R /ID [ <AE5400E970AB8EBE6C04A229EBA70E89> <AE5400E970AB8EBE6C04A229EBA70E89> ] >>
startxref
23761
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-tagpdf-template.pdf b/macros/latex/contrib/tagpdf/ex-tagpdf-template.pdf
index 81423fede4..7147cd1e91 100644
--- a/macros/latex/contrib/tagpdf/ex-tagpdf-template.pdf
+++ b/macros/latex/contrib/tagpdf/ex-tagpdf-template.pdf
@@ -210,17 +210,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-06-20T17:55:14+02:00</rdf:li>
+ <rdf:li>2024-08-02T13:00:16+02:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-tagpdf-template.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-06-20T17:55:14+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-06-20T17:55:14+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-06-20T17:55:14+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-08-02T13:00:16+02:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-08-02T13:00:16+02:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-08-02T13:00:16+02:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:f320abfc-f6ab-4d12-8719-d176f4d947cf</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:898c4009-cc18-43c3-8fda-44ab8e28318c</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:3b4409f1-f3e5-4c01-86c4-a0bcea68ea38</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -307,7 +307,7 @@ endobj
<< /Type /Namespace /NS (https://www.latex-project.org/ns/book/2022) /RoleMapNS 18 0 R >>
endobj
19 0 obj
-<< /Type /Namespace /NS (data:,69C62BB9-6D5A-6FC9-FD75-56BC71E087F4) >>
+<< /Type /Namespace /NS (data:,25352333-84F8-941A-42AB-414B46468294) >>
endobj
8 0 obj
[ 9 0 R 11 0 R 13 0 R 15 0 R 17 0 R 19 0 R ]
@@ -399,7 +399,7 @@ endobj
<< /Type /Catalog /Pages 31 0 R /MarkInfo 32 0 R/Lang (en)/Metadata 26 0 R/StructTreeRoot 5 0 R >>
endobj
42 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240620175514+02'00')/ModDate (D:20240620175514+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240802130016+02'00')/ModDate (D:20240802130016+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 43
@@ -447,7 +447,7 @@ xref
0000017842 00000 n
0000017957 00000 n
trailer
-<< /Size 43 /Root 41 0 R /Info 42 0 R /ID [ <E36FE13F3FA0066C1F9796E38E50018C> <E36FE13F3FA0066C1F9796E38E50018C> ] >>
+<< /Size 43 /Root 41 0 R /Info 42 0 R /ID [ <42D962292B4982520E998D32C837DE43> <42D962292B4982520E998D32C837DE43> ] >>
startxref
18180
%%EOF
diff --git a/macros/latex/contrib/tagpdf/link-figure-input.tex b/macros/latex/contrib/tagpdf/link-figure-input.tex
index ef07c33e95..1a1036d282 100644
--- a/macros/latex/contrib/tagpdf/link-figure-input.tex
+++ b/macros/latex/contrib/tagpdf/link-figure-input.tex
@@ -27,7 +27,7 @@
\NewDocumentCommand\balloon{m}{%
\node[fit={(pic cs:#1-first) (pic cs:#1-end)
([yshift=7pt]pic cs:#1-end)},balloon](#1){};}
-\begin{tikzpicture}[overlay,remember picture]
+\begin{tikzpicture}[overlay,remember picture,alt={Illustration of link annotation structure}]
\balloon{link}
\balloon{structparent}
\balloon{OBJR}
@@ -45,7 +45,7 @@
\draw[ref] (kid)--(OBJR);
\draw[ref] (OBJR)--(linkref);
\end{tikzpicture}
-\begin{lstlisting}[name=OBJR]
+\begin{taglstlisting}[name=OBJR]
*\tikzmark{link-first}*18 0 obj*\tikzmark{link-end}* %Link Object
<< /Type /Annot /Subtype/Link
/Rect [ 196.109 494.573 399.167 506.831 ]
@@ -67,4 +67,4 @@ endobj};
<< /Nums
[... *\tikzmark{pnum-first}*16*\tikzmark{pnum-end}* *\tikzmark{pref-first}*17 0 R*\tikzmark{pref-end}* ...] >>
endobj
-\end{lstlisting}
+\end{taglstlisting}
diff --git a/macros/latex/contrib/tagpdf/pac2024-report.png b/macros/latex/contrib/tagpdf/pac2024-report.png
new file mode 100644
index 0000000000..4474bc989f
--- /dev/null
+++ b/macros/latex/contrib/tagpdf/pac2024-report.png
Binary files differ
diff --git a/macros/latex/contrib/tagpdf/pac2024-version.png b/macros/latex/contrib/tagpdf/pac2024-version.png
new file mode 100644
index 0000000000..1bc12bdafe
--- /dev/null
+++ b/macros/latex/contrib/tagpdf/pac2024-version.png
Binary files differ
diff --git a/macros/latex/contrib/tagpdf/tagpdf-backend.dtx b/macros/latex/contrib/tagpdf/tagpdf-backend.dtx
index 7e19e1e90f..0ed233e2e0 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-backend.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-backend.dtx
@@ -47,13 +47,13 @@
% }^^A
% }
%
-% \date{Version 0.99c, released 2024-06-20}
+% \date{Version 0.99d, released 2024-08-02}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*luatex>
-\ProvidesExplFile {tagpdf-luatex.def} {2024-06-20} {0.99c}
+\ProvidesExplFile {tagpdf-luatex.def} {2024-08-02} {0.99d}
{tagpdf~driver~for~luatex}
% \end{macrocode}
% \section{Loading the lua}
@@ -164,8 +164,8 @@
local ProvidesLuaModule = {
name = "tagpdf",
- version = "0.99c", --TAGVERSION
- date = "2024-06-20", --TAGDATE
+ version = "0.99d", --TAGVERSION
+ date = "2024-08-02", --TAGDATE
description = "tagpdf lua code",
license = "The LATEX Project Public License 1.3c"
}
@@ -252,6 +252,12 @@ local iwfontattributeid = luatexbase.new_attribute ("g_@@_interwordfont_attr")
local tagunmarkedbool= token.create("g_@@_tagunmarked_bool")
local truebool = token.create("c_true_bool")
% \end{macrocode}
+% with this token we can query the state of the softhyphen boolean
+% and so detect if hyphens from hyphenation should be replaced by soft-hyphens.
+% \begin{macrocode}
+local softhyphenbool = token.create("g_@@_softhyphen_bool")
+% \end{macrocode}
+
% Now a number of local versions from global tables.
% Not all is perhaps needed, most node variants were copied from lua-debug.
% \begin{macrocode}
@@ -286,6 +292,9 @@ local KERN = node.id("kern")
local PENALTY = node.id("penalty")
local LOCAL_PAR = node.id("local_par")
local MATH = node.id("math")
+
+local explicit_disc = 1
+local regular_disc = 3
% \end{macrocode}
% Now we setup the main table structure. ltx is used by other latex code too!
% \begin{macrocode}
@@ -1267,6 +1276,80 @@ function ltx.@@.func.output_parenttree (abspage)
end
% \end{macrocode}
% \end{macro}
+%
+% \begin{macro}
+% {
+% process_softhyphen_pre
+% process_softhyphen_post
+% }
+% First some local definitions. Since these are only needed locally everything gets wrapped into a block.
+% \begin{macrocode}
+do
+ local properties = node.get_properties_table()
+ local is_soft_hyphen_prop = 'tagpdf.rewrite-softhyphen.is_soft_hyphen'
+ local hyphen_char = 0x2D
+ local soft_hyphen_char = 0xAD
+% \end{macrocode}
+%
+% A lookup table to test if the font supports the soft hyphen glyph.
+% \begin{macrocode}
+ local softhyphen_fonts = setmetatable({}, {__index = function(t, fid)
+ local fdir = identifiers[fid]
+ local format = fdir and fdir.format
+ local result = (format == 'opentype' or format == 'truetype')
+ local characters = fdir and fdir.characters
+ result = result and (characters and characters[soft_hyphen_char]) ~= nil
+ t[fid] = result
+ return result
+ end})
+% \end{macrocode}
+%
+% A pre shaping callback to mark hyphens as being hyphenation hyphens.
+% This runs before shaping to avoid affecting hyphens moved into
+% discretionaries during shaping.
+% \begin{macrocode}
+ local function process_softhyphen_pre(head, _context, _dir)
+ if softhyphenbool.mode ~= truebool.mode then return true end
+ for disc, sub in node.traverse_id(DISC, head) do
+ if sub == explicit_disc or sub == regular_disc then
+ for n, _ch, _f in node.traverse_char(disc.pre) do
+ local props = properties[n]
+ if not props then
+ props = {}
+ properties[n] = props
+ end
+ props[is_soft_hyphen_prop] = true
+ end
+ end
+ end
+ return true
+ end
+
+% \end{macrocode}
+%
+% Finally do the actual replacement after shaping. No checking for double processing here
+% since the operation is idempotent.
+% \begin{macrocode}
+ local function process_softhyphen_post(head, _context, _dir)
+ if softhyphenbool.mode ~= truebool.mode then return true end
+ for disc, sub in node.traverse_id(DISC, head) do
+ for n, ch, fid in node.traverse_glyph(disc.pre) do
+ local props = properties[n]
+ if softhyphen_fonts[fid] and ch == hyphen_char and props and props[is_soft_hyphen_prop] then
+ n.char = soft_hyphen_char
+ props.glyph_info = nil
+ end
+ end
+ end
+ return true
+ end
+
+ luatexbase.add_to_callback('pre_shaping_filter', process_softhyphen_pre, 'tagpdf.rewrite-softhyphen')
+ luatexbase.add_to_callback('post_shaping_filter', process_softhyphen_post, 'tagpdf.rewrite-softhyphen')
+end
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
%</lua>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-checks.dtx b/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
index 345b2e35ba..3cbe3b141b 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
@@ -48,7 +48,7 @@
% }^^A
% }
%
-% \date{Version 0.99c, released 2024-06-20}
+% \date{Version 0.99d, released 2024-08-02}
% \maketitle
% \begin{documentation}
% \section{Commands}
@@ -331,7 +331,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-checks-code} {2024-06-20} {0.99c}
+\ProvidesExplPackage {tagpdf-checks-code} {2024-08-02} {0.99d}
{part of tagpdf - code related to checks, conditionals, debugging and messages}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-code.pdf b/macros/latex/contrib/tagpdf/tagpdf-code.pdf
index 4dd216d1a9..76e839d0d5 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-code.pdf
+++ b/macros/latex/contrib/tagpdf/tagpdf-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/tagpdf/tagpdf-data.dtx b/macros/latex/contrib/tagpdf/tagpdf-data.dtx
index f07e5db3ed..6417b44c40 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-data.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-data.dtx
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Version 0.99c, released 2024-06-20}
+% \date{Version 0.99d, released 2024-08-02}
% \maketitle
% \begin{documentation}
% This files contains a various data files which are read in
@@ -61,7 +61,7 @@
% latex-lab has also a namespace module, which takes precedence!
% \begin{macrocode}
%<*ns-latex>
-%% \ProvidesExplFile {tagpdf-ns-latex.def} {2024-06-20} {0.99c}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2024-08-02} {0.99d}
%% {latex} {https://www.latex-project.org/ns/dflt/2022}{}
title, Title, pdf2,
part, Title, pdf2,
@@ -93,7 +93,7 @@ text, P, pdf2,
% It is bound to change
% \begin{macrocode}
%<*ns-latex-book>
-%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2024-06-20} {0.99c}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2024-08-02} {0.99d}
%% {latex-book} {https://www.latex-project.org/ns/book/2022}{}
chapter, H1,pdf2,
section, H2,pdf2,
@@ -107,7 +107,7 @@ subparagraph, H6,pdf2,
% \section{The pdf namespace data}
% \begin{macrocode}
%<*ns-pdf>
-%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2024-06-20} {0.99c}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2024-08-02} {0.99d}
%% {pdf} {http://iso.org/pdf/ssn}{}
StructTreeRoot,StructTreeRoot,pdf,D,
Document,Document,pdf,D,
@@ -175,7 +175,7 @@ Strong,Span,pdf,I,
% \section{The pdf 2.0 namespace data}
% \begin{macrocode}
%<*ns-pdf2>
-%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2024-06-20} {0.99c}
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2024-08-02} {0.99d}
%% {pdf2} {http://iso.org/pdf2/ssn}{}
StructTreeRoot,StructTreeRoot,pdf2,D,
Document,Document,pdf2,D,
@@ -232,7 +232,7 @@ Strong,Strong,pdf2,I,
% \section{The mathml namespace data}
% \begin{macrocode}
%<*ns-mathml>
-%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2024-06-20} {0.99c}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2024-08-02} {0.99d}
% {mathml}{http://www.w3.org/1998/Math/MathML}{}
abs,abs,mathml,
and,and,mathml,
@@ -467,7 +467,7 @@ xor,xor,mathml,
% This will perhaps change in future.
% \begin{macrocode}
%<*parent-child>
-%% \ProvidesExplFile {tagpdf-parent-child.csv} {2024-06-20} {0.99c}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2024-08-02} {0.99d}
,,,StructTreeRoot,Document,Art,Part,Div,Sect,BlockQuote,NonStruct,TOC,TOCI,Index,Private,Quote,Note,Reference,BibEntry,P,Hn,H,Lbl,Code,Span,Link,Annot,Form,Ruby,RB,RT,RP,Warichu,WT,WP,L,LI,LBody,Table,TR,TH,TD,THead,TBody,TFoot,Caption,Figure,Formula,MC
Document,both,document level,1,0..n,∅,‡,‡,∅,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅
Art,1.7,grouping,∅,0..n,∅,‡,‡,0..n,0..n,‡,∅,∅,∅,0..n,∅,0..n,∅,∅,∅,0..1,0..1,∅,∅,∅,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,∅,∅
@@ -522,7 +522,7 @@ MC,both,---,∅,∅,∅,∅,∅,∅,0..n,‡,∅,∅,∅,0..n,0..n,0..n,0..n,0..
% This will perhaps change in future.
% \begin{macrocode}
%<*parent-child-2>
-%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2024-06-20} {0.99c}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2024-08-02} {0.99d}
,,,StructTreeRoot,Document,DocumentFragment,Art,Part,Div,Sect,Aside,BlockQuote,NonStruct,TOC,TOCI,Index,Private,Title,Sub,Quote,Note,Reference,BibEntry,P,Hn,H,Lbl,Code,Em,Strong,Span,Link,Annot,Form,Ruby,RB,RT,RP,Warichu,WT,WP,FENote,L,LI,LBody,Table,TR,TH,TD,THead,TBody,TFoot,Caption,Figure,Formula,math,mathml,Artifact,MC
Document,both,document level,1,0..n,0..n,∅,‡,‡,∅,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅
DocumentFragment,2.0,document level,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅*,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅,0..n,∅
diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
index 0cef27fd3b..ff036b5523 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99c, released 2024-06-20}
+% \date{Version 0.99d, released 2024-08-02}
% \maketitle
% \begin{documentation}
% \end{documentation}
@@ -55,11 +55,11 @@
% \begin{macrocode}
%<@@=tag>
%<*generic>
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2024-06-20} {0.99c}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2024-08-02} {0.99d}
{part of tagpdf - code related to marking chunks - generic mode}
%</generic>
%<*debug>
-\ProvidesExplPackage {tagpdf-debug-generic} {2024-06-20} {0.99c}
+\ProvidesExplPackage {tagpdf-debug-generic} {2024-08-02} {0.99d}
{part of tagpdf - debugging code related to marking chunks - generic mode}
%</debug>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx
index 7dd309c5f5..3c2e91605e 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99c, released 2024-06-20}
+% \date{Version 0.99d, released 2024-08-02}
% \maketitle
% \begin{implementation}
% The code is split into three parts: code shared by all engines,
@@ -86,11 +86,11 @@
% \begin{macrocode}
%<@@=tag>
%<*luamode>
-\ProvidesExplPackage {tagpdf-mc-code-lua} {2024-06-20} {0.99c}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2024-08-02} {0.99d}
{tagpdf - mc code only for the luamode }
%</luamode>
%<*debug>
-\ProvidesExplPackage {tagpdf-debug-lua} {2024-06-20} {0.99c}
+\ProvidesExplPackage {tagpdf-debug-lua} {2024-08-02} {0.99d}
{part of tagpdf - debugging code related to marking chunks - lua mode}
%</debug>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx
index c96fd8c4c8..5bfe0658d1 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99c, released 2024-06-20}
+% \date{Version 0.99d, released 2024-08-02}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -181,7 +181,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-mc-code-shared} {2024-06-20} {0.99c}
+\ProvidesExplPackage {tagpdf-mc-code-shared} {2024-08-02} {0.99d}
{part of tagpdf - code related to marking chunks -
code shared by generic and luamode }
%</header>
diff --git a/macros/latex/contrib/tagpdf/tagpdf-roles.dtx b/macros/latex/contrib/tagpdf/tagpdf-roles.dtx
index 80f9da0f6b..fb5f1b77c9 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-roles.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-roles.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99c, released 2024-06-20}
+% \date{Version 0.99d, released 2024-08-02}
% \maketitle
% \begin{documentation}
% \begin{function}
@@ -98,7 +98,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-roles-code} {2024-06-20} {0.99c}
+\ProvidesExplPackage {tagpdf-roles-code} {2024-08-02} {0.99d}
{part of tagpdf - code related to roles and structure names}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-space.dtx b/macros/latex/contrib/tagpdf/tagpdf-space.dtx
index a29c8f0fb3..5c8e007084 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-space.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-space.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99c, released 2024-06-20}
+% \date{Version 0.99d, released 2024-08-02}
% \maketitle
% \begin{documentation}
% \begin{function}{activate/space (setup-key),interwordspace (deprecated)}
@@ -66,7 +66,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-space-code} {2024-06-20} {0.99c}
+\ProvidesExplPackage {tagpdf-space-code} {2024-08-02} {0.99d}
{part of tagpdf - code related to real space chars}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-struct.dtx b/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
index 963852b1fc..6da5e48b18 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99c, released 2024-06-20}
+% \date{Version 0.99d, released 2024-08-02}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -285,7 +285,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-struct-code} {2024-06-20} {0.99c}
+\ProvidesExplPackage {tagpdf-struct-code} {2024-08-02} {0.99d}
{part of tagpdf - code related to storing structure}
%</header>
% \end{macrocode}
@@ -1937,7 +1937,7 @@
% \section{Attributes and attribute classes}
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage {tagpdf-attr-code} {2024-06-20} {0.99c}
+\ProvidesExplPackage {tagpdf-attr-code} {2024-08-02} {0.99d}
{part of tagpdf - code related to attributes and attribute classes}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-tree.dtx b/macros/latex/contrib/tagpdf/tagpdf-tree.dtx
index 04b9309597..f7ae6de996 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-tree.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-tree.dtx
@@ -47,13 +47,13 @@
% }^^A
% }
%
-% \date{Version 0.99c, released 2024-06-20}
+% \date{Version 0.99d, released 2024-08-02}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-tree-code} {2024-06-20} {0.99c}
+\ProvidesExplPackage {tagpdf-tree-code} {2024-08-02} {0.99d}
{part of tagpdf - code related to writing trees and dictionaries to the pdf}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-user.dtx b/macros/latex/contrib/tagpdf/tagpdf-user.dtx
index 916ff041d0..a4014b62e3 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-user.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-user.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99c, released 2024-06-20}
+% \date{Version 0.99d, released 2024-08-02}
% \maketitle
% \begin{documentation}
% \section{Setup commands}
@@ -309,7 +309,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-user} {2024-06-20} {0.99c}
+\ProvidesExplPackage {tagpdf-user} {2024-08-02} {0.99d}
{tagpdf - user commands}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf.dtx b/macros/latex/contrib/tagpdf/tagpdf.dtx
index e58570340e..b1d008a6e6 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf.dtx
@@ -72,6 +72,12 @@
% marked up as artifact. The initial value is true.
% \end{function}
%
+% \begin{function}{activate/softhyphen (setup-key)}
+% This key allows to activates automatic handling of hyphens inserted
+% by hyphenation. It only is used in luamode and replaces hyphens
+% by U+00AD if the font supports this.
+% \end{function}
+%
% \begin{function}{page/tabsorder (setup-key), tabsorder (deprecated)}
% This sets the tabsorder on a page. The values are |row|, |column|, |structure| (default)
% or |none|. Currently this is set more or less globally. More finer control can be
@@ -87,7 +93,7 @@
% \begin{macrocode}
%<@@=tag>
%<*package>
-\ProvidesExplPackage {tagpdf} {2024-06-20} {0.99c}
+\ProvidesExplPackage {tagpdf} {2024-08-02} {0.99d}
{ A package to experiment with pdf tagging }
\bool_if:nF
@@ -113,7 +119,7 @@
% \end{macrocode}
%<*debug>
% \begin{macrocode}
-\ProvidesExplPackage {tagpdf-debug} {2024-06-20} {0.99c}
+\ProvidesExplPackage {tagpdf-debug} {2024-08-02} {0.99d}
{ debug code for tagpdf }
\@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
% \end{macrocode}
@@ -136,7 +142,7 @@
% we define a base package with dummy functions
% \begin{macrocode}
%<*base>
-\ProvidesExplPackage {tagpdf-base} {2024-06-20} {0.99c}
+\ProvidesExplPackage {tagpdf-base} {2024-08-02} {0.99d}
{part of tagpdf - provide base, no-op versions of the user commands }
%</base>
% \end{macrocode}
@@ -354,6 +360,13 @@
% \end{macrocode}
% \end{variable}
%
+% \begin{variable}{\g_@@_softhyphen_bool}
+% This boolean controls if the code should try to automatically
+% handle hyphens from hyphenation. It is currently only used in luamode.
+% \begin{macrocode}
+\bool_new:N \g_@@_softhyphen_bool
+% \end{macrocode}
+% \end{variable}
% \section{Variants of l3 commands}
% \begin{macrocode}
\prg_generate_conditional_variant:Nnn \pdf_object_if_exist:n {e}{T,F,TF}
@@ -648,6 +661,13 @@
tagunmarked .bool_gset:N = \g_@@_tagunmarked_bool,
% \end{macrocode}
% \end{macro}
+% \begin{macro}{activate/softhyphen (setup-key)}
+% This key activates (in luamode) the handling of soft hyphens.
+% \begin{macrocode}
+ activate/softhyphen .bool_gset:N = \g_@@_softhyphen_bool,
+ activate/softhyphen .initial:n = true,
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{page/tabsorder (setup-key),tabsorder (deprecated)}
% This sets the tabsorder on a page. The values are |row|, |column|, |structure| (default)
% or |none|. Currently this is set more or less globally. More finer control can be
diff --git a/macros/latex/contrib/tagpdf/tagpdf.pdf b/macros/latex/contrib/tagpdf/tagpdf.pdf
index 04d46c2fbf..f7c6ea02a3 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.pdf
+++ b/macros/latex/contrib/tagpdf/tagpdf.pdf
Binary files differ
diff --git a/macros/latex/contrib/tagpdf/tagpdf.tex b/macros/latex/contrib/tagpdf/tagpdf.tex
index ac1c33fa4a..10d36d09a0 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.tex
+++ b/macros/latex/contrib/tagpdf/tagpdf.tex
@@ -16,8 +16,8 @@
}
\DebugBlocksOff
\makeatletter
-\def\UlrikeFischer@package@version{0.99c}
-\def\UlrikeFischer@package@date{2024-06-20}
+\def\UlrikeFischer@package@version{0.99d}
+\def\UlrikeFischer@package@date{2024-08-02}
\makeatother
\documentclass[bibliography=totoc,a4paper]{article}
@@ -338,13 +338,15 @@ improvements and new features in the \LaTeX\ kernel, the latex-lab bundle and
the \PDF\ management code and is now much better. Only a few
structures---mostly some from currently unsupported packages--- still need
manual tagging. But sadly the output of the validators don't quite reflect
-the improvements. The documentation uses now \PDF~2.0 and PAC~2024 can't handle
-this, it claims that the file is damaged. The Adobe validator has a bug and
+the improvements. The documentation uses now \PDF~2.0 and while the newest
+PAC~2024 can at least open the file it can not validate properly the file. For example
+it complains about the tabular header cells as it doesn't follow attribute classes.
+The Adobe validator has a bug and
doesn't like the (valid) use of the \texttt{Lbl} tag for the section numbers
(see figure~\ref{fig:adobe}).
-But even if the documentation passed the tests of the validators: as
+But even if the documentation would pass all the tests of the validators: as
mentioned above passing a formal test doesn't mean that the content is really
good and usable. The user commands used for the tagging and also some of the
patches used are still rather crude. So there is lot space for improvement.
@@ -354,8 +356,9 @@ Be aware that to create the tagged version a current lualatex-dev and a
current version of the pdfmanagment-testphase package is needed.
\end{tcolorbox}
-\includegraphics[alt=PAC 3 report]{pac3}
+\includegraphics[alt=PAC 2024 complains about PDF version]{pac2024-version}
+\includegraphics[alt=PAC 2024 complains about table header cells]{pac2024-report}
\begin{figure}
@@ -504,6 +507,10 @@ The key-val list understands at least the following keys. More keys are defined
least \PrintKeyName{activate/mc} has been used.
The old name of the key |interwordspace| is still supported but deprecated.
+\item[\PrintKeyName{activate/softhyphen}] Boolean. luamode only.
+ The key activates/deactivates the replacing of hard hyphens from hyphenation
+ by soft hyphens. By default this is activated.
+
\item[\PrintKeyName{role/new-tag}] Allows to define new tag names, see
section \ref{sec:new-tag} for a description.
@@ -721,11 +728,8 @@ To tag a \PDF{} three tasks must be carried out:
\minisec{Page stream with marked content}
-\tagpdfparaOff
-
-\tagstructbegin{tag=Figure,alt={Illustration of page stream with marked content},attribute=bbox}%
-\tagmcbegin{tag=Figure}%
-\begin{tikzpicture}[baseline=(a.north),node distance=2pt,remember picture]
+\begin{tikzpicture}[baseline=(a.north),node distance=2pt,remember picture,
+alt={Illustration of page stream with marked content}]
\node(start){\ldots~\ldots~\ldots};
\node[draw,base right = of start](a) {mc-chunk 1};
\node[draw,base right = of a](b) {mc-chunk 2};
@@ -733,20 +737,13 @@ To tag a \PDF{} three tasks must be carried out:
\node[draw,base right = of c](d) {mc-chunk 3};
\node[base right = of d] {\ldots~\ldots};
\end{tikzpicture}
-\tagmcend\tagstructend
-
-\tagpdfparaOn
\minisec{Structure}
-\tagpdfparaOff
\newlength\ydistance\setlength\ydistance{-0.8cm}
-\tagstructbegin{tag=Figure,alt={Illustration of structure},attribute=bbox}%
-\tagmcbegin{tag=Figure}%
-\begin{tikzpicture}[remember picture,baseline=(root.north)]
-
+\begin{tikzpicture}[remember picture,baseline=(root.north),alt={Illustration of structure}]
\node[draw,anchor=base west] (root) at (0,0) {Sect (start section)};
\node[draw,anchor=base west] at (0.3,\ydistance) {H (header section)};
\node[draw,anchor=base west](aref) at (0.6,2\ydistance){mc-chunk 1};
@@ -758,17 +755,12 @@ To tag a \PDF{} three tasks must be carried out:
\node[draw,anchor=base west] at (0.3,8\ydistance){/P (end paragraph)};
\node[draw,anchor=base west] at (0,9\ydistance){/Sect (end section)};
\end{tikzpicture}
-
\begin{tikzpicture}[remember picture, overlay]
\draw[->,red](aref)-|(a);
\draw[->,red](bref)-|(b);
\draw[->,red](cref)-|(c);
\draw[->,red](dref)-|(d);
-
\end{tikzpicture}
-\tagmcend\tagstructend
-
-\tagpdfparaOn
\end{tcolorbox}
@@ -1108,8 +1100,8 @@ the command, as the effect of the begin command ends with a new
\begin{docCommands}
{
- {doc name=tagmcuse},
- {doc name=tag_mc_use:n}
+ {doc name=tagmcuse,doc parameter=\marg{label}},
+ {doc name=tag_mc_use:n,doc parameter=\marg{label}}
}
\end{docCommands}
@@ -1283,13 +1275,8 @@ add the needed code.
\begin{figure}
-\tagpdfparaOff
-\tagstructbegin{tag=Figure,alt={Illustration of link annotation structure},attribute=bbox}\tagmcbegin{tag=Figure}
-\tagstop
\input{link-figure-input}
-\tagstart
-\tagmcend\tagstructend
\caption{Structure needed for a link annotation}\label{fig:linkannot}
@@ -2661,7 +2648,8 @@ already mentioned there are more requirements:
is normally not a problem. With pdflatex it could need additional
\verb+\pdfglyphtounicode+ commands.
- \item Hard and soft hyphen must be distinct.
+ \item Hard and soft hyphen must be distinct. In luamode this is now handled through
+ the \texttt{activate/softhyphen} key. For pdftex no solution is known.
\item Spaces between words should be space glyphs and not only a
horizontal movement. See section~\ref{sec:spacechars}.
@@ -3061,10 +3049,7 @@ examples and remarks easier to understand.
\item[postfix notation] \PDF{} uses in various places postfix
notation. This means that the operator is behind its arguments:
-\tagpdfparaOff
-
-\tagstructbegin{tag=Figure,alt={Illustration of postfix notation},attribute=bbox}\tagmcbegin{tag=Figure}
-\begin{tikzpicture}[baseline=(c.base)]
+\begin{tikzpicture}[baseline=(c.base),alt={Illustration of postfix notation}]
\node[arg](a1) {18};
\node[arg,right=of a1.east](a2) {0};
\node[operator,right= of a2.east](c) {obj};
@@ -3072,7 +3057,7 @@ examples and remarks easier to understand.
\draw[->] (c.south) --++(0,-2mm) -| (a2);
\end{tikzpicture}
-\begin{tikzpicture}[baseline=(c.base)]
+\begin{tikzpicture}[baseline=(c.base),alt={Illustration of postfix notation}]
\node[arg](a1) {18};
\node[arg,right=of a1.east](a2) {0};
\node[operator,right= of a2.east](c) {R};
@@ -3081,7 +3066,7 @@ examples and remarks easier to understand.
\end{tikzpicture} (a reference (operator R) to an object
-\begin{tikzpicture}[baseline=(c.base)]
+\begin{tikzpicture}[baseline=(c.base),alt={Illustration of postfix notation}]
\node[arg](a1) {1};
\node[arg,right = of a1.east](a2) {0};
\node[arg,right = of a2.east](a3) {0};
@@ -3097,19 +3082,15 @@ examples and remarks easier to understand.
\draw[->] (c.south) --++(0,-2mm) -|(a1);
\end{tikzpicture}
-\begin{tikzpicture}[baseline=(c.base)]
+\begin{tikzpicture}[baseline=(c.base),alt={Illustration of postfix notation}]
\node[arg](a1) {/P};
\node[arg,right = of a1.east](a2) {<</MCID 0>>};
\node[operator,right = of a2.east](c) {BDC};
\draw[->] (c.south) --++(0,-2mm) -| (a1);
\draw[->] (c.south) --++(0,-2mm) -| (a2);
\end{tikzpicture}
-\tagmcend\tagstructend
-
-\tagpdfparaOn
-
\item[Names] \PDF{} knows a sort of variable called a
\enquote{name}. Names start with a slash and may include any regular
characters, but not delimiter or white-space characters. Uppercase
@@ -3152,19 +3133,13 @@ examples and remarks easier to understand.
\mbox{\texttt{[0 15 0 R (hello) <</Type /X>> [1 2 3]]}}
-\tagpdfparaOff
-
- \tagstructbegin{tag=Figure,alt={Illustration of array},attribute=bbox}\tagmcbegin{tag=Figure}
- \begin{tikzpicture}[baseline=(c.base)]
+ \begin{tikzpicture}[baseline=(c.base),alt={Illustration of array}]
\node[arg](a1) {0};
\node[arg,right = of a1.east](a2) {15 0 R};
\node[arg,right = of a2.east](a3) {(hello)};
\node[arg,right = of a3.east](a4) {<</Type /X>>};
\node[arg,right = of a4.east](a5) {[1 2 3]};
\end{tikzpicture}
-\tagmcend\tagstructend
-
-\tagpdfparaOn
\item[Dictionaries] Dictionaries are enclosed by double angle
diff --git a/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty b/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty
index 936f8adacd..6ae5840b11 100644
--- a/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty
+++ b/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty
@@ -1,5 +1,5 @@
%\RequirePackage[enable-debug]{expl3}[2018/06/14]
-\ProvidesExplPackage {tagpdfdocu-patches} {2024-06-20} {0.99c}
+\ProvidesExplPackage {tagpdfdocu-patches} {2024-08-02} {0.99d}
{patches/commands for the tagpdf documentation}
\RequirePackage{etoolbox,xpatch}
@@ -82,10 +82,6 @@
% }
\ExplSyntaxOff
-% ======== tikzpicture ==========
-% TODO this needs some investigation: it messes up the stack if one add paraOff
-
-\AddToHook{env/tikzpicture/begin}{}
%======== tcolorbox ========
% We switch of paratagging at the begin and reenable it locally in before upper.
@@ -138,22 +134,6 @@
% ======= footnote ========
% done in testphase code
-% ======= bibliography ========
-% biblatex. Creates some empty mc-chunks.
-% no internal patches, but redefining begentry/finentry is not safe.
-% better hook is needed.
-
-
-\def\blx@endbibliography{%
- \csuse{blx@endenv@\blx@theenv}%
- \blx@noitem
- \blx@locallabelwidth@finish
- \endgroup
- \blx@bibnote\blx@thepostnote
-% \endgroup
- \expandafter\endgroup\if@endpe\@doendpe\fi
-}
-
% ====== hyperref ========
% this should probably go into tagpdf, but it is related to
% problem of pdf strings and context ....
@@ -167,16 +147,147 @@
\let\tagstructend\relax
}}{}
-%====== picture =======
+%====== tikz picture =======
+% first draft to tag. The main problem is to handle paragraphs. One
+\ExplSyntaxOn
+\cs_new_protected:Npn\__tag_tikz_savepos:n #1
+ {
+ \tex_savepos:D
+ \tikz@resetexpandcount%
+ \tikz@scan@one@point\pgfutil@firstofone(current~bounding~box.north~east)\relax
+ \pgf@pos@transform{\pgf@x}{\pgf@y}%
+ \property_record:nn{#1}{xpos,ypos,abspage}
+ \property_record:nn{#1-tr}{pgfx,pgfy}
+ \tikz@scan@one@point\pgfutil@firstofone(current~bounding~box.south~west)\relax
+ \pgf@pos@transform{\pgf@x}{\pgf@y}%
+ \property_record:nn{#1-bl}{pgfx,pgfy}
+ \tex_savepos:D
+ }
+\cs_generate_variant:Nn \__tag_tikz_savepos:n {e}
+
+\NewProperty{pgfx}{now}{0}
+ {
+ \dim_compare:nNnTF {\dim_abs:n {\pgf@x}} > {15999pt}
+ { 0 }
+ { \dim_to_decimal_in_sp:n{\pgf@x} }
+ }
+\NewProperty{pgfy}{now}{0}
+ {
+ \dim_compare:nNnTF {\dim_abs:n {\pgf@y}} > {15999pt}
+ { 0 }
+ { \dim_to_decimal_in_sp:n{\pgf@y} }
+ }
+
+\cs_new_protected:Npn \__tag_tikz_getbbox:
+ {
+ \int_gincr:N\g__tag_graphic_int
+ \tl_set:Ne\l__tag_graphic_currentlabel_tl {__tag_graphic_\int_use:N \g__tag_graphic_int}
+ \tl_gset:Ne\g__tag_graphic_lx_tl
+ {
+ \dim_to_decimal_in_bp:n
+ { \property_ref:een {\l__tag_graphic_currentlabel_tl}{xpos}{0}sp
+ + \property_ref:een {\l__tag_graphic_currentlabel_tl-bl}{pgfx}{0}sp
+ }
+ }
+ \tl_gset:Ne\g__tag_graphic_ly_tl
+ {
+ \dim_to_decimal_in_bp:n
+ { \property_ref:een {\l__tag_graphic_currentlabel_tl}{ypos}{0}sp
+ + \property_ref:een {\l__tag_graphic_currentlabel_tl-bl}{pgfy}{0}sp
+ }
+ }
+ \tl_gset:Ne\g__tag_graphic_ux_tl
+ {
+ \dim_to_decimal_in_bp:n
+ { \property_ref:een {\l__tag_graphic_currentlabel_tl}{xpos}{0}sp
+ + \property_ref:een {\l__tag_graphic_currentlabel_tl-tr}{pgfx}{0}sp
+ }
+ }
+ \tl_gset:Ne\g__tag_graphic_uy_tl
+ {
+ \dim_to_decimal_in_bp:n
+ { \property_ref:een {\l__tag_graphic_currentlabel_tl}{ypos}{0}sp
+ + \property_ref:een {\l__tag_graphic_currentlabel_tl-tr}{pgfy}{0}sp
+ }
+ }
+ }
-% PAC3 complained that the BBox is missing, so we are cheating for now
-% and add a fix size.
-\tagpdfsetup
- {
- newattribute =
- {bbox}{/O /Layout /BBox [0 0 100 100]}
+\cs_new_protected:Npn \__tag_graphic_tikz_begin_picture:
+ {
+ \tag_mc_end_push:
+ \bool_if:NTF \l__tag_graphic_artifact_bool
+ { \tagmcbegin{artifact} }
+ {
+ \__tag_tikz_getbbox:
+ \tagstructbegin{tag=Figure,alt=\l__tag_graphic_alt_tl}\tagmcbegin{}
+ \__tag_prop_gput:cne
+ { g__tag_struct_\int_eval:n {\c@g__tag_struct_abs_int}_prop }
+ { A }
+ {
+ <<
+ /O /Layout /BBox~
+ [
+ \g__tag_graphic_lx_tl\c_space_tl
+ \g__tag_graphic_ly_tl\c_space_tl
+ \g__tag_graphic_ux_tl\c_space_tl
+ \g__tag_graphic_uy_tl
+ ]
+ >>
+ }
+ \bool_if:NT\l__tag_graphic_debug_bool
+ {
+ \__tag_graphic_show_bbox:VVVVne
+ \g__tag_graphic_lx_tl
+ \g__tag_graphic_ly_tl
+ \g__tag_graphic_ux_tl
+ \g__tag_graphic_uy_tl
+ {red}
+ {\int_use:N\g__tag_graphic_int}
+ }
+ }
+ \SuspendTagging{tikz}
}
+\cs_new_protected:Npn \__tag_graphic_tikz_end_picture:
+ {
+ \ResumeTagging{tikz}\tagmcend
+ \bool_if:NF \l__tag_graphic_artifact_bool
+ {
+ \tagstructend
+ \__tag_tikz_savepos:e {__tag_graphic_\int_use:N \g__tag_graphic_int}
+ }
+ \tag_mc_begin_pop:n{}
+ }
+
+\tikzset
+ {
+ every~picture/.style=
+ {
+ artifact,
+ execute~at~begin~picture=\__tag_graphic_tikz_begin_picture:,
+ execute~at~end~picture=\__tag_graphic_tikz_end_picture:
+ }
+ }
+\AddToHook{env/tikzpicture/before}{\leavevmode}
+
+\tikzset
+ {
+ alt/.code=
+ {
+ \bool_set_false:N \l__tag_graphic_artifact_bool
+ \tl_set:Nn \l__tag_graphic_alt_tl{#1}
+ }
+ }
+\tikzset
+ {
+ artifact/.code=
+ \bool_set_true:N \l__tag_graphic_artifact_bool
+ }
+
+\ExplSyntaxOff
+
+
+
\endinput
diff --git a/macros/latex/contrib/tagpdf/tagpdfsetup-keys.tex b/macros/latex/contrib/tagpdf/tagpdfsetup-keys.tex
index 04f8b88aec..a02411c31f 100644
--- a/macros/latex/contrib/tagpdf/tagpdfsetup-keys.tex
+++ b/macros/latex/contrib/tagpdf/tagpdfsetup-keys.tex
@@ -12,7 +12,8 @@ new key name & old key name & value &type & defined in \\\midrul
activate & activate & boolean &meta & tagpdf \\
activate/all & activate-all & boolean &meta & tagpdf\\
-activate/mc & activate-mc & boolean &bool & tagpdf\\
+activate/mc & activate-mc & boolean &bool & tagpdf\\
+activate/softhyphen & --- & boolean &bool & tagpdf \\
activate/spaces & interwordspace & boolean &code & tagpdf-space\\
activate/struct & activate-struct & boolean &bool & tagpdf\\
activate/struct-dest & no-struct-dest&boolean &bool & tagpdf\\
diff --git a/macros/latex/required/l3kernel/CHANGELOG.md b/macros/latex/required/l3kernel/CHANGELOG.md
index c58c1a6188..76ee35a0f1 100644
--- a/macros/latex/required/l3kernel/CHANGELOG.md
+++ b/macros/latex/required/l3kernel/CHANGELOG.md
@@ -7,6 +7,17 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+## [2024-07-20]
+
+### Fixed
+- Implementation of deprecated `\tl_mixed_case:n(n)`
+- Redo the fix for LaTeX2e key properties (issue latex3/latex2e\#1415)
+
+## [2024-06-19]
+
+### Fixed
+- Avoid a low-level error when LaTeX2e key properties are given without a value
+
## [2024-05-27]
### Added
@@ -1742,7 +1753,9 @@ this project uses date-based 'snapshot' version identifiers.
- Step functions have been added for dim variables,
e.g. `\dim_step_inline:nnnn`
-[Unreleased]: https://github.com/latex3/latex3/compare/2024-05-27...HEAD
+[Unreleased]: https://github.com/latex3/latex3/compare/2024-07-20...HEAD
+[2024-07-20]: https://github.com/latex3/latex3/compare/2024-06-19...2024-07-20
+[2024-06-19]: https://github.com/latex3/latex3/compare/2024-05-27...2024-06-19
[2024-05-27]: https://github.com/latex3/latex3/compare/2024-05-08...2024-05-27
[2024-05-08]: https://github.com/latex3/latex3/compare/2024-04-11...2024-05-08
[2024-04-11]: https://github.com/latex3/latex3/compare/2024-03-14...2024-04-11
diff --git a/macros/latex/required/l3kernel/README.md b/macros/latex/required/l3kernel/README.md
index 8946af1293..0afb38a9ba 100644
--- a/macros/latex/required/l3kernel/README.md
+++ b/macros/latex/required/l3kernel/README.md
@@ -1,7 +1,7 @@
LaTeX3 Programming Conventions
==============================
-Release 2024-05-27
+Release 2024-07-20
Overview
--------
diff --git a/macros/latex/required/l3kernel/expl3.dtx b/macros/latex/required/l3kernel/expl3.dtx
index 4b4e61d3c8..64c65d0ff7 100644
--- a/macros/latex/required/l3kernel/expl3.dtx
+++ b/macros/latex/required/l3kernel/expl3.dtx
@@ -24,7 +24,7 @@
%
%<*driver|generic|package|2ekernel>
%</driver|generic|package|2ekernel>
-\def\ExplFileDate{2024-05-27}%
+\def\ExplFileDate{2024-07-20}%
%<*driver>
\documentclass[full]{l3doc}
\usepackage{graphicx}
@@ -51,7 +51,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/expl3.pdf b/macros/latex/required/l3kernel/expl3.pdf
index a6eca24ce4..650e6999f9 100644
--- a/macros/latex/required/l3kernel/expl3.pdf
+++ b/macros/latex/required/l3kernel/expl3.pdf
Binary files differ
diff --git a/macros/latex/required/l3kernel/interface3.pdf b/macros/latex/required/l3kernel/interface3.pdf
index 5c72322e35..1b89f2f257 100644
--- a/macros/latex/required/l3kernel/interface3.pdf
+++ b/macros/latex/required/l3kernel/interface3.pdf
Binary files differ
diff --git a/macros/latex/required/l3kernel/interface3.tex b/macros/latex/required/l3kernel/interface3.tex
index 62501cfa53..0219809dab 100644
--- a/macros/latex/required/l3kernel/interface3.tex
+++ b/macros/latex/required/l3kernel/interface3.tex
@@ -58,7 +58,7 @@ for those people who are interested.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2024-05-27}
+\date{Released 2024-07-20}
\pagenumbering{roman}
\maketitle
diff --git a/macros/latex/required/l3kernel/l3basics.dtx b/macros/latex/required/l3kernel/l3basics.dtx
index 69e4441580..ad15d79653 100644
--- a/macros/latex/required/l3kernel/l3basics.dtx
+++ b/macros/latex/required/l3kernel/l3basics.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3bitset.dtx b/macros/latex/required/l3kernel/l3bitset.dtx
index 4559b56fd3..2b62c68b4a 100644
--- a/macros/latex/required/l3kernel/l3bitset.dtx
+++ b/macros/latex/required/l3kernel/l3bitset.dtx
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3bootstrap.dtx b/macros/latex/required/l3kernel/l3bootstrap.dtx
index 861f0bb5a6..7f4eba752b 100644
--- a/macros/latex/required/l3kernel/l3bootstrap.dtx
+++ b/macros/latex/required/l3kernel/l3bootstrap.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3box.dtx b/macros/latex/required/l3kernel/l3box.dtx
index 808d22da23..532ec6a7d8 100644
--- a/macros/latex/required/l3kernel/l3box.dtx
+++ b/macros/latex/required/l3kernel/l3box.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
@@ -906,9 +906,9 @@
% \begin{syntax}
% \cs{box_set_trim:Nnnnn} \meta{box} \Arg{left} \Arg{bottom} \Arg{right} \Arg{top}
% \end{syntax}
-% Adjusts the bounding box of the \meta{box} \meta{left} is removed from
+% Adjusts the bounding box of the \meta{box}: \meta{left} is removed from
% the left-hand edge of the bounding box, \meta{right} from the right-hand
-% edge and so fourth. All adjustments are \meta{dim exprs}.
+% edge, and so forth. All adjustments are \meta{dim exprs}.
% Material outside of the bounding box is still displayed in the output
% unless \cs{box_set_clipped:N} is subsequently applied.
% The updated \meta{box} is an
diff --git a/macros/latex/required/l3kernel/l3cctab.dtx b/macros/latex/required/l3kernel/l3cctab.dtx
index 4bf8db41a6..92f134aa93 100644
--- a/macros/latex/required/l3kernel/l3cctab.dtx
+++ b/macros/latex/required/l3kernel/l3cctab.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3clist.dtx b/macros/latex/required/l3kernel/l3clist.dtx
index 5adb01cffb..f8d1eeaea8 100644
--- a/macros/latex/required/l3kernel/l3clist.dtx
+++ b/macros/latex/required/l3kernel/l3clist.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
@@ -324,8 +324,10 @@
% {
% \clist_remove_all:Nn, \clist_remove_all:cn,
% \clist_remove_all:NV, \clist_remove_all:cV,
+% \clist_remove_all:Ne, \clist_remove_all:ce,
% \clist_gremove_all:Nn, \clist_gremove_all:cn,
% \clist_gremove_all:NV, \clist_gremove_all:cV
+% \clist_gremove_all:Ne, \clist_gremove_all:ce
% }
% \begin{syntax}
% \cs{clist_remove_all:Nn} \meta{clist~var} \Arg{item}
@@ -1429,13 +1431,15 @@
% \begin{macro}
% {
% \clist_remove_all:Nn, \clist_remove_all:cn,
-% \clist_remove_all:NV, \clist_remove_all:cV
+% \clist_remove_all:NV, \clist_remove_all:cV,
+% \clist_remove_all:Ne, \clist_remove_all:ce
% }
% \UnitTested
% \begin{macro}
% {
% \clist_gremove_all:Nn, \clist_gremove_all:cn,
-% \clist_gremove_all:NV, \clist_gremove_all:cV
+% \clist_gremove_all:NV, \clist_gremove_all:cV,
+% \clist_gremove_all:Ne, \clist_gremove_all:ce
% }
% \UnitTested
% \begin{macro}{\@@_remove_all:NNNn}
@@ -1509,8 +1513,8 @@
\cs_new:Npn \@@_remove_all:
{ \exp_after:wN \@@_remove_all:w \@@_tmp:w , }
\cs_new:Npn \@@_remove_all:w #1 , \s_@@_mark , #2 , { \exp_not:n {#1} }
-\cs_generate_variant:Nn \clist_remove_all:Nn { c , NV , cV }
-\cs_generate_variant:Nn \clist_gremove_all:Nn { c , NV , cV }
+\cs_generate_variant:Nn \clist_remove_all:Nn { c , NV , cV , Ne , ce }
+\cs_generate_variant:Nn \clist_gremove_all:Nn { c , NV , cV , Ne , ce }
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/macros/latex/required/l3kernel/l3coffins.dtx b/macros/latex/required/l3kernel/l3coffins.dtx
index 62dc5f92ad..afbd1bd394 100644
--- a/macros/latex/required/l3kernel/l3coffins.dtx
+++ b/macros/latex/required/l3kernel/l3coffins.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3color.dtx b/macros/latex/required/l3kernel/l3color.dtx
index b56fb9e0ac..117a468d21 100644
--- a/macros/latex/required/l3kernel/l3color.dtx
+++ b/macros/latex/required/l3kernel/l3color.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
@@ -103,7 +103,7 @@
% \begin{itemize}
% \item \texttt{Gray} Grayscale color, with a single axis running from
% $0$ (fully black) to $15$ (fully white)
-% \item \texttt{hsb} Hue-saturation-brightness color, with three axes,all
+% \item \texttt{hsb} Hue-saturation-brightness color, with three axes, all
% real values in the range $[0,1]$ for hue saturation and brightness
% \item \texttt{Hsb} Hue-saturation-brightness color, with three axes, integer
% in the range $[0,360]$ for hue, real values in the range $[0,1]$ for
@@ -406,20 +406,20 @@
%
% \begin{function}{\color_export:nnN}
% \begin{syntax}
-% \cs{color_export:nnN} \Arg{color expression} \Arg{format} \Arg{tl}
+% \cs{color_export:nnN} \Arg{color expression} \Arg{format} \meta{tl var}
% \end{syntax}
% Parses the \meta{color expression} as described earlier,
% then converts to the \meta{format} specified and assigns the data to the
-% \meta{tl}.
+% \meta{tl var}.
% \end{function}
%
% \begin{function}{\color_export:nnnN}
% \begin{syntax}
-% \cs{color_export:nnnN} \Arg{model} \Arg{value(s)} \Arg{format} \Arg{tl}
+% \cs{color_export:nnnN} \Arg{model} \Arg{value(s)} \Arg{format} \meta{tl var}
% \end{syntax}
% Expresses the combination of \meta{model} and \meta{value(s)} in an
% internal representation, then converts to the \meta{format} specified and
-% assigns the data to the \meta{tl}.
+% assigns the data to the \meta{tl var}.
% \end{function}
%
% \section{Creating new color models}
@@ -495,7 +495,7 @@
%
% Color profiles are used to ensure color accuracy by linking to collaboration.
% Applying a profile can be used to standardise color which is otherwise
-% device-dependence.
+% device-dependent.
%
% \begin{function}[added = 2021-02-23]{\color_profile_apply:nn}
% \begin{syntax}
@@ -697,14 +697,14 @@
% \begin{macro}{\@@_convert:nnnN, \@@_convert:nVnN, \@@_convert:nnVN}
% \begin{macro}[EXP]
% {
-% \@@_convert_gray_gray:w
-% \@@_convert_gray_rgb:w
-% \@@_convert_gray_cmyk:w
-% \@@_convert_cmyk_gray:w
-% \@@_convert_cmyk_rgb:w
-% \@@_convert_cmyk_cmyk:w
-% \@@_convert_rgb_gray:w
-% \@@_convert_rgb_rgb:w
+% \@@_convert_gray_gray:w,
+% \@@_convert_gray_rgb:w,
+% \@@_convert_gray_cmyk:w,
+% \@@_convert_cmyk_gray:w,
+% \@@_convert_cmyk_rgb:w,
+% \@@_convert_cmyk_cmyk:w,
+% \@@_convert_rgb_gray:w,
+% \@@_convert_rgb_rgb:w,
% \@@_convert_rgb_cmyk:w
% }
% \begin{macro}[EXP]{\@@_convert_rgb_cmyk:nnn}
diff --git a/macros/latex/required/l3kernel/l3debug.dtx b/macros/latex/required/l3kernel/l3debug.dtx
index 21e6747a84..4e578ee9b6 100644
--- a/macros/latex/required/l3kernel/l3debug.dtx
+++ b/macros/latex/required/l3kernel/l3debug.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
@@ -69,7 +69,7 @@
%
% Standard file identification.
% \begin{macrocode}
-\ProvidesExplFile{l3debug.def}{2024-05-27}{}{L3 Debugging support}
+\ProvidesExplFile{l3debug.def}{2024-07-20}{}{L3 Debugging support}
% \end{macrocode}
%
% \begin{variable}{\s_@@_stop}
diff --git a/macros/latex/required/l3kernel/l3deprecation.dtx b/macros/latex/required/l3kernel/l3deprecation.dtx
index 5852205ddc..697f235311 100644
--- a/macros/latex/required/l3kernel/l3deprecation.dtx
+++ b/macros/latex/required/l3kernel/l3deprecation.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
@@ -505,10 +505,10 @@
{ \text_uppercase:nn {#1} {#2} }
\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \text_titlecase_first:n }
\cs_new:Npn \tl_mixed_case:n #1
- { \text_titlecase_first:n {#1} }
+ { \text_titlecase_first:n { \text_lowercase:n {#1} } }
\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \text_titlecase_first:nn }
\cs_new:Npn \tl_mixed_case:nn #1#2
- { \text_titlecase_first:nn {#1} {#2} }
+ { \text_titlecase_first:nn {#1} { \text_lowercase:n {#2} } }
% \end{macrocode}
% \end{macro}
%
@@ -571,7 +571,7 @@
% \char_lower_case:N, \char_upper_case:N,
% \char_mixed_case:Nn, \char_fold_case:N,
% \char_str_lower_case:N, \char_str_upper_case:N,
-% \char_str_mixed_case:Nn, \char_str_fold_case:N,
+% \char_str_mixed_case:N, \char_str_fold_case:N,
% }
% \begin{macrocode}
\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \text_lowercase:n }
diff --git a/macros/latex/required/l3kernel/l3doc.dtx b/macros/latex/required/l3kernel/l3doc.dtx
index 43b719ce59..751d4f4e14 100644
--- a/macros/latex/required/l3kernel/l3doc.dtx
+++ b/macros/latex/required/l3kernel/l3doc.dtx
@@ -71,7 +71,7 @@ and all files in that bundle must be distributed together.
% This isn't included in the typeset documentation because it's a bit
% ugly:
%<*class>
-\ProvidesExplClass{l3doc}{2024-05-27}{}
+\ProvidesExplClass{l3doc}{2024-07-20}{}
{L3 Experimental documentation class}
%</class>
% \fi
@@ -84,7 +84,7 @@ and all files in that bundle must be distributed together.
% require you to do updates, if the class changes.}}
%
% \author{\Team}
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
% \maketitle
% \tableofcontents
%
diff --git a/macros/latex/required/l3kernel/l3doc.pdf b/macros/latex/required/l3kernel/l3doc.pdf
index 42960f5e6f..0d5a3494c0 100644
--- a/macros/latex/required/l3kernel/l3doc.pdf
+++ b/macros/latex/required/l3kernel/l3doc.pdf
Binary files differ
diff --git a/macros/latex/required/l3kernel/l3docstrip.dtx b/macros/latex/required/l3kernel/l3docstrip.dtx
index fecb228324..199801ff3b 100644
--- a/macros/latex/required/l3kernel/l3docstrip.dtx
+++ b/macros/latex/required/l3kernel/l3docstrip.dtx
@@ -63,7 +63,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3docstrip.pdf b/macros/latex/required/l3kernel/l3docstrip.pdf
index efc8882c36..07f24848e3 100644
--- a/macros/latex/required/l3kernel/l3docstrip.pdf
+++ b/macros/latex/required/l3kernel/l3docstrip.pdf
Binary files differ
diff --git a/macros/latex/required/l3kernel/l3expan.dtx b/macros/latex/required/l3kernel/l3expan.dtx
index d13578bde1..499c94587e 100644
--- a/macros/latex/required/l3kernel/l3expan.dtx
+++ b/macros/latex/required/l3kernel/l3expan.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3file.dtx b/macros/latex/required/l3kernel/l3file.dtx
index 546222711e..039c4eecb8 100644
--- a/macros/latex/required/l3kernel/l3file.dtx
+++ b/macros/latex/required/l3kernel/l3file.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3flag.dtx b/macros/latex/required/l3kernel/l3flag.dtx
index 88e726df35..690347426f 100644
--- a/macros/latex/required/l3kernel/l3flag.dtx
+++ b/macros/latex/required/l3kernel/l3flag.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3fp-assign.dtx b/macros/latex/required/l3kernel/l3fp-assign.dtx
index e6fa97423e..e1b3bc788b 100644
--- a/macros/latex/required/l3kernel/l3fp-assign.dtx
+++ b/macros/latex/required/l3kernel/l3fp-assign.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
% \maketitle
%
% \begin{documentation}
diff --git a/macros/latex/required/l3kernel/l3fp-aux.dtx b/macros/latex/required/l3kernel/l3fp-aux.dtx
index 1ad33e235e..4c39e81f46 100644
--- a/macros/latex/required/l3kernel/l3fp-aux.dtx
+++ b/macros/latex/required/l3kernel/l3fp-aux.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3fp-basics.dtx b/macros/latex/required/l3kernel/l3fp-basics.dtx
index e2d93219b0..a93ff90291 100644
--- a/macros/latex/required/l3kernel/l3fp-basics.dtx
+++ b/macros/latex/required/l3kernel/l3fp-basics.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3fp-convert.dtx b/macros/latex/required/l3kernel/l3fp-convert.dtx
index 4983a3dd1f..9b5b66f815 100644
--- a/macros/latex/required/l3kernel/l3fp-convert.dtx
+++ b/macros/latex/required/l3kernel/l3fp-convert.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3fp-expo.dtx b/macros/latex/required/l3kernel/l3fp-expo.dtx
index 7577f640d4..e9dcdf6646 100644
--- a/macros/latex/required/l3kernel/l3fp-expo.dtx
+++ b/macros/latex/required/l3kernel/l3fp-expo.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3fp-extended.dtx b/macros/latex/required/l3kernel/l3fp-extended.dtx
index 596dc86ef2..24f1e5c127 100644
--- a/macros/latex/required/l3kernel/l3fp-extended.dtx
+++ b/macros/latex/required/l3kernel/l3fp-extended.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3fp-functions.dtx b/macros/latex/required/l3kernel/l3fp-functions.dtx
index b9e269b988..2c5eb9602f 100644
--- a/macros/latex/required/l3kernel/l3fp-functions.dtx
+++ b/macros/latex/required/l3kernel/l3fp-functions.dtx
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3fp-logic.dtx b/macros/latex/required/l3kernel/l3fp-logic.dtx
index 486a3bc579..9d39f4f67e 100644
--- a/macros/latex/required/l3kernel/l3fp-logic.dtx
+++ b/macros/latex/required/l3kernel/l3fp-logic.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3fp-parse.dtx b/macros/latex/required/l3kernel/l3fp-parse.dtx
index 7853c40132..191ab2755c 100644
--- a/macros/latex/required/l3kernel/l3fp-parse.dtx
+++ b/macros/latex/required/l3kernel/l3fp-parse.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3fp-random.dtx b/macros/latex/required/l3kernel/l3fp-random.dtx
index ff999926ab..dd40704719 100644
--- a/macros/latex/required/l3kernel/l3fp-random.dtx
+++ b/macros/latex/required/l3kernel/l3fp-random.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3fp-round.dtx b/macros/latex/required/l3kernel/l3fp-round.dtx
index 0d39b8a26a..ad20934215 100644
--- a/macros/latex/required/l3kernel/l3fp-round.dtx
+++ b/macros/latex/required/l3kernel/l3fp-round.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3fp-symbolic.dtx b/macros/latex/required/l3kernel/l3fp-symbolic.dtx
index 88e214f49e..8223419f66 100644
--- a/macros/latex/required/l3kernel/l3fp-symbolic.dtx
+++ b/macros/latex/required/l3kernel/l3fp-symbolic.dtx
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3fp-traps.dtx b/macros/latex/required/l3kernel/l3fp-traps.dtx
index fec48bc163..7f22a2d137 100644
--- a/macros/latex/required/l3kernel/l3fp-traps.dtx
+++ b/macros/latex/required/l3kernel/l3fp-traps.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
% \maketitle
%
% \begin{documentation}
diff --git a/macros/latex/required/l3kernel/l3fp-trig.dtx b/macros/latex/required/l3kernel/l3fp-trig.dtx
index 7c40c6198f..b7b67c9445 100644
--- a/macros/latex/required/l3kernel/l3fp-trig.dtx
+++ b/macros/latex/required/l3kernel/l3fp-trig.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3fp-types.dtx b/macros/latex/required/l3kernel/l3fp-types.dtx
index e9269e1f03..d969f76bdc 100644
--- a/macros/latex/required/l3kernel/l3fp-types.dtx
+++ b/macros/latex/required/l3kernel/l3fp-types.dtx
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3fp.dtx b/macros/latex/required/l3kernel/l3fp.dtx
index d273b057ea..8e37a55799 100644
--- a/macros/latex/required/l3kernel/l3fp.dtx
+++ b/macros/latex/required/l3kernel/l3fp.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
@@ -773,7 +773,7 @@
% The result may contain other functions, which are
% then replaced by their results if they have any. For instance,
% \begin{quote}
-% \cs{fp_new_function:n} |{ foo }| \\
+% \cs{fp_new_function:n} |{ npow }| \\
% \cs{fp_set_function:nnn} |{ npow } { a,b } { a**b }| \\
% \cs{fp_show:n} |{ npow(16,0.25) } }|
% \end{quote}
diff --git a/macros/latex/required/l3kernel/l3fparray.dtx b/macros/latex/required/l3kernel/l3fparray.dtx
index f48de27af3..9592671ae3 100644
--- a/macros/latex/required/l3kernel/l3fparray.dtx
+++ b/macros/latex/required/l3kernel/l3fparray.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3int.dtx b/macros/latex/required/l3kernel/l3int.dtx
index 45050964de..4b0d251cab 100644
--- a/macros/latex/required/l3kernel/l3int.dtx
+++ b/macros/latex/required/l3kernel/l3int.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
@@ -100,21 +100,6 @@
% restricted-expandable functions can both be used, and \cs{exp_not:n}
% and its variants have no effect while \cs{exp_not:N} may incorrectly
% interrupt the expression.
-% \begin{texnote}
-% Exactly two expansions are needed to evaluate \cs{int_eval:n}.
-% The result is \emph{not} an \meta{internal integer}, and therefore
-% should be terminated by a space if used in \cs{int_value:w} or in
-% a \TeX{}-style integer assignment.
-%
-% As all \TeX{} integers, integer operands can also be:
-% \tn{value}\Arg{\LaTeXe{} counter}; dimension or skip variables,
-% converted to integers in~\texttt{sp}; the character code of some
-% character given as \texttt{`}\meta{char} or
-% \texttt{`\textbackslash}\meta{char}; octal numbers given as
-% \texttt{'} followed by digits from \texttt{0} to \texttt{7}; or
-% hexadecimal numbers given as |"| followed by digits and upper case
-% letters from \texttt{A} to~\texttt{F}.
-% \end{texnote}
%
% \begin{function}[EXP]{\int_eval:n}
% \begin{syntax}
diff --git a/macros/latex/required/l3kernel/l3intarray.dtx b/macros/latex/required/l3kernel/l3intarray.dtx
index aa49275e78..4be0ca6be6 100644
--- a/macros/latex/required/l3kernel/l3intarray.dtx
+++ b/macros/latex/required/l3kernel/l3intarray.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3kernel-functions.dtx b/macros/latex/required/l3kernel/l3kernel-functions.dtx
index c3bb838acf..5d5758a6af 100644
--- a/macros/latex/required/l3kernel/l3kernel-functions.dtx
+++ b/macros/latex/required/l3kernel/l3kernel-functions.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3keys.dtx b/macros/latex/required/l3kernel/l3keys.dtx
index 13772d1781..db580c525c 100644
--- a/macros/latex/required/l3kernel/l3keys.dtx
+++ b/macros/latex/required/l3kernel/l3keys.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
@@ -649,15 +649,13 @@
% { key } % Name of choice key
% { choice-a , choice-b , choice-c } % Valid choices
% { \exp_not:n {#1} } % Invalid choice given
-% %
-% %
% }
% \end{verbatim}
%
% Multiple choices are created in a very similar manner to mutually-exclusive
% choices, using the properties \texttt{.multichoice:} and
% \texttt{.multichoices:nn}. As with mutually exclusive choices, multiple
-% choices are define as sub-keys. Thus both
+% choices are defined as sub-keys. Thus both
% \begin{verbatim}
% \keys_define:nn { mymodule }
% {
@@ -1926,19 +1924,21 @@
% \end{macro}
%
% \begin{macro}{\@@_define_code:n}
+% \begin{macro}[EXP]{\@@_define_code:nnn}
% \begin{macro}[EXP]{\@@_define_code:w}
% Two possible cases. If there is a value for the key, then just use
% the function. If not, then a check to make sure there is no need for
% a value with the property. If there should be one then complain,
-% otherwise execute it. There is no need to check for a |:| as if it
-% was missing the earlier tests would have failed.
+% otherwise execute it. For a \LaTeXe{} property like |.code| which
+% doesn't contain a |:|, treat it as having arity 1 and pass the
+% (empty) value to it.
% \begin{macrocode}
\cs_new_protected:Npn \@@_define_code:n #1
{
\bool_if:NTF \l_@@_no_value_bool
{
- \exp_after:wN \@@_define_code:w
- \l_@@_property_str \s_@@_stop
+ \@@_define_code:nnn
+ { \use:c { \c_@@_props_root_str \l_@@_property_str } {#1} }
{ \use:c { \c_@@_props_root_str \l_@@_property_str } }
{
\msg_error:nnee { keys } { property-requires-value }
@@ -1947,12 +1947,31 @@
}
{ \use:c { \c_@@_props_root_str \l_@@_property_str } {#1} }
}
-\exp_last_unbraced:NNNNo
- \cs_new:Npn \@@_define_code:w #1 \c_colon_str #2 \s_@@_stop
- { \tl_if_empty:nTF {#2} }
+\cs_new:Npe \@@_define_code:nnn
+ {
+ \exp_not:N \exp_after:wN \exp_not:N \@@_define_code:w
+ \exp_not:N \l_@@_property_str
+ \c_colon_str \c_colon_str
+ \exp_not:N \s_@@_stop
+ }
+\use:e
+ {
+ \cs_new:Npn \exp_not:N \@@_define_code:w
+ #1 \c_colon_str #2 \c_colon_str #3 \exp_not:N \s_@@_stop
+ }
+ {
+ \tl_if_empty:nTF {#3}
+ { \use_i:nnn }
+ {
+ \tl_if_empty:nTF {#2}
+ { \use_ii:nnn }
+ { \use_iii:nnn }
+ }
+ }
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \subsection{Turning properties into actions}
%
diff --git a/macros/latex/required/l3kernel/l3legacy.dtx b/macros/latex/required/l3kernel/l3legacy.dtx
index 4cfce5c5f1..b5ef896827 100644
--- a/macros/latex/required/l3kernel/l3legacy.dtx
+++ b/macros/latex/required/l3kernel/l3legacy.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3luatex.dtx b/macros/latex/required/l3kernel/l3luatex.dtx
index eb10d5aecc..aa7724a8ce 100644
--- a/macros/latex/required/l3kernel/l3luatex.dtx
+++ b/macros/latex/required/l3kernel/l3luatex.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3msg.dtx b/macros/latex/required/l3kernel/l3msg.dtx
index e901b07c06..66e7ac8282 100644
--- a/macros/latex/required/l3kernel/l3msg.dtx
+++ b/macros/latex/required/l3kernel/l3msg.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3names.dtx b/macros/latex/required/l3kernel/l3names.dtx
index 5cdd1361e3..1cb0d132ae 100644
--- a/macros/latex/required/l3kernel/l3names.dtx
+++ b/macros/latex/required/l3kernel/l3names.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3news.pdf b/macros/latex/required/l3kernel/l3news.pdf
index 4b57ef41c8..eb4c42d8c5 100644
--- a/macros/latex/required/l3kernel/l3news.pdf
+++ b/macros/latex/required/l3kernel/l3news.pdf
Binary files differ
diff --git a/macros/latex/required/l3kernel/l3news01.pdf b/macros/latex/required/l3kernel/l3news01.pdf
index b5f45059d3..21997cf980 100644
--- a/macros/latex/required/l3kernel/l3news01.pdf
+++ b/macros/latex/required/l3kernel/l3news01.pdf
Binary files differ
diff --git a/macros/latex/required/l3kernel/l3news02.pdf b/macros/latex/required/l3kernel/l3news02.pdf
index 0ee8ffaf96..db1ac5b85b 100644
--- a/macros/latex/required/l3kernel/l3news02.pdf
+++ b/macros/latex/required/l3kernel/l3news02.pdf
Binary files differ
diff --git a/macros/latex/required/l3kernel/l3news03.pdf b/macros/latex/required/l3kernel/l3news03.pdf
index fef9bf3a7b..6630201b1f 100644
--- a/macros/latex/required/l3kernel/l3news03.pdf
+++ b/macros/latex/required/l3kernel/l3news03.pdf
Binary files differ
diff --git a/macros/latex/required/l3kernel/l3news04.pdf b/macros/latex/required/l3kernel/l3news04.pdf
index 0afbb9591e..c74f9f0a7c 100644
--- a/macros/latex/required/l3kernel/l3news04.pdf
+++ b/macros/latex/required/l3kernel/l3news04.pdf
Binary files differ
diff --git a/macros/latex/required/l3kernel/l3news05.pdf b/macros/latex/required/l3kernel/l3news05.pdf
index 0a44ce6811..18d4df3290 100644
--- a/macros/latex/required/l3kernel/l3news05.pdf
+++ b/macros/latex/required/l3kernel/l3news05.pdf
Binary files differ
diff --git a/macros/latex/required/l3kernel/l3news06.pdf b/macros/latex/required/l3kernel/l3news06.pdf
index 10cec7c17f..643b8f1f68 100644
--- a/macros/latex/required/l3kernel/l3news06.pdf
+++ b/macros/latex/required/l3kernel/l3news06.pdf
Binary files differ
diff --git a/macros/latex/required/l3kernel/l3news07.pdf b/macros/latex/required/l3kernel/l3news07.pdf
index 6bfbab4d96..b457fd6033 100644
--- a/macros/latex/required/l3kernel/l3news07.pdf
+++ b/macros/latex/required/l3kernel/l3news07.pdf
Binary files differ
diff --git a/macros/latex/required/l3kernel/l3news08.pdf b/macros/latex/required/l3kernel/l3news08.pdf
index a0130195cc..a5b4744d28 100644
--- a/macros/latex/required/l3kernel/l3news08.pdf
+++ b/macros/latex/required/l3kernel/l3news08.pdf
Binary files differ
diff --git a/macros/latex/required/l3kernel/l3news09.pdf b/macros/latex/required/l3kernel/l3news09.pdf
index 3616cc20ca..a2242937d2 100644
--- a/macros/latex/required/l3kernel/l3news09.pdf
+++ b/macros/latex/required/l3kernel/l3news09.pdf
Binary files differ
diff --git a/macros/latex/required/l3kernel/l3news10.pdf b/macros/latex/required/l3kernel/l3news10.pdf
index 00ec553d1c..1775167008 100644
--- a/macros/latex/required/l3kernel/l3news10.pdf
+++ b/macros/latex/required/l3kernel/l3news10.pdf
Binary files differ
diff --git a/macros/latex/required/l3kernel/l3news11.pdf b/macros/latex/required/l3kernel/l3news11.pdf
index 59a672d339..8e14906f03 100644
--- a/macros/latex/required/l3kernel/l3news11.pdf
+++ b/macros/latex/required/l3kernel/l3news11.pdf
Binary files differ
diff --git a/macros/latex/required/l3kernel/l3news12.pdf b/macros/latex/required/l3kernel/l3news12.pdf
index 9c4f937b00..15a8332f07 100644
--- a/macros/latex/required/l3kernel/l3news12.pdf
+++ b/macros/latex/required/l3kernel/l3news12.pdf
Binary files differ
diff --git a/macros/latex/required/l3kernel/l3pdf.dtx b/macros/latex/required/l3kernel/l3pdf.dtx
index 55f49476e3..34118c371a 100644
--- a/macros/latex/required/l3kernel/l3pdf.dtx
+++ b/macros/latex/required/l3kernel/l3pdf.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
@@ -70,8 +70,8 @@
% \cs{pdf_object_write:nnn} \Arg{object} \Arg{type} \Arg{content}
% \end{syntax}
% Writes the \meta{content} as content of the \meta{object}. Depending on the
-% \meta{type} declared for the object, the format required for the
-% \meta{data} will vary
+% \meta{type} declared for the object, the format required for
+% \meta{content} will vary:
% \begin{itemize}
% \item[\texttt{array}] A space-separated list of values
% \item[\texttt{dict}] Key--value pairs in the form
@@ -159,7 +159,7 @@
% \cs{pdf_object_unnamed_write:nn} \Arg{type} \Arg{content}
% \end{syntax}
% Writes the \meta{content} as content of an anonymous object. Depending on the
-% \meta{type}, the format required for the \meta{data} will vary
+% \meta{type}, the format required for \meta{content} will vary:
% \begin{itemize}
% \item[\texttt{array}] A space-separated list of values
% \item[\texttt{dict}] Key--value pairs in the form
@@ -251,9 +251,9 @@
%
% \section{Destinations}
%
-% Destinations are the places a link jumped too.
-% Unlike the name may suggest they don't described
-% an exact location in the PDF. Instead a destination contains a reference to
+% Destinations are the places a link jumped to.
+% Unlike the name may suggest, they don't describe
+% an exact location in the PDF. Instead, a destination contains a reference to
% a page along with an instruction how to display this page.
% The normally used \enquote{XYZ \textit{top left zoom}} for example instructs
% the viewer to show the page with the given \textit{zoom} and
diff --git a/macros/latex/required/l3kernel/l3prefixes.csv b/macros/latex/required/l3kernel/l3prefixes.csv
index e85412b9d8..339f6625fd 100644
--- a/macros/latex/required/l3kernel/l3prefixes.csv
+++ b/macros/latex/required/l3kernel/l3prefixes.csv
@@ -26,6 +26,7 @@ block,latex2e,The LaTeX Project,https://www.latex-project.org/latex3.html,https:
bool,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
box,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
bxjh,BXjaholiday,Takuto Asakura,https://github.com/wtsnjp/BXjaholiday,https://github.com/wtsnjp/BXjaholiday.git,https://github.com/wtsnjp/BXjaholiday/issues,2018-02-02,2019-02-02,
+cal,spath3,Andrew Stacey,https://github.com/loopspace/spath3,https://github.com/loopspace/spath3.git,https://github.com/loopspace/spath3/issues,2024-07-18,2024-07-18,
cascade,cascade,F. Pantigny,,,,2020-07-21,2020-07-21,
catcode,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
cctab,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-28,2012-09-28,
@@ -135,6 +136,7 @@ keys,"l3kernel,l3keys2e,ltkeys",The LaTeX Project,https://www.latex-project.org/
keyval,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
kgl,kantlipsum,Enrico Gregorio,,,,2013-03-16,2013-03-16,
kivitendo,"kiviletter, kivitables",Marei Peischl for Kivitendo,https://www.kivitendo.de/,https://github.com/kivitendo/kivitendo-erp,https://forum.kivitendo.de/,2021-05-28,2021-05-28,
+knot,spath3,Andrew Stacey,https://github.com/loopspace/spath3,https://github.com/loopspace/spath3.git,https://github.com/loopspace/spath3/issues,2024-07-18,2024-07-18,
langsci,langscibook,Language Science Press,https://langsci-press.org,https://github.com/langsci/langscibook,https://github.com/langsci/langscibook/issues,2021-07-20,2021-07-21,
left,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
liftarm,liftarm,Matthias Floré,,,,2024-05-25,2024-05-25,
@@ -210,6 +212,7 @@ property,latex2e,The LaTeX Project,https://www.latex-project.org/latex3.html,htt
pseudo,pseudo,Magnus Lie Hetland,https://github.com/mlhetland/pseudo.sty,https://github.com/mlhetland/pseudo.sty.git,https://github.com/mlhetland/pseudo.sty/issues,2019-06-24,2019-06-24,
ptex,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2015-07-28,2015-07-28,
ptxcd,ptxcd,Marei Peischl,,,,2020-07-27,2020-07-27,Used for specific corporate design templates
+ptxtools,"depp, ptxtools",Marei Peischl,https://gitlab.com/islandoftex/texmf/depp,https://gitlab.com/islandoftex/texmf/depp.git,https://gitlab.com/islandoftex/texmf/depp,2024-07-09,2024-07-09,
qrbill,qrbill,Marei Peischl,https://github.com/peiTeX/qrbill,https://github.com/peiTeX/qrbill.git,https://github.com/peiTeX/qrbill/issues,2020-06-27,2020-06-27,
quark,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
rainbow,beamertheme-rainbow,samcarter,https://github.com/samcarter/beamertheme-rainbow,https://github.com/samcarter/beamertheme-rainbow,https://github.com/samcarter/beamertheme-rainbow/issues,2023-07-04,2023-07-04,
@@ -239,6 +242,7 @@ slcd,se2thesis,Stephan Lukasczyk,https://github.com/se2p/se2thesis,https://githu
socket,latex2e,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex2e.git,https://github.com/latex3/latex2e/issues,2023-10-17,2023-10-17,
sort,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2017-02-13,
space,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+spath,spath3,Andrew Stacey,https://github.com/loopspace/spath3,https://github.com/loopspace/spath3.git,https://github.com/loopspace/spath3/issues,2024-07-18,2024-07-18,
starray,starray,Alceu Frigeri,https://github.com/alceu-frigeri/starray,https://github.com/alceu-frigeri/starray,https://github.com/alceu-frigeri/starray/issues,2023-05-15,2023-05-15,
statistics,statistics,Julien Rivaud,https://gitlab.com/frnchfrgg-latex/statistics,https://gitlab.com/frnchfrgg-latex/statistics.git,https://gitlab.com/frnchfrgg-latex/statistics/issues,2018-06-25,2018-06-25,
stm,lt3-stm,CV Radhakrishnan,http://www.cvr.cc/,,,2014-02-26,2014-02-26,
@@ -258,6 +262,7 @@ tex,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https:/
text,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2020-01-15,2020-01-15,
tikzfill,tikzfill,Thomas F. Sturm,https://github.com/T-F-S/tikzfill,https://github.com/T-F-S/tikzfill.git,https://github.com/T-F-S/tikzfill/issues,2022-07-19,2022-07-19,
tikzlings,tikzlings,samcarter,https://github.com/samcarter/tikzlings,git@github.com:samcarter/tikzlings.git,https://github.com/samcarter/tikzlings/issues,2023-02-17,2023-02-17,
+tikzspath,spath3,Andrew Stacey,https://github.com/loopspace/spath3,https://github.com/loopspace/spath3.git,https://github.com/loopspace/spath3/issues,2024-07-18,2024-07-18,
tikzsymbols,tikzsymbols,Ben Vitecek,https://github.com/Vidabe/tikzsymbols,https://github.com/Vidabe/tikzsymbols.git,https://github.com/Vidabe/tikzsymbols/issues,2018-09-26,2018-09-26,
tilde,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
tl,"l3kernel,l3tl-build",The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
@@ -288,6 +293,7 @@ xmarks,latex2e,The LaTeX Project,https://www.latex-project.org/latex3.html,https
xparse,xparse,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
xpatch,"regexpatch,xpatch",Enrico Gregorio,,,,2013-03-16,2013-03-16,
xpeek,xpeek,Joel C. Salomon,,,,2013-03-16,2013-03-16,
+xpg,polyglossia,Jürgen Spitzmüller,https://github.com/reutenauer/polyglossia/,https://github.com/reutenauer/polyglossia/,https://github.com/reutenauer/polyglossia/issues,2024-07-02,2024-07-02,
xpinyin,xpinyin,Qing Lee,https://github.com/CTeX-org/ctex-kit,https://github.com/CTeX-org/ctex-kit.git,https://github.com/CTeX-org/ctex-kit/issues,2013-03-16,2013-05-26,
xsb,xsavebox,Alexander Grahn,,https://gitlab.com/agrahn/xsavebox,https://gitlab.com/agrahn/xsavebox/issues,2016-02-26,2020-04-15,
xsim,xsim,Clemens Niederberger,https://github.com/cgnieder/xsim/,https://github.com/cgnieder/xsim.git,https://github.com/cgnieder/xsim/issues,2020-04-14,2020-04-14,
@@ -299,4 +305,5 @@ zhnum,zhnumber,Qing Lee,https://github.com/CTeX-org/ctex-kit,https://github.com/
zrefcheck,zref-check,gusbrs,https://github.com/gusbrs/zref-check,https://github.com/gusbrs/zref-check,https://github.com/gusbrs/zref-check/issues,2021-08-05,2021-08-05,
zrefclever,zref-clever,gusbrs,https://github.com/gusbrs/zref-clever,https://github.com/gusbrs/zref-clever,https://github.com/gusbrs/zref-clever/issues,2021-11-29,2021-11-29,
zrefvario,zref-vario,gusbrs,https://github.com/gusbrs/zref-vario,https://github.com/gusbrs/zref-vario,https://github.com/gusbrs/zref-vario/issues,2022-02-02,2022-02-02,
+zugferd,zugferd,Marei Peischl,https://github.com/TeXhackse/LaTeX-ZUGFeRD,https://github.com/TeXhackse/LaTeX-ZUGFeRD.git,https://github.com/TeXhackse/LaTeX-ZUGFeRD/issues,2024-07-09,2024-07-09,
zxjt,zxjatype,Takayuki Yato,,,,2013-03-16,2013-03-16,
diff --git a/macros/latex/required/l3kernel/l3prefixes.pdf b/macros/latex/required/l3kernel/l3prefixes.pdf
index 602ccaaa59..ab4d18e916 100644
--- a/macros/latex/required/l3kernel/l3prefixes.pdf
+++ b/macros/latex/required/l3kernel/l3prefixes.pdf
Binary files differ
diff --git a/macros/latex/required/l3kernel/l3prg.dtx b/macros/latex/required/l3kernel/l3prg.dtx
index bec4e3a712..ac6131d6ff 100644
--- a/macros/latex/required/l3kernel/l3prg.dtx
+++ b/macros/latex/required/l3kernel/l3prg.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3prop.dtx b/macros/latex/required/l3kernel/l3prop.dtx
index 21b8d03dd6..fd0d8e167d 100644
--- a/macros/latex/required/l3kernel/l3prop.dtx
+++ b/macros/latex/required/l3kernel/l3prop.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
@@ -181,11 +181,11 @@
% \prop_gset_from_keyval:Nn, \prop_gset_from_keyval:cn,
% }
% \begin{syntax}
-% \cs{prop_set_from_keyval:Nn} \meta{property list}
-% \{
-% \meta{key1} |=| \meta{value1} |,|
-% \meta{key2} |=| \meta{value2} |,| \ldots{}
-% \}
+% \cs{prop_set_from_keyval:Nn} \meta{property list} \\
+% ~~\{ \\
+% ~~~~\meta{key1} |=| \meta{value1} |,| \\
+% ~~~~\meta{key2} |=| \meta{value2} |,| \ldots{} \\
+% ~~\}
% \end{syntax}
% Sets \meta{property list} to contain key--value pairs given in the second
% argument. If duplicate keys appear only the last of the values is kept.
@@ -205,11 +205,11 @@
% \begin{function}[added = 2017-11-28, updated = 2021-11-07]
% {\prop_const_from_keyval:Nn, \prop_const_from_keyval:cn}
% \begin{syntax}
-% \cs{prop_const_from_keyval:Nn} \meta{property list}
-% \{
-% \meta{key1} |=| \meta{value1} |,|
-% \meta{key2} |=| \meta{value2} |,| \ldots{}
-% \}
+% \cs{prop_const_from_keyval:Nn} \meta{property list} \\
+% ~~\{ \\
+% ~~~~\meta{key1} |=| \meta{value1} |,| \\
+% ~~~~\meta{key2} |=| \meta{value2} |,| \ldots{} \\
+% ~~\}
% \end{syntax}
% Creates a new constant \enquote{flat} \meta{property list} or raises
% an error if the
@@ -224,11 +224,11 @@
% \begin{function}[added = 2024-02-12]
% {\prop_const_linked_from_keyval:Nn, \prop_const_linked_from_keyval:cn}
% \begin{syntax}
-% \cs{prop_const_linked_from_keyval:Nn} \meta{prop~var}
-% \{
-% \meta{key1} |=| \meta{value1} |,|
-% \meta{key2} |=| \meta{value2} |,| \ldots{}
-% \}
+% \cs{prop_const_linked_from_keyval:Nn} \meta{prop~var} \\
+% ~~\{ \\
+% ~~~~\meta{key1} |=| \meta{value1} |,| \\
+% ~~~~\meta{key2} |=| \meta{value2} |,| \ldots{} \\
+% ~~\}
% \end{syntax}
% Creates a new constant \enquote{linked} \meta{prop~var} or raises an
% error if the
@@ -347,11 +347,11 @@
% \prop_gput_from_keyval:Nn, \prop_gput_from_keyval:cn,
% }
% \begin{syntax}
-% \cs{prop_put_from_keyval:Nn} \meta{property list}
-% \{
-% \meta{key1} |=| \meta{value1} |,|
-% \meta{key2} |=| \meta{value2} |,| \ldots{}
-% \}
+% \cs{prop_put_from_keyval:Nn} \meta{property list} \\
+% ~~\{ \\
+% ~~~~\meta{key1} |=| \meta{value1} |,| \\
+% ~~~~\meta{key2} |=| \meta{value2} |,| \ldots{} \\
+% ~~\}
% \end{syntax}
% Updates the \meta{property list} by adding entries for each key--value
% pair given in the second argument. The addition is done through
diff --git a/macros/latex/required/l3kernel/l3quark.dtx b/macros/latex/required/l3kernel/l3quark.dtx
index 136596a3fe..ad78a12bd2 100644
--- a/macros/latex/required/l3kernel/l3quark.dtx
+++ b/macros/latex/required/l3kernel/l3quark.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3regex.dtx b/macros/latex/required/l3kernel/l3regex.dtx
index 6ca9c8eeed..c3d5de27cb 100644
--- a/macros/latex/required/l3kernel/l3regex.dtx
+++ b/macros/latex/required/l3kernel/l3regex.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3seq.dtx b/macros/latex/required/l3kernel/l3seq.dtx
index 38fc9471a9..413e20f8ca 100644
--- a/macros/latex/required/l3kernel/l3seq.dtx
+++ b/macros/latex/required/l3kernel/l3seq.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3skip.dtx b/macros/latex/required/l3kernel/l3skip.dtx
index 6e96b41326..9bea4c7b14 100644
--- a/macros/latex/required/l3kernel/l3skip.dtx
+++ b/macros/latex/required/l3kernel/l3skip.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3sort.dtx b/macros/latex/required/l3kernel/l3sort.dtx
index 47cebcad25..a86f916d24 100644
--- a/macros/latex/required/l3kernel/l3sort.dtx
+++ b/macros/latex/required/l3kernel/l3sort.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3str-convert.dtx b/macros/latex/required/l3kernel/l3str-convert.dtx
index baf705fe0c..4061895896 100644
--- a/macros/latex/required/l3kernel/l3str-convert.dtx
+++ b/macros/latex/required/l3kernel/l3str-convert.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3str.dtx b/macros/latex/required/l3kernel/l3str.dtx
index f4f7b94b88..2be2b105ce 100644
--- a/macros/latex/required/l3kernel/l3str.dtx
+++ b/macros/latex/required/l3kernel/l3str.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
@@ -757,7 +757,7 @@
% \item Case changing text for typesetting: see the
% \cs[index=text_lowercase:n]{text_lowercase:n(n)},
% \cs[index=text_uppercase:n]{text_uppercase:n(n)} and
-% \cs[index=text_titlecase_all:n]{text_titlecase_(all|once):n(n)} functions which
+% \cs[index=text_titlecase_all:n]{text_titlecase_(all|first):n(n)} functions which
% correctly deal with context-dependence and other factors appropriate
% to text case changing.
% \end{itemize}
diff --git a/macros/latex/required/l3kernel/l3styleguide.pdf b/macros/latex/required/l3kernel/l3styleguide.pdf
index 0113bac571..31ff7889ff 100644
--- a/macros/latex/required/l3kernel/l3styleguide.pdf
+++ b/macros/latex/required/l3kernel/l3styleguide.pdf
Binary files differ
diff --git a/macros/latex/required/l3kernel/l3styleguide.tex b/macros/latex/required/l3kernel/l3styleguide.tex
index bcea3de06e..985f20a68c 100644
--- a/macros/latex/required/l3kernel/l3styleguide.tex
+++ b/macros/latex/required/l3kernel/l3styleguide.tex
@@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2024-05-27}
+\date{Released 2024-07-20}
\begin{document}
diff --git a/macros/latex/required/l3kernel/l3syntax-changes.pdf b/macros/latex/required/l3kernel/l3syntax-changes.pdf
index 99e93c2ccc..515a9eb803 100644
--- a/macros/latex/required/l3kernel/l3syntax-changes.pdf
+++ b/macros/latex/required/l3kernel/l3syntax-changes.pdf
Binary files differ
diff --git a/macros/latex/required/l3kernel/l3syntax-changes.tex b/macros/latex/required/l3kernel/l3syntax-changes.tex
index 30d8d47747..b9ffcb011a 100644
--- a/macros/latex/required/l3kernel/l3syntax-changes.tex
+++ b/macros/latex/required/l3kernel/l3syntax-changes.tex
@@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2024-05-27}
+\date{Released 2024-07-20}
\newcommand{\TF}{\textit{(TF)}}
diff --git a/macros/latex/required/l3kernel/l3sys.dtx b/macros/latex/required/l3kernel/l3sys.dtx
index b2228c7fd9..1db09f9550 100644
--- a/macros/latex/required/l3kernel/l3sys.dtx
+++ b/macros/latex/required/l3kernel/l3sys.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3term-glossary.pdf b/macros/latex/required/l3kernel/l3term-glossary.pdf
index 01598ca79a..d1a2058e9f 100644
--- a/macros/latex/required/l3kernel/l3term-glossary.pdf
+++ b/macros/latex/required/l3kernel/l3term-glossary.pdf
Binary files differ
diff --git a/macros/latex/required/l3kernel/l3term-glossary.tex b/macros/latex/required/l3kernel/l3term-glossary.tex
index 141749aa6b..fca2886337 100644
--- a/macros/latex/required/l3kernel/l3term-glossary.tex
+++ b/macros/latex/required/l3kernel/l3term-glossary.tex
@@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2024-05-27}
+\date{Released 2024-07-20}
\newcommand{\TF}{\textit{(TF)}}
diff --git a/macros/latex/required/l3kernel/l3text-case.dtx b/macros/latex/required/l3kernel/l3text-case.dtx
index 89cdb9e2b1..134e2508b7 100644
--- a/macros/latex/required/l3kernel/l3text-case.dtx
+++ b/macros/latex/required/l3kernel/l3text-case.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3text-map.dtx b/macros/latex/required/l3kernel/l3text-map.dtx
index 3573002244..e3586164c5 100644
--- a/macros/latex/required/l3kernel/l3text-map.dtx
+++ b/macros/latex/required/l3kernel/l3text-map.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3text-purify.dtx b/macros/latex/required/l3kernel/l3text-purify.dtx
index 35390811aa..d22ee1bc3e 100644
--- a/macros/latex/required/l3kernel/l3text-purify.dtx
+++ b/macros/latex/required/l3kernel/l3text-purify.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3text.dtx b/macros/latex/required/l3kernel/l3text.dtx
index bcfd15cb62..9a4c4f244e 100644
--- a/macros/latex/required/l3kernel/l3text.dtx
+++ b/macros/latex/required/l3kernel/l3text.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
@@ -65,11 +65,11 @@
% \end{syntax}
% Takes user input \meta{text} and expands the content.
% Protected commands (typically
-% formatting) are left in place, and no processing takes place of
+% formatting) are left in place, and no processing of
% math mode material (as delimited by pairs given in
% \cs{l_text_math_delims_tl} or as the argument to commands listed
-% in \cs{l_text_math_arg_tl}). Commands which are neither engine-
-% nor \LaTeX{} protected are expanded exhaustively.
+% in \cs{l_text_math_arg_tl}) takes place. Commands which are neither engine-
+% nor \LaTeX{}-protected are expanded exhaustively.
% Any commands listed in \cs{l_text_expand_exclude_tl} are excluded from
% expansion, as are those in \cs{l_text_case_exclude_arg_tl} and
% \cs{l_text_math_arg_tl}.
@@ -114,8 +114,8 @@
% \end{function}
%
% Upper- and lowercase have the obvious meanings. Titlecasing may be regarded
-% informally as converting the first character of the \meta{tokens} to
-% uppercase. However, the process is more complex
+% informally as converting the first \emph{non-space} character of the
+% \meta{tokens} to uppercase. However, the process is more complex
% than this as there are some situations where a single lowercase character
% maps to a special form, for example \texttt{ij} in Dutch which becomes
% \texttt{IJ}. There are two functions available for titlecasing: one which
@@ -214,8 +214,8 @@
% \text_declare_uppercase_mapping:nnn
% }
% \begin{syntax}
-% \cs{text_declare_lowercase_mapping:nn} \Arg{codeppoint} \Arg{replacement}
-% \cs{text_declare_lowercase_mapping:nnn} \Arg{BCP-47} \Arg{codeppoint} \Arg{replacement}
+% \cs{text_declare_lowercase_mapping:nn} \Arg{codepoint} \Arg{replacement}
+% \cs{text_declare_lowercase_mapping:nnn} \Arg{BCP-47} \Arg{codepoint} \Arg{replacement}
% \end{syntax}
% Declares that the \meta{replacement} tokens should be used when case mapping
% the \meta{codepoint}, rather than the standard mapping given in the
diff --git a/macros/latex/required/l3kernel/l3tl-analysis.dtx b/macros/latex/required/l3kernel/l3tl-analysis.dtx
index 4df9ee68a3..600da3985d 100644
--- a/macros/latex/required/l3kernel/l3tl-analysis.dtx
+++ b/macros/latex/required/l3kernel/l3tl-analysis.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3tl-build.dtx b/macros/latex/required/l3kernel/l3tl-build.dtx
index 6cd9822ad2..e484c5b1c5 100644
--- a/macros/latex/required/l3kernel/l3tl-build.dtx
+++ b/macros/latex/required/l3kernel/l3tl-build.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3tl.dtx b/macros/latex/required/l3kernel/l3tl.dtx
index 71d68d532c..84f2c36798 100644
--- a/macros/latex/required/l3kernel/l3tl.dtx
+++ b/macros/latex/required/l3kernel/l3tl.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3token.dtx b/macros/latex/required/l3kernel/l3token.dtx
index 03bf46b101..c028310326 100644
--- a/macros/latex/required/l3kernel/l3token.dtx
+++ b/macros/latex/required/l3kernel/l3token.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/l3unicode.dtx b/macros/latex/required/l3kernel/l3unicode.dtx
index 179817d490..532eb315d3 100644
--- a/macros/latex/required/l3kernel/l3unicode.dtx
+++ b/macros/latex/required/l3kernel/l3unicode.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-07-20}
%
% \maketitle
%
diff --git a/macros/latex/required/l3kernel/source3.pdf b/macros/latex/required/l3kernel/source3.pdf
index 34279f9e00..26c62e620d 100644
--- a/macros/latex/required/l3kernel/source3.pdf
+++ b/macros/latex/required/l3kernel/source3.pdf
Binary files differ
diff --git a/macros/latex/required/l3kernel/source3.tex b/macros/latex/required/l3kernel/source3.tex
index 00095ad319..228d3ca93c 100644
--- a/macros/latex/required/l3kernel/source3.tex
+++ b/macros/latex/required/l3kernel/source3.tex
@@ -57,7 +57,7 @@ for those people who are interested.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2024-05-27}
+\date{Released 2024-07-20}
\pagenumbering{roman}
\maketitle