From mboxrd@z Thu Jan 1 00:00:00 1970 From: AW Subject: Re: Bug in export orgtbl / LaTeX Date: Wed, 19 Jun 2013 13:41:30 +0200 Message-ID: <7582439.92XJDMLJzd@linux-ik7b.site> References: <1725976.zQozjb3gTU@linux-ik7b.site> <1739590.NZpg6Crt5q@linux-ik7b.site> <87fvwfgovg.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpGg9-0001Lq-L2 for emacs-orgmode@gnu.org; Wed, 19 Jun 2013 07:36:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UpGg5-0007J6-5B for emacs-orgmode@gnu.org; Wed, 19 Jun 2013 07:35:57 -0400 Received: from mailout07.t-online.de ([194.25.134.83]:40846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpGg4-0007IW-FF for emacs-orgmode@gnu.org; Wed, 19 Jun 2013 07:35:52 -0400 In-Reply-To: <87fvwfgovg.fsf@gmail.com> 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: Nicolas Goaziou Cc: Nick Dokos , emacs-orgmode@gnu.org Am Dienstag, 18. Juni 2013, 22:12:03 schrieb Nicolas Goaziou: > 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? WDIT? Let's be carefull, maybe I got it the wrong way: I put your "take 2" from "(defun ..." until "t))))))" into my .emacs (somewhere) and restarted Emacs. Result: If I C-c C-c on the orgtbl from my example, the output still is full of \begin{enumerate} \item installment \end{enumerate} So there is something wrong. But if I put your code into scratch and press C-M-x, change to the buffer with the *.tex-file and repeat C-c C-c on the orgtbl, it works properly. I can live with that way. So WDIT: thank you very much! Regards, Alexander