-
Notifications
You must be signed in to change notification settings - Fork 101
Installation Guides
This page provides user supplied guides and workarounds to installation issues. It supplements the 'Official' Get LaTeXML page.
Some issues with dependencies; See the discussion in #929
Using cpanminus is a simple and quick method for installing latexml for development. The method is platform-independent, but this guide is written from an Ubuntu usage perspective - please feel free to correct any inaccuracies for your specific platform.
- requires no system privileges
- makes it straightforward to work with multiple forks of latexml.
- Switching the active installation requires a single
cpanm .
in the chosen repository working directory.
- Switching the active installation requires a single
- possible to test multiple perl versions when combined with perlbrew
- automatically installs CPAN perl dependencies, as long as the underlying system packages are already available (e.g.
libxml2-dev
) - offers the most recent versions of dependent packages, including the dev linting tools
-
You can look for
App::cpanminus
in your OS package manager, or install it directly via:curl -L https://cpanmin.us | perl - App::cpanminus
-
Setup the local paths in your
.bashrc
or equivalent initialization scriptexport PATH=$HOME/perl5/bin:$PATH export PERL5LIB=$HOME/perl5/lib/perl5:$PERL5LIB
-
Install LaTeXML and pre-commit hook
git clone https://github.com/brucemiller/LaTeXML cd LaTeXML ln -s tools/pre-commit .git/hooks cpanm .
Additionally, for certain quick fixes you may want to reinstall without running tests at all (e.g. fixing a typo while prototyping), which you can do neatly via
cpanm . --notest
. -
Install linting tools
cpanm Perl::Critic Perl::Tidy
A caveat to keep in mind with this approach is that you may see some weird classes of errors if you install LaTeXML both globally (say via a package manager or classic sudo make install
), and locally via cpanminus. It is usually recommended to only install latexml using a single pipeline, to keep things simple.
The default execution of perl's Test::Harness
test runs happens in a single process and thread, and is needlessly slow on modern systems. Setting the HARNESS_OPTIONS
environment variable allows to leverage the full compute power of modern systems, e.g. by adding to your .bashrc
or equivalent:
export HARNESS_OPTIONS=j$(grep -c ^processor /proc/cpuinfo):c
On my X230 Thinkpad, an Intel i5-3210M CPU @ 2.50GHz
processor speeds up from 4.5 to 2.2 minutes in running make test
, as one example. A gain that compounds while developing.