Open aualbert opened 6 months ago
To give a few more details, once the webview renderer is ready (https://github.com/Ashinch/ReadYou/pull/568), it suffices to include the relevant files (at least katex.min.js and katex.min.css, these can be added in the resources) in the head of the html that will be displayed using webview. This deals with in-text Latex formulas. To deal with Latex properly on a WordPress blog, image urls have to be scanned and if an url of the form https://s0.wp.com/latex.php? latex=%7BF_2%28N%29+%3D+%28%5Cfrac%7B6%7D%7B%5Cpi%5E2%7D+%2B+o%281%29%29+N%7D&bg=ffffff&fg=000000&s=0&c=20201002&zoom=4.5 is found, the image could be converted directly into a latex formula that will be displayed locally with Katex.
It looks like LaTeX is being treated as an image in native rendering. Maybe turning off the maximize images setting can temporarily fix this.
It looks like LaTeX is being treated as an image in native rendering. Maybe turning off the maximize images setting can temporarily fix this.
These latex formulas are indeed images. WordPress automatically convert latex formulas into images, so when the article is pulled, the html contains an image instead of text. However, the text can be recovered either from the image URL or image description.
I can take care of the latex rendering once the webview is ready!
1. Environment
2. Describe the feature request
The app is wonderful but cannot be used on math blog as latex is not managed well. There are two main ways to display latex on a blog:
the blog site includes mathjax or katex, and latex be included using an HTML element or DIRECTLY in the text by surrounding it by a usual latex math notation ($$, $$$$, etc)
latex formulas are directly concerted into images, like on WordPress.
In the first case, un ReadYou, the latex formula is displayed as text.
In the second case, the image is included with the formula as description.
In both case the HTML parser could be modified. Katex could then be used to display the math.