emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: AW <alexander.willand@t-online.de>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: Nick Dokos <ndokos@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Bug in export orgtbl / LaTeX
Date: Wed, 19 Jun 2013 13:41:30 +0200	[thread overview]
Message-ID: <7582439.92XJDMLJzd@linux-ik7b.site> (raw)
In-Reply-To: <87fvwfgovg.fsf@gmail.com>

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

      reply	other threads:[~2013-06-19 11:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-12 15:55 Bug in export orgtbl / LaTeX AW
2013-06-13 17:22 ` AW
2013-06-13 17:29   ` Nick Dokos
2013-06-13 19:04     ` AW
2013-06-14 16:58       ` Nicolas Goaziou
2013-06-17 12:34         ` AW
2013-06-17 18:20           ` Suvayu Ali
2013-06-18 20:12           ` Nicolas Goaziou
2013-06-19 11:41             ` AW [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7582439.92XJDMLJzd@linux-ik7b.site \
    --to=alexander.willand@t-online.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \
    --cc=ndokos@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).