From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 0FZIGNIerWV+NAEA62LTzQ:P1 (envelope-from ) for ; Sun, 21 Jan 2024 14:40:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 0FZIGNIerWV+NAEA62LTzQ (envelope-from ) for ; Sun, 21 Jan 2024 14:40:34 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=AP4niHdW; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1705844434; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=iycVb/Gr+C9vUJTQkgazyJhKyX9On3LGV+zrVabc7WU=; b=GYncBkP0DdmlBGJTLdpBc0tIXkMu3w0ayNL758cxCYZ2uN62ivN+2RyW4xFXvvuPyw76+c ck9BcgKBUUwSq3fKhnbXv9ROwn9colBJWW/P8BLnLjC7bi1kEiPIAorQMxc2T/sp5GH+k1 Y4p6FXYHfOPZ0YTDF6xxvMh/Jb0p+Or0qMKr8m98MI0iJhCCNmrWaVrZOzWdnhXRWiXB+/ hTe3/8rzRD8uRnGatyA+yHZKBJKdUy0wjzb9xct1qw2wYBM7aFsaCIH+TU4EydW9GnckID FQQq2A3zMD5MM1KgfuQMBbNTKh3/VkKy/i3bnQner8Eh3z4fSRMqYl6i8drxbQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=AP4niHdW; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1705844434; a=rsa-sha256; cv=none; b=i1HoXD46hmwvb1qRk5/81ef+jBcDk9nq6yly8tqldcvhx6QnsZqPX8ZI27kSRbr7tf6rUV gglqcQ4U7wmrzGyC7VzIj7q88kkFkhNSef5FmQy4YpYKOiAHPWoFYOrbXaB0KHQ+OBVB2T /gRslF+5dIZLOG1xrdkFqoVjll2O0EXXyUopvWlxG8vCk5OfQEV1HQoSxSRa8uHQuYfzd9 ARnaESM6ZYAWZboZlfLVF628R/AkF15xhS9C94b2AZKH5jd1lTnuRYwNB75Q/eIN682chr LVIHTTVN4fozIHMW+iYz2B1qkL1KRmQH6SD8ks3cUhvWIwnT61di5EbE2vw1pQ== 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 0FD4B36EB5 for ; Sun, 21 Jan 2024 14:40:34 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRY3D-0002de-O5; Sun, 21 Jan 2024 08:39:51 -0500 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 1rRY38-0002cZ-31 for emacs-orgmode@gnu.org; Sun, 21 Jan 2024 08:39:46 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rRY34-0001xL-G1 for emacs-orgmode@gnu.org; Sun, 21 Jan 2024 08:39:45 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 4055A240034 for ; Sun, 21 Jan 2024 14:39:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705844379; bh=rhoDUVsWBOThq12lPnW9+OgUgKHUc3TroqNZwYXIa/w=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=AP4niHdWSsFXObA/nA+0NPNPjrlBJsRhynigvY9Y/KKChoNmfg9g18SPOdp4mb210 p1STs/LlmSOHmLUaeZdfOdhf0UXEUlrrheaKumvIKxTQlRcruRXEMTZ/Ig8JIwYqj3 oJyB2OxUSyRTParlQhr/XIfKyyQ2w41n2sBDtIhbTTsrLeYQVGTjwUVyjF/Ujjf/lG E03bRK/S7lc5iAWgAuV0IfzKv2Y9xHcI7dqqTyKWFK0+Xt5xycdneKIWkAllpA9l66 yHGgQ8hRUotcSF9/pmyhznByrCMvWR+rw/n5L1wXJrnDsGc1kqJ9gHfxqQOwlUZcbZ MD4T0MnWHdXFw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4THvbV2GhDz9rxD; Sun, 21 Jan 2024 14:39:34 +0100 (CET) From: Ihor Radchenko To: Juan Manuel =?utf-8?Q?Mac=C3=ADas?= Cc: orgmode , Max Nikulin Subject: Re: [possible patch] Remove the '\\[0pt]' string from the last line of a verse block in LaTeX export In-Reply-To: <878r4jg37s.fsf@posteo.net> References: <874jfvjo2k.fsf@posteo.net> <87cyu5uv7c.fsf@localhost> <878r4tfccn.fsf@posteo.net> <87zfx9t7di.fsf@localhost> <87wmsddlw5.fsf@posteo.net> <87r0ikrt5h.fsf@localhost> <87o7dnefwo.fsf@posteo.net> <87cyu1l69f.fsf@localhost> <87il3tax9a.fsf@posteo.net> <8734uwjerg.fsf@localhost> <87o7dju9vn.fsf@posteo.net> <8734uuaj11.fsf@localhost> <87h6j96xn5.fsf@posteo.net> <871qac6v5j.fsf@localhost> <87o7dgf8bb.fsf@posteo.net> <87o7dg5d8f.fsf@localhost> <87frysf1wf.fsf@posteo.net> <875xzn6dw3.fsf@localhost> <878r4jg37s.fsf@posteo.net> Date: Sun, 21 Jan 2024 13:42:52 +0000 Message-ID: <87mssyg5ur.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -53 X-Spam_score: -5.4 X-Spam_bar: ----- X-Spam_report: (-5.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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-Spam-Score: -9.89 X-Spam-Score: -9.89 X-Migadu-Queue-Id: 0FD4B36EB5 X-Migadu-Scanner: mx12.migadu.com X-TUID: 13TXAdCA5NTR --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Juan Manuel Mac=C3=ADas writes: >> Although I am still a bit hesitant to remove >> `org-latex-line-break-safe'. >> What would be the benefit of removing it? For now, I mostly just see >> that it will make the life harder for users in Scenario B. > > It's a complicated situation, because we now have two solutions to the > same problem... It certainly sounds a bit abrupt to remove > org-latex-line-break-safe (at least for now). I see no problem in both > solutions coexisting. After all, the user can always give an "\\\\" > value to org-latex-line-break-safe. The other possibility is that > org-latex-line-break-safe is selectively deleted, as you mentioned in a > previous email. In tables and verse blocks, unless I'm missing > something, I think adding [0pt] would be unnecessary, with the new > solution. Upon looking closer into selective removal, it turned out to be more tricky than I thought. I'm afraid that using \\[0pt] only in some places may become a bit of headache to maintain - we may accidentally break certain regexp replacements in `org-latex-verse-block'. In particular, when verse contents is not straightforward and uses \\[0pt]. Given that `org-latex-line-break-safe' also introduced the problem with verse blocks, I decided that it is better to remove it at the end. See the attached tentative patchset. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=v2-0001-ox-latex-Make-sure-that-text-is-not-misinterprete.patch >From d2e74cc2734eaf8d782f5acf66b11956d6ffa47e Mon Sep 17 00:00:00 2001 Message-ID: From: Ihor Radchenko Date: Thu, 18 Jan 2024 14:01:32 +0100 Subject: [PATCH v2 1/2] ox-latex: Make sure that [text] is not misinterpreted as LaTeX argument * lisp/ox-latex.el (org-latex-plain-text): Protect plain text starting from [. It might be misinterpreted as optional command argument if previous exported fragment ends with a command accepting such. * testing/lisp/test-ox-latex.el (text-ox-latex/protect-square-brackets): Add new test. Link: https://orgmode.org/list/87o7dju9vn.fsf@posteo.net --- lisp/ox-latex.el | 9 +++++++++ testing/lisp/test-ox-latex.el | 23 +++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index df20345f8..a64dd5a87 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -3095,6 +3095,15 @@ (defun org-latex-plain-text (text info) "\\(?:[ \t]*\\\\\\\\\\)?[ \t]*\n" (concat org-latex-line-break-safe "\n") output nil t))) + ;; Protect [foo] at the beginning of lines / beginning of the + ;; plain-text object. This prevents LaTeX from unexpectedly + ;; interpreting @@latex:\pagebreak@@ [foo] as a command with + ;; optional argument. + (setq output (replace-regexp-in-string + (rx bol (0+ space) (group "[")) + "{[}" + output + nil nil 1)) ;; Return value. output)) diff --git a/testing/lisp/test-ox-latex.el b/testing/lisp/test-ox-latex.el index 41df1b823..237ad97ec 100644 --- a/testing/lisp/test-ox-latex.el +++ b/testing/lisp/test-ox-latex.el @@ -29,6 +29,29 @@ (unless (featurep 'ox-latex) +(ert-deftest text-ox-latex/protect-square-brackets () + "Test [foo] being interpreted as plain text even after LaTeX commands." + (org-test-with-exported-text + 'latex + "* This is test +lorem @@latex:\\pagebreak@@ [ipsum] + +#+begin_figure +[lorem] figure +#+end_figure + +| [foo] | 2 | +| [bar] | 3 | + +- [bax] +- [aur] +" + (goto-char (point-min)) + (should (search-forward "lorem \\pagebreak {[}ipsum]")) + (should (search-forward "{[}lorem] figure")) + (should (search-forward "{[}foo]")) + (should (search-forward "\\item {[}bax]")))) + (ert-deftest test-ox-latex/verse () "Test verse blocks." (org-test-with-exported-text -- 2.43.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=v2-0002-ox-latex-Remove-org-latex-line-break-safe.patch >From dd4618b31dc5070d6802e484fd58cf50f5d3606d Mon Sep 17 00:00:00 2001 Message-ID: In-Reply-To: References: From: Ihor Radchenko Date: Sun, 21 Jan 2024 14:21:33 +0100 Subject: [PATCH v2 2/2] ox-latex: Remove org-latex-line-break-safe This reverts commit 3f60acff7717e472d06833e9cf9fff6ca3d59337 and subsequent relevant comments. * lisp/ox-latex.el (org-latex-line-break-safe): Remove constant. The \\[0pt] is actually not safe to use in some scenarios. We use a different approach to avoid plain text [...] being interpreted as LaTeX optional argument - we escape [ like {[}; that's what pandoc does. (org-latex-clock): (org-latex-line-break): (org-latex-plain-text): (org-latex-planning): (org-latex--org-table): (org-latex--math-table): (org-latex-table-row): (org-latex-verse-block): * testing/lisp/test-org-table.el (test-org-table/to-latex): * testing/lisp/test-ox-latex.el (test-ox-latex/verse): (test-ox-latex/longtable): Remove references to `org-latex-line-break-safe'. * etc/ORG-NEWS (=ox-latex=: ~org-latex-line-break-safe~ is removed): Announce removal. * lisp/org-compat.el (org-latex-line-break-safe): Make obsolete. Link: https://orgmode.org/list/878r4jg37s.fsf@posteo.net --- etc/ORG-NEWS | 10 +++++++ lisp/org-compat.el | 18 +++++++++++++ lisp/ox-latex.el | 49 ++++++++++++---------------------- testing/lisp/test-org-table.el | 6 ++--- testing/lisp/test-ox-latex.el | 16 +++++------ 5 files changed, 56 insertions(+), 43 deletions(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 847ddf614..46f1e66a7 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -13,6 +13,16 @@ Please send Org bug reports to mailto:emacs-orgmode@gnu.org. * Version 9.7 (not released yet) ** Important announcements and breaking changes +*** =ox-latex=: ~org-latex-line-break-safe~ is removed + +~org-latex-line-break-safe~ constant was previously introduced to deal +with edge cases when LaTeX interprets [...] as LaTeX command +argument. However, it caused a number of other issues and proved +itself not to be as "safe" as it supposed to be. + +We now use a Pandoc's approach to deal with the same problem, +utilizing ={[}= to escape =[...]= instances where needed. + *** ~org-agenda-search-headline-for-time~ now ignores all the timestamp in headings Previously, ~org-agenda-search-headline-for-time~ made Org agenda diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 17f07db9d..27d094b07 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -629,6 +629,24 @@ (define-obsolete-variable-alias 'org-reveal-start-hook (define-obsolete-function-alias 'org-file-url-p 'org-url-p "9.6") (define-obsolete-variable-alias 'org-plantuml-executable-args 'org-plantuml-args "Org 9.6") + +(defconst org-latex-line-break-safe "\\\\[0pt]" + "Linebreak protecting the following [...]. + +Without \"[0pt]\" it would be interpreted as an optional argument to +the \\\\. + +This constant, for example, makes the below code not err: + +\\begin{tabular}{c|c} + [t] & s\\\\[0pt] + [I] & A\\\\[0pt] + [m] & kg +\\end{tabular}") +(make-obsolete 'org-latex-line-break-safe + "should not be used - it is not safe in all the scenarios." + "9.7") + (defun org-in-fixed-width-region-p () "Non-nil if point in a fixed-width region." (save-match-data diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index a64dd5a87..d6e74cb45 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -298,23 +298,10 @@ (defconst org-latex-language-alist - `:script-tag' the script otf tag.") -(defconst org-latex-line-break-safe "\\\\[0pt]" - "Linebreak protecting the following [...]. -Without \"[0pt]\" it would be interpreted as an optional argument to -the \\\\. - -This constant, for example, makes the below code not err: - -\\begin{tabular}{c|c} - [t] & s\\\\[0pt] - [I] & A\\\\[0pt] - [m] & kg -\\end{tabular}") - -(defconst org-latex-table-matrix-macros `(("bordermatrix" . "\\cr") +(defconst org-latex-table-matrix-macros '(("bordermatrix" . "\\cr") ("qbordermatrix" . "\\cr") - ("kbordermatrix" . ,org-latex-line-break-safe)) + ("kbordermatrix" . "\\\\")) "Alist between matrix macros and their row ending.") (defconst org-latex-math-environments-re @@ -2124,7 +2111,7 @@ (defun org-latex-clock (clock _contents info) (concat (org-timestamp-translate (org-element-property :value clock)) (let ((time (org-element-property :duration clock))) (and time (format " (%s)" time))))) - org-latex-line-break-safe)) + "\\\\")) ;;;; Code @@ -2722,7 +2709,7 @@ ;;;; Line Break (defun org-latex-line-break (_line-break _contents _info) "Transcode a LINE-BREAK object from Org to LaTeX. CONTENTS is nil. INFO is a plist holding contextual information." - (concat org-latex-line-break-safe "\n")) + "\\\\\n") ;;;; Link @@ -3092,9 +3079,7 @@ (defun org-latex-plain-text (text info) ;; Handle break preservation if required. (when (plist-get info :preserve-breaks) (setq output (replace-regexp-in-string - "\\(?:[ \t]*\\\\\\\\\\)?[ \t]*\n" - (concat org-latex-line-break-safe "\n") - output nil t))) + "\\(?:[ \t]*\\\\\\\\\\)?[ \t]*\n" "\\\\\n" output nil t))) ;; Protect [foo] at the beginning of lines / beginning of the ;; plain-text object. This prevents LaTeX from unexpectedly ;; interpreting @@latex:\pagebreak@@ [foo] as a command with @@ -3139,7 +3124,7 @@ (defun org-latex-planning (planning _contents info) (format (plist-get info :latex-active-timestamp-format) (org-timestamp-translate scheduled))))))) " ") - org-latex-line-break-safe)) + "\\\\")) ;;;; Property Drawer @@ -3919,11 +3904,11 @@ (defun org-latex--org-table (table contents info) (format "\\begin{%s}%s{%s}\n" table-env width alignment) (and above? (org-string-nw-p caption) - (concat caption org-latex-line-break-safe "\n")) + (concat caption "\\\\\n")) contents (and (not above?) (org-string-nw-p caption) - (concat caption org-latex-line-break-safe "\n")) + (concat caption "\\\\\n")) (format "\\end{%s}" table-env) (and fontsize "}")))) (t @@ -4008,7 +3993,7 @@ (defun org-latex--math-table (table info) (lambda (cell) (substring (org-element-interpret-data cell) 0 -1)) (org-element-map row 'table-cell #'identity info) "&") - (or (cdr (assoc env org-latex-table-matrix-macros)) org-latex-line-break-safe) + (or (cdr (assoc env org-latex-table-matrix-macros)) "\\\\") "\n"))) (org-element-map table 'table-row #'identity info) ""))) (concat @@ -4083,7 +4068,7 @@ (defun org-latex-table-row (table-row contents info) (setq table-head-cache (make-hash-table :test #'eq)) (plist-put info :org-latex-table-head-cache table-head-cache)) (if-let ((head-contents (gethash (org-element-parent table-row) table-head-cache))) - (puthash (org-element-parent table-row) (concat head-contents org-latex-line-break-safe "\n" contents) + (puthash (org-element-parent table-row) (concat head-contents "\\\\\n" contents) table-head-cache) (puthash (org-element-parent table-row) contents table-head-cache)))) ;; Return LaTeX string as the transcoder. @@ -4092,7 +4077,7 @@ (defun org-latex-table-row (table-row contents info) ;; hline was specifically marked. (and booktabsp (not (org-export-get-previous-element table-row info)) "\\toprule\n") - contents org-latex-line-break-safe "\n" + contents "\\\\\n" (cond ;; Special case for long tables. Define header and footers. ((and longtablep (org-export-table-row-ends-header-p table-row info)) @@ -4100,9 +4085,9 @@ (defun org-latex-table-row (table-row contents info) (org-element-lineage table-row 'table) info)))) (format "%s \\endfirsthead -\\multicolumn{%d}{l}{%s} \\\\[0pt] +\\multicolumn{%d}{l}{%s} \\\\ %s -%s \\\\[0pt]\n +%s \\\\\n %s \\endhead %s\\multicolumn{%d}{r}{%s} \\\\ @@ -4211,15 +4196,15 @@ (defun org-latex-verse-block (verse-block contents info) (replace-regexp-in-string (if (not lit) (rx-to-string - `(seq (group ,org-latex-line-break-safe "\n") - (1+ (group line-start (0+ space) ,org-latex-line-break-safe "\n")))) - (concat "^[ \t]*" (regexp-quote org-latex-line-break-safe) "$")) + `(seq (group "\\\\\n") + (1+ (group line-start (0+ space) "\\\\\n")))) + "^[ \t]*\\\\$") (if (not lit) (if lin "\\\\!\n\n" "\n\n") "\\vspace*{\\baselineskip}") (replace-regexp-in-string "\\([ \t]*\\\\\\\\\\)?[ \t]*\n" - (concat org-latex-line-break-safe "\n") + "\\\\\n" (if (not lit) (concat (org-trim contents t) "\n") contents) diff --git a/testing/lisp/test-org-table.el b/testing/lisp/test-org-table.el index 92ccd2a05..6ee790894 100644 --- a/testing/lisp/test-org-table.el +++ b/testing/lisp/test-org-table.el @@ -1633,11 +1633,11 @@ (ert-deftest test-org-table/to-generic () (ert-deftest test-org-table/to-latex () "Test `orgtbl-to-latex' specifications." (should - (equal "\\begin{tabular}{l}\na\\\\[0pt]\n\\end{tabular}" + (equal "\\begin{tabular}{l}\na\\\\\n\\end{tabular}" (orgtbl-to-latex (org-table-to-lisp "| a |") nil))) ;; Test :environment parameter. (should - (equal "\\begin{tabularx}{l}\na\\\\[0pt]\n\\end{tabularx}" + (equal "\\begin{tabularx}{l}\na\\\\\n\\end{tabularx}" (orgtbl-to-latex (org-table-to-lisp "| a |") '(:environment "tabularx")))) ;; Test :booktabs parameter. @@ -1646,7 +1646,7 @@ (ert-deftest test-org-table/to-latex () "\\toprule" (orgtbl-to-latex (org-table-to-lisp "| a |") '(:booktabs t)))) ;; Handle LaTeX snippets. (should - (equal "\\begin{tabular}{l}\n\\(x\\)\\\\[0pt]\n\\end{tabular}" + (equal "\\begin{tabular}{l}\n\\(x\\)\\\\\n\\end{tabular}" (orgtbl-to-latex (org-table-to-lisp "| $x$ |") nil))) ;; Test pseudo objects and :raw parameter. (should diff --git a/testing/lisp/test-ox-latex.el b/testing/lisp/test-ox-latex.el index 237ad97ec..d0be4e5a4 100644 --- a/testing/lisp/test-ox-latex.el +++ b/testing/lisp/test-ox-latex.el @@ -71,14 +71,14 @@ (ert-deftest test-ox-latex/verse () (should (search-forward "\\begin{verse} -lorem ipsum dolor\\\\[0pt] +lorem ipsum dolor\\\\ lorem ipsum dolor -lorem ipsum dolor\\\\[0pt] +lorem ipsum dolor\\\\ lorem ipsum dolor -lorem ipsum dolor\\\\[0pt] -lorem ipsum dolor\\\\[0pt] +lorem ipsum dolor\\\\ +lorem ipsum dolor\\\\ \\end{verse}")))) (ert-deftest test-ox-latex/longtable () @@ -98,15 +98,15 @@ (ert-deftest test-ox-latex/longtable () (should (search-forward "\\begin{longtable}{lr} -First & Second\\\\[0pt] -Column & Column\\\\[0pt] +First & Second\\\\ +Column & Column\\\\ \\hline \\endfirsthead")) (goto-char (point-min)) (should (search-forward - "First & Second\\\\[0pt] -Column & Column \\\\[0pt] + "First & Second\\\\ +Column & Column \\\\ \\hline \\endhead")) -- 2.43.0 --=-=-= Content-Type: text/plain -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at --=-=-=--