From mboxrd@z Thu Jan 1 00:00:00 1970 From: AW Subject: radiotables in LaTeX-document: export numbers from orgtbl with commas as decimal separators instead of periods; with MWE and lisp-code Date: Wed, 18 Apr 2012 13:00:25 +0200 Message-ID: <4297465.2ty5xHOKpk@linux-nyil.site> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:36077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKScp-0007sP-8G for Emacs-orgmode@gnu.org; Wed, 18 Apr 2012 07:00:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SKSci-0007QK-T4 for Emacs-orgmode@gnu.org; Wed, 18 Apr 2012 07:00:38 -0400 Received: from mailout04.t-online.de ([194.25.134.18]:39607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKSci-0007O2-GM for Emacs-orgmode@gnu.org; Wed, 18 Apr 2012 07:00:32 -0400 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: Emacs-orgmode@gnu.org Dear all, I'd like to use radiotables inside a LaTeX-document. Here is a minimal = working=20 example: ----------------------------------------------------------- \documentclass[pagesize, ngerman, fontsize=3D12pt]{scrartcl} \usepackage[T1]{fontenc}\usepackage[utf8]{inputenc} \usepackage{babel, comment, array, booktabs} \title{Sicherheitsbestellung} \subtitle{gag} \begin{document} \maketitle \begin{tabular}{p{0.25\linewidth}p{0.5\linewidth}}%\toprule Bezeichnung & Betrag \\ % BEGIN RECEIVE ORGTBL Kaufpreis Kaufpreis & 100000.00 \\ Darlehen & -5000.00 \\ Summe & 95000.00 \\ % END RECEIVE ORGTBL Kaufpreis \bottomrule \end{tabular} \begin{comment} #+ORGTBL: SEND Kaufpreis orgtbl-to-latex :splice t :skip 0 | Kaufpreis | 100000.00 | | Darlehen | -5000.00 | | Summe | 95000.00 | #+TBLFM: @3$2=3D@1$2+@2$2;%.2f \end{comment} \end{document} ----------------------------------------------------------- I would like to have the LaTeX table with commas as decimal separators = instead=20 of periods, e.g.:=20 =BBKaufpreis & 100000,00\\=AB or even better=20 =BBKaufpreis & 100\,000,00\\=AB.=20 To avoid misunderstandigs: The change of all periods to commas should t= ake=20 place when the org-table is =BBtransfered=AB to the LaTeX table, not ea= rlier! I found a suggestion by Carsten Dominik here:=20 http://permalink.gmane.org/gmane.emacs.orgmode/42000 ----------------------------------------------------------- (add-hook 'org-export-preprocess-hook =09 'org-use-comma-in-exported-tables) (defun org-use-comma-in-exported-tables () (goto-char (point-min)) (while (re-search-forward "\\([0-9]\\)\\.\\([0-9]\\)" nil t) (org-if-unprotected (when (save-match-data (org-at-table-p)) (replace-match "\\1,\\2" t nil))))) ----------------------------------------------------------- I put that into my .emacs, restarted Emacs, but no result. I'm using Emacs 23.3 and Org-mode version 7.8.02. Please bear in mind t= hat I'm=20 may have made strange mistake, because I do neither have experience wit= h=20 radiotables nor understand lisp. Any help would be appreciated, thanks in advance. Kind regards, Alexander