emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Latex export to documentclass beamer
@ 2009-08-09 13:05 RC
  2009-08-09 14:17 ` Carsten Dominik
  0 siblings, 1 reply; 7+ messages in thread
From: RC @ 2009-08-09 13:05 UTC (permalink / raw)
  To: emacs-orgmode

Hi,
 Following an earlier suggestion on the list:
http://thread.gmane.org/gmane.emacs.orgmode/15010/focus=15077

I added the following to my .emacs file:

(add-to-list 'org-export-latex-classes
             '("beamer"
	       "\\documentclass[11pt]{beamer}
                \\usepackage[utf8]{inputenc}
                \\usepackage[T1]{fontenc}
                \\usepackage{amsmath,amssymb,graphicx,bm,multirow,colortbl,vector}
                \\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}")))

However, this gives me the error:
Debugger entered--Lisp error: (void-variable org-export-latex-classes)

I am using Emacs 23.1 and org-mode 6.29trans in Windows Vista.

Any suggestions to fix the error are appreciated.
RC

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Latex export to documentclass beamer
  2009-08-09 13:05 Latex export to documentclass beamer RC
@ 2009-08-09 14:17 ` Carsten Dominik
  2009-08-09 15:45   ` RC
  0 siblings, 1 reply; 7+ messages in thread
From: Carsten Dominik @ 2009-08-09 14:17 UTC (permalink / raw)
  To: RC; +Cc: emacs-orgmode


On Aug 9, 2009, at 3:05 PM, RC wrote:

> Hi,
> Following an earlier suggestion on the list:
> http://thread.gmane.org/gmane.emacs.orgmode/15010/focus=15077
>
> I added the following to my .emacs file:
>
> (add-to-list 'org-export-latex-classes
>             '("beamer"
> 	       "\\documentclass[11pt]{beamer}
>                \\usepackage[utf8]{inputenc}
>                \\usepackage[T1]{fontenc}
>                \ 
> \usepackage{amsmath,amssymb,graphicx,bm,multirow,colortbl,vector}
>                \\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}")))

For this line to be working, the variable must have been defined.

Either precede the code with

  (require 'org-latex)

or wrap it into

(eval-after-load "org-latex" '(add-to-list....))

- Carsten

>
> However, this gives me the error:
> Debugger entered--Lisp error: (void-variable org-export-latex-classes)
>
> I am using Emacs 23.1 and org-mode 6.29trans in Windows Vista.
>
> Any suggestions to fix the error are appreciated.
> RC
>
>
>
> _______________________________________________
> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Latex export to documentclass beamer
  2009-08-09 14:17 ` Carsten Dominik
@ 2009-08-09 15:45   ` RC
  2009-08-10 11:46     ` Carsten Dominik
  0 siblings, 1 reply; 7+ messages in thread
From: RC @ 2009-08-09 15:45 UTC (permalink / raw)
  To: emacs-orgmode

Carsten Dominik <carsten.dominik <at> gmail.com> writes:

