[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Bug in export orgtbl / LaTeX
From: |
Nicolas Goaziou |
Subject: |
Re: [O] Bug in export orgtbl / LaTeX |
Date: |
Tue, 18 Jun 2013 22:12:03 +0200 |
Hello,
AW <address@hidden> writes:
> isn't that quite a contradiction: according to org-syntax tables can not
> contain lists, but orgtbl-to-latex treats "1." inside a table as if it were a
> beginning of a list?
Of course it is a contradiction. As, I wrote it, "orgtbl-to-latex"
interprets Org syntax differently, since it doesn't rely on Elements.
> Besides that, thank you for your code, but as my MEW showed, I use things
> like
> :splice t . In fact, I do splice nearly every orgtbl into a frame on the
> LaTeX-side.
Take 2. We can implement back :splice property. The others are much less
useful.
(defun orgtbl-to-latex (table params)
"Convert the orgtbl-mode TABLE to LaTeX.
TABLE is a list, each entry either the symbol `hline' for
a horizontal separator line, or a list of fields for that line.
PARAMS is a property list of parameters that can influence the
conversion. Currently this function recognizes the following
parameters:
:splice When set to t, return only table body lines, don't wrap
them into a \"tabular\" environment. Default is nil."
(require 'ox-latex)
(let ((table-string (orgtbl-to-orgtbl table nil)))
(if (not (plist-get params :splice))
(org-export-string-as table-string 'latex t '(:with-tables t))
;; If :splice is non-nil, we create a temporary back-end,
;; `latex-tmp', derived from `latex', but with a transparent
;; table translator.
(let ((org-export-registered-backends org-export-registered-backends))
(org-export-define-derived-backend 'latex-tmp 'latex
:translate-alist (list (cons 'table (lambda (e c i) c))))
(org-export-string-as table-string 'latex-tmp t '(:with-tables t))))))
WDYT?
Regards,
--
Nicolas Goaziou
- [O] Bug in export orgtbl / LaTeX, AW, 2013/06/12
- Re: [O] Bug in export orgtbl / LaTeX, AW, 2013/06/13
- Re: [O] Bug in export orgtbl / LaTeX, Nick Dokos, 2013/06/13
- Re: [O] Bug in export orgtbl / LaTeX, AW, 2013/06/13
- Re: [O] Bug in export orgtbl / LaTeX, Nicolas Goaziou, 2013/06/14
- Re: [O] Bug in export orgtbl / LaTeX, AW, 2013/06/17
- Re: [O] Bug in export orgtbl / LaTeX, Suvayu Ali, 2013/06/17
- Re: [O] Bug in export orgtbl / LaTeX,
Nicolas Goaziou <=
- Re: [O] Bug in export orgtbl / LaTeX, AW, 2013/06/19