diff --git a/.github/tl_packages b/.github/tl_packages index ada5da56..700edc5d 100644 --- a/.github/tl_packages +++ b/.github/tl_packages @@ -61,6 +61,7 @@ lualatex-math luatexbase luatexko makeindex +mathastext mathpazo multirow natbib diff --git a/CHANGELOG.md b/CHANGELOG.md index c514b339..d81fcbf1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to - Adjust `colortbl` support to allow for `tabularray` (see https://github.com/lvjr/tabularray/issues/512) +### Fixed +- Output of `\ohm` with `mathastext` (see issue + [\#757](https://github.com/josephwright/siunitx/issues/757)) + ## [v3.3.22] - 2024-09-30 ### Fixed diff --git a/siunitx-symbol.dtx b/siunitx-symbol.dtx index ea974318..eb31aafa 100644 --- a/siunitx-symbol.dtx +++ b/siunitx-symbol.dtx @@ -243,16 +243,23 @@ \@ifpackageloaded { fontspec } { \exp_not:V \l_@@_tmpb_tl } { - \bool_lazy_or:nnTF + \bool_lazy_any:nTF { - \@ifclassloaded { beamer } - \c_true_bool - \c_false_bool - } - { - \@ifpackageloaded { kmath } - \c_true_bool - \c_false_bool + { + \@ifclassloaded { beamer } + \c_true_bool + \c_false_bool + } + { + \@ifpackageloaded { kmath } + \c_true_bool + \c_false_bool + } + { + \@ifpackageloaded { mathastext } + \c_true_bool + \c_false_bool + } } { \exp_not:V \l_@@_tmpb_tl } { \exp_not:V \l_@@_tmpa_tl } diff --git a/testfiles/siunitx-pkg-mathastext.lvt b/testfiles/siunitx-pkg-mathastext.lvt new file mode 100644 index 00000000..9c81b879 --- /dev/null +++ b/testfiles/siunitx-pkg-mathastext.lvt @@ -0,0 +1,28 @@ +\input{regression-test} + +\documentclass{article} + +\ExplSyntaxOn +\debug_on:n { check-declarations , deprecation } +\ExplSyntaxOff + +\usepackage{siunitx} + +% Needed to force the failure we are testing for +\ifdefined\Umathcode\else + \usepackage[T1]{fontenc} +\fi +\usepackage[LGRgreek]{mathastext} + +\begin{document} + +% Set up math fonts +\savebox0{$ \mathrm { a } \mathsf { b } \mathtt{ c } \mathbf { d } $ } + +\START + +\showoutput + +\unit{\omega} + +\end{document} diff --git a/testfiles/siunitx-pkg-mathastext.tlg b/testfiles/siunitx-pkg-mathastext.tlg new file mode 100644 index 00000000..ef92770b --- /dev/null +++ b/testfiles/siunitx-pkg-mathastext.tlg @@ -0,0 +1,46 @@ +This is a generated file for the l3build validation system. +Don't change this file in any respect. +Completed box being shipped out [1] +\vbox(633.0+0.0)x407.0 +.\hbox(0.0+0.0)x0.0 +..\kern -72.26999 +..\vbox(0.0+0.0)x0.0, glue set 72.26999fil +...\kern -72.26999 +...\hbox(0.0+0.0)x0.0 +....\glue 0.0 plus 1.0fil minus 1.0fil +...\glue 0.0 plus 1.0fil minus 1.0fil +.\glue 16.0 +.\vbox(617.0+0.0)x345.0, shifted 62.0 +..\vbox(12.0+0.0)x345.0, glue set 12.0fil +...\glue 0.0 plus 1.0fil +...\hbox(0.0+0.0)x345.0 +....\pdfcolorstack 0 push {0 g 0 G} +....\hbox(0.0+0.0)x345.0 +....\pdfcolorstack 0 pop +..\glue 25.0 +..\glue(\lineskip) 0.0 +..\vbox(550.0+0.0)x345.0, glue set 539.94232fil +...\write-{} +...\glue(\topskip) 5.6955 +...\hbox(4.3045+0.0)x345.0, glue set 322.64069fil +....\hbox(0.0+0.0)x15.0 +....\mathon +....\T1/cmr/m/n/10 w +....\kern0.13885 +....\mathoff +....\penalty 10000 +....\glue(\parfillskip) 0.0 plus 1.0fil +....\glue(\rightskip) 0.0 +...\glue 0.0 plus 1.0fil +...\glue 0.0 +...\glue 0.0 plus 0.0001fil +..\glue(\baselineskip) 23.5849 +..\hbox(6.4151+0.0)x345.0 +...\pdfcolorstack 0 push {0 g 0 G} +...\hbox(6.4151+0.0)x345.0, glue set 170.00061fil +....\glue 0.0 plus 1.0fil +....\T1/cmr/m/n/10 1 +....\glue 0.0 plus 1.0fil +...\pdfcolorstack 0 pop +.\kern 0.0 +(siunitx-pkg-mathastext.aux)