emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Max Nikulin <manikulin@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Export of this table fails LuaLaTeX compilation
Date: Thu, 13 Oct 2022 10:44:51 +0800	[thread overview]
Message-ID: <87tu48tpb0.fsf@localhost> (raw)
In-Reply-To: <ti5tdb$rd2$1@ciao.gmane.io>

Max Nikulin <manikulin@gmail.com> writes:

> On 12/10/2022 14:26, Ihor Radchenko wrote:
>> Max Nikulin writes:
>>>
>>> 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.
>> 
>> What about adding \relax in front of table rows instead of at the end?
>> The hlines are transcoded separately.
>> 
>> All other instances of \\\relax may remain.
>
> If you see a way to implement it, you may try. Do not forget a space 
> after it. Spaces at the beginning of line are insignificant, so 
> insertion of \relax should not cause more ignored spaces than it was 
> before. I would consider skipping "\relax " in the beginning of rows 
> where first cell starts from an export snippet.
>
> I am considering \noalign{} instead of \relax. I was never aware of its 
> effect, but accordingly to The TeXbook it should keep TeX in vertical 
> mode without any action due to empty argument. (Actually I surprised 
> that \relax causes any change of internal state besides parser.) 

If \noalign has less side effects compared to \relax, I'd prefer
\noalign. Can you confirm this?

I was also surprised that \relax does anything except escaping.

> Unfortunately \noalign{} just as \relax will not allow @@latex:[1cm]@@ 
> on the next line, perhaps @@latex:\noalign{\vskip 1cm}@@ is a workaround 
> to introduce additional vertical space.
>
>      \\[0pt]

What you are talking about appears to be abusing our exporter. We give
no guarantees about how \\ is going to be exported internally into
LaTeX. We should have no obligation to keep use-cases like this.

> causes insertion of some code for negative vertical skip (of zero height 
> this case). It should not be really harmful, but I would avoid this hack.
>
> I never used \\* or \\*[10pt] variants of the command. Current stable 
> release should has problems when the line next to \\ starts from * that 
> is not bold marker, besides square brackets.

I feel like I am missing what you are talking about here.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


  reply	other threads:[~2022-10-13  2:44 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 [this message]
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         ` Export of this table fails LuaLaTeX compilation gerard.vermeulen
2022-10-12 16:21           ` 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=87tu48tpb0.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=manikulin@gmail.com \
    /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).