emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Adding [fragile] to a LaTeX Beamer slide
@ 2016-07-06 13:25 Florian Lindner
  2016-07-06 20:49 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Lindner @ 2016-07-06 13:25 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I try to put some source code, using the listings package in my slides:

** Source Code
#+BEGIN_LATEX
\begin{lstlisting}
for (int i = 1; i != 10; ++i) 
    std::cout << i << ": hello, world!"
              << std::endl;
\end{lstlisting}
#+END_LATEX

Problem is, this, in contrast to

#+BEGIN_SRC c
foobar
#+END_SRC

does not add the fragile option the frame and therefore it does not compile.

I would prefer the latter option, but it renders to a verbatim environment, not a lstlisting.

How can I add a fragile option to the frame or make the BEGIN_src block use the lstlisting environment?

Thanks,
Florian

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

* Re: Adding [fragile] to a LaTeX Beamer slide
  2016-07-06 13:25 Adding [fragile] to a LaTeX Beamer slide Florian Lindner
@ 2016-07-06 20:49 ` Nicolas Goaziou
  2016-07-07  8:32   ` Florian Lindner
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2016-07-06 20:49 UTC (permalink / raw)
  To: Florian Lindner; +Cc: emacs-orgmode

Hello,

Florian Lindner <mailinglists@xgm.de> writes:

> How can I add a fragile option to the frame

You can set :BEAMER_OPT property accordingly.

> or make the BEGIN_src block use the lstlisting environment?

See `org-latex-listings'.

Regards,

-- 
Nicolas Goaziou

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

* Re: Adding [fragile] to a LaTeX Beamer slide
  2016-07-06 20:49 ` Nicolas Goaziou
@ 2016-07-07  8:32   ` Florian Lindner
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Lindner @ 2016-07-07  8:32 UTC (permalink / raw)
  To: emacs-orgmode

Am 06.07.2016 um 22:49 schrieb Nicolas Goaziou:
> Hello,
> 
> Florian Lindner <mailinglists@xgm.de> writes:
> 
>> How can I add a fragile option to the frame
> 
> You can set :BEAMER_OPT property accordingly.

Great, works:

:PROPERTIES:
:BEAMER_OPT: fragile
:END:

Just one more question, btw. When I used this property syntax:

#+PROPERTY: BEAMER_OPT fragile

The only difference is that this property would be inherited to children?


>> or make the BEGIN_src block use the lstlisting environment?
> 
> See `org-latex-listings'.

Works fine by setting:

(setq org-latex-listings t
      org-latex-packages-alist '(("" "listings") ("" "color"))))


Thanks for your help!

Florian

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

end of thread, other threads:[~2016-07-07  8:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-06 13:25 Adding [fragile] to a LaTeX Beamer slide Florian Lindner
2016-07-06 20:49 ` Nicolas Goaziou
2016-07-07  8:32   ` Florian Lindner

Code repositories for project(s) associated with this public 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).