emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] Org export to latex/pdf with longtabu adds extra line (\\) whe


From: Ihor Radchenko
Subject: Re: [BUG] Org export to latex/pdf with longtabu adds extra line (\\) when #+NAME is present but no #+CAPTION [9.8-pre (release_9.7.11-145-g28b631 @ /home/aurel/admin/org-bugreport/org/lisp/)]
Date: Thu, 03 Oct 2024 17:56:07 +0000

> when exporting org table to latex/pdf with longtabu environment the
> generated latex includes extra \\ if the #+NAME tag is present,
> inserting an needed row, the resulting table look ugly in some cases.

Thanks for reporting!
Confirmed.

> The extra \\ seem to be added at ox-latex.el line 3937 (current git head):
> 
>       (concat (and fontsize (concat "{" fontsize))
>               (format "\\begin{%s}%s{%s}\n" table-env width alignment)
>               (and above?
>                    (org-string-nw-p caption)
>                    (concat caption "\\\\\n")) ; <= HERE 
>               contents
>               (and (not above?)
>                    (org-string-nw-p caption)
>                    (concat caption "\\\\\n"))
>               (format "\\end{%s}" table-env)
>               (and fontsize "}"))))
> 
> When I remove the "\\\\" the generated code is correct, but I suspect
> this is may be useful in some other cases and this may not be a suitable
> fix?

Yes, the problem occurs where you pointed.
The "\\\\" part is present there from the very first commit in ox-latex.
I am not sure why it is there.

What happens if you remove "\\\\" part from the code and play around
with tables with/without #+caption/#+name?

-- 
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 via email to

[Prev in Thread] Current Thread [Next in Thread]