Closed Krantz-XRF closed 10 months ago
Sorry for the late reply. Thanks for the detailed report. I can reproduce this. I'll try to understand what's going on.
This is a bug in polytable.sty
. I have committed an updated version to the branch https://github.com/kosmikus/lhs2tex/compare/wip/issue-83
Note that installing polytable.sty
via lhs2tex is fragile. Depending on your setup, you may have to manually put the new polytable.sty
into a directory where your LaTeX installation will find it.
It would be great if you could confirm that the fix works not just for the sample file you reported with, but also the file that actually first triggered the problem for you.
Thanks for the fix! I edited polytable.sty
in my local MiKTeX installation as in this line (in the above mentioned branch), and it worked as expected.
See the following example, I expect all the code centered, align at the equal sign, with LHS align to the right and RHS align to the left.
But after running
lhs2tex test.lhs -o test.tex
andpdflatex test.tex
, some LHS end up aligning to the left. If I manually modify the generated TeX file, replace thel
withr
in\column{5}{@{}>{\hspre}l<{\hspost}@{}}%
, I get the correct result:I did not find documentation for
aligncolumn
, so I followed instructions in #23.