In LaTeX, the bar in fractions periodically disappears

Steps to reproduce

Create a bunch of bullet points, all with fractions displayed in LaTeX, e.g.

  • $$\frac34$$
  • $$\frac34$$
  • $$\frac34$$
  • $$\frac34$$
  • $$\frac34$$
  • $$\frac34$$
  • $$\frac34$$
  • $$\frac34$$

Expected result

Each fraction displays the same way, 3 over a bar, 4 under the bar.

Actual Result

Sometimes the bar disappears, e.g.

image

Environment

Chrome, Windows 10.

I do not see the same problem in the Windows app.

Hereā€™s the Windows app (1.0.54):
image

1 Like

I tried a few times and canā€™t repro. Do you know approximate how often this issue happens, like 1 in 10 times or 1 in 5?

It could be that the newer versions of Chrome broke KaTeXā€™s layout. Iā€™ll check their GitHub issues and see if others are having the same issue.

It sort of follows a pattern.

If I do

-$$\frac12$$
-$$\frac12$$
-$$\frac12$$

etc.

then line 1, 5, 6, 10, 11, 15, 16, 20, 21, etc. all have the bar disappear.

However, the pattern changes a bit when I change the levels of indent or the content of the fraction.

Approximately 1 in 5 lines is about right. It doesnā€™t have to be a bunch of fractions. I can type one fraction, move the cursor above it, and repeatedly hit enter to add blank lines. The bar in the fraction will periodically disappear and then come back as it gets pushed down the screen.

Here is a video of this happening:

Thanks for the video!

Followed the steps but still canā€™t repro it. I tried having 20 1/2 fractions or pressing Enter before it as whatā€™s shown in the video.

Iā€™m running Chrome 64 on Windows 10. Is that the same as yours?

Yes,

Windows 10 Pro
Chrome Version 64.0.3282.186 (Official Build) (64-bit)

I canā€™t repro though. Any chance itā€™s because of some browser extension? :thinking:

I can confirm this bug. It appears only on Chrome. Iā€™ve tested it on Ubuntu and Mac, both times Chrome Version 64.0.3282.186 (Official Build) (64-bit), without any special extensions.

Firefox and standalone Dynalist app display it perfectly fine.

Iā€™ve set up a test document here:
https://dynalist.io/d/NeEwVRR3_AVffM6ZcdUN0vBH

This is how it looks with my account logged in:

And this is how it looks with incognito-mode or not signed-in Chrome:

Funnily, the fraction bars appear and disappear depending on where the focus of the cursor is. For this iā€™ve made a copy of the document above and made it editable via link for testing without being logged in.
https://dynalist.io/d/hdduNYdqzckP7rKViE-MJN3S

I hope you can see this in both documents on your system.

1 Like

It might be interesting for those interested to see if the behavior varies as a function of the browser zoom level. Iā€™ve noted a similar loss of thin horizontal lines in various pdf viewers over the years and zooming in provided an higher resolution rendering that made the lines ā€œappearā€.

In the context of Dynalist, I personally had to increase the height of Powerpack separators to ā€œ2ā€ so that my separators would be consistently rendered in Chrome at all zoom levels I use. Unfortunately with LaTeX a similar option doesnā€™t really exist so Iā€™m not sure how the problem might be addressed here.

1 Like

Great point, BryanN. I have my browser set to 90% by default. The issue went away when I set it to 100%.

Thanks, detectives! :male_detective:

I was able to repro the issue at 80% zoom level on Chrome, using this document: https://dynalist.io/d/NeEwVRR3_AVffM6ZcdUN0vBH

I guess whether you see it at 90% zoom or 80% zoom also depend on your screen?

From my quick testing, I think it has something to do with how subpixels are rendered in Google Chrome.

image

You can see that the element exists and the height is 0.86 pixels. However, itā€™s not visible.

image

This doesnā€™t happen for the 2nd equation.