> 
> 
> On Aug 9, 2009, at 3:05 PM, RC wrote:
> 
> > Hi,
> > Following an earlier suggestion on the list:
> > http://thread.gmane.org/gmane.emacs.orgmode/15010/focus=15077
> >
> > I added the following to my .emacs file:
> >
> > (add-to-list 'org-export-latex-classes
> >    ...

> For this line to be working, the variable must have been defined.
> Either precede the code with
>   (require 'org-latex)
> or wrap it into
> (eval-after-load "org-latex" '(add-to-list....))
> - Carsten

Thanks! That worked.

I had a a couple more questions about using latex-export.

1. 
* Slide 5
\uncover<2->
{appear from slide 2 on\\ }
\uncover<3-4>
{appears from 3 to slide 4\\ }
\uncover<4>{appears on slide 4\\ }
\uncover<3->{appears from slide 3 on\\ }

gets output as:

\begin{frame}\frametitle{Slide 5}
\label{sec-5}
\uncover<2->
\{appear from slide 2 on\\ \}
\uncover<3-4>
\{appears from 3 to slide 4\\ \}
\uncover<4>\{appears on slide 4\\ \}
\uncover<3->\{appears from slide 3 on\\ \}
\end{frame}

Is there a way to avoid { and } being output as \{ and \} , respectively.

2. Is there a way to add an attribute to latex lists (itemize, enumerate,
description} so that:

* Slide 1
 - x
 - y
 - z

gets output as:
\begin{itemize}[<+->]
\item x
\item y
\item z
\end{itemize}

Thanks again for the help, and the invaluable org-mode.

RC

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: Latex export to documentclass beamer
  2009-08-09 15:45   ` RC
@ 2009-08-10 11:46     ` Carsten Dominik
  2009-08-11  4:14       ` William Henney
  0 siblings, 1 reply; 7+ messages in thread
From: Carsten Dominik @ 2009-08-10 11:46 UTC (permalink / raw)
  To: RC; +Cc: emacs-orgmode


On Aug 9, 2009, at 5:45 PM, RC wrote:

> Carsten Dominik <carsten.dominik <at> gmail.com> writes:
>
>>
>>
>> On Aug 9, 2009, at 3:05 PM, RC wrote:
>>
>>> Hi,
>>> Following an earlier suggestion on the list:
>>> http://thread.gmane.org/gmane.emacs.orgmode/15010/focus=15077
>>>
>>> I added the following to my .emacs file:
>>>
>>> (add-to-list 'org-export-latex-classes
>>>   ...
>
>> For this line to be working, the variable must have been defined.
>> Either precede the code with
>>  (require 'org-latex)
>> or wrap it into
>> (eval-after-load "org-latex" '(add-to-list....))
>> - Carsten
>
> Thanks! That worked.
>
> I had a a couple more questions about using latex-export.
>
> 1.
> * Slide 5
> \uncover<2->
> {appear from slide 2 on\\ }
> \uncover<3-4>
> {appears from 3 to slide 4\\ }
> \uncover<4>{appears on slide 4\\ }
> \uncover<3->{appears from slide 3 on\\ }

You can warp this code in #+begin_latex ... #+end_latex

>
> gets output as:
>
> \begin{frame}\frametitle{Slide 5}
> \label{sec-5}
> \uncover<2->
> \{appear from slide 2 on\\ \}
> \uncover<3-4>
> \{appears from 3 to slide 4\\ \}
> \uncover<4>\{appears on slide 4\\ \}
> \uncover<3->\{appears from slide 3 on\\ \}
> \end{frame}
>
> Is there a way to avoid { and } being output as \{ and \} ,  
> respectively.
>
> 2. Is there a way to add an attribute to latex lists (itemize,  
> enumerate,
> description} so that:
>
> * Slide 1
> - x
> - y
> - z
>
> gets output as:
> \begin{itemize}[<+->]
> \item x
> \item y
> \item z
> \end{itemize}

No.

- Carsten

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: Latex export to documentclass beamer
  2009-08-10 11:46     ` Carsten Dominik
@ 2009-08-11  4:14       ` William Henney
  0 siblings, 0 replies; 7+ messages in thread
From: William Henney @ 2009-08-11  4:14 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: RC

On Mon, Aug 10, 2009 at 6:46 AM, Carsten
Dominik<carsten.dominik@gmail.com> wrote:
>> 2. Is there a way to add an attribute to latex lists (itemize, enumerate,
>> description} so that:
>>
>> * Slide 1
>> - x
>> - y
>> - z
>>
>> gets output as:
>> \begin{itemize}[<+->]
>> \item x
>> \item y
>> \item z
>> \end{itemize}
>
> No.

Although you could always add

\beamerdefaultoverlayspecification{<+->}

to the preamble.

Cheers

Will

-- 

  Dr William Henney, Centro de Radioastronomía y Astrofísica,
  Universidad Nacional Autónoma de México, Campus Morelia

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: Latex export to documentclass beamer
  2009-08-17 18:19   ` Nick Dokos
@ 2009-08-17 18:35     ` Robert Goldman
  0 siblings, 0 replies; 7+ messages in thread
From: Robert Goldman @ 2009-08-17 18:35 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Org Mode

Nick Dokos wrote:
> Robert Goldman <rpgoldman@sift.info> wrote:
> 
>> Here's another challenge --- is there a good way to handle this in the
>> exporter?
>>
>> If you use VERBATIM in a beamer frame, then you need to add the optional
>> argument "fragile" to the environment, like this:
>>
>> \begin{frame}[fragile]
>>
>> instead of just
>>
>> \begin{frame}
>>
>> I'd be surprised if there was a good method for this, but thought I'd ask...
>>
> 
> Have you tried adding it unconditionally in the org-export-latex-classes
> alist?  I don't think it hurts to have it on by default (it costs a bit
> of performance maybe, but it should not be noticeable.) OTOH, verbatim
> is a can of worms: it should be avoided if at all possible. It cannot be
> used in moving arguments (at all: see
> 
> http://www.tex.ac.uk/cgi-bin/texfaq2html?label=verbwithin
> 
> for details.) - and what beamer does with it is a mystery to me - hence
> the "avoid at all costs" statement.

I don't think the "avoid at all costs" is tenable when using beamer,
because of the need to insert code.

I have used alltt as well as verbatim, but it seems just as fragile.

I hope to provide a proposed beamer template sometime soon.

best,
Robert

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: Latex export to documentclass beamer
  2009-08-17 16:17 ` Robert Goldman
@ 2009-08-17 18:19   ` Nick Dokos
  2009-08-17 18:35     ` Robert Goldman
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Dokos @ 2009-08-17 18:19 UTC (permalink / raw)
  To: Robert Goldman; +Cc: Org Mode

Robert Goldman <rpgoldman@sift.info> wrote:

> Here's another challenge --- is there a good way to handle this in the
> exporter?
> 
> If you use VERBATIM in a beamer frame, then you need to add the optional
> argument "fragile" to the environment, like this:
> 
> \begin{frame}[fragile]
> 
> instead of just
> 
> \begin{frame}
> 
> I'd be surprised if there was a good method for this, but thought I'd ask...
> 

Have you tried adding it unconditionally in the org-export-latex-classes
alist?  I don't think it hurts to have it on by default (it costs a bit
of performance maybe, but it should not be noticeable.) OTOH, verbatim
is a can of worms: it should be avoided if at all possible. It cannot be
used in moving arguments (at all: see

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=verbwithin

for details.) - and what beamer does with it is a mystery to me - hence
the "avoid at all costs" statement.

HTH,
Nick

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-08-17 18:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-09 13:05 Latex export to documentclass beamer RC
2009-08-09 14:17 ` Carsten Dominik
2009-08-09 15:45   ` RC
2009-08-10 11:46     ` Carsten Dominik
2009-08-11  4:14       ` William Henney
2009-08-17 14:43 Robert Goldman
2009-08-17 16:17 ` Robert Goldman
2009-08-17 18:19   ` Nick Dokos
2009-08-17 18:35     ` Robert Goldman

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).