From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Failed to create radio tables Date: Sat, 10 Jul 2010 15:26:41 -0400 Message-ID: <653.1278790001@gamaville.dokosmarshall.org> References: <447823.81910.qm@web33204.mail.mud.yahoo.com> Reply-To: nicholas.dokos@hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=40330 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OXgJG-0008WR-Gx for emacs-orgmode@gnu.org; Sat, 10 Jul 2010 16:06:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OXfiM-0006dv-92 for emacs-orgmode@gnu.org; Sat, 10 Jul 2010 15:27:55 -0400 Received: from vms173019pub.verizon.net ([206.46.173.19]:46050) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OXfiM-0006XG-1W for emacs-orgmode@gnu.org; Sat, 10 Jul 2010 15:27:54 -0400 Received: from gamaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173019.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0L5C00FB4WOH6990@vms173019.mailsrvcs.net> for emacs-orgmode@gnu.org; Sat, 10 Jul 2010 14:26:42 -0500 (CDT) In-reply-to: Message from Angel Popov of "Thu\, 08 Jul 2010 22\:55\:01 PDT." <447823.81910.qm@web33204.mail.mud.yahoo.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Angel Popov Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org Angel Popov wrote: > Hi,=C2=A0 > I am following example on radio tables but it looks that it does not work. > I copied >=20 > % BEGIN RECEIVE ORGLST to-buy > % END RECEIVE ORGLST to-buy > \begin{comment} > #+ORGLIST: SEND to-buy orgtbl-to-latex > - a new house > - a new computer > + a new keyboard > + a new mouse > - a new life > \end{comment} >=20 > and when I C-c C-c on '- a new house' nothing happend >=20 Well, you are not following the example exactly (App. A.5.2 of the Org manual): you are trying to extend it to lists and I'm not sure that you can do that. So let me go back to the example in the manual and explain the rationale: The idea is that specifying tables in Org is easy, but specifying tables in LaTeX is harder. It would be convenient if you could use Org mode syntax for tables *in your LaTeX file* and have the LaTeX table generated automatically from that. That's what radio tables do for you: in your LaTeX file, you include the table in Org syntax *as a comment* and then you use orgtbl facilities to automatically generate your LaTeX table. So here's my LaTeX file with the example table: --8<---------------cut here---------------start------------->8--- \documentclass{article} \begin{document} Here's a table of stuff: % BEGIN RECEIVE ORGTBL to-buy % END RECEIVE ORGTBL to-buy \begin{comment} The Org table is inside a LaTeX comment. #+ORGTBL: SEND to-buy orgtbl-to-latex | foo | bar | |-----+-----| | 1 | 2 | | 3 | 4 | \end{comment} \end{document} --8<---------------cut here---------------end--------------->8--- When you edit this file, the major mode of the buffer is going to be LaTeX-mode, not Org-mode. This is where orgtbl-mode comes in: it's a minor mode, so you can enable it in your LaTeX-mode buffer: M-x orgtbl-mode and then you have the orgtbl facilities available in the buffer where you are editing your LaTeX file. Now put your cursor somewhere in the Org table and say C-c C-c - presto, change-o, you get this: --8<---------------cut here---------------start------------->8--- \documentclass{article} \begin{document} Here's a table of stuff: % BEGIN RECEIVE ORGTBL to-buy \begin{tabular}{rr} foo & bar \\ \hline 1 & 2 \\ 3 & 4 \\ \end{tabular} % END RECEIVE ORGTBL to-buy \begin{comment} The Org table is inside a LaTeX comment. #+ORGTBL: SEND to-buy orgtbl-to-latex | foo | bar | |-----+-----| | 1 | 2 | | 3 | 4 | \end{comment} \end{document} --8<---------------cut here---------------end--------------->8--- Process this with LaTeX and you get a nicely typeset table, without having to worry much about the finicky LaTeX syntax. Plus, if you need to change the table, you change the Org table in the comment, press C-c C-c again and the change is propagated automatically to the LaTeX table. In addition, if you enable orgtbl-mode before you even start, then you have all the nice shortcuts for *editing* the Org table in the first place. In fact, it's handy to have orgtbl-mode *always* enabled when you edit LaTeX files. You can do that by using the appropriate hook. For example, if you use AucTeX, add the following line to your .emacs (after the place where AucTeX is initialized, so that it has a chance to define the hook): (add-hook 'LaTeX-mode-hook 'orgtbl-mode) AFAIK, you *cannot* do something similar with lists (which is what you seem to have tried with your modifications to the example), but lists are much easier to deal with directly in LaTeX. Hope this makes things clearer, Nick