Math Latex symbols not rendered/invisible at some zoom level

At some zoom level, some subscript/superscript or underline/overline are invisible.
This is known upstream bug of mathjax, likely to be an upstream bug in the browser.

3 Likes

Steps to reproduce

  1. Just type $\sqrt[n]{x}$ in your Obsidian note

Expected result

It should render the index as well as the radicand

Actual result

It does not render the index

Environment

  • Operating system: macOS Monterey (12.2)
  • Debug info:

Additional information

What I typed:
Screen Shot 2022-02-21 at 23.27.14

Rendered result:
Screen Shot 2022-02-21 at 23.27.43

Same input and result in Notion:

works for me. post a screen recording of this happening in the help vault.

Thanks for quick response!

I found a interesting bug. Index is not rendered on specific zoom setting.

Feb-21-2022 23-44-55
1122

Also, when scrollbar appears, the index go away from the note.

Feb-21-2022 23-50-46

Steps to reproduce

  • write LaTeX with \overline like
    \frac{1}{T}\int_0^T{\overline{f\left( t \right) e^{-ik\omega t}}dt}
    or
    \overline{c_k}

Expected result

Every thing properly rendered, including overline:
Snipaste_2020-11-12_15-12-51

Actual result

The overline is rendered but in light gray, both for light and dark mode, which makes it hardly visible.
Snipaste_2020-11-12_15-21-16
Snipaste_2020-11-12_15-21-43

Environment

  • Operating system: Windows 10
  • Obsidian version: v0.9.11 (Installer version v0.8.12)

Additional information

  • custon CSS and Third-party plugin already disabled.

Sadly I also can’t find an alternative way to write this formular with conjugation. “\bar” has only width of 1 character.

This is a resolution problem that mathjax has. If you zoom in or out you will see it better. Nothing we can do about it.

Is it stated somewhere that Obsidian is using MathJax instead of LaTeX?
I see a lot of requests/remarks passing by of people who try to force Obsidian into doing LaTeX stuff (especially when it comes to formulas) which doesn’t work with the LaTeX examples you find on the web.
Again logical because Obsidian uses MathJax of which everything is supported you find on the web :wink:

It’s been stated in the Discord a few times.

LaTeX is a typesetting system used in academia. Mathjax is an emulator for the web of SOME parts of latex (specifically the ones related to expressing math, and not all of them).

1 Like

I spend seldomly time at Discord…
Guess I am not the only one :wink:

Well thanks a lot, I have the screen of 1920x1080 with 125% zoom in. Both 100% and 150% makes the resolution better.

Steps to reproduce

just input a math equation contains \underbrace, it will reproduce this problem

Expected result

Actual result

image

Environment

  • Operating system: windows 7
  • Obsidian version: 0.8.4

Additional information

I can’t reproduce this. I don’t think it’s just a matter of adding underbrace.

Did you try tweeking mathjax by using the mathjax context menu (right click on the formula?) . If you did it, this may bring mathjax in an error state. We disabled it in 0.8.8.

This may also be a font\resolution problem. Is your screen resolution very low or very high? Did you zoom in or zoom out too much?

It is the zooming problem. I enlarge the text a little bit, it works well.

Thanks.

It only happens for me when the equation is at the start of a sentence, or in your case when there is no sentence. I must say that I never ran into this issue, because I never used an inline equation at the very start of a sentence.

If you want to use an standalone equation (without text around it) you should use the double $$ to show it in display mode instead of inline mode.

Steps to reproduce

Copy the following content into the OB file, and then see the display effect.

$$
\Large 
\underbrace{a+b\cdots+z}_{26}
$$



$$
\Large 
\underline{1+2}
$$




$$
\Large 
\overline{1+2}
$$

Expected result

Normal display effect:

image

Actual result

image

Environment

Obsidian: 0.15.9
System: Window11 Beta 22622.586


I thought it was a thematic influence, but after trying it out in a brand new warehouse, I found it wasn’t.

As previously mentioned, this is a known issue with mathjax.
For reference see here and here.

There were several workarounds mentioned in the first thread, which did not really help in my case.

However, I was able to modify one of the workarounds slightly. The result is not especially beautiful for more complex shapes like e.g. underbrace, but it gets the job done.

I simply increased font-weight by pasting the following into a custom .css file:

mjx-stretchy-h > mjx-ext {
  font-weight: 600
}

(This might be particularly interesting for you @DylanJVA)

3 Likes

This reply on the mathjax bug report claims that this is a browser issue rather than a mathjax issue. As such, would this issue not also be an obsidian issue that requires attention?

The Problem

Hard to tell what you would have to do to reproduce this. For some font sizes some brackets in LaTeX equations are missing parts. Either a horizontal bar or vertical one. It’s usually all fine with very small or very big font sizes. Also underbrace and the matrix don’t have to show that problem at the same font sizes.

image image

It started out of nothing. And its only a problem on my laptop.

Environment

Windows 11 on a Laptop with v1.1.16

1 Like

Have you considered using KaTeX instead of Mathjax, dev team?

1 Like