emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [PATCH v2] Re: [BUG] Tables with square brackets do not compile in PDF (latex) export [9.5 (release_9.5-59-g52e6f1 @ /home/sjt015/repo/emacs/lisp/org/)]
Date: Mon, 10 Oct 2022 23:30:04 +0700	[thread overview]
Message-ID: <ti1had$802$1@ciao.gmane.io> (raw)
In-Reply-To: <87lepqlwrl.fsf@localhost>

Ihor, I have tried your patch (v2). With a tiny test file it works as 
expected. I have not managed to add some text immediately after \relax 
to break this command.

On 08/10/2022 12:17, Ihor Radchenko wrote:
> Max Nikulin writes:
>>> +(defconst org-latex-linebreak-safe "\\\\\\relax"
>> Is there a reason why you did not add \n at the end? It could help to
>> avoid a lot of `concat' calls.
> Mostly because there are a couple of places where we need the version
> without newline. I though that `concat' is better than
> `replace-regexp-in-string' or introducing two constants with/without
> newline.
> I guess, we can introduce the two constants. It might be slightly more
> optimal. See the updated version of the patch.

Reading with more attention, I do not think that second constant really 
makes the code more clear. I had a hope that it is enough to introduce a 
single constant, but it seems it is not the case. I did not expect that 
newline should not be added e.g. planning export handler. Perhaps it is 
better to commit v1.

>>> -   (equal "\\begin{tabular}{l}\n\\(x\\)\\\\\n\\end{tabular}"
>>> +   (equal "\\begin{tabular}{l}\n\\(x\\)\\\\\\relax\n\\end{tabular}"
>> May be left as is since the line next to \\ does not start from square
>> brackets.
> Nope. It can't. These are ERT tests for the ox-latex output.

My bad. I am sorry.

> @@ -2659,7 +2675,7 @@ ;;;; Line Break
>  (defun org-latex-line-break (_line-break _contents _info)
>    "Transcode a LINE-BREAK object from Org to LaTeX.
>  CONTENTS is nil.  INFO is a plist holding contextual information."
> -  "\\\\\n")
> +  org-latex-linebreak-safe-newline)

A minor naming inconsistency: "line-break" and "linebreak".

  reply	other threads:[~2022-10-10 16:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10 16:16 [BUG] Tables with square brackets do not compile in PDF (latex) export [9.5 (release_9.5-59-g52e6f1 @ /home/sjt015/repo/emacs/lisp/org/)] Stewart Thomas
2021-11-13 14:57 ` Max Nikulin
2022-10-07  8:31   ` [PATCH] " Ihor Radchenko
2022-10-07 11:34     ` Max Nikulin
2022-10-08  5:17       ` [PATCH v2] " Ihor Radchenko
2022-10-10 16:30         ` Max Nikulin [this message]
2022-10-11  3:36           ` Ihor Radchenko

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:

  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='ti1had$802$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* 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


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).