3

Is there a difference between T_{\text{yay}} and T_\text{yay}?

And is one of the both versions recommed to use? Thanks in advance!

julandi
  • 45

1 Answers1

6

They are the same but the fact that the second one works at all depends on the weird internal parsing of the argument of _ I would never use that form. Compare with \sqrt{\text{yay}} which works and \sqrt\text{yay} that does not. Normally (unless it is really a text phrase) I would use \mathrm rather than \text

David Carlisle
  • 757,742
  • And what about \symup? For me, they all seem to do the same. Is it just for easier to read LaTex-Code? – julandi Dec 17 '16 at 21:22
  • 1
    @julandi \symup is unicode-math package, \text makes text using your documents surrounding text font (spaces make spaces and it will be italic if surrounding text is) \mathrm is math mode and always uses a fixed font. – David Carlisle Dec 17 '16 at 21:41
  • @DavidCarlisle yes, but $\x_{text{mín}}$ works, and $\x_{mathrm{mín}}$ fails... (notice the accented i (í ) in the subscript) (utf8 inputenc and T1 fontenc correctly loaded, of course)... – Rmano Dec 18 '16 at 19:20
  • @Rmano accented letters in math are usually avoided as they clash with diacritics used as math operators, but if you are using a language where they are needed you could set up \mathrm to use a T1 encoded font of course – David Carlisle Dec 18 '16 at 19:32