Saturday, December 5, 2009

lhs2TeX on Windows

I used lhs2TeX for the first time in ages today.

One thing I had forgotten was that pdflatex prefers files with Unix end-of-line[1] and was throwing this error:


! Undefined control sequence.
l.30 }\SkipToFmtEnd

? q
OK, entering \batchmode


A solution is to run dos2unix on the generated .tex file after running lhs2TeX:

 
$ lhs2TeX -o HelloWorld.tex HelloWorld.lhs
$ dos2unix HelloWorld.tex
$ pdflatex HelloWorld.tex



[1] Generally I use LaTeX and dvips, pvipdfm on Windows which seem agnostic about linefeed format.

Blog Archive

About Me

My photo
Disambiguating biog as there are a few Stephen Tetley's in the world. I'm neither a cage fighter or yachtsman. I studied Fine Art in the nineties (foundation Bradford 1992, degree Cheltenham 1992 - 95) then Computing part-time at Leeds Met graduating in 2003. I'm the Stephen Tetley on Haskell Cafe and Stackoverflow.