Re: Tutorial for literate Haskell
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=getsearch=0x24C8397D ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: Tutorial for literate Haskell
Hello. I do Literate Programming this way: At first I define a Latex environment code as verbatim e.g. so: \newenvironment{code}{\footnotesize\verbatim}{\endverbatim\normalsize} This environment is understood by the Haskell compilers. All my modules are own documents concluded in the main tex-file with \input{...}. Alternatively I sometimes use lambdaTeX which typesets the code really nice (problem: latex2html doesn't understand it). Hope that will help. Ciao, Steffen ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: Tutorial for literate Haskell
Yo, Steffen Mazanek wrote: I do Literate Programming this way: At first I define a Latex environment code as verbatim e.g. so: \newenvironment{code}{\footnotesize\verbatim}{\endverbatim\normalsize} 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. Regards, Bruce. ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: Tutorial for literate Haskell
Hi, Since I sent this to the haskell list in the first place, I'd better let everyone know that it all worked out. Hmm, there were no problems in simply doing so. Ok, I've cut your example down a bit (just from a minimalist tendency). The complete modified code is ... \documentclass{report} \usepackage{verbatim}% vital \begin{document} \newenvironment{code}{\footnotesize\verbatim}{\endverbatim\normalsize} HaskellModule.lhs: Maybe some text... We call our module Foo, because this name is very meaningful. \begin{code} module Foo where \end{code} \end{document} Works just fine and seems robust. My original problem ... an over-developed tendency to go it alone? I was not using package verbatim, which does help, doesn't it. I hope this will help. Yup, thanks. Bruce. ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell