3
votes
0answers
27 views

Using lstinline in caption of lstlistings with multicol?

Consider this MWE: \documentclass{article} \usepackage{multicol} \usepackage{listings} \begin{document} \def\extra{extra} \begin{lstlisting}[ multicols=2, caption={ [short] aaaa \extra, ...
1
vote
1answer
478 views

Caption below lstinputlisting in multicols + redefining lstlisting caption format

I have 2 problems with caption for lstlisting. I can't get the caption of lstlisting to go below the list when it's in a multicols environment. Although I've added ...
1
vote
1answer
205 views

Using lstlistings in two columns

My goal is to display source code (awk, Python, R and SAS) and text (their output) side-by-side. Both are loaded from external files, and can be pretty long sometimes (pagebreaking is inevitable), the ...
5
votes
1answer
219 views

8 column table with lstinputlisting in LaTeX

I'd like to create a multicolumn table (up to 8 columns) to insert my code via \lstinputlisting{source.c}. But it seems to me that more then 6 columns aren't possibile even tough space is available. ...
5
votes
1answer
240 views

Wider caption for listing using multicol

I am using the multicol and listings packages. I would like to have the caption spread across the entire listing for multi-column listings. Here is a MWE of what I am attempting, however the output ...
6
votes
1answer
320 views

Aligning TikZ graphic vertically to neighbor in multicol

For my documentation of a blocks world problem in Prolog, I'd like to show the example code (using the listing package) next to the real world equivalent, which I made using TikZ. For this I used the ...
8
votes
2answers
1k views

Full width code listing within two column text

I am using multicols to create two columns for body text. For code typesetting I am using the listings package. For the latter I have created an environment using \lstnewenvironment command, used as ...
3
votes
1answer
759 views

multicols, lstlisting and float

Using the following structure, how can I get the listing to stay on the same page, be it at the top or the bottom? \documentclass{scrartcl} \usepackage[ngerman]{babel} \usepackage{multicol} ...
4
votes
1answer
811 views

Framing two-column listings with a tikz node : “missing \item” error ?

I'm trying to use this answer to put my lstlistings environments inside a tikz node. So I want to define a new listings environment, with \lstnewenvironment. My final goal, to be precise, is to ...