Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latex disappears #1

Open
ghost opened this issue Jan 20, 2021 · 18 comments
Open

Latex disappears #1

ghost opened this issue Jan 20, 2021 · 18 comments

Comments

@ghost
Copy link

ghost commented Jan 20, 2021

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
Copy link
Owner

aledeg commented Jan 20, 2021

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

@ghost
Copy link
Author

ghost commented Jan 20, 2021

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
Copy link
Owner

aledeg commented Jan 24, 2021

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
Copy link
Author

ghost commented Jan 25, 2021

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

  • This issue happens as well when I run the MathJax Bookmarklet.
  • Inspecting the source, I can make the LaTeX appear by toggling off the accessibility based aria-hidden.
  • Looking for this issue in the MathJax community, I read it could be related to the fast preview module.

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
Copy link
Owner

aledeg commented Jan 25, 2021

@Alkarex Do you have any thoughts?

@aledeg
Copy link
Owner

aledeg commented Jan 25, 2021

@Nchagnet Do you have any other FreshRSS extension enabled?

@ghost
Copy link
Author

ghost commented Jan 25, 2021

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

@aledeg
Copy link
Owner

aledeg commented Jan 25, 2021

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

@Alkarex
Copy link

Alkarex commented Jan 25, 2021

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
Copy link

Alkarex commented Jan 25, 2021

Any error/warning in the Web browser console?

@ghost
Copy link
Author

ghost commented Jan 25, 2021

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
Copy link

Alkarex commented Jan 25, 2021

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
Copy link
Author

ghost commented Jan 25, 2021

It's done, thank you so much!

@Alkarex
Copy link

Alkarex commented Jan 25, 2021

@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
Copy link
Owner

aledeg commented Jan 25, 2021

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

@Alkarex
Copy link

Alkarex commented Jan 25, 2021

@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
Copy link
Author

ghost commented Jan 25, 2021

Thank you very much! It worked perfectly!

aledeg referenced this issue in aledeg/FreshRSS-extensions Jan 26, 2021
Before, the typeset function was called all the time, even when it
was not defined. Thus generating some alerts in the console.
Now, the function is called only when it exists.

See #9
@aledeg
Copy link
Owner

aledeg commented Jan 26, 2021

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

@aledeg aledeg transferred this issue from aledeg/FreshRSS-extensions Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants