I am using fancyvrb to list code in a multicols situation. I number the code using:
\begin{Verbatim}[numbers=left]
When the code is in the left column, this is good, but not when it is in the right column. I wish to put the numbers in the right column on the right side.
Is there a way to automatically put the numbers on the side that the code is being listed on? Or is there a way of determining what column I am in in the multicols environment?
multicol. You should also consider provide a minimal working example (MWE) that illustrates the problem. It helps both the community (to get started on the problem), but also you (in getting an answer your way faster). – Werner Aug 19 '13 at 16:03`\makeatletter
\newcommand{\testcol}{\if@firstcolumn left\else right\fi}% \makeatother
– Paul A. Thompson Aug 20 '13 at 16:26<br> This can be used as\begin{Verbatim}[frame=single,numbers=\testcol], which resolves tonumbers=leftcorrectly. I also modified the\columnbreakand\newpage` commands. This way, I can switch back and forth from twocolumn to multicols if necessary.