Anteru's blog
  • Consulting
  • Research
    • Assisted environment probe placement
    • Assisted texture assignment
    • Error Metrics for Smart Image Refinement
    • High-Quality Shadows for Streaming Terrain Rendering
    • Hybrid Sample-based Surface Rendering
    • Interactive rendering of Giga-Particle Fluid Simulations
    • Quantitative Analysis of Voxel Raytracing Acceleration Structures
    • Real-time Hybrid Hair Rendering
    • Scalable rendering for very large meshes
    • Subpixel Reconstruction Antialiasing
    • Tiled light trees
  • About
  • Archive

Displaying listings in LaTeX beamer slides

September 15, 2008
  • General
approximately 1 minutes to read

If you are using LaTeX for presentations, you usually use the Beamer package. If you are serious about listing, you probably use the Listings package – but what if you want nice code listings in a presentation?

Actually, it’s quite easy, all you need is:

\begin{frame}[fragile]
\frametitle{Your title}

\begin{lstlisting}
code
\end{lstlisting}
\end{frame}

That’s it, and you can use all fancy formatting options inside your slides (boxes, shadows, line-numbers, etc.). Just make sure you don’t use the short-hand \frame{ ... } and that you add the [fragile] to each slide that contains a listing.

Previous post
Next post

Recent posts

  • Five years of GPU DB
    Posted on 2020-09-27
  • Enabling SSL in your local network
    Posted on 2020-05-17
  • Goodbye, Bitbucket!
    Posted on 2020-03-19
  • QEMU, KVM and trim
    Posted on 2020-01-26
  • Fixing network after Ubuntu 19.04 to 19.10 upgrade
    Posted on 2019-10-26
  • Older posts

Find me on the web

  • GitHub
  • GPU database
  • Projects

Follow me

NIV_Anteru

Contents © 2005-2021 | Anteru | Imprint/Impressum | Privacy policy/Datenschutz