aledeg / xExtension-LatexSupport

A FreshRSS extension which add LaTeX support
GNU Affero General Public License v3.0
3 stars 0 forks source link

Latex disappears #1

Open ghost opened 3 years ago

ghost commented 3 years ago

Hi,

I just installed the extension, enabled it, went to check on one of my feeds featuring heavy inline math LaTeX (hep-th arxiv, I can give a specific example if necessary).

What happened then is that when I load the page, I can very briefly see the inline math unformated and it disappears (presumably when MathJax is loaded).

By the way, I am using the yunohost version of FreshRSS.

aledeg commented 3 years ago

Could you provide the feed so I can see what is going on? Thank you

ghost commented 3 years ago

Yes, the feed is accessible here: http://export.arxiv.org/rss/hep-th

These are pictures of before/after turning on the extension. https://postimg.cc/gallery/YQc90hw

aledeg commented 3 years ago

What browser are you using? It seems that I cannot reproduce on Firefox. Here is a screenshot of my output. Screenshot_2021-01-24 (39) hep-th updates on arXiv org · FreshRSS

ghost commented 3 years ago

I was using Firefox but I just checked on Chrome and the issue is there as well. I also ran multiple tests:

I would like to specify that the LaTeX is present in the source, it just seems to disappear. If I could access another install of FreshRSS I could see if I can reproduce this unfortunately the demo.freshrss.org website does not allow me to add customs feeds which have LaTeX.

aledeg commented 3 years ago

@Alkarex Do you have any thoughts?

aledeg commented 3 years ago

@nchagnet Do you have any other FreshRSS extension enabled?

ghost commented 3 years ago

I had the default ones but I tried disabling them (as well as all other browser extensions) and it didn't help.

aledeg commented 3 years ago

I am running out of ideas why it's working on my machines and not on yours. What theme are you using?

Alkarex commented 3 years ago

I have made a quick test and it worked for me, thought with some CSP errors - maybe something to look into. Will check again a bit later

Alkarex commented 3 years ago

Any error/warning in the Web browser console?

ghost commented 3 years ago

Hi Alkarex,

No error/warning in the console related to that. I tried multiple themes (including the default one) and the problem was there each time. I just tried reinstalling the extension just in case. As I mentioned before I have the same issue when I use the bookmarklet from https://checkmyworking.com/misc/mathjax-bookmarklet/ so I think it's somehow my freshRSS installation and mathjax, though I don't know why.

Thank you both so much for helping me with this, the LaTeX rendering is arguably the feature I need the most in a RSS reader.

Alkarex commented 3 years ago

Could you make share a test account with us with that feed and relevant extension enabled? If yes, my email can be found online.

ghost commented 3 years ago

It's done, thank you so much!

Alkarex commented 3 years ago

@aledeg There seems to be at least two distinct bugs, in CSS and in JS:

For CSS, try with those changes:

mjx-assistive-mml {
    /* position: absolute !important; */
}

mjx-container[jax="CHTML"] {
    line-height: 0;
    display: inline-block;
}

Furthermore, there is a race condition, as the extension does not wait for Mathjax to be loaded (this ends up working sometimes, not always): image

aledeg commented 3 years ago

Thank you for your help. I'll look into it.

Alkarex commented 3 years ago

@nchagnet Meanwhile, you can try to add a custom stylesheet (for instance with the CustomCSS extension) with the following:

#global mjx-assistive-mml {
    position: relative !important;
}
mjx-container[jax="CHTML"] {
    display: inline-block;
}
ghost commented 3 years ago

Thank you very much! It worked perfectly!

aledeg commented 3 years ago

I found the JS error. It will be fixed in next release. I still don't understand the CSS error :/