Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This question already has an answer here:

What do you think which notation is better to read?

The set $B^{high} = {b_1, \ldots, b_n}$ should indicate the set of all buildings which are high and $B^{low} = {b_1, \ldots, b_n}$ all buildings which are low. Now I have the following options to write this down:

  • $B^{high}$ seems to be wrong, because Tex treats each letter like it was a variable
  • $B^\mathit{high}$ maybe correct
  • $B^\text{high}$ correct if the word high is descriptive and is not part of the letter for the set (but I'm not sure if this is the case)
  • $B^\textnormal{high}$ same as above, but better if the math mode could be in a surrounding italic text or similar

For a concrete element of the set I would write $b_i \in B^high$. Would you leave both b and i in italic or should the subscript be upright?

share|improve this question

marked as duplicate by Manuel, Masroor, Malipivo, ChrisS, Andrew Swann Jul 9 at 8:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
$B^{\text{high}}$ and $B_{\text{low}}$ since both high and low provides textual context rather than math symbols. Never $B^high$ nor $B_low$ (since only the first letter will be considered a super-/subscript). –  Werner Jul 3 at 19:27
    
@Werner You are totally right, I forget to add the curly braces here, in my text I have them. So for the question one should assume that I didn't forget them. –  user2653422 Jul 3 at 19:38
    
@PaulGessler I saw that thread, but I was not sure how to handle this with sets and especially with the subscripts in my case which I think should be in italic, but I'm not sure. –  user2653422 Jul 3 at 19:51

1 Answer 1

up vote 7 down vote accepted
$B^{\mathit{high}}$ 

or

 $B^{\mathrm{high}}$ 

I'd probably use the latter.

As you noted it's possible to omit the {} around \mathit{high} but it's not a good practice it would fail with most commands, it just works with \mathit because of the slightly bizarre way that ^ works.

the \text... commands will also use script size fonts if amsmath is loaded but they will use the text fonts which may not be the same as the math fonts for roman and italic (although they are in the default computer modern setup).

share|improve this answer
    
Under this link I found a hint from egreg that \mathrm has some problems with spaces and hyphens. At the moment I use lmodern as font and I can't see any difference between the superscript typed with \text or \mathrm. So do you think for lmodern it is ok to go with \textnormal ? –  user2653422 Jul 3 at 19:48
1  
\mathrm doesn't have problems with spaces and hyphens but it sets them as math so spaces are ignored and - is a minus sign. I think it is more correct to use \mathrm (which is the font used for \log or \sin etc) worry about hyphens if you need a hyphenated math identifier. –  David Carlisle Jul 3 at 19:57
    
Thanks that is a good point. Do you also have an idea about the subscript? –  user2653422 Jul 3 at 20:01
    
@user2653422 you mean b_n ? that's fine assuming you use and define n elsewhere, that is (presumably) the variable n unlike high and low –  David Carlisle Jul 3 at 20:03
2  
@user2653422 \log and \textnormal{log} will use the same font by default but with different spacing (and \textnormal is much slower (it has to make 4 hboxes to get out of math mode, select font sizes matching the math sizes and set 4 boxes each time) but latex syntax is designed to allow you to later change the document class so using markup that will break if you ever choose a different font set seems pointless when it is longer to type and takes much longer to execute –  David Carlisle Jul 3 at 20:29

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