LaTex in Lyx differs from LaTex on forum?

  • Context: LaTeX 
  • Thread starter Thread starter Stephen Tashi
  • Start date Start date
  • Tags Tags
    Forum Latex
Click For Summary

Discussion Overview

The discussion revolves around the differences in how LaTeX is rendered in the LyX editor compared to the LaTeX processor used by the forum. Participants explore issues related to formatting, particularly with integral expressions, and the potential reasons for discrepancies in display.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • Some participants note that the LaTeX expression \int_a^b f(x) is displayed correctly on the forum, while in LyX, it appears as an integral with the lower limit a^b.
  • One participant suggests that the LyX processor may require braces around limits, proposing the format \int_{a}^{b} f(x) dx for clarity.
  • Another participant mentions that the LyX processor is sensitive to spaces, indicating that inserting a space between 'a' and '^' changes the interpretation of the expression.
  • A later reply asserts that \int_a^b is valid LaTeX and questions whether the issue is a misunderstanding of LyX usage, suggesting that spaces in math expressions should generally be ignored.
  • One participant observes that the page source shows the LaTeX as $\int_{a}^{b}f(x)$, implying that the spacebar behavior is specific to LyX.

Areas of Agreement / Disagreement

Participants express differing views on whether the behavior observed in LyX is a bug or a misunderstanding of its usage. There is no consensus on the correct interpretation of the LaTeX formatting in LyX versus the forum.

Contextual Notes

Limitations include the potential for misunderstanding how LyX processes LaTeX, as well as the specific formatting requirements that may differ between the two platforms.

Stephen Tashi
Science Advisor
Homework Helper
Education Advisor
Messages
7,864
Reaction score
1,605
Are there supposed to be significant differences in how LaTex is displayed in the Lyx editor and how LaTex is displayed by the processor used by this forum?

On this forum, the LaTex expression \int_a^b f(x) dx shows an integral with lower limit a and upper limit b. When I ( as a novice user) type this expression into Lyx, I get an integral with the lower limit a^b.

(I prefer the way the LaTex processor on this forum does it.)
 
Physics news on Phys.org
Stephen Tashi said:
Are there supposed to be significant differences in how LaTex is displayed in the Lyx editor and how LaTex is displayed by the processor used by this forum?

On this forum, the LaTex expression \int_a^b f(x) dx shows an integral with lower limit a and upper limit b. When I ( as a novice user) type this expression into Lyx, I get an integral with the lower limit a^b.

(I prefer the way the LaTex processor on this forum does it.)
I don't know this for sure, but it might be that the Lyx processor is more picky than the one here. It could be that you need to use braces around each of the limits, like this:
\int_{a}^{b} f(x) dx

The LaTeX processor in use here requires braces when the limits contain more than one character, so if the lower limit happened to be -a and the upper limit were 2b, you would have to include braces, like so:
\int_{-a}^{2b} f(x) dx
 
By experimentation, I determined that the Lyx processor is very particular about the use of the spacebar key. If I type \int_a ^b (with a space between 'a' and '^') then I get b as the upper limit of integration.
 
Stephen Tashi said:
By experimentation, I determined that the Lyx processor is very particular about the use of the spacebar key. If I type \int_a ^b (with a space between 'a' and '^') then I get b as the upper limit of integration.

\int_a^b is valid LaTex defining the lower limit a and upper limit b. Interpreting it as \int_{a^b} is just wrong.

I don't use Lyx, but this seems such a fundamental "bug", if it really is a bug, that I wonder if you are misunderstanding how to use Lyx properly.

Spaces in math expressions should be ignored, except to delimit a macro name followed by a letter (i.e. you have to write \sin x not \sinx, but you can write \sin90, \sin 90, or even \sin 9 0, and all three should give identical output).
 
When I view the page source, the LaTex that is actually there is:
$\int_{a}^{b}f(x)$
so I think the behavior of the spacebar key is peculiar to Lyx.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
13K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K