[Haskell-cafe] lhs2TeX and line numbers in error messages
produced by LaTeX
Andres Loeh
andres at cs.uu.nl
Mon May 2 06:18:40 EDT 2005
> I use lhs2TeX for typesetting literate haskell code. The problem is that LaTeX
> uses the line numbers from the .tex file generated by lhs2TeX and not the
> line number from the original .lhs file when producing error messages.
>
> Does anyone have a solution for this problem?
Sorry, I don't. I think it's very much work to change lhs2TeX so
that the generated .tex file will have the same line numbers than
the original (%include would have to be mapped to \input statements
and each code block would have to produce exactly as many lines as
the input was etc.), and AFAIK LaTeX does not have any such thing as
LINE pragmas.
I usually look at the generated file to find what LaTeX complains
about and map this to the original location mentally.
I could make lhs2TeX generate line hints as LaTeX comments, to
facilitate this process, but this would still require to read the
generated file, because the hints wouldn't be interpreted by LaTeX
automatically.
Cheers,
Andres
More information about the Haskell-Cafe
mailing list