-
-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
TeX Math rendering #26
Comments
This is a super cool suggestion, and it'll almost certainly get added. (I've been burned by trying to mess with the Markdown rendering before, and I'm a little worried about tweaks like this turning into a slippery slope, but... it's still too cool to not add.) I totally agree with the info-leak concern, so there will be an option to enable it (which means it'll be disabled by default, which is sad). Taking a look at this SO post suggests that there are different rendering providers and different GCharts options that might be nice to expose to users. So, the options page could let the user modify the base URL being used. (It'll default to the HTTPS GCharts URL in your code.) On the other hand... getting that URL prefix from the options down into the Marked.js code might make me stop caring about this custom-URL option. This suggestion set me to thinking about abstracting Markdown Here into a plugin-able email-mutation framework. So, there could be a Markdown plugin and a Tex plugin and a Textile plugin and a RST plugin and so on. Some plugins would work with others (like Markdown with Tex), while some would replace others (like MD and Textile). I don't think I'm going to try to do this in the short term, though, for two reasons:
Anyway, pluginable architecture is not in the short term. Looking at Tex support is in the short term. |
There's another non-fatal strike against this change that I forgot to mention: Modifications to Marked.js could have later repercussions (besides the usual harder-to-update-from-upstream). Markdown Here was failed Mozilla approval because I had made changes to Highlight.js (see #21) -- which is code that they've already reviewed and therefore don't want people to modify. They haven't said anything about my existing modification to Marked.js, but... it could happen. "But you've already modified Marked.js!", you say? That's true, but I've submitted an issue to Marked.js about the change -- markedjs/marked#54 -- and I have a faint hope that it might be fixed/changed someday. Anyway, this is just an academic objection. Just stating it for completeness. |
I am glad you like the idea! Few remarks:
I understand your concerns about modifying |
If you use Chrome, I just put out a release that has a TeX easter egg:
Proper TeX support still needs a bunch more work, but I had to push out a bugfix release last night, so I decided to sneak this in. Let me know if you have any problems or whatever. Also, @bordaigorl, can you sometime give me a cool TeX example that I can use in samples and screenshots? Thanks. |
I would go with these examples Will settings in Firefox be supported any soon? |
Firefox settings are totally implemented, as of a few days ago. I'm waiting for the currently-queued Mozilla review to finish -- I'm currently 4th in the queue, so that should be soon. (Cross your fingers that Markdown Here finally gets approved.) I'll put out a new release as soon as the review is finished. You can pull head code if you want to take a look. (But if you've seen the Chrome settings... it looks the same.) |
Version 2.6.0 has bee released with TeX support. Options have been added to Firefox and Thunderbird, so they fully support it as well. Take a look at the options page to enable it. Big caveat: The new version has just entered the Mozilla review queue, so it could be between a week and a month before it's actually available to install/upgrade. @bordaigorl: Thanks for helping to implement this. |
Update regarding Firefox/Thunderbird installation: It looks like you can get the latest version of Markdown Here from the view-all-versions page: https://addons.mozilla.org/en-US/firefox/addon/markdown-here/versions/ |
This is great news! I just tried the latest version and it works great. Thank you very much for the effort and enthusiasm you are putting in this brilliant extension! |
Just a quick comment: the info-leak issue should actually not occur if one uses the https version of Google Charts (as in my initial post)...that should fix it, shouldn't it? |
It fixes one sort of leak (eavesdropping on the network connection), but the one I was/am more concerned with was/is: Your formula is being sent to Google (or whatever rendering service you use). If you use Gmail, then maybe that isn't a big deal -- although you're still sending it to a different business unit in a different data centre, with different data storage, retention, and security policies. But if you're using any other mail provider (and so is your recipient), then you're sending information to a third party that wouldn't otherwise be part of the equation. I still think it's necessary for users to explicitly acknowledge and accept that "leak". (For the record, https is used by default.) |
Good point! |
I though that this discussion in CommonMark (a temptative specification of a unified Markdown syntax) |
I am proposing to add TeX math rendering via Google Charts or the like.
The only change needed is in
marked.tex
that needs to be patched as followsor along the same lines.
I am aware of one big downside of this approach: the image gets rendered on the fly by google chart so your TeX formula flies around the net every time you (or the receiver) view it.
This conflicts with the general idea of Mardown-here rendering the content completely in-browser.
A fully fledged solution could present an option to disable this feature if "no info leak" is a strong requirement.
The added functionality is in my opinion a huge gain when working on scientific projects with collaborators.
A warning that this is not rendered in browser would in my opinion be enough.
The text was updated successfully, but these errors were encountered: