Conflict with beamerarticle
scmu opened this issue · 3 comments
Some hooks in hscode
seems to be causing a conflict with beamerarticle.
Please see the attached files.
Issue.zip
If you typeset Issue.lhs with
lhs2TeX Issue.lhs > Issue.tex
pdflatex Issue
You get the following error message:
! Missing number, treated as zero.
<to be read again>
]
l.332 \end{hscode}
\resethooks
?
! Illegal unit of measure (pt inserted).
<to be read again>
]
l.332 \end{hscode}
\resethooks
?
And, as you can see in the attached pdf file, the second piece of code is formatted wrongly. It seems that newline are interpreted as something else.
It only happens when the code is in a frame
environment, and only with beamerarticle
. The "presentation mode" (with \documentclass{beamer}
) works fine.
Is there a fix? Thank you!
Sorry for the late reply. I vaguely recall having seen this before, but I'll have to dig into how beamerarticle is implemented to see how/if it can be fixed.
A simple workaround is to say
\arrayhs
after %include polycode.fmt
.
This has some (possibly unwanted) side-effects such as that code blocks cannot contain page breaks, but if that's acceptable for you (or even desirable), then it should be a relatively straight-forward fix.