Rendering breaks part way through in exported PDF

When exporting a file with a large number of LaTeX expressions

Steps to reproduce

Create a large note with a large number of LaTeX expressions, some back to back.
Export the note to a PDF file.

Did you follow the troubleshooting guide? [Y/N]

Yes

Expected result

A PDF file with all LaTeX rendered properly and all non-LaTeX text displayed properly.

Actual result

Part way through, the LaTeX code starts to be rendered as regular text and the regular text is rendered as if it is

Environment

SYSTEM INFO:
Obsidian version: v1.11.5
Installer version: v1.5.12
Operating system: Windows 10 Home 10.0.26100
Login status: logged in
Language: en
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: dark
Community theme: Obsidianite v2.0.2
Snippets enabled: 0
Restricted mode: off
Plugins installed: 2
Plugins enabled: 1
1: Excalidraw v2.8.0
RECOMMENDATIONS:
Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.


Additional information

Happened on two different computers.

How does that note look in Reading view? If it’s broken there, it will be in the PDF as well.

I’d paste a minimal example here in a code block or attach the note (the .md file) where it’s happening so others can have a look.

Also →

your installer is quite old. I’d update that to a newer version. It doesn’t need to be the latest but v1.5.12 is from Apr 1, 2024.

It looks normal in reading view. That’s why I’m surprised the PDF doesn’t look the same.

Yeah, go ahead drop the file in here or link to it (if there’s no private info) so others can test it out.

Stat 115 - Intro to Probability Theory 1.md (57.7 KB)

It’s broken in Reading view so will be in the PDF as well. The first break, where it starts to go wrong anyway, looks like line 382:

$$Ex.

That Ex. should be on its own line.

source mode | reading view

Oh, sorry I misunderstood. I’m not sure why it goes wrong there since I’ve made notes with back to back LaTeX environments before without this issue.

Ok, so after fixing that one line, the rest of Reading view and PDF export looks alright on my end.

Going to move this to help.

Thank you for the help. Adding a linebreak seems to have fixed it on my end too. Not sure why it was necessary for that line though.

1 Like

I rarely use and know only a little of MathJax myself, but I’ve seen this mentioned multiple times:

(click through to see the proper spacing). Something to keep in mind, and always have a peek in Reading view. You can generally sort out where things “break” looking there.

Because MathJax is embedded in markdown. Obsidian is a markdown editor, after all.