3

When typing formulas to explain physics, sometimes non spaced text in super or subscripts is helpful.

$q_{heat}$

To prevent spacing in subscripts, I often used \textit in math mode:

$q_{\textit{heat}}$

since I use classic thesis together with eulervm, the \textit trick doesn't work any more, because text font changes.

Is there a better way to prevent spacing without changing the font?

How do I define a \texteulervm environment correctly?


As an example what happens, the following code:

j_{WDR,runoff}^{w} & \ne j_{\text{WDR,runoff}}^{w}

results in: FontChange

please note the difference in the subscript.

7
  • Welcome to TeX.SX! You shouldn't be using Euler for those subscripts, because they are text, not math variables.
    – egreg
    Oct 4, 2013 at 9:09
  • 1
    for Euler use \text{..} with package amsmath. Euler has no italic font
    – user2478
    Oct 4, 2013 at 9:36
  • @ereg thx for the welcome, but using another font would clearly break the classic thesis layout; also spacing makes a great difference, and worked well over the last years...
    – StVO
    Oct 4, 2013 at 11:05
  • @Herbert amsmath is already in use, but \text{...} also changes the font, it is clear that euler is non italic, the code above was just an example how I did it before using eulervm and classic thesis
    – StVO
    Oct 4, 2013 at 11:23
  • \text uses the text font which is Euler. What do you mean by "changes the font"?
    – user2478
    Oct 4, 2013 at 11:26

2 Answers 2

3

Not a solution according to your wishes, but it is according to well established standards.

The purpose of using Euler for math is to get a sharp visual distinction between text and math: letters for variables and digits are very different from any text font.

On the other hand, ‘WDR’ and ‘runoff’ are not math variables, but specifiers for distinguishing between variables with the same name. Just like they should be typeset upright when not using Euler, they should be upright and in the text font also with it. It's a similar situation as with function names such as ‘log’ or ‘sin’ that should be typeset in the text font and not in Euler.

A hypothetical $j_{WDR}$ means j subscripted with the product of W, D and R, while $j_{\textnormal{WDR}} means what you really intend: the variable j subscripted with the label WDR.

Also your habit of typing $j_{\textit{heat}}$ is wrong, according to the standards: it should be $j_{\textnormal{heat}}$, at least if ‘heat’ is a label and not a variable taking a value.

9
  • Shouldn't it be $j_{\textnormal{heat}}$, etc. with a braced subscript?
    – Joseph Wright
    Nov 3, 2013 at 14:17
  • @JosephWright The \text... commands start with a \bgroup.
    – egreg
    Nov 3, 2013 at 14:29
  • Yes, but if you are parsing formal LaTeX syntax then _ and ^ take a single argument: _\textnormal may break with for example breqn.
    – Joseph Wright
    Nov 3, 2013 at 14:39
  • @JosephWright I don't care about breqn; but I'll edit the code anyway. ;-)
    – egreg
    Nov 3, 2013 at 14:43
  • @egreg: "It's a similar situation as with function names such as ‘log’ or ‘sin’ that should be typeset in the text font and not in Euler." I totally agree with that, it seems the most logical to me. But then why does amsopn.sty package use a mathcode variant of \mathrm instead of \textnormal for defining the macros \operatorname and \DeclareMathOperator? Is the AMS standard for function names wrong in this area?
    – Maggyero
    May 23, 2015 at 9:34
1

define a command \texteuler:

\def\texteuler#1{{\fontencoding{U}\fontfamily{zeur}\selectfont\text{#1}}}
3
  • Well this fixed the font issue but the spacing stays like without the \text; probably an enclosed spacing is not defined for eulervm at all?
    – StVO
    Oct 4, 2013 at 16:06
  • eulervm is a math font
    – user2478
    Oct 4, 2013 at 19:17
  • ok, I didn't know that spacing in math mode is done by the font itself, but it makes sense, I wrote an email to the package provider, if he knows/has another solution or if I have to create a new font
    – StVO
    Oct 5, 2013 at 8:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.