diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 3d18ee7ff..6d72dab70 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -278,17 +278,17 @@ list can be: - `:lang-name' the actual name of the language.") -(defconst org-latex-line-break-safe "\\\\\\empty" +(defconst org-latex-line-break-safe "\\\\[0pt]" "Linebreak protecting the following [...]. -Without \"\\empty\" it would be interpreted as an optional argument to +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\\\\\\empty - [I] & A\\\\\\empty + [t] & s\\\\[0pt] + [I] & A\\\\[0pt] [m] & kg \\end{tabular}") @@ -4005,9 +4005,9 @@ a communication channel." (org-export-get-parent-table table-row) info)))) (format "%s \\endfirsthead -\\multicolumn{%d}{l}{%s} \\\\\\empty +\\multicolumn{%d}{l}{%s} \\\\[0pt] %s -%s \\\\\\empty\n +%s \\\\[0pt]\n %s \\endhead %s\\multicolumn{%d}{r}{%s} \\\\ diff --git a/testing/lisp/test-org-table.el b/testing/lisp/test-org-table.el index 722c37ea4..573179878 100644 --- a/testing/lisp/test-org-table.el +++ b/testing/lisp/test-org-table.el @@ -1635,11 +1635,11 @@ See also `test-org-table/copy-field'." (ert-deftest test-org-table/to-latex () "Test `orgtbl-to-latex' specifications." (should - (equal "\\begin{tabular}{l}\na\\\\\\empty\n\\end{tabular}" + (equal "\\begin{tabular}{l}\na\\\\[0pt]\n\\end{tabular}" (orgtbl-to-latex (org-table-to-lisp "| a |") nil))) ;; Test :environment parameter. (should - (equal "\\begin{tabularx}{l}\na\\\\\\empty\n\\end{tabularx}" + (equal "\\begin{tabularx}{l}\na\\\\[0pt]\n\\end{tabularx}" (orgtbl-to-latex (org-table-to-lisp "| a |") '(:environment "tabularx")))) ;; Test :booktabs parameter. @@ -1648,7 +1648,7 @@ See also `test-org-table/copy-field'." "\\toprule" (orgtbl-to-latex (org-table-to-lisp "| a |") '(:booktabs t)))) ;; Handle LaTeX snippets. (should - (equal "\\begin{tabular}{l}\n\\(x\\)\\\\\\empty\n\\end{tabular}" + (equal "\\begin{tabular}{l}\n\\(x\\)\\\\[0pt]\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 4fb9f2888..adb3a60ea 100644 --- a/testing/lisp/test-ox-latex.el +++ b/testing/lisp/test-ox-latex.el @@ -60,14 +60,14 @@ lorem ipsum dolor (should (search-forward "\\begin{verse} -lorem ipsum dolor\\\\\\empty -lorem ipsum dolor\\\\\\empty +lorem ipsum dolor\\\\[0pt] +lorem ipsum dolor\\\\[0pt] \\vspace*{1em} -lorem ipsum dolor\\\\\\empty -lorem ipsum dolor\\\\\\empty +lorem ipsum dolor\\\\[0pt] +lorem ipsum dolor\\\\[0pt] \\vspace*{1em} -lorem ipsum dolor\\\\\\empty -lorem ipsum dolor\\\\\\empty +lorem ipsum dolor\\\\[0pt] +lorem ipsum dolor\\\\[0pt] \\end{verse}")))) (provide 'test-ox-latex)