outline icon indicating copy to clipboard operation
outline copied to clipboard

Some LaTeX content causes page to hang

Open xbzxsh opened this issue 7 months ago • 9 comments
trafficstars

Is there an existing issue for this?

  • [x] I have searched the existing issues

This is not related to configuring Outline

  • [x] The issue is not related to self-hosting config

Current Behavior

When writing LaTeX formulas, I wanted to align the equations and searched online for solutions. Some answers suggested using the aligned environment and provided example code:

\begin{ equation} \begin{ aligned} ...... \end{ aligned} \end{ equation}

After copying this code into Outliners' LaTeX module, it didn't work. Even worse, the entire document now fails to open - though I can still see it in the version history. I tried using the restore function without success. Screenshots of the document's current state and version history are attached below.

i am using outline self-hosted docker version 0.83.0

Image Image

Expected Behavior

i expect the document can display correctly, even if the latex command is not supported.

Steps To Reproduce

No response

Environment

- Outline: 0.83.0
- Browser: chrome 135.0.7049.96

Anything else?

log file

outline-20250424175204.log

xbzxsh avatar Apr 24 '25 09:04 xbzxsh

There is some bug with the math module and this specific syntax that puts it in an infinite loop

tommoor avatar Apr 25 '25 03:04 tommoor

I tried it, and it’s working fine for me. Here are a few things to check on your end:

Rendering Settings: Check if the LaTeX rendering settings are correct.

Encoding: Verify the document encoding (UTF-8).

LaTeX Syntax: Double-check your LaTeX code for small errors.

Image

skander2904 avatar Apr 27 '25 21:04 skander2904

I already reproduced the issue with the provided LaTeX in the repo, it's valid.

tommoor avatar Apr 28 '25 00:04 tommoor

I tried it, and it’s working fine for me. Here are a few things to check on your end:

Rendering Settings: Check if the LaTeX rendering settings are correct.

Encoding: Verify the document encoding (UTF-8).

LaTeX Syntax: Double-check your LaTeX code for small errors.

Image

5a6e5pon (1).zip

here submit the document in which the problem happened, exported as Markdown. The original file can not display after archiving (see screenshot).

Image

xbzxsh avatar Apr 28 '25 01:04 xbzxsh

Hi, I’m also experiencing this issue . When I use LaTeX code with the equation and aligned environments in a math block, the document hangs and becomes inaccessible after saving. I tried restoring from version history without success. This seems to happen especially when multiple such math blocks are present.

Mariemlahmar avatar May 13 '25 14:05 Mariemlahmar

What are aligned environments?

tommoor avatar May 13 '25 15:05 tommoor

Hi , The aligned environment in LaTeX is used to align multiple lines of equations vertically, usually at the equals signs. It’s typically placed inside another math environment like equation to format multi-line equations neatly.

For example, this LaTeX code aligns two simple equations:

\begin{equation} \begin{aligned} x + y &= 5 \ x - y &= 1 \end{aligned} \end{equation}

Using this environment in Outline’s math blocks currently causes the document to hang, which is the issue we’re discussing here.

Image

Mariemlahmar avatar May 13 '25 16:05 Mariemlahmar

I can't reproduce it anymore weirdly – try v0.84.0. The math library was updated, though it didn't claim to have any fixes for this

tommoor avatar May 14 '25 04:05 tommoor

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar Sep 12 '25 02:09 github-actions[bot]

Automatically closed due to inactivity

github-actions[bot] avatar Sep 17 '25 02:09 github-actions[bot]