kosmikus / lhs2tex

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

Poly style incompatible with the unicode-math package (XeLaTeX) #29

Closed asr closed 9 years ago

asr commented 11 years ago

unicode-math version: unicode-math.sty 2013/05/04 v0.7e Unicode maths in XeLaTeX and LuaLaTeX

$ lhs2TeX --version
lhs2TeX 1.18.1

$ xelatex --version
XeTeX 3.1415926-2.5-0.9999.3-2013060708 (TeX Live 2013)

$ cat bug.lhs
\documentclass{article}
%include polycode.fmt

\usepackage{unicode-math}
\setmathfont{Asana-Math.otf}

\begin{document}
This is the famous ``Hello world'' example,
written in Haskell:
\begin{code}
main :: IO ()
main = putStrLn "Hello, world!"
\end{code}
\end{document}
$ lhs2TeX --poly -o bug.tex bug.lhs
$ xelatex bug.tex 
...
! Argument of \gobbletrue has an extra }.
<inserted text> 
                \par 
l.277 \end{hscode}
                  \resethooks
? 
asr commented 11 years ago

After some tests, there is an incompatibility between the packages polytable and unicode-math.

kosmikus commented 11 years ago

Yes, there's a conflict with at least the \Not command. I've pushed a new version of polytable.sty which should also go on CTAN (but the last release was from 2009, I have to look up how that works again).

asr commented 11 years ago

Thanks! The issue was fixed.