Different behaviour using Beamer
rafaelpap opened this issue ยท 10 comments
Is normal than the font of units using Beamer does not change to sans serif?
Version 2 used the same font for the text and the units but version 3 uses the "mathrm" font.
To recover the behaviour of version 2 is enough to define
\sisetup{
text-family-to-math=true
}
?
Two examples of the different behaviour are attached
testv2.pdf
testv3.pdf
I think I will document this: the old behaviour might be 'handy', but it's not really consistent with what one would put in manually.
Thanks, I am using
\sisetup{
text-family-to-math=true
}
but I am not sure if it's the right way.
@FrankMittelbach, @samcarter I'd welcome your thoughts here. Arguably the issue is in beamer
, as it leaves \mathrm
alone but make \mathnormal
sans serif.
I think this is a matter of philosophy. For me units/operator should have the upright font of the surrounding text/math. If the text happens to be in sans serif, then they should also be in sans serif. This makes sure they are not confused with math variables but at the same time don't stand out like foreign objects in the text flow.
However I've seen answers on Q&A sites in which the authors were very adherent that such things always ought to be upright serif - in fact many style guides will say this (but I'm convinced they were written with exclusively serif documents in mind).
Concerning beamer: \mathrm
is a specific math alphabet, so if used directly in a formula beamer should not change that to something else in my opinion (that is different from \mathnormal
which is covering symbols/letters without an explicit request for an alphabet).
Concerning how should units come out, I agree with @samcarter that this is more a style question, so it might need an option like units-follow-text-style=false/true
and then branch based on what the main text family is (or the current family).
I think this is a matter of philosophy. For me units/operator should have the upright font of the surrounding text/math. If the text happens to be in sans serif, then they should also be in sans serif.
However I've seen answers on Q&A sites in which the authors were very adherent that such things always ought to be upright serif - in fact many style guides will say this (but I'm convinced they were written with exclusively serif documents in mind).
The "ACS Style Guide" does not mention explicitly what to do. But in Appendix 11-1 where the text in tables changes to sans-serif the units are also written in sans-serif.
Do you have one example of a style guide which maintain the serif font?
Thanks,
Rafael RP
@rafaelpap I don't have any example with sans serif (as I said, I hope they just don't take into account that such documents exist), but here a IMHO silly example that uses normal weight font in a bold context (from https://physics.nist.gov/cuu/Units/checklist.html)
Thanks everyone for the thoughts: I'll see what I can adjust
The 'style vs logic' is always fun, as for the main target audience of siunitx
, sans serif is a stylistic choice, but for pure mathematicians it conveys meaning - so it's 'fun' deciding what to do. (The defaults in siunitx
tend toward the pure maths end, but that's because at least in part I'm viewing \mathrm
as to some extent conveying logical meaning - which is I realise problematic here.)
in part I'm viewing
\mathrm
as to some extent conveying logical meaning - which is I realise problematic here.)
this is why I think beamer has no "right" to change an explicit \mathrm
in a formula. As to units I think this much more a boundary case: you don't expect "kg" as a unit be next to \mathsf{kg}
meaning something else, so I think the style question is has a right and it is somewhat odd if a whole document is set in Sans and then ends up having units with serifs.