emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: gerard.vermeulen@posteo.net
To: emacs-orgmode@gnu.org,
	Emacs-orgmode
	<emacs-orgmode-bounces+gerard.vermeulen=posteo.net@gnu.org>
Subject: Re: Export of this table fails LuaLaTeX compilation
Date: Wed, 12 Oct 2022 09:17:44 +0000	[thread overview]
Message-ID: <5dc57c74c7a7817440b244a374c4a50c@posteo.net> (raw)
In-Reply-To: <ti5krs$17ar$1@ciao.gmane.io>



On 12.10.2022 07:55, Max Nikulin wrote:
> 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]
> - item
> 
> I 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.

Max, thanks for the background information.

For your info:
1. I also need to remove \relax in the LaTeX export using Gentoo 
texlive-2022 to compile.
2. On my systems ws-butler removes the trailing whitespace.
3. I edited your example with nano to add the trailing space after 
\relax, but it still does not compile.



  parent reply	other threads:[~2022-10-12  9:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-12  3:15 Export of this table fails LuaLaTeX compilation gerard.vermeulen
2022-10-12  4:15 ` Ihor Radchenko
2022-10-12  4:45   ` Max Nikulin
2022-10-12  5:15     ` gerard.vermeulen
2022-10-12  5:55       ` Max Nikulin
2022-10-12  7:26         ` Ihor Radchenko
2022-10-12  8:20           ` Max Nikulin
2022-10-13  2:44             ` Ihor Radchenko
2022-10-13  4:59               ` Max Nikulin
2022-10-13 14:27                 ` Leo Butler
2022-10-13 15:18                   ` [PATCH] ox-latex: Use \empty instead of \relax after \\ Max Nikulin
2022-10-14  2:32                     ` Ihor Radchenko
2022-10-12  9:17         ` gerard.vermeulen [this message]
2022-10-12 16:21           ` Export of this table fails LuaLaTeX compilation Max Nikulin
2022-10-13  5:03             ` gerard.vermeulen
2022-10-12  4:53   ` gerard.vermeulen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5dc57c74c7a7817440b244a374c4a50c@posteo.net \
    --to=gerard.vermeulen@posteo.net \
    --cc=emacs-orgmode-bounces+gerard.vermeulen=posteo.net@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).