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

Replace images on the fly #2

Merged
merged 2 commits into from
Aug 18, 2013
Merged

Replace images on the fly #2

merged 2 commits into from
Aug 18, 2013

Conversation

pkra
Copy link
Contributor

@pkra pkra commented Aug 13, 2013

By wrapping the TeX-images in MathJax_Preview spans and attaching the script immediately afterwards, MathJax will replace them on the fly. The extra scaling for display equations was moved into its own loop, not sure how to do this more efficiently.

@bgromov
Copy link
Owner

bgromov commented Aug 18, 2013

I finally had some time to look into the code and will merge your changes soon.

I first tried this feature on a new extension and it took me few hours to realize why <span class="MathJax_Preview" /> elements are not removed after MathJax is loaded. I guess that was the reason you have moved <span font-size="125%"> to wrap both the preview span and the script.

@bgromov
Copy link
Owner

bgromov commented Aug 18, 2013

This feature and #3 will be enough for the v0.0.5, so I hope to publish the release soon.

Proper support for Wikipedia (#5) and local slim version of MathJax (#4) will do the v0.0.6.

bgromov added a commit that referenced this pull request Aug 18, 2013
Replace images on the fly
@bgromov bgromov merged commit fba77c3 into bgromov:master Aug 18, 2013
@pkra
Copy link
Contributor Author

pkra commented Aug 19, 2013

Ah, yes, the preview has to be right before the script-tag. Glad it worked out 👍

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

Successfully merging this pull request may close these issues.

None yet

2 participants