Posted By

spino327 on 09/06/16


Tagged

LaTeX lstlisting


Versions (?)

Latex: lstlisting in two columns


 / Published in: LaTeX
 

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

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

  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}

Report this snippet  

You need to login to post a comment.