Export pdf misformats bullets & latex

Steps to reproduce

  • enter restricted mode in any vault
  • write the following file:
## part d
- evaluate $\pi$ analytically using $N = 10, \beta = \gamma = 0.5, \delta = 1$:
	- compute $B$:
		$$
		B = \sum_{n = 1}^N b_n
			= \sum_{n = 1}^N \phi_n S_n
			= 2 \sum_{n = 1}^{10} \sum_{j = 1}^n {10 \choose n} \frac1{j}
			= \frac{1442426}{315} \approx 4579.13
		$$
	- compute $\pi_n$:
		$$
		\begin{align}
		\pi_n
			&= C a_n - J b_n \\
			&= C a_n - \left(\delta \frac{C a_N}{1 - \delta b_N}\right) b_n \\
			&= C \left(a_n - \delta \frac{a_N}{1 - \delta b_N} b_n\right) \\
			&= \frac
				{a_n - \delta \frac{a_N}{1 - \delta b_N} b_n}
				{A - \delta \frac{a_N}{1 - \delta b_N} B}
				\\
			&= \frac
				{a_n (1 - \delta b_N) - \delta a_N b_n}
				{A (1 - \delta b_N) - \delta a_N B}
				\\
			&\approx \frac
				{{10 \choose n} (1 - (1) (5.85794)) - (1) (1) \left(2 {10 \choose n} \sum_{j = 1}^n \frac1{j}\right)}
				{(1024) (1 - (1) (5.85794)) - (1) (1) (4579.13)}
				\\
		\end{align}
		$$
$$
\begin{align}
\Rightarrow \pi
	\approx [
		&0.0017191,
		-0.046895,
		-1.364593,
		-10.30395,
		-32.16308,
		-46.72448, \\
		&-32.61169,
		-10.67016,
		-1.488189,
		-0.067240,
		0.0002339,
	]

\end{align}
$$
...that's not right T-T

TODO code
# problem 4
## part a
- show irreducibility:
	- all states are connected in a ring
	- -> can get from any one state to any other state by following connections around the ring
	- -> there is some non-zero probability $p \geq \frac1{2^k} > 0$ of moving from any $i$ to any $j$ after $k_+ := j - i \mod N$ steps upwards, or $k_- := N - (j - i \mod N)$ steps downwards
	- -> $\forall i, j: i \to j$
	- -> $P$ is irreducible
- show aperiodicity:
	- $P_{1, 1} = \delta > 0$
	- -> state $1$ maps to itself
	- -> $T_i = \gcd\{1, ...\} = 1$
	- -> period of $P$ is $1$
	- -> $P$ is aperiodic
- find stationary distribution via detailed balance:
	- for $i \notin \{0, N\}$:
		$$
		\begin{align}
		\pi_i P_{i, i+1} &= \pi_{i+1} P_{i+1, i} \\
		\to \frac12 \pi_{i} &= \frac12 \pi_{i+1} \\
		\to \pi_{i} &= \pi_{i+1} \\
		\end{align}
		$$
	- for $i = 0$:
		$$
		\begin{align}
		\pi_0 P_{0, 1} &= \pi_{1} P_{1, 0} \\
		\to \frac12 (1 - \delta) \pi_0 &= \frac12 \pi_{1} \\
		\to \pi_1 &= (1 - \delta) \pi_0 \\
		\end{align}
		$$
	- for $i = N$: same as $i = 0$:
		$$
		\to \pi_N = (1 - \delta) \pi_0
		$$
	- normalize:
		$$
		\begin{align}
		1 = \sum_{n = 1}^N \pi_n
			&= \pi_0 (1 + (1 - \delta) (N-1)) \\
			&= \pi_0 (N - \delta(N - 1)) \\
		\end{align}
		$$
$$
\begin{align}
\to \pi_0
	&= \frac1{N - \delta(N - 1)} \\
\to \forall i \neq 0,
	\pi_i &= \frac{1 - \delta}{N - \delta(N - 1)}
	\\
\end{align}
$$

  • generate a pdf of the above text with the “Export PDF” tool
  • view the pdf

Did you follow the troubleshooting guide? YES

Expected result

the pdf should render correctly, identically to how it’s rendered in write mode:

  • all bullets should look correct
  • all latex blocks should be correctly rendered.
  • no part of the file is rendered as a literal text code block (since that isn’t used in this file)

Actual result

  • none of the second-indentation bullets in the first header “part d” aren’t rendered correctly
  • the last latex block in “part d” gives error text
  • everything below the latex error is shown as a literal code text block

Environment

SYSTEM INFO:
Obsidian version: v1.9.14
Installer version: v1.8.7
Operating system: Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:34 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T8103 24.6.0
Login status: not logged in
Language: en
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

a screenshot of the bug:

  • bug workaround: if you add a newline before the offending latex block (i.e., between lines 30 and 31), the rendering bug goes away

This has nothing to do with print, the same happens in reading view. It’s another (more complex) manifestation of

Also, please note that, according to markdown, you must add blank line at the end of the list to begin a new paragraph. So your workaround is not a workaround, is what you should actually do.

if this is intended behavior, then the bug is in editing view: all three views (reading, editing, pdf export) should be consistent.

I don’t care much for what the rules are exactly, but when I try to export a pdf when in editing view, I expect it to look the same. the difference in behavior is unexpected and (in my case, trying to submit homework before a deadline) detrimental.

In general, I agree you that they should be the same.
However, there are some intrinsic limitations on how live previews works by virtue of being still bases on a plain text editor.

On top of this, here there is a bug in reading view, that I linked.