[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Adding [fragile] to a LaTeX Beamer slide
From: |
Florian Lindner |
Subject: |
[O] Adding [fragile] to a LaTeX Beamer slide |
Date: |
Wed, 6 Jul 2016 15:25:53 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 |
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
- [O] Adding [fragile] to a LaTeX Beamer slide,
Florian Lindner <=