From 264fb8b7f2c5782c92c5beffe54ac18c97b4b685 Mon Sep 17 00:00:00 2001 From: Gaurav Date: Mon, 9 May 2022 18:05:52 -0400 Subject: [PATCH] lisp/org-table.el: Use booktabs on org-table-export * lisp/org-table.el (orgtbl-to-latex): Read booktabs flag from `org-latex-tables-booktabs' if `:booktabs' is not present in table `params'. Problem was while using ~org-table-export~ on a table directly even with ~org-latex-tables-booktabs~ set to ~t~, it exports a normal table instead of booktabs table. But on the same point, if you export the whole buffer the table will be exported according to booktabs. I looked at the discrepancy between the method used by ~org-latex-export-to-latex~ and the ~org-table-export~ and did this to fix it. TINYCHANGE --- lisp/org-table.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/org-table.el b/lisp/org-table.el index b160dc97c..46498f119 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -6000,7 +6000,9 @@ supported. It is also possible to use the following ones: (list :backend 'latex :latex-default-table-mode 'table :latex-tables-centered nil - :latex-tables-booktabs (plist-get params :booktabs) + :latex-tables-booktabs (if (plist-member params :booktabs) + (plist-get params :booktabs) + org-latex-tables-booktabs) :latex-table-scientific-notation nil :latex-default-table-environment (or (plist-get params :environment) "tabular")) -- 2.36.1