Convert MathJax to Office

736 views
Skip to first unread message

Nikita

unread,
May 20, 2012, 4:23:07 AM5/20/12
to MathJax Users
Is there a way to convert web-page containing MathJax formulas to
OpenOffice (LibreOffice) document? When I try either open or copy/
paste I see a lot of quality-loose even if I install STIX and MathJax
fonts on my system (no lover indexes, improper spacing, etc...) Maybe
there is a way to force MathJax to convert all formulas to images?
Or... any other MathJax friendly word processor? I'm going to join my
several wiki web-pages into single printable document.

Marc Grober

unread,
May 20, 2012, 11:04:08 PM5/20/12
to mathja...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

if you have webpage cobbled up as xhtml (see, e.g.,
http://en.wikipedia.org/wiki/MathML#Embedding_MathML_in_XHTML_files )
you can dot the following:
Open an empty writer document in LO.
Then do:
Insert->Object->Formula
NOW, while the Equation Editor is still open (that is important) do:
Tools->Import Formula
Select the xhtml document you wish to convert to LO
LO will do a mediocre job of importing, and you can then tweak the
math using the equation editor.
The German LO folk think this is simple and elegant.....
If you suggest its a brutish kludge I won't argue.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPubCnAAoJEMCi9wxDaNqEKAIH/iHB1ujszrVqY6Jfr2r2WCsl
RNlLdJrMppFhiAQbxiLGTlZa1rvYKtUaSYSFgkt/C7MxxX8K0OlJIH5wp1a/UpFl
7lEFRLy1BNtcMgJNzTdbrq6A5uFMZJOjZmc+AlOUM3+Ai9DzFov29Aj7VI8mzjc2
7QysGwW0xY7097S8Kx9d5wialBYTMlnEdv+VcPbPfKTMyniksxBagIq0H2GDzpBb
ofLX7OjU4Hyoh/l+wMJLNQrtAAtMuTl2BqIHHPWLHNS0lkBnLKpBpVXyBtJRiwmm
WXpUhNs/tki6Pt3W6InysRk1js7PtcYk6C6WUTmdqVAbxH0rYkXKYmQBFWufx2A=
=AtOb
-----END PGP SIGNATURE-----

Marc Grober

unread,
May 20, 2012, 11:14:41 PM5/20/12
to mathja...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

sorry, but forot to add the important bit, lol.....
only the equations will survive........

On 5/20/12 12:23 AM, Nikita wrote:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPubMhAAoJEMCi9wxDaNqEvSUH/irMV2GnynOUQfb75xA0YT2+
ok6UndDffunlIbWAtYF9jaiXBLW72YtAIN++8hm3z2Z/GNwzSv1g3zQhhKvh6TQV
+WVs6SdJE7UyP9k06nTWM4gFGB8vCIedCtRUvrTSIt7/rQMSAyjBRsphIxf/FXfH
wrD4z54JO3N1IICr28RqG0nfwlV21M/S9ISTwJWPNXd8uKndgjy4ggiXeUb6yAoS
Th7PF37HyTCqHZUPkUZRRgq67bVz0mZCSoaP8M3IpWC44zpoJWFSs0gwQj710H/Q
xIRVeQ5iGrvMTSJ9uaMaIJab2Xu0RcU1pGU1w6Q6rExWtRDGT1CN2qyaj1FLT1o=
=uyG6
-----END PGP SIGNATURE-----

Peter Krautzberger

unread,
May 21, 2012, 8:44:26 AM5/21/12
to mathja...@googlegroups.com
As Marcs' answer already indicates, there's probably no easy way.

You could look into website scraping tools (in combination with SVG rendering). But I would suggest looking at pandoc. It has html input and odt output, but you might have to convert to some intermediary format like markdown or TeX to get a good result.

Peter.

Nikita

unread,
May 22, 2012, 12:49:01 PM5/22/12
to MathJax Users
Well, finally I almost manually converted document to TeX - turn off
MathJax, copy/pasty to office and export to LaTeX, but was to replace
all things like {\textbackslash} to real "\", etc. Maybe it was a
little easy to take wiki source and substitute wiki code to TeX
one...

Well, also I tried to use a ooolatex plugin to click all formulas to
convert them to images, but it isn't stable. I know, I've got the best
quality by converting everything to TeX, but it wasn't an easy job and
I'm afraid I've done some misplaced replaces of slashed, figure braces
and "_", "^" symbols and so on...

Pity if no chance to render formulas to images in MathJax.

Peter Krautzberger

unread,
May 22, 2012, 2:09:42 PM5/22/12
to mathja...@googlegroups.com
So are you really looking for an html-to-tex converter? Either way, you should really look into pandoc http://johnmacfarlane.net/pandoc/ it is the most versatile tool around and it "knows" MathJax.

Peter.
Reply all
Reply to author
Forward
0 new messages