# Latex keeps on getting parsing errors

1. Jul 24, 2012

### andrewkirk

I keep on getting errors from Latex. For instance the following code looks OK to me but won't parse:

$g(\vec{\bar{V}}_S, \vec{U}(1)) =\ _Sg_{ik}(O) _S\bar{V}_S^i _SU(1)^k$

However if I break it with the insertion of a close and then an open itex delimiter, the first bit parses but the second won't.

$g(\vec{\bar{V}}_S, \vec{U}(1)) =$$\ _Sg_{ik}(O) _S\bar{V}_S^i _SU(1)^k$

Now if I break it yet again, it all parses OK.

$g(\vec{\bar{V}}_S, \vec{U}(1)) =$$\ _Sg_{ik}(O)$$_S\bar{V}_S^i$$_SU(1)^k$

The three strings are identical, except for the insertion of [/itex][itex] first once and then twice.

I have put enough spaces in to deactivate the vBulletin 'no more than 50 consecutive nonspace characters' bug, but it still seems to go wrong.

Any help in fixing this would be much appreciated. I have a derivation I want to post, but it's impractical with this amount of latex problems.

Thanks very much.

PS is there any way to get that first arrow to sit over the V rather than off to the left?

2. Jul 24, 2012

### AlephZero

The problem is towards the end of your LaTeX where you have
Code (Text):

\bar{V}_S^i _S U(1)^k

And the error message from LaTeX is "double subscript". If you write
Code (Text):

A_b^c_d E

LaTeX thinks the "b" and "d" are both subscripts applied to "A".

One way to get round this is attach subscripts to an empty group, for example
Code (Text):

A_b^c {}_d E

I think that is a MathJax problem. It looks OK in "real" LaTeX.

3. Jul 24, 2012

### DrGreg

For what it's worth, I had the same problem viewing the message on someone else's computer earlier today (IE8 on XP) but I see no problem now on my own computer (FF10 or IE9 on Vista, all MathJax renderers tried).

4. Jul 24, 2012

### andrewkirk

Thanks for the replies. I presume MathJax is the TeX rendering engine for this site.
I tried the empty group suggestion and it worked, after I put in a few extra spaces "\ ", without which it also seemed to get upset.

I downloaded Texmaker and experimented with that and had a lot of intermittent 'double subscript' errors there too, but at least that was user-friendly enough to give an error message saying 'double subscript'.

When working with tensors there's sometimes no easy way to avoid using pre-subscripts (I use them to denote different coordinate systems) so it's good to know how to make it handle them correctly.

PS Texmaker seems to put my vector arrows in the right place.