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

Support MathJax rendering and convert HTML to LaTeX #19

Open
erinspace opened this issue Jul 11, 2016 · 4 comments
Open

Support MathJax rendering and convert HTML to LaTeX #19

erinspace opened this issue Jul 11, 2016 · 4 comments

Comments

@erinspace
Copy link
Member

linking here from CenterForOpenScience/SHARE#267

@hmoco
Copy link

hmoco commented Jul 12, 2016

@erinspace, where is this wanted? On the search results or on the detail/curate page (maybe both)?

@erinspace
Copy link
Member Author

Maybe both! Basically wherever we have the possibility of displaying html or latex (which often appears in descriptions, especially in arxiv)

So, something that does not look like this!

screen shot 2016-07-12 at 11 05 09 am

I know there have been some attempts to fix this in the OSF, so perhaps some inspiration can be drawn from them:

CenterForOpenScience/osf.io#5264
CenterForOpenScience/osf.io#5709

@SSJohns
Copy link

SSJohns commented Jul 18, 2016

MathAjax imports in ember can be done by laoding the plugin onto the page that is wanted to be modified. It's as simple as include the script when loading the page. The sweep can further be customized by adding a mathjax script defining behavior in the head.

Import:

loadPlugin: function() { // Use run loop if you need to setup the DOM first Ember.run.scheduleOnce('afterRender', this, function() { Ember.$.getScript('https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS->MML_HTMLorMML'); }); }.on('init'),

Customization:

<script type="text/x-mathjax-config"> MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}}); </script>

@karleywalker
Copy link
Contributor

@SSJohns has apparently finished this but it hasn't been closed?

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

4 participants