Re: Regression in latex export of tables?

2023-11-02 Thread Vikas Rawal
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@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
> "\\(\\([[: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
 


Re: Regression in latex export of tables?

2023-11-02 Thread Max Nikulin

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@posteo.net/T/#u
Juan Manuel Macías. Re: Line breaks and brackets in LaTeX export. Mon, 
17 Oct 2022 18:04:34 +


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 
"\\(\\([[: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.





Re: Regression in latex export of tables?

2023-11-02 Thread Vikas Rawal

On Thursday, November 02, 2023 14:59 IST, "Fraga, Eric"  
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  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 
"\\(\\([[:blank:]]+\\&\\)+\\)[[:blank:]]" "midrule" row))

Now my \midrule becomes \midrule[0pt].

Vikas
 


Re: Regression in latex export of tables?

2023-11-02 Thread Fraga, Eric
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


Re: Regression in latex export of tables?

2023-11-01 Thread Vikas Rawal

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?

 


Re: Regression in latex export of tables?

2023-11-01 Thread Max Nikulin

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




Re: Regression in latex export of tables?

2023-11-01 Thread Vikas Rawal
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č 
Date:   Fri Oct 21 14:48:56 2022 +0200

Clearly, the problem has appeared more recently than this.

Vikas
 


Regression in latex export of tables?

2023-10-31 Thread Vikas Rawal

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