|
From: | Max Nikulin |
Subject: | Re: Export of this table fails LuaLaTeX compilation |
Date: | Wed, 12 Oct 2022 12:55:06 +0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 |
On 12/10/2022 12:15, gerard.vermeulen wrote:
On 12.10.2022 06:45, Max Nikulin wrote:LuaLaTeX is irrelevant. It seems \hline is allowed only immediately after \\. Minimal LaTeX example: \begin{tabular}{l} b\\\relax \hline \end{tabular}Your example fails on my Mac texlive-2020 with: ! Misplaced \noalign. \hline ->\noalign{\ifnum 0=`}\fi \hrule \@height \arrayrulewidth \futurelet...l.40 \hline It compiles when I remove \hline
Gerard, we forgot to post the reason why \relax has been added after \\. The intention was to prevent errors in the case of
| a | | [b] | or - item \\ [2022-10-12]Stewart Thomas. [BUG] Tables with square brackets do not compile in PDF (latex) export. Wed, 10 Nov 2021 11:16:10 -0500. https://list.orgmode.org/CAO12V+wB18nAN0FuDPAeN94GHdt_2nbdJtc4u7n4W3HAZbaZsA@mail.gmail.com
I can not figure out an easy way to separate \\ from [b] text but to prevent the problem you have discovered. I am unsure if
\\[0pt]has no negative consequences and safe enough. I expect that LaTeX sources are not easy to read when fragile sequences of tokens are involved.
I just have realized that some users might take advantage of earlier behavior as a feature:
- item \\ [1cm] - itemI think that [1cm] should be treated as text, however I have no idea how to allow users to specify amount of vertical space and to not limit line break to LaTeX only. @@latex:\\[1cm]@@ is not suitable when the same text should be exported to ascii, html, etc.
[Prev in Thread] | Current Thread | [Next in Thread] |