Tutorial for literate Haskell
Steffen Mazanek
Steffen.Mazanek@UniBw-Muenchen.de
03 Mar 2003 21:59:11 +0000
Hi,
> When I ran into the same question some time ago I tried that,
> but found that the \verbatim was interpreted to0 literally, so
> that the \end{code} does not terminate it. Could you give a
> complete short example that works for you?
>
> My own solution was to copy the definition of verbatim from the
> base files, and define code the same way in a separate style file.
Hmm, there were no problems in simply doing so.
MainFile.tex:
\documentclass[12pt,oneside]{report}
\usepackage[latin1]{inputenc}
\usepackage{verbatim}
\begin{document}
\newenvironment{code}{\footnotesize\verbatim}{\endverbatim\normalsize}
\begin{titlepage}
...
\begin{document}
...
\input{HaskellModule.lhs}
...
HaskellModule.lhs:
\chapter{The Module Foo}
\label{Foo}
Maybe some text...
We call our module Foo, because this name is very
meaningful.
\begin{code}
module Foo where
\end{code}
and so on
Thats it.
I hope this will help.
Ciao,
Steffen
--
Steffen Mazanek
Werner Heisenberg Weg 102 App. 232
85579 Neubiberg
GPG key fingerprint: A165 227D B288 5E10 701D BF5F E91C 6B88 24C8 397D
http://blackhole.pca.dfn.de:11371/pks/lookup?op=get&search=0x24C8397D