emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: Beamer presentation in the document


From: Sébastien Vauban
Subject: [Orgmode] Re: Beamer presentation in the document
Date: Thu, 10 Jun 2010 10:03:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Hi Eric,

"Eric Schulte" wrote:
> Sébastien Vauban <address@hidden> writes:
>>
>> 1. How could I use the same table in the slides as in the document, without
>>    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 presentation
> on export.

I played a bit with this example. Remarks follow.

--8<---------------cut here---------------start------------->8---
#+TITLE:     Complete Minimal Example
#+AUTHOR:    Sébastien Vauban
#+EMAIL:     address@hidden
#+DATE:      2010-06-10
#+LANGUAGE:  en_US

# This code block won't show in any export
#+source: echo
#+begin_src emacs-lisp :var tab='(("echo")) :exports none
  tab
#+end_src

* Document

** Results

   #+ATTR_LaTeX: align=lr
#+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=vsum(@address@hidden)::@7$2=vsum(@address@hidden)

* Presentation

  Amounts -- here is the table
  #+call: echo(tab=rate-&-interests) :exports results

#+results: echo(tab=rate-&-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=lr

  and the small explanation.
--8<---------------cut here---------------end--------------->8---

1. On the echo functionality itself, everything is perfect, but for the
   horizontal lines that are not echo'ed.

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" ;-)):

   - Babel does not find the tables if the `#+tblname: XXX' instruction is 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;

   - the `results' block is not "naturally" aligned either;

   - 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'?


> I think I'll add the "echo" code block in the below example to the library
> of babel, so in the future this should work w/o having to include the code
> 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).

Best regards,
  Seb

-- 
Sébastien Vauban




reply via email to

[Prev in Thread] Current Thread [Next in Thread]