Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Latex keeps on getting parsing errors

  1. Jul 24, 2012 #1

    andrewkirk

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

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

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

    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.

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

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

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

    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. jcsd
  3. Jul 24, 2012 #2

    AlephZero

    User Avatar
    Science Advisor
    Homework Helper

    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.
     
  4. Jul 24, 2012 #3

    DrGreg

    User Avatar
    Science Advisor
    Gold Member

    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).
     
  5. Jul 24, 2012 #4

    andrewkirk

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    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:
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Latex keeps on getting parsing errors
  1. Latex getting garbled (Replies: 5)

Loading...