all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Line breaks and brackets in LaTeX export
Date: Mon, 17 Oct 2022 23:46:17 +0700	[thread overview]
Message-ID: <tik0uf$td1$1@ciao.gmane.io> (raw)
In-Reply-To: <878rlecx49.fsf@posteo.net>

On 17/10/2022 22:01, Juan Manuel Macías wrote:
> 
> \documentclass{article}
> \usepackage{tabularray}

LaTeX I have installed is too old for this package. It is marked as 
"Experimental LaTeX3", so I am unsure, maybe you have found a bug in 
this package.
https://ctan.org/pkg/tabularray

You believe that an issue with brackets is extremely rare. It may be 
true for humanitarian texts. For some users it may be a constant source 
of pain e.g. in the case of interval notation as [a,b]. I have already 
mentioned tables generated by code blocks, not typed directly. I can not 
say that I often need to export my notes, but I was afraid that I will 
be bitten by this bug because I may try to put dates close to left margin:

- Something\\
   [2022-10-17 Mon]

By default dates wrapped into \textit, but it may be customized to just 
"%s".

Selectively adding some workaround require complete reimplementation of 
exporters. I have some curiosity concerning pandoc approach, but I am 
unsure if I will reserve some time to read its code.

An idea how to avoid complete redesign: at first add something like
    %__ORG_PROTECT_NEWLINE__
after each \\, later at an optimizing pass remove the comment if next 
line does not start from a star or a square bracket, otherwise use some 
workaround, e.g. "{[}". \relax may be suitable as well (in the beginning 
of rows, not after \\).

I do not like approach with a custom command. It is effectively the same 
as adding \empty but \\ may be redefined by some packages, so I strongly 
prefer to keep \\ in exported markup. Redefining of \\ is a way to new 
issues. I do not feel firm ground with a command that will expand to \\. 
I am afraid that \\ may still consume following "[" unless \empty or its 
equivalent is added after it. I am completely unsure concerning 
tabularray parser that does not rely on TeX primitives.

I found \empty when I was looking for an approach with minimal overhead. 
I expect that e.g. \\[0pt] may have higher performance penalty since it 
is expanded to several commands. When the idea with "\\\relax" failed I 
was choosing between "\\{}" and "\\\empty". I decided that the latter 
minimizes risk to add spurious space.

Some problems:

I do not see a way to add some LaTeX code between table lines.

Semi-verbatim environment may be a source of new bugs. They may be 
rather selective in respect to what they consider a command and what is 
passed as raw text. tabularray perhaps is similar in this sense.





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

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-15 21:35 [bug] `org-latex-line-break-safe' breaks the export of verse blocks to LaTeX Juan Manuel Macías
2022-10-16  3:24 ` Ihor Radchenko
2022-10-16 12:08   ` Juan Manuel Macías
2022-10-16 15:04 ` Max Nikulin
2022-10-16 16:33   ` Verse block and separations (was: [bug] `org-latex-line-break-safe' breaks the export of verse blocks to LaTeX) Juan Manuel Macías
2022-10-17  8:54     ` Ihor Radchenko
2022-10-18  9:39       ` Verse block and separations Juan Manuel Macías
2022-10-17 14:48     ` Verse block and separations (was: [bug] `org-latex-line-break-safe' breaks the export of verse blocks to LaTeX) Max Nikulin
2022-10-19 11:08     ` Max Nikulin
2022-10-19 11:24       ` Verse block and separations Juan Manuel Macías
2022-10-16 17:14   ` Line breaks and brackets in LaTeX export (was: [bug] `org-latex-line-break-safe' breaks the export of verse blocks to LaTeX) Juan Manuel Macías
2022-10-17  9:04     ` Ihor Radchenko
2022-10-17 11:30       ` Line breaks and brackets in LaTeX export Juan Manuel Macías
2022-10-17 11:47         ` Ihor Radchenko
2022-10-17 12:27           ` Juan Manuel Macías
2022-10-17 15:01         ` Juan Manuel Macías
2022-10-17 16:46           ` Max Nikulin [this message]
2022-10-17 18:04             ` Juan Manuel Macías
2022-10-18  4:41               ` Ihor Radchenko
2022-10-18 14:23                 ` Juan Manuel Macías
2022-10-19  3:57                   ` Ihor Radchenko
2022-10-19  5:11                     ` Max Nikulin
2022-10-19 11:16                       ` Juan Manuel Macías
2022-10-19 12:30                         ` Juan Manuel Macías
2022-10-19 17:07                           ` Max Nikulin
2022-10-20 16:55                             ` Juan Manuel Macías
2022-10-21  3:34                               ` Ihor Radchenko
2022-10-21 16:38                                 ` Max Nikulin
2022-10-21 19:32                                   ` Juan Manuel Macías
     [not found]                         ` <ac290c60-3b54-5521-eb16-82e6611dc6e2@gmail.com>
2022-10-20 17:07                           ` Juan Manuel Macías
2022-10-29  2:36                     ` Ihor Radchenko
2022-11-13 17:01                       ` Max Nikulin
2022-10-18  4:39             ` Ihor Radchenko
2022-10-19 17:12               ` Max Nikulin
2022-10-20  5:07                 ` Ihor Radchenko
2022-10-20 17:15                   ` Max Nikulin
2022-10-21  3:41                     ` Ihor Radchenko
2022-10-21 16:32                       ` Max Nikulin
2022-10-22  5:15                         ` Ihor Radchenko
2022-10-22 12:26                           ` Juan Manuel Macías
2022-10-22 15:55                           ` Max Nikulin
2022-11-01  1:51                             ` Ihor Radchenko
2022-11-01 16:07                               ` Max Nikulin
2022-11-02  6:44                                 ` Ihor Radchenko
2022-11-02  6:46                                   ` Ihor Radchenko
2022-11-02 15:27                                     ` Max Nikulin
2022-11-03  6:15                                       ` Ihor Radchenko
2022-11-03 15:00                                         ` Juan Manuel Macías
2022-11-03 15:33                                           ` Max Nikulin
2022-11-03 15:48                                             ` Juan Manuel Macías
2022-11-04  4:23                                             ` Ihor Radchenko
2022-11-04  5:40                                               ` Max Nikulin
2022-11-05  5:30                                                 ` Ihor Radchenko
  -- strict thread matches above, loose matches on Subject: below --
2022-11-01 16:55 Juan Manuel Macías

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

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

  git send-email \
    --in-reply-to='tik0uf$td1$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.