LaTex Syntax-Highlighting not woking anymore

Steps to reproduce

Open a new file and type some latex math within $$ $$

Expected result

The text within the dollar signs should show up red

Actual result

The latex mode will not be recognized and the default markdown syntax highlighting is active

Environment

  • Operating system:
    MacOS (English)
    Windows (German)
    (However both with german keyboard layout)
  • Obsidian version:
    0.6.5
  • Using custom CSS:

Additional information

Tried it on three different machines, even one with freshly installed obsidian and new, empty vault.

image

2 Likes

Same problems here, inline LaTeX works now, display mode no longer highlights syntax in edit mode.

Operating System: Ubuntu 18.04.4 LTS
Obsidian Version: 0.6.5
German Keyboard as well but English operating system

1 Like

currently, the syntax for block latex in edit mode is $$math$$

we will fix that in a future release.

Steps to reproduce

Suppose $f$ is convex.
$$
f(y) \leq f(x) + \nabla f(x)^T (y - x) + \frac{\beta}{2} \| y - x \|^2 \Longleftrightarrow \|\nabla f(y) - \nabla f(x)\| \leq \beta \|y - x\|
$$

The above code does not show correctly.

Environment

  • Operating system: Mac OSX 10.15.5
  • Obsidian version: v0.6.5
  • Using custom CSS: No
1 Like

See ā€œFormat your notesā€ in help.

Related to: LaTeX math displayed incorrectly

Question on that note then. Will the current block method (i.e $$math$$) be preserved or will it be fully changed to:

$$
math
$$

It would be helpful to know the ā€˜properā€™ way to format my block math environments moving forward.

Thanks!

It will be preserved

1 Like

Hi, sorry if Iā€™m not understanding correctly. Iā€™m currently getting an issue where inline math is working as expected, but display math is showing up as if it were inline, so when I put

$$\mathbb{C}^*=\mathbb{C} \setminus {0} = {z \in \mathbb{C} | z \neq 0 }$$

it actually shows up in preview mode as

$\mathbb{C}^*=\mathbb{C} \setminus {0} = {z \in \mathbb{C} | z \neq 0 }$

with the latex rendered correctly, but inline, and with the two dollar signs, so it clearly thinks what I wrote was some inline math that started and ended in dollar signs, instead of some display math.

Any help would be appreciated and thanks for making Obsidian so awesome!

Add an empty line before the block formula.

1 Like

Perfect, thank you!

Fixed in 0.7.2

@WhiteNoise This issue is still persistant in 0.7.3. Withouting adding an additional black line before the formula, the rendering doesnā€™t work.

The blank line before block math is a different bug than the one in this thread.