Latex: lstlisting in two columns


/ Published in: LaTeX
Save to your folder(s)

Using minipage to place two lstlistings side by side when you're using two column documents.


Copy this code and paste it in your HTML
  1. \noindent\begin{minipage}{.45\columnwidth}
  2. \begin{lstlisting}[caption=code 1,frame=tlrb]{Name}
  3. void code()
  4. {
  5. }
  6. \end{lstlisting}
  7. \end{minipage}\hfill
  8. \begin{minipage}{.45\columnwidth}
  9. \begin{lstlisting}[caption=code 2,frame=tlrb]{Name}
  10. void code()
  11. {
  12. }
  13. \end{lstlisting}
  14. \end{minipage}

URL: http://tex.stackexchange.com/questions/35155/lstlisting-in-two-columns

Report this snippet


Comments


You need to login to view comments.