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.
This commit is contained in:
Nicolas Goaziou 2016-11-06 23:29:12 +01:00
parent a236f7d44f
commit 2c0d8774b4
3 changed files with 10 additions and 7 deletions

View File

@ -12063,11 +12063,10 @@ layout and contents. Valid @LaTeX{} attributes include:
@vindex org-latex-default-table-mode @vindex org-latex-default-table-mode
Nature of table's contents. It can be set to @code{table}, @code{math}, 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} or @code{verbatim}. In particular, when in @code{math} or
@code{inline-math} mode, every cell is exported as-is, horizontal rules are @code{inline-math} mode, every cell is exported as-is and the table is
ignored and the table will be wrapped in a math environment. Also, wrapped within a math environment. Also, contiguous tables sharing the same
contiguous tables sharing the same math mode will be wrapped within the same math mode are merged within the same environment. Default mode is determined
environment. Default mode is determined in in @code{org-latex-default-table-mode}.
@code{org-latex-default-table-mode}.
@item :environment @item :environment
@vindex org-latex-default-table-environment @vindex org-latex-default-table-environment
Environment used for the table. It can be set to any @LaTeX{} table Environment used for the table. It can be set to any @LaTeX{} table

View File

@ -23,6 +23,11 @@ into
: (file (lambda () (sexp))) : (file (lambda () (sexp)))
** New features
*** Horizontal rules are no longer ignored in LaTeX table math mode
* Version 9.0 * Version 9.0
** Incompatible changes ** Incompatible changes

View File

@ -3271,8 +3271,7 @@ This function assumes TABLE has `org' as its `:type' property and
(contents (contents
(mapconcat (mapconcat
(lambda (row) (lambda (row)
;; Ignore horizontal rules. (if (eq (org-element-property :type row) 'rule) "\\hline"
(when (eq (org-element-property :type row) 'standard)
;; Return each cell unmodified. ;; Return each cell unmodified.
(concat (concat
(mapconcat (mapconcat