From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Re: Beamer presentation in the document Date: Thu, 10 Jun 2010 10:11:29 -0700 Message-ID: <87r5keolry.fsf@gmail.com> References: <871vcg1rs0.fsf@mundaneum.com> <87sk4w2kgu.fsf@gmail.com> <87k4q7tiub.fsf@mundaneum.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=44310 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMlWw-0005kH-Nb for emacs-orgmode@gnu.org; Thu, 10 Jun 2010 13:27:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OMlI8-0005ni-84 for emacs-orgmode@gnu.org; Thu, 10 Jun 2010 13:11:45 -0400 Received: from mail-pz0-f183.google.com ([209.85.222.183]:64975) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMlI8-0005nd-0N for emacs-orgmode@gnu.org; Thu, 10 Jun 2010 13:11:44 -0400 Received: by pzk13 with SMTP id 13so84247pzk.13 for ; Thu, 10 Jun 2010 10:11:43 -0700 (PDT) In-Reply-To: <87k4q7tiub.fsf@mundaneum.com> (=?utf-8?Q?=22S=C3=A9bastien?= Vauban"'s message of "Thu, 10 Jun 2010 10:03:40 +0200") 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: =?utf-8?Q?S=C3=A9bastien?= Vauban Cc: emacs-orgmode@gnu.org Hi=20 S=C3=A9bastien Vauban writes: > Hi Eric, > > "Eric Schulte" wrote: >> S=C3=A9bastien Vauban writes: >>> >>> 1. How could I use the same table in the slides as in the document, wit= hout >>> copy/pasting it? >>> >>> Is there, maybe, some Babel black magic at hand? Export/import? >> >> The following babel solution should work. > > I was sure you had "black magic" to provide us with. Thanks a lot (once > again)! > > >> It uses a code block to copy the contents of the table into the presenta= tion >> on export. > > I played a bit with this example. Remarks follow. > > #+TITLE: Complete Minimal Example > #+AUTHOR: S=C3=A9bastien Vauban > #+EMAIL: wxhgmqzgwmuf@spammotel.com > #+DATE: 2010-06-10 > #+LANGUAGE: en_US > > # This code block won't show in any export > #+source: echo > #+begin_src emacs-lisp :var tab=3D'(("echo")) :exports none > tab > #+end_src > > * Document > > ** Results > > #+ATTR_LaTeX: align=3Dlr > #+tblname: rate-&-interests > | Rate (%) | Interests | > |----------+-------------| > | 3.50 | 2564935.21 | > | 4.00 | 2931354.52 | > | 4.50 | 3297773.83 | > | 5.00 | 3664193.15 | > | 5.50 | 4030612.46 | > |----------+-------------| > | 22.5 | 16488869.17 | > #+TBLFM: @7$1=3Dvsum(@-I..@-II)::@7$2=3Dvsum(@-I..@-II) > > * Presentation > > Amounts -- here is the table > #+call: echo(tab=3Drate-&-interests) :exports results > > #+results: echo(tab=3Drate-&-interests) > | Rate (%) | Interests | > | 3.5 | 2564935.21 | > | 4.0 | 2931354.52 | > | 4.5 | 3297773.83 | > | 5.0 | 3664193.15 | > | 5.5 | 4030612.46 | > | 22.5 | 16488869.17 | > #+ATTR_LaTeX: align=3Dlr > > and the small explanation. > Great points Thanks. > > 1. On the echo functionality itself, everything is perfect, but for > the horizontal lines that are not echo'ed. > hlines are preservable with the :hlines header argument, see the example below [1]. Were working on integrating the babel documentation in the org-mode documentation which should really help in terms of making these more exotic header arguments accessible/discoverable to users. > > 2. For Babel, more generally, some remarks that I have for a while, >but always > forget to report (as you're allowed to consider them as "details"=C2= =A0;-)): > > - Babel does not find the tables if the `#+tblname: XXX' instruction i= s not > located at column 0 -- annoying for me, as I try to perfectly align = all > the text and source code based on `org-indent'-like functionality; > Good catch, this has been fixed. > > - the `results' block is not "naturally" aligned either; > Again, thanks for pointing this out. This has been fixed for results which already have an indented #+results: line, for the first time a block is run the results will not be indented currently, although it would probably be worthwhile to default to indenting the results to the same level as the code block -- I'll add this as a TODO. > > - less a detail than the 2 above: would it be possible to leave > some text between the `call' and the `results': in this example, so > that the `align' statement does not move after the table whenever > we `C-c C-c' the block for executing the `echo'? > See the example below [1], is it sufficient to squeeze the #+results line in between the #+attr_latex line and the table? If not I'll update the results handling so that we allow preservation of comment lines between #+results and it's contents. > > >> I think I'll add the "echo" code block in the below example to the libra= ry >> of babel, so in the future this should work w/o having to include the co= de >> block in the file. > > I think so as well. This is a must for enabling us to insert slides into a > document. And something nobody else (PowerPoint, even plain LaTeX?) can do > (AFAIK). > done. Thanks for all the great feedback! -- Eric > > Best regards, > Seb Footnotes:=20 [1]=20=20 --8<---------------cut here---------------start------------->8--- #+TITLE: Complete Minimal Example #+AUTHOR: S=C3=A9bastien Vauban #+EMAIL: wxhgmqzgwmuf@spammotel.com #+DATE: 2010-06-10 #+LANGUAGE: en_US # This code block won't show in any export #+source: echo #+begin_src emacs-lisp :var tab=3D'(("echo")) :exports none tab #+end_src * Document ** Results #+ATTR_LaTeX: align=3Dlr #+tblname: rate-&-interests | Rate (%) | Interests | |----------+-------------| | 3.50 | 2564935.21 | | 4.00 | 2931354.52 | | 4.50 | 3297773.83 | | 5.00 | 3664193.15 | | 5.50 | 4030612.46 | |----------+-------------| | 22.5 | 16488869.17 | #+TBLFM: @7$1=3Dvsum(@-I..@-II)::@7$2=3Dvsum(@-I..@-II) * Presentation Amounts -- here is the table #+call: echo(tab=3Drate-&-interests) :exports results :hlines yes #+ATTR_LaTeX: align=3Dlr #+results: echo(tab=3Drate-&-interests) | Rate (%) | Interests | |----------+-------------| | 3.5 | 2564935.21 | | 4.0 | 2931354.52 | | 4.5 | 3297773.83 | | 5.0 | 3664193.15 | | 5.5 | 4030612.46 | |----------+-------------| | 22.5 | 16488869.17 | and the small explanation. --8<---------------cut here---------------end--------------->8---