开发者

How to include a code snippet in a beamer presentation?

开发者 https://www.devze.com 2022-12-10 05:42 出处:网络
开发者_运维问答What\'s the best way to include some code snippets in a beamer presentation? I\'ve already tried verbatim, and lstlisting environments - both destroyed my presentation.Use the [fragile

开发者_运维问答What's the best way to include some code snippets in a beamer presentation?

I've already tried verbatim, and lstlisting environments - both destroyed my presentation.


Use the [fragile] option:

\begin{frame}[fragile]
\begin{verbatim}
...
\end{verbatim}
\end{frame}


I recently used something like

\verbatiminput{blah.c}

in a beamer presentation, and it worked alright for me...

Wanna post your code?

0

精彩评论

暂无评论...
验证码 换一张
取 消