# How to change font in lhs2tex output

Documentation for lhs2tex shows a serif font being used by default as the output from the preprocessor (http://www.andres-loeh.de/lhs2tex/Guide2-1.17.pdf):

However, when I run lhs2tex --poly input.lhs > out.tex;pdflatex out.tex, the Haskell source is formatted in a computer-modern font:

My input file is

\documentclass{article}
\%include polycode.fmt
\begin{document}
Hello World!

> main :: IO ()
> main = putStrLn "Hello, world!"

\end{document}

• Computer Modern is a serif font? Well, Computer Modern Roman is a serif font, Computer Modern Sans serif is, ähm, sans-serif font. Mar 26, 2015 at 17:18
• sorry - I am probably not referring to the font correctly. I've added screenshots to help describe the current issue Mar 26, 2015 at 17:24
• To be honest, i don't know how that works in detail and i won't read the doc. Try to add \usepackage{tgchorus} to your inputfile and see if there are differences. Mar 27, 2015 at 20:04
• thanks. that still gives the same result though. I think the issue is related to the polytable package not being found, although no errors are shown when running pdflatex Mar 28, 2015 at 11:06
• You can make some edit to the question, add some detail, this will make the question appear back on top of the main site. Do it at around 20 pm standard time, most people online. Mar 28, 2015 at 13:34

It seems that alignment in lhs2TeX (which uses the polytable packake) is driven by spaces in the .lhs source file. I was able to set the font using
\usepackage{mathpazo}

> main  ::   IO()