[texhax] beamer code in columns

shawn wilson ag4ve.us at gmail.com
Wed Sep 11 12:10:52 CEST 2013


I can't seem to figure out how to get one column to stop overflowing into
the next - I've tried minipage and parcolumns, but this is the simplest
example:

\documentclass{beamer}
\usepackage{listings}

\begin{document}

\subsection{The SSH config file}

\defverbatim[colored]\initdepend{%
  \begin{lstlisting}[tabsize=8,basicstyle=\ttfamily\tiny,frame=single]
    depend() {
        provide dns
        need localmount net
        after bootmisc
        use logger
    }
  \end{lstlisting}
}

\defverbatim[colored]\initreload{%
  \begin{lstlisting}[tabsize=8,basicstyle=\ttfamily\tiny,frame=single]
    reload() {
        ebegin "Reloading ${SVCNAME}"
        kill -HUP $(cat "${pidfile}")
        eend $?
    }
  \end{lstlisting}
}

\begin{frame}[fragile]{Config file}
  Outline:
  \begin{columns}
    \begin{column}{0.5\textwidth}
      \initdepend
    \end{column}
    \begin{column}{0.5\textwidth}
      \initreload
    \end{column}
  \end{columns}
\end{frame}

\end{document}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20130911/26170834/attachment.html>


More information about the texhax mailing list