Latex keeps on getting parsing errors

  • Context: LaTeX 
  • Thread starter Thread starter andrewkirk
  • Start date Start date
  • Tags Tags
    Errors Latex
Click For Summary

Discussion Overview

The discussion revolves around issues encountered while using LaTeX for typesetting mathematical expressions, specifically focusing on parsing errors and rendering problems in the context of a forum post. Participants explore solutions to these errors and discuss the behavior of different LaTeX rendering engines.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant reports persistent parsing errors in LaTeX code, despite the code appearing correct, and seeks assistance in resolving these issues.
  • Another participant identifies a potential cause of the error as a "double subscript" issue in the LaTeX code, suggesting a workaround involving empty groups to avoid this problem.
  • A later reply confirms that the workaround was successful after adding extra spaces, indicating that the rendering engine may have specific requirements.
  • Participants discuss the placement of vector arrows in LaTeX, noting that rendering may differ across various systems and browsers.
  • One participant mentions experimenting with Texmaker and encountering similar errors, but appreciates its user-friendly error messages.
  • There is an acknowledgment that using pre-subscripts in tensor notation can complicate LaTeX usage, and participants share insights on managing these challenges.

Areas of Agreement / Disagreement

Participants generally agree on the existence of parsing issues and the effectiveness of certain workarounds, but there are differing experiences regarding rendering consistency across different platforms and LaTeX environments.

Contextual Notes

Limitations include the potential for varying interpretations of LaTeX syntax, the influence of different rendering engines, and the complexity of mathematical notation that may lead to errors.

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:

[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.<br /> <br /> I have put enough spaces into deactivate the vBulletin 'no more than 50 consecutive nonspace characters' 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'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?[/itex]
 
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

  • · Replies 3 ·
Replies
3
Views
2K
Replies
12
Views
2K
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 10 ·
Replies
10
Views
17K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
7
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 13 ·
Replies
13
Views
6K