On 8/15/25 6:30 PM, Enrico Forestieri wrote:
On Fri, Aug 15, 2025 at 12:44:30PM -0400, Richard Kimberly Heck wrote:
The attached file, which was posted at lyx-users, does not compile. The problem is the blank line between the two displayed formulas. This causes LyX to output

\textcolor{red}{
\[
I=\int^{\infty}_{-\infty}\frac{1}{1+x^{2}}dx
\]

\[
I=\pi
\]
}

which LaTeX does not like. The workaround is to put a protected space on the blank line, in which case you get:


\textcolor{red}{
\[
I=\int^{\infty}_{-\infty}\frac{1}{1+x^{2}}dx
\]
\
\[
I=\pi
\]
}

Even putting a comment on that line works.

I guess maybe that is a LaTeX bug then?

No, it isn't. \textcolor typesets single paragraphs and LyX knows that. Indeed, you can see that the whole LaTeX source is as follows:

\textcolor{red}{Colored formulas.}

\textcolor{red}{
\[
I=\int^{\infty}_{-\infty}\frac{1}{1+x^{2}}dx
\]

\[
I=\pi
\]
}

So, this is a LyX bug not accounting for the fact that the two formulas are on two different paragraphs.

Right. Should I file a bug?

Riki



--
lyx-devel mailing list
lyx-devel@lists.lyx.org
https://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to