From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 3FKUH/aK9GZ6FgEAqHPOHw:P1 (envelope-from ) for ; Wed, 25 Sep 2024 22:13:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 3FKUH/aK9GZ6FgEAqHPOHw (envelope-from ) for ; Thu, 26 Sep 2024 00:13:10 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict), No valid DKIM" header.from=francillon.net (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1727302390; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=K9uS+G5nBhbDfamtI5GFo7j1N2bNnoM6/OS6Kkb6XDI=; b=E/SXOng6OsFp5AYfxstc5SwfTYcAJSXi61XcuLzpbzi3Sde82PXpi1HFMmZBjCdcJ/YJma DymfsvXTTMDZh5nI9OZt3qzG9zlFKlh/xiKpcynrx+d4Y0YjRKem67X1Vx+mBbUwkhctQx jXEPQ0mgSRP4GGDvywouUSCto/Fa8fXemdyfSu59DzCLwL6xGfMMRZxNQgQB3a9wm1Fi3t 3cjnCpFzNZep7YNbk+nW40fb1iXj3EFRCvGTNczKHGqxykSwOg6ymx30RThbp/nOI5dU5y +LqD+8BcU4d3bc52MUDbgWgO8P6hQlEXyZuxmhpoxZM+/Bj+BmVCRQXhnYHUXw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict), No valid DKIM" header.from=francillon.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1727302390; a=rsa-sha256; cv=none; b=NEC8IE02Vnf0MdBfCy9VMr586d3/0kIsDTURGDOf/yLlouMtJVVZpdYaerhK4cNcOfwGAL ksf0Cm8cHpI4WydrgWH8FsGBnYXZaLOlPeYON/ck3dutUu3iyOjElk9IDvfbbJep0YI5Iq 4PZ7IStJJhkZ5NSHBpACwJDO/kGkXifERpvc2wJ5j90OUKZ0vH9T446+pvgIXmCpb0FNXx sjewXQH2WHdgxoU4Ntpo2bJ9MGj/FstxKeSjYwlRgO/pJ36losTdEAaLH6NzqtWIZl7SnY lRoYbmoJzEZEbbElfBvGERMCYzURpcCpLOyV4diWS/slL/QtjsMvdUeOVJXJew== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4DB60735E9 for ; Thu, 26 Sep 2024 00:13:10 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1staAH-0003KH-Hs; Wed, 25 Sep 2024 18:07:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1stZd3-0007Hy-Ve for emacs-orgmode@gnu.org; Wed, 25 Sep 2024 17:32:58 -0400 Received: from smtp2.eurecom.fr ([193.55.113.211]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1stZcz-0002pl-NI for emacs-orgmode@gnu.org; Wed, 25 Sep 2024 17:32:56 -0400 X-CSE-ConnectionGUID: ihmN2BWCSoKBkmSz5z6Kvg== X-CSE-MsgGUID: SlNbBNFRSL+NIt+OBp1WEQ== X-IronPort-AV: E=Sophos;i="6.10,258,1719871200"; d="asc'?scan'208";a="16181583" Received: from waha.eurecom.fr (HELO smtps.eurecom.fr) ([10.3.2.236]) by drago2i.eurecom.fr with ESMTP; 25 Sep 2024 23:32:49 +0200 Received: from crashtoo (lfbn-nic-1-17-227.w2-15.abo.wanadoo.fr [2.15.112.227]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtps.eurecom.fr (Postfix) with ESMTPSA id 924522DBB; Wed, 25 Sep 2024 23:32:48 +0200 (CEST) Received: by crashtoo (Postfix, from userid 1000) id D55573B0F2DC; Wed, 25 Sep 2024 23:32:47 +0200 (CEST) Date: Wed, 25 Sep 2024 23:32:47 +0200 From: =?utf-8?B?QXVyw6lsaWVu?= Francillon To: emacs-orgmode@gnu.org Subject: [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/)] Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="QxSZbaScxwL35ehO" Content-Disposition: inline Received-SPF: pass client-ip=193.55.113.211; envelope-from=aurelien@francillon.net; helo=smtp2.eurecom.fr X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 25 Sep 2024 18:07:14 -0400 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 4DB60735E9 X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -8.02 X-Migadu-Spam-Score: -8.02 X-TUID: dsSh76wgFxUC --QxSZbaScxwL35ehO Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, 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. This table export correctly: #+ATTR_LATEX: :environment longtabu :align {|l|l|} | 100 | test | Generated tex: \begin{longtabu}{{|l|l|}} 100 & test\\ \end{longtabu} This table does not: #+ATTR_LATEX: :environment longtabu :align {|l|l|} #+NAME: 1 | 100 | test | Generated tex: \begin{longtabu}{{|l|l|}} \label{tab:orgfed8bde} \\ 100 & test\\ \end{longtabu} The extra \\ is inserting a new row and because of the ":align {|l|l|}" it actually looks ugly with extra vertiocal bars on top of the table Note that when both #+NAME and #+CAPTIONS are present the extra \\ is not causing an issue. #+CAPTION: Test caption #+NAME: 222 #+ATTR_LATEX: :environment longtabu :align {|l|l|} | 100 | test | Generated tex: \begin{longtabu}{{|l|l|}} \caption{\label{tab:org6e51105}Test caption} \\ 100 & test\\ \end{longtabu} The problem also does not appear with tabu environment. 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")) ; <=3D HERE=20 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? Best, Aur=C3=A9lien=20 Emacs : GNU Emacs 29.4 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43= , cairo version 1.18.0) Package: Org mode version 9.8-pre (release_9.7.11-145-g28b631 @ /home/aurel= /admin/org-bugreport/org/lisp/) current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (setq org-link-elisp-confirm-function 'yes-or-no-p org-bibtex-headline-format-function 'org-bibtex-headline-format-default org-persist-after-read-hook '(org-element--cache-persist-after-read) org-export-before-parsing-hook '(org-attach-expand-links) org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-he= ader-arg-expand) org-archive-hook '(org-attach-archive-delete-maybe) org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-func= tion org-ascii-format-drawer-function '(closure (t) (_name contents _width) con= tents) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lin= es org-cycle-optimize-window-after-visibility-change org-cycle-display-inl= ine-images) org-persist-before-read-hook '(org-element--cache-persist-before-read) org-yank-image-file-name-function 'org-yank-image-autogen-filename org-mode-hook '((closure (org--rds reftex-docstruct-symbol org-attach-method org--single-lines-l= ist-is-paragraph org-element-greater-elements org-agenda-restrict-end org-agenda-restri= ct-begin org-agenda-restrict visual-fill-column-width org-clock-history org-age= nda-current-date org-with-time org-defdecode org-def org-read-date-inactive org-ans2 or= g-ans1 org-columns-current-fmt-compiled org-clock-current-task org-clock-effo= rt org-agenda-skip-function org-agenda-skip-comment-trees org-agenda-arch= ives-mode org-end-time-was-given org-time-was-given org-log-note-extra org-log-n= ote-purpose org-log-post-message org-last-inserted-timestamp org-last-changed-time= stamp org-entry-property-inherited-from org-state org-agenda-headline-snapsh= ot-before-repeat org-agenda-buffer-name org-agenda-start-on-weekday org-agenda-buffer-t= mp-name org-log-note-marker org-priority-regexp org-mode-abbrev-table org-elem= ent-cache-persistent org-element-cache-version buffer-face-mode-face org-tbl-menu org-org-m= enu org-struct-menu org-entities org-last-state org-id-track-globally org-clock-start-time= texmathp-why remember-data-file org-agenda-tags-todo-honor-ignore-options calc-embe= dded-open-mode calc-embedded-open-formula calc-embedded-close-formula align-mode-rule= s-list org-emphasis-alist org-emphasis-regexp-components org-export-registered-backends org-modu= les crm-separator org-babel-load-languages org-id-overriding-file-name org-indent-indent= ation-per-level org-element--timestamp-regexp org-element-cache-map-continue-from org-element-paragraph-separate org-agenda-buffer-name org-inlinetask-m= in-level t) nil (add-hook 'change-major-mode-hook 'org-fold-show-all 'append 'local= )) (closure (org-src-window-setup *this* org-babel-confirm-evaluate-answer-no org-babel-tangle-uncomment-comments org-src-lang-modes org-edit-src-co= ntent-indentation org-babel-library-of-babel t) nil (add-hook 'change-major-mode-hook #'org-babel-show-result-all 'appe= nd 'local)) org-babel-result-hide-spec org-babel-hide-all-hashes) org-latex-format-drawer-function '(closure (engrave-faces-latex-mathescape engrave-faces-current-preset-style engrave-faces-latex-output-style t) (_ contents) contents) org-latex-format-headline-function 'org-latex-format-headline-default-func= tion org-confirm-shell-link-function 'yes-or-no-p org-html-format-drawer-function '(closure (htmlize-buffer-places org-html-format-table-no-css htmlize-css-name= -prefix htmlize-output-type htmlize-output-type htmlize-css-name-prefix t) (_name contents) contents) outline-isearch-open-invisible-function 'outline-isearch-open-invisible org-sort-function 'string-collate-lessp org-odt-format-headline-function 'org-odt-format-headline-default-function org-agenda-before-write-hook '(org-agenda-add-entry-text) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-confi= gure-edit-buffer) org-confirm-elisp-link-function 'yes-or-no-p org--warnings nil org-speed-command-hook '(org-speed-command-activate org-babel-speed-comman= d-activate) org-html-format-inlinetask-function 'org-html-format-inlinetask-default-fu= nction org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-odt-format-drawer-function '(closure (hfy-user-sheet-assoc hfy-html-quote-regex hfy-html-quote-map hfy-fac= e-to-css hfy-begin-span-handler hfy-end-span-handler archive-zip-extract nxml-auto-insert-xml-declaration-flag t) (_name contents) contents) org-persist-directory "/tmp/org-persist-auw53H" org-fold-core-isearch-open-function 'org-fold--isearch-reveal org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-= function org-persist-before-write-hook '(org-element--cache-persist-before-write) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-a= rg-expand) org-link-shell-confirm-function 'yes-or-no-p org-babel-pre-tangle-hook '(save-buffer) org-agenda-loop-over-headlines-in-active-region nil org-occur-hook '(org-first-headline-recenter) org-metadown-hook '(org-babel-pop-to-session-maybe) org-link-parameters '(("attachment" :follow org-attach-follow :complete or= g-attach-complete-link) ("id" :follow org-id-open :store org-id-store-link-maybe) ("eww" :follow org-eww-open :store org-eww-store-link) ("rmail" :follow org-rmail-open :store org-rmail-store-link) ("mhe" :follow org-mhe-open :store org-mhe-store-link) ("irc" :follow org-irc-visit :store org-irc-store-link :export org= -irc-export) ("info" :follow org-info-open :export org-info-export :store org-i= nfo-store-link :insert-description org-info-description-as-command) ("gnus" :follow org-gnus-open :store org-gnus-store-link) ("docview" :follow org-docview-open :export org-docview-export :st= ore org-docview-store-link) ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link) ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete or= g-bbdb-complete-link :store org-bbdb-store-link) ("w3m" :store org-w3m-store-link) ("doi" :follow org-link-doi-open :export org-link-doi-export) ("fi= le+sys") ("file+emacs") ("shell" :follow org-link--open-shell) ("news" :follow (closure ((scheme . "news")) (url arg) (browse-url (concat scheme ":" ur= l) arg))) ("mailto" :follow (closure ((scheme . "mailto")) (url arg) (browse-url (concat scheme ":" = url) arg))) ("https" :follow (closure ((scheme . "https")) (url arg) (browse-url (concat scheme ":" u= rl) arg))) ("http" :follow (closure ((scheme . "http")) (url arg) (browse-url (concat scheme ":" ur= l) arg))) ("ftp" :follow (closure ((scheme . "ftp")) (url arg) (browse-url (concat scheme ":" url= ) arg))) ("shortdoc" :follow org-link--open-shortdoc :store org-link--store= -shortdoc :complete org-link--complete-shortdoc) ("help" :follow org-link--open-help :store org-link--store-help) ("file" :complete org-link-complete-file) ("elisp" :follow org-lin= k--open-elisp)) org-html-format-headline-function 'org-html-format-headline-default-functi= on org-metaup-hook '(org-babel-load-in-session-maybe) ) --QxSZbaScxwL35ehO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiqvGLyMAnrQaT0/Sm0Jhhhy7+uYFAmb0gX8ACgkQm0Jhhhy7 +uZxqQ//frvh0tr7t5kjyMJg+SnHYKHgwTTU4F2qO/nBnYgmuGPkCKUC6FBds/NI PXAdmUvl9gBKftBqg+1s4lPPCtZp3Bd31eFV5ElBR1x5tuIO8I6jGrgMmr93L/z+ lrDVAAQLu0853tWK+zEJlTHvabFSYWONa9rCcaD5BlqnxvQ9wEDDgES0yC6yyZCq Bo6XiGAJkKdRuHOOB34i7l6LiJKhRkOtjYwXcLa01UTAqYdja/1EImV+Nn62eUTm reOoXsIAd+IUpjnvEjBm3X4LUS4PIM0lM5laQ+Ip++J/zvTzgNG67+kAeFtprF3K cLzEWgZeDGgSnKE6WdaYGHW+l7rkKrkD62TN3ZQnmIByJvFxE4+6CT3h9fVLhPP3 Klw7u5rtQI8XkZa4zLkydJOtSuUPxwMg6Jjh3bUJoQ4Amq2TKBiFKcnpmhnhzYRl gHoW+FXY/UhAjpTLOo2pcJ66Hj8DU7KLKhdw1CA828Fa6UsMmFcW72wNWugSg5z1 0gEfZBjknWrBW1Xd1xBLTVzICeWLHpb8mc3Pjw1ZFPaZopa1QaCKaGVMDwbXq5Mm ggysYc3L7WO+7l9QCWLEQ96P0J9Hun/FAwS2oaXFCsPICo6RVnU06K8lFm6wtBXV 42a6Xh+F+Y3a9U4AmrozbtIc6rH2ViZiBQ8y55FYIYUQxLX5l0Y= =Sms1 -----END PGP SIGNATURE----- --QxSZbaScxwL35ehO--