Export to LaTeX Beamer. [WAS: Re: [Orgmode] Re: LaTeX export bugs?]
Hello: I was happy to see a simple formula for exporting to Beamer. The following worked initially. However, this initialization routine was able to run only when org-latex had already been loaded. On Sat, Jul 4, 2009 at 2:52 AM, Nick Dokos nicholas.do...@hp.com wrote: Here's the minimal.emacs - you'll need to adjust the load path for your setup: , | (add-to-list 'load-path (expand-file-name ~/src/emacs/org/org-mode/lisp)) | (add-to-list 'auto-mode-alist '(\\.\\(org\\|org_archive\\|txt\\)$ . org-mode)) | (require 'org-install) | (global-set-key \C-cl 'org-store-link) | (global-set-key \C-ca 'org-agenda) | (global-set-key \C-cb 'org-iswitchb) | (setq org-log-done (quote time)) | (setq org-log-into-drawer t) | | (load org-exp) | (load org-latex) | | (add-to-list 'org-export-latex-classes | '(beamer |\\documentclass[11pt]{beamer} | \\usepackage[utf8]{inputenc} | \\usepackage[T1]{fontenc} | \\usepackage{hyperref} | \\usepackage{verbatim} | \\setbeameroption{show notes} | \\usetheme{Goettingen} | \\useoutertheme{infolines} |(\\begin{frame}\\frametitle{%s}\\begin{itemize} \\end{itemize}\\end{frame} | \\begin{frame}\\frametitle{%s}\\begin{itemize} \\end{itemize}\\end{frame}) |(\\item{%s} . \\item*{%s}) |) | ) ` Is it possible to put this inside of a hook (say, when org-latex was loaded, or when the document class was beamer during the export process)? Emacs just reports the following when this code is included into the init file: Symbol's value as variable is void: org-export-latex-classes After explicitly loading the library org-latex the code is executed and the procedure works for exporting the example file---given that the latex code must be cleaned up. I haven't yet tried the following as a heading line: #+OPTIONS: toc:nil Would that solve the problem you reported? Alan and here's slides.org: , | #+LaTeX_CLASS: beamer | #+TITLE: Example presentation | #+AUTHOR: Nick Dokos \\ $$\href{mailto:nicholas.do...@hp.com}{ nicholas.do...@hp.com}$$ | #+EMAIL: nicholas.do...@hp.com | #+OPTIONS: toc:nil H:2 | | * Why | ** Reason 1. |Text explaining reason #1. | ** Reason 2. |... more explanations. | ** Reason 3. |Blah, blah, blah. | | ** Reason 4. |Why not? | | * What | ** First piece. | ** Second piece. | ** Third piece. | ** Fourth piece. ` Thank you for this helpful advice. Alan Davis You can know the name of a bird in all the languages of the world, but when you're finished, you'll know absolutely nothing whatever about the bird... So let's look at the bird and see what it's doing---that's what counts. Richard Feynman ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: Export to LaTeX Beamer. [WAS: Re: [Orgmode] Re: LaTeX export bugs?]
On Sep 19, 2009, at 8:03 PM, Alan E. Davis wrote: Hello: I was happy to see a simple formula for exporting to Beamer. The following worked initially. However, this initialization routine was able to run only when org-latex had already been loaded. On Sat, Jul 4, 2009 at 2:52 AM, Nick Dokos nicholas.do...@hp.com wrote: Here's the minimal.emacs - you'll need to adjust the load path for your setup: , | (add-to-list 'load-path (expand-file-name ~/src/emacs/org/org- mode/lisp)) | (add-to-list 'auto-mode-alist '(\\.\\(org\\|org_archive\\|txt\\) $ . org-mode)) | (require 'org-install) | (global-set-key \C-cl 'org-store-link) | (global-set-key \C-ca 'org-agenda) | (global-set-key \C-cb 'org-iswitchb) | (setq org-log-done (quote time)) | (setq org-log-into-drawer t) | | (load org-exp) | (load org-latex) | | (add-to-list 'org-export-latex-classes | '(beamer |\\documentclass[11pt]{beamer} | \\usepackage[utf8]{inputenc} | \\usepackage[T1]{fontenc} | \\usepackage{hyperref} | \\usepackage{verbatim} | \\setbeameroption{show notes} | \\usetheme{Goettingen} | \\useoutertheme{infolines} |(\\begin{frame}\\frametitle{%s}\\begin{itemize} \ \end{itemize}\\end{frame} | \\begin{frame}\\frametitle{%s}\\begin{itemize} \ \end{itemize}\\end{frame}) |(\\item{%s} . \\item*{%s}) |) | ) ` Is it possible to put this inside of a hook (say, when org-latex was loaded, or when the document class was beamer during the export process)? Emacs just reports the following when this code is included into the init file: Symbol's value as variable is void: org-export-latex-classes After explicitly loading the library org-latex the code is executed and the procedure works for exporting the example file--- given that the latex code must be cleaned up. I haven't yet tried the following as a heading line: #+OPTIONS: toc:nil Would that solve the problem you reported? Alan and here's slides.org: , | #+LaTeX_CLASS: beamer | #+TITLE: Example presentation | #+AUTHOR: Nick Dokos \\ $$\href{mailto:nicholas.do...@hp.com}{nicholas.dokos@hp.com }$$ | #+EMAIL: nicholas.do...@hp.com | #+OPTIONS: toc:nil H:2 | | * Why | ** Reason 1. |Text explaining reason #1. | ** Reason 2. |... more explanations. | ** Reason 3. |Blah, blah, blah. | | ** Reason 4. |Why not? | | * What | ** First piece. | ** Second piece. | ** Third piece. | ** Fourth piece. ` Thank you for this helpful advice. Alan Davis You can know the name of a bird in all the languages of the world, but when you're finished, you'll know absolutely nothing whatever about the bird... So let's look at the bird and see what it's doing---that's what counts. Richard Feynman ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode Aloha Alan, Here is a somewhat more elaborate set-up. In customize org-export-latex-classes (or add to appropriate place in .emacs): \documentclass{beamer} \mode{{{beamermode}}} { \usethemebeamertheme \usecolorthemebeamercolortheme } \usepackage[english]{babel} \usepackage[latin1]{inputenc} \usepackage{times} \usepackage[T1]{fontenc} \institutebeamerinstitute \subjectbeamersubject The macros here let me specify things that I like to change on a per- file basis. So, in my org file there is this: #+MACRO: BEAMERMODE presentation #+MACRO: BEAMERTHEME Malmoe #+MACRO: BEAMERCOLORTHEME tsdye #+MACRO: BEAMERSUBJECT Evolutionary archaeology #+MACRO: BEAMERINSTITUTE T. S. Dye \ Colleagues \\ B. P. Bishop Museum I typically use sections and subsections in my talks (and the Malmoe theme displays them nicely within beamer). So, I have this in customize org-export-latex-classes: INS DEL Choice: Value Menu Heading: numbered: \section{%s} unnumbered): \section{%s} INS DEL Choice: Value Menu Heading: numbered: \subsection{%s} unnumbered): \subsection{%s} INS DEL Choice: Value Menu Environment: Opening (numbered) : \begin{frame} \frametitle{%s} Closing (numbered) : \end{frame} Opening (unnumbered): \begin{frame} \frametitle{%s} Closing (unnumbered): \end{frame} I have the standard value for org-export-latex-low-levels in customize: Org Export Latex Low Levels: Hide Value Value Menu Convert as itemized list And then this in my .org file: #+OPTIONS: H:3 #+OPTIONS: toc:nil A typical slide show might look like this, in part: * Introduction ** Evolution *** Four Components of Evolutionary Processes Inheritance = Social learning
Re: [Orgmode] Re: LaTeX export bugs?
On Sep 17, 2009, at 3:52 PM, Sébastien Vauban wrote: Hi Carsten, Francesco Pizzolante wrote: indeed, it looks like I did make a mistake when recently trying to fix this. I believe I have got it right this time (current git version), please verify. It works perfectly now. Not exactly the same problem, but very similar IMHO, there is (now or still?) a problem of highlighting with `#+BEGIN' meta info not starting in column 0. Just test with the following: --8---cut here---start-8--- * 2009-09 #+BEGIN: clocktable :maxlevel 2 :scope file :block yesterday Clock summary at [2009-09-16 Wed 17:27], for Tuesday, September 15, 2009. | L | Headline | Time | | |---+--++--| | | *Total time* | *7:25* | | |---+--++--| | 1 | 2009-09 | 7:25 | | | 2 | Some project || 7:25 | #+END: --8---cut here---end---8--- Hi Sebasien, I am aware of this problem, but it is not so easy to solve. The reason for this is that dynamic blocks are written by some user function, which is not aware of any indentation to be applied. So if I would allow indentation for the BEGIN line, I would end up with #+BEGIN: clocktable | L | Headline | Time | | |---+--++--| | | *Total time* | *7:25* | | |---+--++--| | 1 | 2009-09 | 7:25 | | | 2 | Some project || 7:25 | #+END: Is that the desired outcome? I guess I could enforce indentation of the block written by the user function, but I am not sure if this might cause problems in some cases. I need to think more about this. - Carsten ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: LaTeX export bugs?
On Sep 18, 2009, at 7:37 AM, Carsten Dominik wrote: On Sep 17, 2009, at 3:52 PM, Sébastien Vauban wrote: Hi Carsten, Francesco Pizzolante wrote: indeed, it looks like I did make a mistake when recently trying to fix this. I believe I have got it right this time (current git version), please verify. It works perfectly now. Not exactly the same problem, but very similar IMHO, there is (now or still?) a problem of highlighting with `#+BEGIN' meta info not starting in column 0. Just test with the following: --8---cut here---start-8--- * 2009-09 #+BEGIN: clocktable :maxlevel 2 :scope file :block yesterday Clock summary at [2009-09-16 Wed 17:27], for Tuesday, September 15, 2009. | L | Headline | Time | | |---+--++--| | | *Total time* | *7:25* | | |---+--++--| | 1 | 2009-09 | 7:25 | | | 2 | Some project || 7:25 | #+END: --8---cut here---end---8--- Hi Sebasien, I am aware of this problem, but it is not so easy to solve. The reason for this is that dynamic blocks are written by some user function, which is not aware of any indentation to be applied. So if I would allow indentation for the BEGIN line, I would end up with #+BEGIN: clocktable | L | Headline | Time | | |---+--++--| | | *Total time* | *7:25* | | |---+--++--| | 1 | 2009-09 | 7:25 | | | 2 | Some project || 7:25 | #+END: Is that the desired outcome? I guess I could enforce indentation of the block written by the user function, but I am not sure if this might cause problems in some cases. I need to think more about this. I just *did* think more about it. Indented dynamic blocks are now possible. - Carsten ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: LaTeX export bugs?
Hi Carsten, Carsten Dominik wrote: On Sep 18, 2009, at 7:37 AM, Carsten Dominik wrote: I am aware of this problem, but it is not so easy to solve. The reason for this is that dynamic blocks are written by some user function, which is not aware of any indentation to be applied. So if I would allow indentation for the BEGIN line, I would end up with #+BEGIN: clocktable | L | Headline | Time | | |---+--++--| | | *Total time* | *7:25* | | |---+--++--| | 1 | 2009-09 | 7:25 | | | 2 | Some project || 7:25 | #+END: Is that the desired outcome? Certainly not. I guess I could enforce indentation of the block written by the user function, but I am not sure if this might cause problems in some cases. I need to think more about this. I just *did* think more about it. Indented dynamic blocks are now possible. Great! Otherwise, leave it as it is... Best regards, Seb -- Sébastien Vauban ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: LaTeX export bugs?
Hi Carsten, Francesco Pizzolante wrote: indeed, it looks like I did make a mistake when recently trying to fix this. I believe I have got it right this time (current git version), please verify. It works perfectly now. Not exactly the same problem, but very similar IMHO, there is (now or still?) a problem of highlighting with `#+BEGIN' meta info not starting in column 0. Just test with the following: --8---cut here---start-8--- * 2009-09 #+BEGIN: clocktable :maxlevel 2 :scope file :block yesterday Clock summary at [2009-09-16 Wed 17:27], for Tuesday, September 15, 2009. | L | Headline | Time | | |---+--++--| | | *Total time* | *7:25* | | |---+--++--| | 1 | 2009-09 | 7:25 | | | 2 | Some project || 7:25 | #+END: --8---cut here---end---8--- Best regards, Seb -- Sébastien Vauban ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: LaTeX export bugs?
Hi Carsten, indeed, it looks like I did make a mistake when recently trying to fix this. I believe I have got it right this time (current git version), please verify. It works perfectly now. Thanks! Francesco ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: LaTeX export bugs?
Hi, Carsten Dominik wrote: On Jul 1, 2009, at 10:21 PM, Sébastien Vauban wrote: Other things I've noticed: - Even with version 6.28, the `#+TBLNAME' tag must be located in column 0 (at least, for the highlighting features to work) Fixed, thanks. I'm using orgmode 6.30c and I still have this problem: if the #+TBLNAME: tag is not located in column 0, the remote reference does not work. Here's my little test: #+TBLNAME: A | | T | |---+---| | | 2.00 | | | 5.00 | |---+---| | # | 9.00 | | ^ | total | #+TBLFM: $2=vsum(@-...@-ii);%.2f #+TBLNAME: price |T |PU | Total | |--+---+---| | 9.00 | 10.25 | 92.25 | |--+---+---| #+TBLFM: @2$1=remote(A,$total);%.2f::@2$3=$1*$2;%.2f Just add a few spaces at the first line and when you recompute the second table you get a Can't find remote table A message. Moreover, in a LaTeX environment, using the orgtbl minor mode, the highlighting (font locking) does not work on the #+TBLNAME: line, even if located in column 0. Thanks. F. ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: LaTeX export bugs?
Hi Francesco, indeed, it looks like I did make a mistake when recently trying to fix this. I believe I have got it right this time (current git version), please verify. - Carsten On Sep 15, 2009, at 1:11 PM, Francesco Pizzolante wrote: Hi, Carsten Dominik wrote: On Jul 1, 2009, at 10:21 PM, Sébastien Vauban wrote: Other things I've noticed: - Even with version 6.28, the `#+TBLNAME' tag must be located in column 0 (at least, for the highlighting features to work) Fixed, thanks. I'm using orgmode 6.30c and I still have this problem: if the # +TBLNAME: tag is not located in column 0, the remote reference does not work. Here's my little test: #+TBLNAME: A | | T | |---+---| | | 2.00 | | | 5.00 | |---+---| | # | 9.00 | | ^ | total | #+TBLFM: $2=vsum(@-...@-ii);%.2f #+TBLNAME: price |T |PU | Total | |--+---+---| | 9.00 | 10.25 | 92.25 | |--+---+---| #+TBLFM: @2$1=remote(A,$total);%.2f::@2$3=$1*$2;%.2f Just add a few spaces at the first line and when you recompute the second table you get a Can't find remote table A message. Moreover, in a LaTeX environment, using the orgtbl minor mode, the highlighting (font locking) does not work on the #+TBLNAME: line, even if located in column 0. Thanks. F. ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: LaTeX export bugs?
Hi all, Carsten Dominik wrote: Sébastien Vauban wrote: Carsten Dominik wrote: Sébastien Vauban wrote: [This is not working...] --8---cut here---start-8--- #+LaTeX: \begin{framed} #+ATTR_LaTeX: align=lrrr | Code | \euro{} | \% | \euro{} | |---+-+-+-| | GSM | | |0.00 | | Internet | 168.45 | 100 | 168.45 | | Matériel | 295.99 | 100 | 295.99 | | Publicité | 214.25 | 33 | 70.70 | | Autres| | |0.00 | |---+-+-+-| | Total | | | 535.14 | #+TBLFM: $4=$2*$3/100;%.2f::@7$4=vsum(@-...@-ii) #+LaTeX: \end{framed} --8---cut here---end---8--- Am I misunderstanding section 12.7.2 or is this a feature? This does not work. What is happening here is that during LaTeX export, these begin/end lines are inserted into the buffer. Then the LaTeX exporter marks the entire content of this environment as something that should be exported literally to LaTeX, this is why you can write \begin{equation} a=b \end{equation} and it will all be exported literally to LaTeX. The fact that the table is transformed into a LaTeX table at all is actually a bug which I will fix. I'm not sure I understand what's the impact of your last sentence. But, maybe, I don't have too... Related to this: Now, more important question, one of the few that's not answered from my previous post: how can I shade or frame a table? For me, inserting #+LaTeX tags is different from inserting #+BEGIN_LaTeX and #+END_LaTeX tags: the first one should have no impact on the rest of the text. Rephrasing my question, asking it again in other words (showing you I did not follow correctly): for me, --8---cut here---start-8--- #+BEGIN_framed XXX #+END_framed --8---cut here---end---8--- is equivalent to: --8---cut here---start-8--- #+LaTeX: \begin{framed} XXX #+LaTeX: \end{framed} --8---cut here---end---8--- If not, that's not what I understand from reading section 12.7.2 about the quoting of LaTeX code? Though, it seems (seemed) clear... So there is not really a standard way to do what you want. However, you could take a look as Chris Gray's contributes package org-special-blocks.el http://orgmode.org/worg/org-contrib/org-special-blocks.php which was made just for this use case. Excellent. Tested. Work perfectly, except for: - Even with version 6.28, the `#+TBLNAME' tag must be located in column 0 (at least, for the highlighting features to work) Fixed, thanks. Same problem with the Org-special-blocks constructs: they need to be declared in column 0; otherwise, they're just ignored... A detail, though: putting my table in a `framed' block makes the highlighting of the keywords such as TBLNAME and TBLFM disappear... Many thanks for all the help you all provide us with! Best regards, Seb PS- Hoping desperately Org-mode will win! -- Sébastien Vauban ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: LaTeX export bugs?
Hi Carsten, Carsten Dominik wrote: Sébastien Vauban wrote: - If you have a level 3 item under a level 1 item, the level 3 doesn't get exported to LaTeX. I know this is not a normal situation, but it happens when restructuring some text, and you loose it in the exported view... Yes, the parser currently requires the structure to be consistent and does not fail gracefully if not. OK. - Table with formulas and environment /framed/ : The following table will be framed, but TBL formulas do not work anymore. #+ATTR_LaTeX: align=lrrr #+LaTeX: \begin{framed} | Code | \euro{} | \% | \euro{} | |---+-+-+-| | GSM | | |0.00 | | Internet | 168.45 | 100 | 168.45 | | Matériel | 295.99 | 100 | 295.99 | | Publicité | 214.25 | 33 | 70.70 | | Autres| | |0.00 | |---+-+-+-| | Total | | | 535.14 | #+LaTeX: \end{framed} #+TBLFM: $4=$2*$3/100;%.2f::@7$4=vsum(@-...@-ii) Swapping these two last lines gives LaTeX errors... What's the solution for having both: an environment around the table and formulas that work? This is a hard problem. It is on my list, but will not be fixed soon. I had not seen this reply yet, when re-sending my question yesterday night. I've got the solution from Chris to test... Why do I have to escape the sign symbol as soon as I put LaTeX commands (and not BEGIN..END_LaTeX) near it? I do not understand what you mean here. I don't understand the details of the export process. For me, if I have such a table: | Item | % | |--+| | Sample 1 | 20 | and I want it framed, adding `#+LaTeX: \begin{framed}' and `#+LaTeX: \end{framed}' should be transparent for the Org - LaTeX conversion process. It is not: as soon as I do such a thing, I need to escape the `%' sign: | Item | \% | |--+| | Sample 1 | 20 | For me, the `%' should be escaped independently of whether I add or not such a LaTeX tag. - Hyperlink to other sections: see [[To be referenced]]. Looking in the produced LaTeX code, it always link to the current section instead! Have not yet looked into this. Use IDs or custom IDs to links to sections, that is much better. OK. - Quotes are sometimes exported in a weird /fashion/ : see Industriels, et commerçants. And compare with the quotes in the next sample (Industriels et commerçants). Fixed. Thanks that *you* fixed it ;-) See as well that /fashion/ is not in italic above. It is for me I guess you talk to someone else? ;-) Apparently because of the special non-breaking space following the second slash... Looks like the non-breaking space did not make it through the mailing process. What exactly are you using? Here is one non-breaking space: ` ', and here is what Emacs tells me about it (when `C-u C-x ='): --8---cut here---start-8--- character:  (160, #o240, #xa0) preferred charset: unicode (Unicode (ISO10646)) code point: 0xA0 syntax: .which means: punctuation category: .:Base, b:Arabic, j:Japanese, l:Latin buffer code: #xC2 #xA0 file code: #xC2 #xA0 (encoded by coding system utf-8-emacs-unix) display: by display table entry [?ø·] (see below) The display table entry is displayed by these fonts (glyph codes): ø·: -- no font -- face: `bold' Character code properties: customize what to show name: NO-BREAK SPACE old-name: NON-BREAKING SPACE general-category: Zs (Separator, Space) decomposition: (noBreak 32) (noBreak ' ') There are text properties here: fontifiedt --8---cut here---end---8--- I insert them when I have a colon (for example) preceded by a space: that space is automagically converted to non-breaking one, thanks to the following code in my `.emacs' file: --8---cut here---start-8--- (defun my-insert-colon () (interactive) (if (eq (char-before) ?\ ) ; normal space (progn (backward-delete-char 1) (if (equal mode-name PDFLaTeX) (insert ~:) ; for LaTeX-only (insert  :))) ; non-breaking space (insert :))) (defun my-double-keys () Specific keys. (interactive) (local-set-key : 'my-insert-colon)) (add-hook 'text-mode-hook 'my-double-keys) (add-hook 'message-mode-hook 'my-double-keys) --8---cut here---end---8--- BTW, a possibility would be to translate the non-breaking space to its LaTeX equivalent syntax (the tilde sign). If you don't mind, this is on my wishlist of Org-mode features... You see my Emacs code handles it when I write LaTeX myself, something I wanna avoid like pest now
[Orgmode] Re: LaTeX export bugs?
Hi Nick, Nick Dokos wrote: Sebastien Vauban wrote: BTW, any solution for exporting to a Beamer presentation? I'd be very very very interested by anything in that direction. That's the last piece of the whole puzzle, IMHO. I did a beamer presentation in org-mode last month (1 hour, about 20 slides). Here is a simplified version (I'll talk about some problems at the end). o org-export-latex-classes is augmented with a beamer element as follows: , | (add-to-list 'org-export-latex-classes |'(beamer | \\documentclass[11pt]{beamer}\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage{hyperref}\n\\usepackage{verbatim}\n\\setbeameroption{show notes}\n\\usetheme{Goettingen}\n\\useoutertheme{infolines} | (\\begin{frame}\\frametitle{%s}\\begin{itemize} \\end{itemize}\\end{frame} | \\begin{frame}\\frametitle{%s}\\begin{itemize} \\end{itemize}\\end{frame}) | (\\item{%s} . \\item*{%s}) | (\\end{itemize}\\note{ }))) ` Excellent idea... o Here is an input file: , | #+LaTeX_CLASS: beamer | #+TITLE: Example presentation | #+AUTHOR: Nick Dokos \\ $$\href{mailto:nicholas.do...@hp.com}{nicholas.dokos@hp.com}$$ | #+EMAIL: nicholas.do...@hp.com | | * Why | ** Reason 1. |Text explaining reason 1. | ** Reason 2. |... more explanations. | ** Reason 3. |Blah, blah, blah. | | ** Reason 4. |Why not? | | * What | ** First piece. | ** Second piece. | ** Third piece. | ** Fourth piece. ` o Export it to latex (and zap the TOC - see below): Weird. Having done the above `add-to-list' in Emacs (with `C-x C-e'), I got a different exported file than yours. But really different: --8---cut here---start-8--- % Created 2009-07-03 Fri 10:32 \documentclass[11pt]{beamer} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{hyperref} \usepackage{verbatim} \setbeameroption{show notes} \usetheme{Goettingen} \useoutertheme{infolines} \title{Example presentation} \author{Nick Dokos \\ $$\href{mailto:nicholas.do...@hp.com}{nicholas.dokos@hp.com}$$} \date{03 July 2009} \begin{document} \maketitle \setcounter{tocdepth}{3} \tableofcontents \vspace*{1cm} \begin{frame}\frametitle{Why}\begin{itemize} \label{sec-1} \end{itemize}\end{frame} \begin{frame}\frametitle{What}\begin{itemize} \label{sec-2} \end{itemize}\end{frame} \end{document} --8---cut here---end---8--- There is no text, in fact... Don't understand why... Some notes: o Level 1 headlines become slide titles. o Level 2 headlines become items in the slide and the text under the level 2 headlines ends up as text in the item. o Level 3 headlines (not shown in the sample document) were supposed to become notes, but this obviously will not work this way. I don't know how to make it work. In the end, I edited the tex file by hand in order to get the notes right. o Moreover (and I think this is a bug in the latex exporter), I had to rearrange the notes by hand: they ended up in the wrong slides. I have had zero time to chase this however, so I am not really sure why this happened. o There was a problem with the table of contents (it's empty and it pushes the title of the first slide down), so I manually zapped it from the tex file. o Latex had some peculiar objections to the labels and I did not care about them, so I preprocessed them out of existence in the tex file. After a little practice, I could edit the tex file to take care of all the problems in about 5 minutes. Even so, after getting the bulk of the contents of the presentation done, I did a final production of the tex file and did the final touchups on that. One of these days, I'll have to go back and figure out some of the problems. For now, this zeroth approximation to a solution will have to suffice. I think as well we can live with such minor troubles for the moment. And still take advantage of Org... Though, I have a bigger problem getting to there. Best regards, Seb -- Sébastien Vauban ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: LaTeX export bugs?
=?utf-8?Q?S=C3=A9bastien_Vauban?= wxhgmqzgw...@spammotel.com wrote: Weird. Having done the above `add-to-list' in Emacs (with `C-x C-e'), I got a different exported file than yours. But really different: --8---cut here---start-8--- ... --8---cut here---end---8--- There is no text, in fact... Don't understand why... I don't understand why either, but it may be some setting in my setup or your setup that leads to the different behavior. In case it matters, I use the following versions: GNU Emacs 23.0.93.1 (i686-pc-linux-gnu, GTK+ Version 2.12.9) of 2009-05-11 on gamaville.dokosmarshall.org Org-mode version 6.28trans - git latest (more or less). Here is an even more simplified version, using a variation of Bernt Hansen's minimal .emacs. This version of slides.org takes care of the zapping of the TOC at the org level, and the beamer section in minimal.emacs gets rid of the third level Notes headlines (which cannot work this way, in any case). I checked with emacs -Q -l minimal.emacs slides.org exported to latex, and ran the latex file through pdflatex a couple of times. The resulting PDF file seems to work for me. Can you try it out? Thanks, Nick Here's the minimal.emacs - you'll need to adjust the load path for your setup: , | (add-to-list 'load-path (expand-file-name ~/src/emacs/org/org-mode/lisp)) | (add-to-list 'auto-mode-alist '(\\.\\(org\\|org_archive\\|txt\\)$ . org-mode)) | (require 'org-install) | (global-set-key \C-cl 'org-store-link) | (global-set-key \C-ca 'org-agenda) | (global-set-key \C-cb 'org-iswitchb) | (setq org-log-done (quote time)) | (setq org-log-into-drawer t) | | (load org-exp) | (load org-latex) | | (add-to-list 'org-export-latex-classes | '(beamer |\\documentclass[11pt]{beamer} | \\usepackage[utf8]{inputenc} | \\usepackage[T1]{fontenc} | \\usepackage{hyperref} | \\usepackage{verbatim} | \\setbeameroption{show notes} | \\usetheme{Goettingen} | \\useoutertheme{infolines} |(\\begin{frame}\\frametitle{%s}\\begin{itemize} \\end{itemize}\\end{frame} | \\begin{frame}\\frametitle{%s}\\begin{itemize} \\end{itemize}\\end{frame}) |(\\item{%s} . \\item*{%s}) |) | ) ` and here's slides.org: , | #+LaTeX_CLASS: beamer | #+TITLE: Example presentation | #+AUTHOR: Nick Dokos \\ $$\href{mailto:nicholas.do...@hp.com}{nicholas.dokos@hp.com}$$ | #+EMAIL: nicholas.do...@hp.com | #+OPTIONS: toc:nil H:2 | | * Why | ** Reason 1. |Text explaining reason #1. | ** Reason 2. |... more explanations. | ** Reason 3. |Blah, blah, blah. | | ** Reason 4. |Why not? | | * What | ** First piece. | ** Second piece. | ** Third piece. | ** Fourth piece. ` ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: LaTeX export bugs?
On Jul 1, 2009, at 10:21 PM, Sébastien Vauban wrote: Other things I've noticed: - Even with version 6.28, the `#+TBLNAME' tag must be located in column 0 (at least, for the highlighting features to work) Fixed, thanks. - Remote references to other tables are great, but they only work with absolute references, not with named cells. They actually do work fine. A call like remote(mytbl,$name) will work in this table | _ | name | | | value | - Carsten On the wishlist (easy to say ;-)), I image it'd be utmost useful to be able to name a cell and reuse its name in a remote ref. Thanks for any commentary on the above... Thank you very much Carsten, Bastien and Co... Seb -- Sébastien Vauban ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: LaTeX export bugs?
Hi Carsten, Carsten Dominik wrote: Sébastien Vauban wrote: Other things I've noticed: - Even with version 6.28, the `#+TBLNAME' tag must be located in column 0 (at least, for the highlighting features to work) Fixed, thanks. Euh, no, *I* am supposed to answer: Fixed, thanks, and I'm doing it... ;-) - Remote references to other tables are great, but they only work with absolute references, not with named cells. They actually do work fine. A call like remote(mytbl,$name) will work in this table | _ | name | | | value | OK. I did not understand from the doc (section 3.5.1) that I had to prefix the name of the cell with $: REF is an absolute field [...] as described above. I admit that, knowing it, I understand the above text better. Maybe is such an example missing? Now, more important question, one of the few that's not answered from my previous post: how can I shade or frame a table? For me, inserting #+LaTeX tags is different from inserting #+BEGIN_LaTeX and #+END_LaTeX tags: the first one should have no impact on the rest of the text. Though, it isn't as you can see with my following example: --8---cut here---start-8--- #+LaTeX: \begin{framed} #+ATTR_LaTeX: align=lrrr | Code | \euro{} | \% | \euro{} | |---+-+-+-| | GSM | | |0.00 | | Internet | 168.45 | 100 | 168.45 | | Matériel | 295.99 | 100 | 295.99 | | Publicité | 214.25 | 33 | 70.70 | | Autres| | |0.00 | |---+-+-+-| | Total | | | 535.14 | #+TBLFM: $4=$2*$3/100;%.2f::@7$4=vsum(@-...@-ii) #+LaTeX: \end{framed} --8---cut here---end---8--- Am I misunderstanding section 12.7.2 or is this a feature? Best regards, Seb -- Sébastien Vauban ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: LaTeX export bugs?
On Jul 2, 2009, at 10:40 PM, Sébastien Vauban wrote: Hi Carsten, Carsten Dominik wrote: Sébastien Vauban wrote: Other things I've noticed: - Even with version 6.28, the `#+TBLNAME' tag must be located in column 0 (at least, for the highlighting features to work) Fixed, thanks. Euh, no, *I* am supposed to answer: Fixed, thanks, and I'm doing it... ;-) The thanks is short for thanks for your report/idea :-) - Remote references to other tables are great, but they only work with absolute references, not with named cells. They actually do work fine. A call like remote(mytbl,$name) will work in this table | _ | name | | | value | OK. I did not understand from the doc (section 3.5.1) that I had to prefix the name of the cell with $: REF is an absolute field [...] as described above. I admit that, knowing it, I understand the above text better. Maybe is such an example missing? Fixed, thanks. Now, more important question, one of the few that's not answered from my previous post: how can I shade or frame a table? For me, inserting # +LaTeX tags is different from inserting #+BEGIN_LaTeX and #+END_LaTeX tags: the first one should have no impact on the rest of the text. Though, it isn't as you can see with my following example: --8---cut here---start-8--- #+LaTeX: \begin{framed} #+ATTR_LaTeX: align=lrrr | Code | \euro{} | \% | \euro{} | |---+-+-+-| | GSM | | |0.00 | | Internet | 168.45 | 100 | 168.45 | | Matériel | 295.99 | 100 | 295.99 | | Publicité | 214.25 | 33 | 70.70 | | Autres| | |0.00 | |---+-+-+-| | Total | | | 535.14 | #+TBLFM: $4=$2*$3/100;%.2f::@7$4=vsum(@-...@-ii) #+LaTeX: \end{framed} --8---cut here---end---8--- Am I misunderstanding section 12.7.2 or is this a feature? This does not work. What is happening here is that during LaTeX export, these begin/end lines are inserted into the buffer. Then the LaTeX exporter marks the entire content of this environment as something that should be exported literally to LaTeX, this is why you can write \begin{equation} a=b \end{equation} and it will all be exported literally to LaTeX. The fact that the table is transformed into a LaTeX table at all is actually a bug which I will fix. So there is not really a standard way to do what you want. However, you could take a look as Chris Gray's contributes package org-special-blocks.el http://orgmode.org/worg/org-contrib/org-special-blocks.php which was made just for this use case. Another workaround (hack, really) would be #+LATEX_HEADER: \def\noop{} \noop\begin{framed} ... \noop\end{framed} This will trick Org-mode by not having the \begin macro at the beginning of a line, so it will not protect the content of the environment. Dirty, but works. HTH - Carsten ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: LaTeX export bugs?
Hi all, To make things clear, I love Org-mode (yes, I voted) and its LaTeX export. More than you can imagine: I now look for avoiding writing any LaTeX document, and have the export do all the work for me... BTW, any solution for exporting to a Beamer presentation? I'd be very very very interested by anything in that direction. That's the last piece of the whole puzzle, IMHO. Though, working more and more in that direction (Org-mode - LaTeX), I've seen a couple of weird things that I've compiled into an ECM, for ease of use: * Org - If you have a level 3 item under a level 1 item, the level 3 doesn't get exported to LaTeX. I know this is not a normal situation, but it happens when restructuring some text, and you loose it in the exported view... * THIS SECTION WILL DISAPPEAR!! This text is not exported. Though, I'm not always aware of it, when sections are long (spreading over more than one screen page)... *** Level 2 -- is there a level 3 above? - Table with formulas and environment /framed/ : The following table will be framed, but TBL formulas do not work anymore. #+ATTR_LaTeX: align=lrrr #+LaTeX: \begin{framed} | Code | \euro{} | \% | \euro{} | |---+-+-+-| | GSM | | |0.00 | | Internet | 168.45 | 100 | 168.45 | | Matériel | 295.99 | 100 | 295.99 | | Publicité | 214.25 | 33 | 70.70 | | Autres| | |0.00 | |---+-+-+-| | Total | | | 535.14 | #+LaTeX: \end{framed} #+TBLFM: $4=$2*$3/100;%.2f::@7$4=vsum(@-...@-ii) Swapping these two last lines gives LaTeX errors... What's the solution for having both: an environment around the table and formulas that work? Why do I have to escape the sign symbol as soon as I put LaTeX commands (and not BEGIN..END_LaTeX) near it? - Hyperlink to other sections: see [[To be referenced]]. Looking in the produced LaTeX code, it always link to the current section instead! - Quotes are sometimes exported in a weird /fashion/ : see Industriels, et commerçants. And compare with the quotes in the next sample (Industriels et commerçants). See as well that /fashion/ is not in italic above. Apparently because of the special non-breaking space following the second slash... BTW, a possibility would be to translate the non-breaking space to its LaTeX equivalent syntax (the tilde sign). * To be referenced This should be the landing point for the hyperreference above. Once again, thanks to all of you that provide us with those wonderful features... Anybody commenting on the above? Other things I've noticed: - Even with version 6.28, the `#+TBLNAME' tag must be located in column 0 (at least, for the highlighting features to work) - Remote references to other tables are great, but they only work with absolute references, not with named cells. On the wishlist (easy to say ;-)), I image it'd be utmost useful to be able to name a cell and reuse its name in a remote ref. Thanks for any commentary on the above... Thank you very much Carsten, Bastien and Co... Seb -- Sébastien Vauban ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode