LaTex in Lyx differs from LaTex on forum?


by Stephen Tashi
Tags: differs, latex
Stephen Tashi
Stephen Tashi is offline
#1
Jun3-11, 09:48 AM
Sci Advisor
P: 3,175
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.)
Phys.Org News Partner Science news on Phys.org
SensaBubble: It's a bubble, but not as we know it (w/ video)
The hemihelix: Scientists discover a new shape using rubber bands (w/ video)
Microbes provide insights into evolution of human language
Mark44
Mark44 is online now
#2
Jun3-11, 01:06 PM
Mentor
P: 21,069
Quote Quote by Stephen Tashi View Post
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
Stephen Tashi
Stephen Tashi is offline
#3
Jun3-11, 01:11 PM
Sci Advisor
P: 3,175
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.

AlephZero
AlephZero is offline
#4
Jun3-11, 06:42 PM
Engineering
Sci Advisor
HW Helper
Thanks
P: 6,386

LaTex in Lyx differs from LaTex on forum?


Quote Quote by Stephen Tashi View Post
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).
Stephen Tashi
Stephen Tashi is offline
#5
Jun3-11, 08:19 PM
Sci Advisor
P: 3,175
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.


Register to reply

Related Discussions
why latex of this forum is horrible Forum Feedback & Announcements 2
How to use Latex in this Forum Calculus & Beyond Homework 1
What kind of LaTex is this forum using? Forum Feedback & Announcements 1
How to use Latex on a forum Math & Science Software 5
Which forum to test LaTeX? Forum Feedback & Announcements 3