summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2016-11-06 23:29:12 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2016-11-06 23:31:54 +0100
commit2c0d8774b423e31d20b74c243fd93983b1949946 (patch)
tree4b9b9fafcd696855667f92734aeb0bba185d7cc1
parenta236f7d44fec2238b56838f26656968920344315 (diff)
downloadorg-mode-2c0d8774b423e31d20b74c243fd93983b1949946.tar.gz
ox-latex: Allow horizontal rules in table math mode
* lisp/ox-latex.el (org-latex--math-table): Handle horizontal rules. * doc/org.texi (Tables in @LaTeX{} export): Update documentation.
-rw-r--r--doc/org.texi9
-rw-r--r--etc/ORG-NEWS5
-rw-r--r--lisp/ox-latex.el3
3 files changed, 10 insertions, 7 deletions
diff --git a/doc/org.texi b/doc/org.texi
index ef653b5..65020e3 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -12063,11 +12063,10 @@ layout and contents. Valid @LaTeX{} attributes include:
@vindex org-latex-default-table-mode
Nature of table's contents. It can be set to @code{table}, @code{math},
@code{inline-math} or @code{verbatim}. In particular, when in @code{math} or
-@code{inline-math} mode, every cell is exported as-is, horizontal rules are
-ignored and the table will be wrapped in a math environment. Also,
-contiguous tables sharing the same math mode will be wrapped within the same
-environment. Default mode is determined in
-@code{org-latex-default-table-mode}.
+@code{inline-math} mode, every cell is exported as-is and the table is
+wrapped within a math environment. Also, contiguous tables sharing the same
+math mode are merged within the same environment. Default mode is determined
+in @code{org-latex-default-table-mode}.
@item :environment
@vindex org-latex-default-table-environment
Environment used for the table. It can be set to any @LaTeX{} table
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 8b2d1f6..a360e35 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -23,6 +23,11 @@ into
: (file (lambda () (sexp)))
+
+** New features
+
+*** Horizontal rules are no longer ignored in LaTeX table math mode
+
* Version 9.0
** Incompatible changes
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index bdb239b..b917355 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -3271,8 +3271,7 @@ This function assumes TABLE has `org' as its `:type' property and
(contents
(mapconcat
(lambda (row)
- ;; Ignore horizontal rules.
- (when (eq (org-element-property :type row) 'standard)
+ (if (eq (org-element-property :type row) 'rule) "\\hline"
;; Return each cell unmodified.
(concat
(mapconcat