kosmikus / lhs2tex

Preprocessor for typesetting Haskell sources with LaTeX
Other
99 stars 28 forks source link

Math style is choking on curly brace. #60

Closed kindaro closed 10 months ago

kindaro commented 6 years ago

I expected that lhs2TeX would produce consistent output with all tex-producing styles, namely math, poly, tt.

However, in math style, the following example will produce no code output from the first curly brace onwards, until the end of the code block. In other modes it works as expected. The code is correct, that is, it compiles with ghc.

\documentclass{article}

%include lhs2TeX.fmt

\begin{document}
\begin{code}

main = do
    let { x = 1 }
    print x

\end{code}
\end{document}
kosmikus commented 6 years ago

Yes, you're right. This is unfortunate.

However, as I said in the other issue, math style is deprecated and only included for long-term backwards-compatibility. I recommend to use poly style.