Closed jexek closed 1 year ago
That's normal lhs2tex behaviour. See e.g. the documentation, Section 3:
Inline verbatim Text between two
@
characters that is not in a code block is con- sidered inline verbatim. If you actually want a@
character to appear in the text, it needs to be escaped:@@
. There is no need to escape@
’s in code blocks. For example,@id :: a -> a@
appears as $\verb+id :: a -> a+$.Inline code Text between two
|
characters that is not in a code block is considered inline code. Again,|
characters that should appear literally outside of code blocks need to be escaped:||
. For example,|id :: a -> a|
appears as $\textit{id} :: a \rightarrow a$.
lhs2tex makes no real attempts to parse (La)TeX. It only recognises a few constructs. So vertical bars in table specs have to be escaped.
Thanks for a quick reply! Of course it works exactly as documented in the guide and it makes perfect sense now.
I would like to use tables in an lhs document, but a tabular environment with a table spec string
l | c | r
in the input to lhs2TeX 1.24is translated to
which is rejected by pdfTeX. I would expect lhs2TeX to not modify the table spec string. Another failing example with odd number of vertical bar symbols in the table spec:
It seems lhs2TeX confuses itself by mistakenly interpreting a valid table spec string as something else where vertical bars must be paired.