summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/siunitx/CHANGELOG.md9
-rw-r--r--macros/latex/contrib/siunitx/siunitx-code.pdfbin1490365 -> 1493627 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx-print.dtx35
-rw-r--r--macros/latex/contrib/siunitx/siunitx-print.pdfbin0 -> 484555 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx-unit.dtx14
-rw-r--r--macros/latex/contrib/siunitx/siunitx-unit.pdfbin0 -> 627332 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx.dtx2
-rw-r--r--macros/latex/contrib/siunitx/siunitx.pdfbin635011 -> 635011 bytes
-rw-r--r--macros/latex/required/firstaid/changes.txt16
-rw-r--r--macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx94
-rw-r--r--macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdfbin237479 -> 243739 bytes
11 files changed, 146 insertions, 24 deletions
diff --git a/macros/latex/contrib/siunitx/CHANGELOG.md b/macros/latex/contrib/siunitx/CHANGELOG.md
index a65179c47f..3d9721549a 100644
--- a/macros/latex/contrib/siunitx/CHANGELOG.md
+++ b/macros/latex/contrib/siunitx/CHANGELOG.md
@@ -7,6 +7,12 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
## [Unreleased]
+## [v3.0.16]
+
+### Fixed
+- Treatment of spaces before `/` in literal units (issue #495)
+- Printing of `\mathchoice` entries in text mode (issue #497)
+
## [v3.0.15]
### Fixed
@@ -1403,7 +1409,8 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
### Added
- First public testing release (as `si`)
-[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.15...HEAD
+[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.16...HEAD
+[v3.0.16]: https://github.com/josephwright/siunitx/compare/v3.0.15...v3.0.16
[v3.0.15]: https://github.com/josephwright/siunitx/compare/v3.0.14...v3.0.15
[v3.0.14]: https://github.com/josephwright/siunitx/compare/v3.0.13...v3.0.14
[v3.0.13]: https://github.com/josephwright/siunitx/compare/v3.0.12...v3.0.13
diff --git a/macros/latex/contrib/siunitx/siunitx-code.pdf b/macros/latex/contrib/siunitx/siunitx-code.pdf
index ab32109002..dd9f899d20 100644
--- a/macros/latex/contrib/siunitx/siunitx-code.pdf
+++ b/macros/latex/contrib/siunitx/siunitx-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/siunitx-print.dtx b/macros/latex/contrib/siunitx/siunitx-print.dtx
index 15d4452055..25acdd306b 100644
--- a/macros/latex/contrib/siunitx/siunitx-print.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-print.dtx
@@ -722,6 +722,8 @@
% \begin{macro}{\@@_text_replace:n}
% \begin{macro}{\@@_text_replace:N}
% \begin{macro}{\@@_text_replace:NNn}
+% \begin{macro}{\@@_text_replace:Nnnn}
+% \begin{macro}{\@@_text_replace_frac:n}
% \begin{macro}{\@@_text_sub:n, \@@_text_super:n}
% \begin{macro}{\@@_text_scripts:NnN}
% \begin{macro}{\@@_text_scripts:}
@@ -763,9 +765,13 @@
\cs_new_protected:Npn \@@_text_replace:n #1
{
\group_begin:
- \tl_set:Nn \l_@@_tmp_tl {#1}
- \@@_text_replace:N \l_@@_tmp_tl
- \tl_use:N \l_@@_tmp_tl
+ \tl_if_head_eq_meaning:nNTF {#1} \mathchoice
+ { \@@_text_replace:Nnnnn #1 }
+ {
+ \tl_set:Nn \l_@@_tmp_tl {#1}
+ \@@_text_replace:N \l_@@_tmp_tl
+ \tl_use:N \l_@@_tmp_tl
+ }
\group_end:
}
\cs_new_protected:Npx \@@_text_replace:N #1
@@ -797,6 +803,27 @@
\tl_replace_all:Nnn #1 {#2} {#3}
\@@_text_replace:NNn #1
}
+\cs_new_protected:Npn \@@_text_replace:Nnnnn #1#2#3#4#5
+ {
+ \ensuremath
+ {
+ \mathchoice
+ { \@@_print_replace_frac:n {#2} }
+ { \@@_print_replace_frac:n {#3} }
+ { \@@_print_replace_frac:n {#4} }
+ { \@@_print_replace_frac:n {#5} }
+ }
+ }
+% \end{macrocode}
+% Almost the same as the lead-off but here we need to deal with re-inserting
+% a text mode shift.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_print_replace_frac:n #1
+ {
+ \exp_args:NnV \tl_if_head_eq_meaning:nNTF {#1} \l_siunitx_unit_fraction_tl
+ { \@@_text_fraction:Nnn #1 }
+ { \mbox { \@@_text_replace:n {#1} } }
+ }
% \end{macrocode}
% When the \pkg{bidi} package is loaded, we need to make sure
% that \cs{text} is doing the correct thing.
@@ -918,6 +945,8 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \subsection{Standard settings for module options}
%
diff --git a/macros/latex/contrib/siunitx/siunitx-print.pdf b/macros/latex/contrib/siunitx/siunitx-print.pdf
new file mode 100644
index 0000000000..e1a77edadf
--- /dev/null
+++ b/macros/latex/contrib/siunitx/siunitx-print.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/siunitx-unit.dtx b/macros/latex/contrib/siunitx/siunitx-unit.dtx
index ab9c30a1c2..b0602c2543 100644
--- a/macros/latex/contrib/siunitx/siunitx-unit.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-unit.dtx
@@ -1190,6 +1190,7 @@
% \begin{macro}{\@@_format_literal_super:nn, \@@_format_literal_sub:nn}
% \begin{macro}{\@@_format_literal_add:n}
% \begin{macro}{\@@_format_literal_auxix:nn}
+% \begin{macro}{\@@_format_literal_auxx:nw}
% \begin{variable}{\l_@@_separator_tl}
% To format literal units, there are two tasks to do. The input is
% \texttt{x}-type expanded to force any symbolic units to be converted into
@@ -1285,7 +1286,11 @@
{
\tl_if_head_is_N_type:nTF {#2}
{ \@@_format_literal_auxvi:nN }
- { \@@_format_literal_auxix:nn }
+ {
+ \tl_if_head_is_group:nTF {#2}
+ { \@@_format_literal_auxix:nn }
+ { \@@_format_literal_auxx:nw }
+ }
{#1} #2 \q_recursion_stop
}
\cs_new_protected:Npx \@@_format_literal_auxvi:nN #1#2
@@ -1347,6 +1352,12 @@
}
\cs_new_protected:Npn \@@_format_literal_auxix:nn #1#2
{ \@@_format_literal_auxvi:nN { #1 {#2} } }
+\use:x
+ {
+ \cs_new_protected:Npn \exp_not:N \@@_format_literal_auxx:nw
+ ##1 \c_space_tl
+ }
+ { \@@_format_literal_auxv:nw {#1} }
\tl_new:N \l_@@_separator_tl
% \end{macrocode}
% \end{variable}
@@ -1361,6 +1372,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \subsection{(PDF) String creation}
%
diff --git a/macros/latex/contrib/siunitx/siunitx-unit.pdf b/macros/latex/contrib/siunitx/siunitx-unit.pdf
new file mode 100644
index 0000000000..0050caf4e5
--- /dev/null
+++ b/macros/latex/contrib/siunitx/siunitx-unit.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/siunitx.dtx b/macros/latex/contrib/siunitx/siunitx.dtx
index 0827729689..0ee202f15f 100644
--- a/macros/latex/contrib/siunitx/siunitx.dtx
+++ b/macros/latex/contrib/siunitx/siunitx.dtx
@@ -121,7 +121,7 @@
%
% Identify the package and give the over all version information.
% \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2021-06-22} {3.0.15}
+\ProvidesExplPackage {siunitx} {2021-06-24} {3.0.16}
{A comprehensive (SI) units package}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/siunitx/siunitx.pdf b/macros/latex/contrib/siunitx/siunitx.pdf
index 9a8af935cc..aa8161e9dd 100644
--- a/macros/latex/contrib/siunitx/siunitx.pdf
+++ b/macros/latex/contrib/siunitx/siunitx.pdf
Binary files differ
diff --git a/macros/latex/required/firstaid/changes.txt b/macros/latex/required/firstaid/changes.txt
index 634e3e5c9b..908452783e 100644
--- a/macros/latex/required/firstaid/changes.txt
+++ b/macros/latex/required/firstaid/changes.txt
@@ -1,8 +1,22 @@
+2021-06-24 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * latex2e-first-aid-for-external-files.dtx (subsection{\footref first aid}):
+ Taken out first aid for memoir and scrbase, they are now fixed
+
+ (section{The Implementation}): show more details if a first aid
+ is not applied.
+
+2021-06-23 Marcel Krüger <Marcel.Krueger@latex-project.org>
+
+ * latex2e-first-aid-for-external-files.dtx:
+ Temporary fix for gh591 to be taken out when the engine is fixed.
+
2021-06-08 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
* latex2e-first-aid-for-external-files.dtx:
ulem doesn't handle \hspace gracefully now that it is calc aware.
- varwidth needs an additional \unskip when unraveling a vertical list.
+ varwidth needs an additional \unskip when unraveling a vertical list
+ (but only if that skip is 0pt)
2021-03-15 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
diff --git a/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx b/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx
index 84ddacb269..da630423c2 100644
--- a/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx
+++ b/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx
@@ -111,8 +111,8 @@
% \end{macrocode}
%
% \begin{macrocode}
-\def\LaTeXFirstAidDate{2021/06/08}
-\def\LaTeXFirstAidVersion{v1.0m}
+\def\LaTeXFirstAidDate{2021/06/24}
+\def\LaTeXFirstAidVersion{v1.0n}
% \end{macrocode}
%
% \begin{macrocode}
@@ -120,8 +120,8 @@
[\LaTeXFirstAidDate\space \LaTeXFirstAidVersion\space
LaTeX kernel fixes to external files and packages]
% \end{macrocode}
- %
-
+%
+%
% \begin{macro}{\FirstAidNeededT}
% This is a very simple help to ensure that we only apply first aid
% to an unmodified package or class. It only works in the case the
@@ -135,7 +135,13 @@
\ExplSyntaxOn
\cs_new:Npn\FirstAidNeededT#1#2#3{
\exp_args:Ncx\str_if_eq:onF{ver@#1.#2}{#3}
- { \typeout{==>~ First~ Aid~ for~ #1.#2~ no~ longer~ applied!} }
+ { \typeout{==>~ First~ Aid~ for~ #1.#2~ no~ longer~ applied!^^J
+ \@spaces Expected:^^J
+ \@spaces\@spaces #3^^J
+ \@spaces but~ found:^^J
+ \@spaces\@spaces \use:c{ver@#1.#2}^^J
+ \@spaces so~ I'm~ assuming~ it~ got~ fixed.
+ } }
\exp_args:Ncx\str_if_eq:onT{ver@#1.#2}{#3}
}
\ExplSyntaxOff
@@ -493,20 +499,22 @@
%
% A few classes unconditionally define \cs{footref}. Until that has
% changed we provide some first aid to let them do this.
+%
+% --- This seems to be resolved now ---
%
% \begin{macrocode}
-\AddToHook{file/after/scrkbase.sty}[firstaid]{%
- \FirstAidNeededT{scrkbase}{sty}%
- {2020/09/21 v3.32 KOMA-Script package (KOMA-Script-dependent basics and keyval usage)}%
- {\let\footref\@undefined}
- }
+%\AddToHook{file/after/scrkbase.sty}[firstaid]{%
+% \FirstAidNeededT{scrkbase}{sty}%
+% {2020/09/21 v3.32 KOMA-Script package (KOMA-Script-dependent basics and keyval usage)}%
+% {\let\footref\@undefined}
+% }
% \end{macrocode}
%
% \begin{macrocode}
-\AddToHook{class/before/memoir}[firstaid]{%
- % for version {2020/10/04 v3.7n configurable book, report, article document class}%
- \let\footref\@undefined
-}
+%\AddToHook{class/before/memoir}[firstaid]{%
+% % for version {2020/10/04 v3.7n configurable book, report, article document class}%
+% \let\footref\@undefined
+%}
% \end{macrocode}
%
%
@@ -548,7 +556,7 @@
%
%
%
-% \subsection{\cs{ulem} first aid}
+% \subsection{\pkg{ulem} first aid}
%
% In 2020 we fixed various kernel commands to accept \pkg{calc}
% syntax. The \pkg{ulem} package redefines some internals and that
@@ -565,7 +573,7 @@
% \end{macrocode}
%
%
-% \subsection{\cs{varwidth} first aid}
+% \subsection{\pkg{varwidth} first aid}
%
% The \pkg{varwidth} package does a lot of low-level paragraph
% manipulation assuming traditional \TeX{} paragraphs. However, with
@@ -583,7 +591,7 @@
{%
\def\@vwid@sift{%
\skip@\lastskip\unskip
- \unskip % <---- the first aid here
+ \ifdim\lastskip=\z@\unskip\fi % <---- the first aid here (not just unskip)
\dimen@\lastkern\unkern
\count@\lastpenalty\unpenalty
\setbox\z@\lastbox
@@ -618,6 +626,58 @@
% {Temporary fixes for the kernel \\
% (until the next patch-level release)}
%
+% This fixes GitHub issue 591. It is only needed in Lua\TeX\ and replaces just one
+% instance of \cs{tex\_par:D} with the following version which removes
+% other nodes in the current list first.
+% \begin{macrocode}
+\ExplSyntaxOn
+\sys_if_engine_luatex:T
+ {
+ \newluafunction \g__para_end_empty_par_id_int
+ \exp_args:Nx \everyjob {
+ \exp_not:V \everyjob
+ \exp_not:N \lua_now:n {
+ local~texnest, flush_list, par_token = tex.nest, node.flush_list, token.create'tex_par:D'~
+ lua.get_functions_table()[\int_use:N \g__para_end_empty_par_id_int] = function()
+ local~nest_level = texnest.top~
+ local~cur_head = nest_level.head~
+ flush_list(cur_head.next)
+ nest_level.tail, cur_head.next = cur_head, nil~
+ token.put_next(par_token)
+ end
+ }
+ }
+ \protected \luadef \__para_end_empty_par: \g__para_end_empty_par_id_int
+ \group_begin:
+ \cs_set:Npn \__para_extract_everypar:w #1 \the \toks #2 \s_stop
+ {
+ \tl_gset:Nn \g__para_standard_everypar_tl {
+ \box_gset_to_last:N \g_para_indent_box
+ \group_begin:
+ \__para_end_empty_par:
+ \group_end:
+ \tex_everypar:D { \msg_error:nnnn { hooks }{ para-mode }{before}{vertical} }
+ \@kernel@before@para@before
+ \hook_use:n {para/before}
+ \group_begin:
+ \tex_everypar:D {}
+ \skip_zero:N \tex_parskip:D
+ \tex_noindent:D
+ \group_end:
+ \tex_everypar:D{\g__para_standard_everypar_tl}
+ \@kernel@before@para@begin
+ \hook_use:n {para/begin}
+ \if_mode_horizontal: \else:
+ \msg_error:nnnn { hooks }{ para-mode }{begin}{vertical} \fi:
+ \__para_handle_indent:
+ \the \toks #2
+ }
+ }
+ \exp_last_unbraced:No \__para_extract_everypar:w \g__para_standard_everypar_tl \s_stop
+ \group_end:
+ }
+\ExplSyntaxOff
+% \end{macrocode}
%
% \begin{macrocode}
%</kernel>
diff --git a/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdf b/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdf
index 35836f16f8..8a1df73324 100644
--- a/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdf
+++ b/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdf
Binary files differ