Sunday, 9 October 2011

Installing lhs2TeX on Ubuntu

lhs2TeX is a processor for literate Haskell code whose output is laTeX. The following worked for me on Unbuntu 11.04, though this was not the path I travelled, that is I discovered that, for example, libghc6-zlib-dev was a prerequisite the hard way.
sudo apt-get install ghc
sudo apt-get install libghc6-zlib-dev
sudo apt-get install cabal-install
cabal update
cabal install cabal-install
sudo apt-get install texlive
cabal install lhs2tex
logout  or 
export PATH=$PATH:~/.cabal/bin
lhs2TeX -o t.tex t.lhs 
pdflatex t.tex

No comments:

Post a Comment