* Regression in latex export of tables?
@ 2023-11-01 3:43 Vikas Rawal
2023-11-01 7:32 ` Vikas Rawal
2023-11-01 16:41 ` Max Nikulin
0 siblings, 2 replies; 8+ messages in thread
From: Vikas Rawal @ 2023-11-01 3:43 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 945 bytes --]
Hi all,
I am seeing a peculiar problem, and I would appreciate if somebody could check whether this is a bug or I am missing something.
The following table exports with a [0pt] at the end of each line.
* Test
| A | B | C |
|---+---+---|
| 1 | 2 | 3 |
| | | |
\section{Test}
\label{sec:orgb720d02}
\begin{center}
\begin{tabular}{rrr}
A & B & C\\[0pt]
\hline
1 & 2 & 3\\[0pt]
& & \\[0pt]
\end{tabular}
\end{center}
\end{document}
I have tried this by running emacs -q (to check if something in my config was messing up). With emacs -q, my org-version is: Org mode version 9.6.7 (release_9.6.7-13-g99cc96)
If I use my .emacs.d, my org-version is: Org mode version 9.7-pre (release_9.6.10-906-gee0961
Both give this strage [0pt] at the end of every line of the table.
Is this by design? This seems to be something recent. Am I missing something.
Thanks,
Vikas
[-- Attachment #2: Type: text/html, Size: 1144 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Regression in latex export of tables?
2023-11-01 3:43 Regression in latex export of tables? Vikas Rawal
@ 2023-11-01 7:32 ` Vikas Rawal
2023-11-01 16:41 ` Max Nikulin
1 sibling, 0 replies; 8+ messages in thread
From: Vikas Rawal @ 2023-11-01 7:32 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 526 bytes --]
I am seeing a peculiar problem, and I would appreciate if somebody could check whether this is a bug or I am missing something.
The following table exports with a [0pt] at the end of each line.I can confirm that the problem disappears if I move to the following version of org-mode:
commit bed47b437d8cde7a98bafdb07996e248b40f70e6 (HEAD -> main, origin/main)
Author: Rudolf Adamkovič <salutis@me.com>
Date: Fri Oct 21 14:48:56 2022 +0200
Clearly, the problem has appeared more recently than this.
Vikas
[-- Attachment #2: Type: text/html, Size: 677 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Regression in latex export of tables?
2023-11-01 3:43 Regression in latex export of tables? Vikas Rawal
2023-11-01 7:32 ` Vikas Rawal
@ 2023-11-01 16:41 ` Max Nikulin
2023-11-01 23:04 ` Vikas Rawal
1 sibling, 1 reply; 8+ messages in thread
From: Max Nikulin @ 2023-11-01 16:41 UTC (permalink / raw)
To: Vikas Rawal, emacs-orgmode
On 01/11/2023 10:43, Vikas Rawal wrote:
> Both give this strage [0pt] at the end of every line of the table.
>
> Is this by design? This seems to be something recent. Am I missing
> something.
If you believe that it is a regression then try to export something like
| (a,b) | open interval |
| [0,1] | closed interval |
https://list.orgmode.org/?q=%5B0pt%5D
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Regression in latex export of tables?
2023-11-01 16:41 ` Max Nikulin
@ 2023-11-01 23:04 ` Vikas Rawal
2023-11-02 9:29 ` Fraga, Eric
0 siblings, 1 reply; 8+ messages in thread
From: Vikas Rawal @ 2023-11-01 23:04 UTC (permalink / raw)
To: Max Nikulin; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 680 bytes --]
On 01/11/2023 10:43, Vikas Rawal wrote:
> Both give this strage [0pt] at the end of every line of the table.
>
> Is this by design? This seems to be something recent. Am I missing
> something.
If you believe that it is a regression then try to export something like
| (a,b) | open interval |
| [0,1] | closed interval |
https://list.orgmode.org/?q=%5B0pt%5D
I am sorry, but I do not understand what are you pointing at. This is what I get:
----
\begin{center}
\begin{tabular}{ll}
(a,b) & open interval\\[0pt]
[0,1] & closed interval\\[0pt]
\end{tabular}
\end{center}
\end{document}
----
What is this [0pt] at the end?
[-- Attachment #2: Type: text/html, Size: 928 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Regression in latex export of tables?
2023-11-01 23:04 ` Vikas Rawal
@ 2023-11-02 9:29 ` Fraga, Eric
2023-11-03 0:58 ` Vikas Rawal
0 siblings, 1 reply; 8+ messages in thread
From: Fraga, Eric @ 2023-11-02 9:29 UTC (permalink / raw)
To: Vikas Rawal; +Cc: Max Nikulin, emacs-orgmode@gnu.org
On Wednesday, 1 Nov 2023 at 19:04, Vikas Rawal wrote:
> I am sorry, but I do not understand what are you pointing at. This is
> what I get:
>
> ----
> \begin{center}
> \begin{tabular}{ll}
> (a,b) & open interval\\[0pt]
> [0,1] & closed interval\\[0pt]
> \end{tabular}
> \end{center}
> \end{document}
> ----
I think the point is that without the [0pt], the following line's [0,1]
gets interpreted as a length parameter for the line break, \\.
--
: Eric S Fraga, with org release_9.6.6-418-g294a4d in Emacs 30.0.50
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Regression in latex export of tables?
2023-11-02 9:29 ` Fraga, Eric
@ 2023-11-03 0:58 ` Vikas Rawal
2023-11-03 2:30 ` Max Nikulin
0 siblings, 1 reply; 8+ messages in thread
From: Vikas Rawal @ 2023-11-03 0:58 UTC (permalink / raw)
To: Fraga, Eric; +Cc: Max Nikulin, emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 1202 bytes --]
On Thursday, November 02, 2023 14:59 IST, "Fraga, Eric" <e.fraga@ucl.ac.uk> wrote:
On Wednesday, 1 Nov 2023 at 19:04, Vikas Rawal wrote:
> I am sorry, but I do not understand what are you pointing at. This is
> what I get:
>
> ----
> \begin{center}
> \begin{tabular}{ll}
> (a,b) & open interval\\[0pt]
> [0,1] & closed interval\\[0pt]
> \end{tabular}
> \end{center}
> \end{document}
> ----
I think the point is that without the [0pt], the following line's [0,1]
gets interpreted as a length parameter for the line break, \\.
--
: Eric S Fraga, with org release_9.6.6-418-g294a4d in Emacs 30.0.50Earlier version gives me this:
\begin{center}
\begin{tabular}{ll}
(a,b) & open interval\\\empty
[0,1] & closed interval\\\empty
\end{tabular}
\end{center}
\end{document}
I have several export filters that break because of this [0pt]. For example, I use <mid> in a table row (created by an R source code) to mark wherever I want a midrule using this:
(defun org-export-midrule-filter-latex (row backend info)
(replace-regexp-in-string "\\(<mid>\\([[:blank:]]+\\&\\)+\\)[[:blank:]]\\\\\\\\" "\\\\midrule" row))
Now my \midrule becomes \midrule[0pt].
Vikas
[-- Attachment #2: Type: text/html, Size: 1512 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Regression in latex export of tables?
2023-11-03 0:58 ` Vikas Rawal
@ 2023-11-03 2:30 ` Max Nikulin
2023-11-03 3:01 ` Vikas Rawal
0 siblings, 1 reply; 8+ messages in thread
From: Max Nikulin @ 2023-11-03 2:30 UTC (permalink / raw)
To: emacs-orgmode
On 03/11/2023 07:58, Vikas Rawal wrote:
> Earlier version gives me this:
> \begin{center}
> \begin{tabular}{ll}
> (a,b) & open interval\\\empty
> [0,1] & closed interval\\\empty
It was changed to avoid your inconvenience:
https://list.orgmode.org/874jw2conh.fsf@posteo.net/T/#u
Juan Manuel Macías. Re: Line breaks and brackets in LaTeX export. Mon,
17 Oct 2022 18:04:34 +0000
That moment there was no hope that tabularray would support \empty out
of the box. Perhaps some stable Linux distribution still have its
version unaware of \empty.
> (defun org-export-midrule-filter-latex (row backend info)
> (replace-regexp-in-string
> "\\(<mid>\\([[:blank:]]+\\&\\)+\\)[[:blank:]]\\\\\\\\" "\\\\midrule" row))
>
> Now my \midrule becomes \midrule[0pt].
Sorry, but your have to adjust the pattern and the replacement string to
allow either optional \empty or [0pt].
I still do not see a better solution that does not require substantional
changes of the org-export framework.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Regression in latex export of tables?
2023-11-03 2:30 ` Max Nikulin
@ 2023-11-03 3:01 ` Vikas Rawal
0 siblings, 0 replies; 8+ messages in thread
From: Vikas Rawal @ 2023-11-03 3:01 UTC (permalink / raw)
To: Max Nikulin; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 833 bytes --]
On 03/11/2023 07:58, Vikas Rawal wrote:
> Earlier version gives me this:
> \begin{center}
> \begin{tabular}{ll}
> (a,b) & open interval\\\empty
> [0,1] & closed interval\\\empty
It was changed to avoid your inconvenience:
https://list.orgmode.org/874jw2conh.fsf@posteo.net/T/#uOh, wow! Thank you all for having been so considerate of needs of even individual users like this. I did not notice this.
Org mode community does not cease to amaze me.
> (defun org-export-midrule-filter-latex (row backend info)
> (replace-regexp-in-string
> "\\(<mid>\\([[:blank:]]+\\&\\)+\\)[[:blank:]]\\\\\\\\" "\\\\midrule" row))
>
> Now my \midrule becomes \midrule[0pt].
Sorry, but your have to adjust the pattern and the replacement string to
allow either optional \empty or [0pt].Done
Thank you once again.
Vikas
[-- Attachment #2: Type: text/html, Size: 1206 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-11-03 3:02 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-01 3:43 Regression in latex export of tables? Vikas Rawal
2023-11-01 7:32 ` Vikas Rawal
2023-11-01 16:41 ` Max Nikulin
2023-11-01 23:04 ` Vikas Rawal
2023-11-02 9:29 ` Fraga, Eric
2023-11-03 0:58 ` Vikas Rawal
2023-11-03 2:30 ` Max Nikulin
2023-11-03 3:01 ` Vikas Rawal
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).