LaTeX Latex keeps on getting parsing errors

  • Thread starter Thread starter andrewkirk
  • Start date Start date
  • Tags Tags
    Errors Latex
AI Thread Summary
Errors in LaTeX, particularly involving parsing issues and "double subscript" messages, are a central concern in this discussion. The user experiences problems with specific LaTeX code not parsing correctly unless broken up with itex delimiters. The discussion highlights how inserting these delimiters can affect the parsing outcome, with the same strings yielding different results based on their formatting. A common issue arises when using multiple subscripts, which LaTeX interprets incorrectly. A workaround involves attaching subscripts to an empty group to avoid confusion. The user also notes that while MathJax may render some elements incorrectly, Texmaker provides clearer error messages and handles vector arrows more effectively. Overall, the conversation emphasizes the challenges of formatting complex mathematical expressions in LaTeX and the importance of understanding how to structure subscripts and delimiters to achieve the desired output.
andrewkirk
Science Advisor
Homework Helper
Insights Author
Gold Member
Messages
4,140
Reaction score
1,741
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]first once and then twice.<br /> <br /> I have put enough spaces into deactivate the vBulletin &#039;no more than 50 consecutive nonspace characters&#039; bug, but it still seems to go wrong.<br /> <br /> Any help in fixing this would be much appreciated. I have a derivation I want to post, but it&#039;s impractical with this amount of latex problems.<br /> <br /> Thanks very much.<br /> <br /> PS is there any way to get that first arrow to sit over the V rather than off to the left?
 
Physics news on Phys.org
The problem is towards the end of your LaTeX where you have
Code:
\bar{V}_S^i _S U(1)^k
And the error message from LaTeX is "double subscript". If you write
Code:
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:
A_b^c {}_d E

PS is there any way to get that first arrow to sit over the V rather than off to the left?
I think that is a MathJax problem. It looks OK in "real" LaTeX.
 
andrewkirk said:
PS is there any way to get that first arrow to sit over the V rather than off to the left?
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).
 
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.:smile:
 

Similar threads

Back
Top