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
Render images as MathJax #1266
Comments
Here's an old bookmarklet I once created for Wikipedia images. It should give you a good point to start. The trouble with Wikipedia (and other sites) are custom macros. Keep in mind that some sites like mathworld use ascii-like syntax (though not actual asciimath, it usually renders ok). |
Thanks. |
Is it possible to make the default zoom 200%? I hate having to set it for every website. |
There is also a Greasemonkey script (the second one in that section) that does the same sort of thing, but that doesn't use jQuery (I worry about inserting jQuery into an arbitrary page, as it might interfere with the page's own copy of jQuery, especially if it is a different version of jQuery). You could have the script add configuration that sets the zoom scaling to 200. Adding |
I actually tried that script before and it didn't work. |
Most websites have latex in the image alt, not as a |
I don't know how to make a proper userscript to convert image alts to latex. It'd have to ignore non-latex image alts, and again, I have no idea how to do that. |
Yes, that's a problem you can only work around with additional information (such as a specific class in the case of Wikipedia). |
I think you may be looking at the wrong user script. There are two in that section, and it is the second one. That one looks for image tags and takes the TeX out of the |
@pkra But most websites don't have a specific class. They just have an ordinary image alt. If a userscript was made to convert that image alt to MathJax, then it would work on plenty of websites. I just absolutely hate those pixelated, blurry, png images. Sometimes they're even gifs, which makes things a lot worse. |
Since you said the user script was trying to "do" The script tags are set to contain the LaTeX from the image It is true that the user script is designed for use only on Wikipedia, so it looks for the images with Also, "it didn't work" is not a very specific comment. You have not indicated what you tried, or in what way it failed, or what types of error message you may have gotten, or any real information at all. So I'm not sure what you expect from us.
If the |
For you and anyone else who might be interested in such bookmarklets, have a look at: http://www.informatik-forum.at/showthread.php?t=107276 (site is German but the code should be pretty self-explanatory) |
@Herst, thanks. It doesn't work on any website, though, :( |
Of course not, this one is very specific, I meant that you can use it as a basis for your own bookmarklet. |
@Herst Okay, then. I'll see what I can do with it. |
I'm looking for someone to kindly provide a userscript for this.
I've noticed that websites have latex in the alt text of their maths images, so I thought that it could be possible for someone to make a userscript that converts that latex to MathJax.
I really hate those blurry maths png images, that's why!
The advantage of such a userscript is that it would work on virtually almost all sorts of websites, instead of having to make a special userscript for every single website.
The only thing though is that if the alt text turns out to be not latex, then the unserscript should be able to understand that, and not break the page trying to convert an ordinary image into MathJax.
Thanks a lot! :)
The text was updated successfully, but these errors were encountered: