Jean-Marc Lasgouttes wrote:
"Herbert" == Herbert Voss <[EMAIL PROTECTED]> writes:


Herbert> this is nonsense! How did you insert it? 2^{Q} is a math
Herbert> expression, it cannot be part of \textrm, it should be an
Herbert> argument of\mathrm

Herbert, while we are at it, does it ever make sense to use \textrm in
math? I am a bit puzzled about what this really does. I would tend to
use \mathrm{} for a variable name in upright shape, and \mbox{} or
\text{} for something which is more like a word.

as I wrote in the other mail, it is _valid_ LaTeX code.
And from my point of view, LyX should not be too clever.
\text{} is the same problem, you have to use $...$ inside
it for math, same for \mbox. It doesn't really make sense,
to have such cases, but it is not unusual and I used it by
myself!

Marc did something wrong, not LyX! In some cases I want
an upright math character, then I use \mathrm{..} and
sometime I want the text character. \mathrm takes all
from the _math_ font and ignores spaces! \textrm takes
all from the current text font and accepts spaces! This
is far different.

And by the way, the question is, what Marc had in mind?
An upright Q inside math, then it should be 2^{\mathrm{Q}}.
An upright Q outside math, then it should be \textrm{2\textsuperscript{Q}}

There is no general rule, which says, what to do ...

Herbert


Reply via email to