When I write {{\tilde{C}}^{0}_{har}}^{\Gamma} (or the same with fewer curly brackets) in Tex I obtain a double superscript error and I can't solve it. Does someone know how to fix this?

  • 3
    Great question - I'd never have expected this code to result in a double superscript error! – Hendrik Vogt Jun 27 '12 at 11:09

If you want the \Gamma at the same height as 0 in the exponent, but not next to 0, then use


enter image description here

The {} creates a new base for super-/subscripts that is separate from the first. If you want to place the \Gamma next to 0, then you have to combine the superscript (say) in the following way


enter image description here

If you want \Gamma to be a superscript of the entire preceding structure, then use


enter image description here

which will place the structure in a (text) box and allow superscripting. I prefer option 2 since options 1 & 3 has \Gamma practically in "the middle of nowhere." Note that I've used \text{...} to write har. This is by virtue of amsmath.

| improve this answer | |
  • 1
    As your first case, we can use \tilde{C}^{0}_{\text{har}}{}^{\Gamma}, maybe it's simple. – Pig Cry Oct 26 '11 at 1:55
  • @PigCry: You're right - it doesn't warrant going through all the "trouble" in this case. – Werner Oct 26 '11 at 2:10
  • Thank you so much, option 1 solves a lot of my problems. – abenthy Dec 7 '13 at 9:16

(The purpose of this answer is to summarize the different aspects in the existing answers and to expand on egreg's explanation.)

You've encountered some really curious aspect of the TeX engine here! My short answer: follow Mico's and Boris' advice and use parentheses around \tilde{C}^{0}_{\text{har}}; this is the way to go.

As egreg said in his answer, the culprit of your trouble is the \tilde. In the TeXbook, grouping with {...} in math mode is explained on page 291 (Summary of Math Mode). For the following recall that { is a token of category 1:

A character token of category 1 [...] causes TeX to start a new level of grouping and also to begin work on a new math list. When such a group ends—with ‘}’—TeX uses the resulting math list as the nucleus of a new Ord atom that is appended to the current list. If the resulting math list is a single Acc atom, however (i.e., an accented quantity), that atom itself is appended.

This means that surrounding \tilde{C}^{0}_{\text{har}} by braces has no effect! For this one also has to know that the sub- and superscripts are added to the Acc atom \tilde{C}, making the whole thing with sub- and superscript a single Acc atom. (This is explained at the bottom of page 291.) The result is the double superscript error you encountered.

Apparently Knuth didn't see any need for the extra grouping you're trying to use here. The error message might be his way of telling you "Don't do this!"

The above explanation also shows the easiest way out of the trouble (if you really want to do it without parentheses, which I strongly advise against). Just make sure that the thing you put into the braces is not "a single Acc atom". For example, with


you'll get the output output; already the empty math list {} does the trick. Of course this looks a lot more like magic than Werner's good advice to use \mbox{$...$}. (One might see as an advantage of the {} trick that you don't have to re-enter math mode inside an \mbox.)

| improve this answer | |

The tilde is a problem. The inputs


will give a "Double superscript" error also in Plain TeX, while


won't. This is due to how TeX deals with "Accent" atoms. However, as Mico remarks, a notation like this is ambiguous and should be managed in a different way than trying to have a superscript hanging from nowhere.

| improve this answer | |

Your example code is a bit ambiguous as to what you want to achieve: do you want the \Gamma to be a superscript to 0 or to har? Alternatively, should the \Gamma symbol be a superscript relative to the entire preceding formula? The following code illustrates the differences between the three possibilities; note that I'm loading the amsmath package to get the \text command, and I'm using a \widetilde rather than a \tilde above the uppercase-C:

$\widetilde{C}^0_{\text{har}^\Gamma}$, or
$\bigl( \widetilde{C}^0_\text{har} \bigr)^{\Gamma}$ ?

enter image description here

| improve this answer | |
  • 3
    I do not see how the code is ambiguous. I'd say it's clear that the \Gamma is supposed to be a superscript relative to the entire preceding formula - as the surrounding braces of that formula show. But the (expected) output is indeed ambiguous. Is that what you mean? (By the way, putting parentheses is the way to go!) – Hendrik Vogt Jun 27 '12 at 13:13
  • @HendrikVogt -- I suppose that what may be clear and unambiguous to one person needn't be as clear to another person. I'm glad, though, that you agree with me that using parentheses is the way to go. :-) – Mico Jun 27 '12 at 13:30

Tilde is not a problem. Using both 0 and \Gamma as superscripts is.

I would suggest the following: $\left({\tilde{C}}^{0}_{har}\right)^{\Gamma}$

| improve this answer | |
  • 3
    The first line of your answer is not correct, as egreg explained. – Hendrik Vogt Jun 27 '12 at 13:03

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.