Closed dac514 closed 4 years ago
Working our way backwards through the PB Latex code, it's more or less a URL that calls a Wordpress server:
<img class="test-image" src="https://s0.wp.com/latex.php?latex=%5Cdisplaystyle+P_%5Cnu%5E%7B-%5Cmu%7D%28z%29%3D%5Cfrac%7B%5Cleft%28z%5E2-1%5Cright%29%5E%7B%5Cfrac%7B%5Cmu%7D%7B2%7D%7D%7D%7B2%5E%5Cmu+%5Csqrt%7B%5Cpi%7D%5CGamma%5Cleft%28%5Cmu%2B%5Cfrac%7B1%7D%7B2%7D%5Cright%29%7D%5Cint_%7B-1%7D%5E1%5Cfrac%7B%5Cleft%281-t%5E2%5Cright%29%5E%7B%5Cmu+-%5Cfrac%7B1%7D%7B2%7D%7D%7D%7B%5Cleft%28z%2Bt%5Csqrt%7Bz%5E2-1%7D%5Cright%29%5E%7B%5Cmu-%5Cnu%7D%7Ddt&bg=T&fg=000000&s=3&zoom=1" alt="Test Image">
Code:
Breakdown:
https://*/latex.php ? latex=URLENCODEDLATEX & bg=BACKGROUNDCOLOR & fg=FOREGROUNDCOLOR & zoom=SIZE
Idea:
Write a small node.js service that is a drop in replacement for <img src=
Technically <img src=
can be a SVG. Does it work in epub2 and mobi? If yes, use svg, if no, convert to png.
Research if it's possible.
Some links to start:
mjpage --output MML < input.html > output.html
Related to: https://github.com/pressbooks/ideas/issues/189