I am having a problem with text in formulas. I am setting tables in sans-serif in order to improve the readability. The math font stays serif for formulas or symbols within the table, when I switch with \sffamiliy directly before \begin{tabular}. I think that's good, because the symbols stay the same over the whole document and are recognizable.
But, when setting indices which are used as abbreviations with _\text{index}, this text of course changes to sans, too. That gives me three different symbols where two different what be easier to understand.
\documentclass{article}
\usepackage{mathtools}
\begin{document}
The mass flow $q_m$ is different from the average heat flow $q_\text{m}$
\sffamily
The mass flow $q_m$ is different from the average heat flow $q_\text{m}$
\end{document}
First of all I wonder how to prevent this behavior and second: What is best practice for this case? How do you type set text indices? Should the math mode follow the text mode and possibly confuse the lector?
An other example are characteristic numbers which should be (Forssmann/Jong) set to circumferential Mach-number $\textit{Ma}_u$ or Reynolds-number over hyd. diameter $\textit{Re}_{D_{\text{h}}}$.
Edit
I am playing around a little with \mathrm and \text. Still not sure, what should be used where. The font is the same for serifs. Using unicode-math or redefining \mathrm however would give different appearances for those outputs. I think that is good, as d for differential should/could look different as d for abbreviation of dynamic. $\frac{\mathrm{d}p_\text{d}}{\mathrm{d}t}$
What I noticed further more:
\mathrmignores spaces but not\,etc.\mathrmand\textare setting indices in a different distance
This code:
Mach-number, total, mean and mass specific values:
$\textit{Ma}_u$; $\mathit{Ma}_u$
$q_m$; $q_{\text{m\,tot}}$; $q_{\text{m tot}}$; $q_{\text{m,tot}}$; $q_{\text{m, tot}}$
$q_m$; $q_{\mathrm{m\,tot}}$; $q_{\mathrm{m tot}}$; $q_{\mathrm{m,tot}}$; $q_{\mathrm{m, tot}}$
\sffamily
Mach-number, total, mean and mass specific values:
$\textit{Ma}_u$; $\mathit{Ma}_u$
$q_m$; $q_{\text{m\,tot}}$; $q_{\text{m tot}}$; $q_{\text{m,tot}}$; $q_{\text{m, tot}}$
$q_m$; $q_{\mathrm{m\,tot}}$; $q_{\mathrm{m tot}}$; $q_{\mathrm{m,tot}}$; $q_{\mathrm{m, tot}}$
looks like:

! Undefined control sequence. l.3 ...fferent from the average heat flow $q_\text {m}$? I am using TL 2013 on Linux mint – Nasser Jul 24 '13 at 08:32mathtoolsto my MWE – LaRiFaRi Jul 24 '13 at 08:38siunitxloaded which seems to give enough math support as well. – LaRiFaRi Jul 24 '13 at 08:43\textcommand. It is meant to switch to the (surrounding) text mode, not to give you a roman font. If you want a fix math font, use one of the math alphabets e.g.$q_{\mathrm{m}}$– Ulrike Fischer Jul 24 '13 at 09:01