Wednesday, 17 September 2014

Installing LaTeXML into a local directory...

I have been working for a while on a document management system that will use MathJax and .tex inputs to create pretty PDF output and good websites.

Researching the available converters the one that is most attractive and most maintained is LaTeXML.

Firstly I have to setup perl to install packages locally for me to use:

PATH="$PATH:~/perl5/bin"
export PERL5LIB=~/perl5/lib/perl5
export PERL_MB_OPT="--install_base '$HOME/perl5'"
export PERL_MM_OPT="INSTALL_BASE=$HOME/perl5"
curl -L http://cpanmin.us | perl - -l ~/perl5 App::cpanminus local::lib 

I now have to fetch and install LaTeXML:

cpanm http://search.cpan.org/CPAN/authors/id/B/BR/BRMILLER/LaTeXML-0.8.0.tar.gz --force
 
Note that you will need the prerequisite system libraries installed onto the system - this approach doesn't provide copies of LibXML etc. as needed.

Command lines:
latexml --dest=example.xml example.tex
latexmlpost --format=html5 --javascript='../MathJax_down/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --destination=example.html example.xml
 
The results are really quite impressive - no links yet as they are behind our 'paywall' but hopefully soon.

No comments:

Post a Comment