From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug in export orgtbl / LaTeX Date: Tue, 18 Jun 2013 22:12:03 +0200 Message-ID: <87fvwfgovg.fsf@gmail.com> References: <1725976.zQozjb3gTU@linux-ik7b.site> <1913229.cKOtJ2ymYU@linux-ik7b.site> <87fvwk1vfl.fsf@gmail.com> <1739590.NZpg6Crt5q@linux-ik7b.site> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Up2Fy-0005NH-R5 for emacs-orgmode@gnu.org; Tue, 18 Jun 2013 16:12:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Up2Fx-0005tL-DT for emacs-orgmode@gnu.org; Tue, 18 Jun 2013 16:11:58 -0400 Received: from mail-we0-x22d.google.com ([2a00:1450:400c:c03::22d]:41010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Up2Fx-0005tD-7Y for emacs-orgmode@gnu.org; Tue, 18 Jun 2013 16:11:57 -0400 Received: by mail-we0-f173.google.com with SMTP id x54so3843357wes.32 for ; Tue, 18 Jun 2013 13:11:56 -0700 (PDT) In-Reply-To: <1739590.NZpg6Crt5q@linux-ik7b.site> (AW's message of "Mon, 17 Jun 2013 14:34:34 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: AW Cc: Nick Dokos , emacs-orgmode@gnu.org Hello, AW 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