LaTex in Lyx differs from LaTex on forum?

  • LaTeX
  • Thread starter Stephen Tashi
  • Start date
  • Tags
    Forum Latex
In summary, the LaTeX processor used on this forum is more picky than the Lyx processor used on this website. The spacebar key is important in Lyx, but it is not important in LaTeX.
  • #1
Stephen Tashi
Science Advisor
7,861
1,598
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
  • #2
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
 
  • #3
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.
 
  • #4
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).
 
  • #5
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.
 

1. What is LaTex and how is it used in Lyx?

LaTex is a typesetting language commonly used for creating scientific and technical documents. It is used in Lyx as a document preparation system, allowing users to easily format and structure their documents without having to write complex code.

2. How does LaTex in Lyx differ from LaTex used on forums?

LaTex in Lyx is a user-friendly interface that generates LaTex code in the background, while LaTex used on forums requires users to manually write and format the code themselves. Lyx also offers a wider range of formatting options and templates compared to forums.

3. Can LaTex code written in Lyx be used on forums?

Yes, LaTex code written in Lyx can be used on forums. Users can simply copy and paste the LaTex code generated by Lyx into the forum post or document.

4. Are there any limitations to using LaTex in Lyx?

While Lyx offers a more user-friendly approach to writing LaTex code, it may have limitations when it comes to more complex formatting or customizations. In these cases, it may be necessary to write the LaTex code directly in a forum or use a specialized LaTex editor.

5. Is there a learning curve to using LaTex in Lyx?

As with any new software or language, there may be a learning curve when first using LaTex in Lyx. However, Lyx offers a comprehensive user manual and many online resources to help users become familiar with the interface and its capabilities.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
881
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
222
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
12K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
3K
Back
Top