I'm trying to get nice syntax-highlighted Haskell in my Latex document
without much luck. I don't think Pandoc can do it yet, I haven't been
successful with lhs2TeX, now I'm trying with lhs2TeX-hl.
Anyone have a workflow they like?
Greg
I added this at the top of my .tex file:
\usepackage{minted}
\definecolor{frame_color}{gray}{0.70}
\addtolength\fboxsep{0.2cm}
\usemintedstyle{trac}
\newminted[code]{haskell}{frame=single, samepage=true, rulecolor=
\color{frame_color}}
and then where I want the code block put
\input{SomeCode.lhs}
where SomeCode.lhs is a literate haskell file that looks like this
% this is a literate haskell file
\begin{code}
f x = x + 1
\end{code}
then add -shell-escape to your pdflatex command
pdflatex -shell-escape mydoc.tex
and you're done
changing \usemintedstyle{trac} to \usemintedstyle{default} looks
better
On Dec 10, 5:19 pm, Greg <gregmainl...@gmail.com> wrote:
> I found the "minted" latex package is simple and works well. Get
> the .sty file athttp://code.google.com/p/minted/(and you'll need to