-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
\Omega, etc., should not be directly in \mathrm #435
Comments
Probably |
Actually, I'd rather set up to suppress the |
On the other hand, something like |
Well, and a combination of |
@EGreg suggests that |
@josephwright — don't ask me, I don't think we can build a completely general and scaleable system using the 2e ideas of the I don't really understand the context of this issue, though. When you talk about |
@wspr I'm working on ohms but there is a more general point. I can arrange for various things to be used as the result of What I'm trying to get at, though, is the 'standard' setting expectation. Is Depending on what is 'right', I should either format \qty{10}{\ohm\metre} as $10\,\mathrm{\Omega}\,\mathrm{m}$ or $10\,\Omega\,\mathrm{m}$ (I'm pretty convinced that |
@wspr Then of course I have |
@josephwright — my broad understanding of For your question, the following two lines will (I believe) always yield the same output:
You could imagine an alternate universe where Going back to this specific example. I can't help but think you should be using
The bf+it style just to emphasise the difference between a standard |
Considering \documentclass{article}
\DeclareFontEncoding{LGR}{}{}
\DeclareSymbolFont{upgreek}{LGR}{opensans-TLF}{m}{n}
\DeclareMathSymbol{\Omega}{\mathalpha}{upgreek}{87}%
\usepackage{siunitx}
\begin{document}
$\Omega$
$\mathrm{\Omega}$
\unit{\ohm}
\end{document} |
LGR is a troublesome encoding that doesn't obey the encoding specification (even though it is widely used) and therefore has limitations. Anyhow, you can't declare a symbol as
exists only in "upgreek" so your result is not at all surprising if all other math fonts have different layouts. In that case it should have been a |
@mrpiggi The thing here is that I've still not got a clear idea of what is 'right' here, with the added complexity that the answer possibly depends on whether Unicode fonts are being used. That's why I've not 'fixed' - I'm not truly sure I know what the right thing is. |
@FrankMittelbach thanks a lot, this solves at least my issue ;) |
To recap, the situation with basic TeX is a bit blury but essentially it is like this (in NFSS convention):
If the NFSS math setup is changed, e.g. T1 is used in "operators" and in mathrm etc, then obviously the declaration for symbols need to point somewhere else (or the math setup is broken). And |
what do you mean by "unicode" fonts are used? Used where/when? |
@FrankMittelbach When |
@FrankMittelbach Sorry for the confusion on As you say, with a 'vanilla' setup, |
Well they are ok as long as nobody attempts to use the symbols in alphabets :-) But for a general approach I'm not sure your symbols should be set as straight math. They are kind of in between. For example formulas in heading should normally not come out bold or sf just because the surrounding text font is bf or sf, for your units that not so clear. It is also not clear if they should be using text fonts or math fonts both of which aren't necessarily the same. But it is too late tonight ot think about this further (and probably not during the next days either ... have a workshop to prepare :-)) |
Oddly, I've thought about this quite a bit :) The 'rules' for quantities (BIPM/NIST) are clear that they are mathematical in nature and tend to specify mid-weight and upright. To me that suggests strongly that in TeX terms they come out as
So it's not so much the final outcome that's tricky as the 'standardised' form. (The printing routine replaces That brings me back of course to the opening statements here. I can (moderately) happily arrange for the |
@FrankMittelbach If you look at the history of |
I think if we were to take about fundamental philosophy here, yes units belong in the text font that is associated with maths (i.e., de facto \mathrm) but as units should always be text themselves things like \Omega would be better to call an error message or silently ignore the \mathrm state. E.G., what does \mathrm{=} “mean”? I think most people would assume the = comes out unchanged.
Where there are symbols in units that often come from maths mode (micro, ohm, etc) but should respect the differences between \mathrm and \mathsf and \mathbf, etc., there should be corresponding \textXY symbol commands defined for them to do the right thing.
|
Although
\mathrm
is essentially 'upright', it can cause issues, for exampleFor this and for semantic reasons, the 'normal'
\mathrm
should therefore be suppressed/avoided with non-Latin symbols. Probably this is best done using\mbox{$...$}
as a general construct.The text was updated successfully, but these errors were encountered: