agrbin / svgtex Goto Github PK
View Code? Open in Web Editor NEWUsing MathJax and PhantomJS to create SVGs on server side with minimum overhead.
License: MIT License
Using MathJax and PhantomJS to create SVGs on server side with minimum overhead.
License: MIT License
The SVG result contains 'use' elements that have duplicate xlink:href elements. That is, using two terminal windows (this is win7)
The resulting SVG has 'use' elements like this:
<use xlink:href="#MJMATHI-78" x="0" y="0" xlink:href="#MJMATHI-78">
What I did to fix it was to replace line 73 in engine.js, which inserts the attribute, with this conditional block:
if (uses[k]["href"] === undefined) {
uses[k].setAttribute("xlink:href", id);
}
A long math formula, which however would fit well in a single line when rendered, is not rendered and is left as text. This is the example that fails for me:
$\displaystyle \delta \sigma^\prime_e = |\frac{d \sigma^\prime_e}{d \alpha} \cdot \frac{\delta\alpha}{\alpha} \cdot \alpha| = \frac{2}{3} \alpha \frac{\delta\alpha}{\alpha} \alpha = \frac{2}{3} \frac{1}{137.035999084^2} \cdot 1.5\times 10^{-10} = 5.3\times 10^{-15}$
Thanks for this nice piece of software!
Alberto
This "fix" has caused a major regression and rendered svgtex completely useless on GNU/Linux (Xubuntu LTS 14.04). On all my browsers (Firefox, Chrome, etc.), I now only see one or more horizontal lines instead of any formula. Reverting that commit fixes the problem.
Could you explicitly declare the license (BSD, MIT, Apache, etc...) of this project?
See https://www.mathjax.org/cdn-shutting-down/ for more details on migrating to another service.
Hello,
Your work is awesome. It works pretty well. However, I suggest, a stand alone version without relying on the http communication would be better. There is no guaranteed that you could set up server port on every machine with your main.js. I also tried to develop a MathJax stand alone component for QT platform. I encountered the problem that in page simple JavaScript were executed. However the screen shot doesn't have rendered math. If you would like to tell me how you solved the rendering issue with MathJax, that would be very helpful. We together make a better one, if you don't mind.
I wrote a proposal to extend Pandoc's (X)HTML writer with support for SvgTex. This would allow to inject SVG math directly into the (X)HTML rendered by Pandoc.
Please, express your support in favour of this proposal over at the pandoc forum!
Hello,
Your work is awesome. It works pretty well. However, I suggest, a stand alone version without relying on the http communication would be better. There is no guaranteed that you could set up server port on every machine with your main.js. Plus, your html code rely on the mathjax on cdn.com. It is better to use local MathJax.js. I also tried to develop a MathJax stand alone component for QT platform. I encountered the problem that in page simple JavaScript were executed. However the screen shot doesn't have rendered math. If you would like to tell me how you solved the rendering issue with MathJax, that would be very helpful. We together make a better one, if you don't mind.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.