4
votes
2answers
58 views

Aligning two minipages - one with lstlisting, one without - on top?

I'm already aware that two minipages with [t] align at the baseline of the top line, not at the top of their respective boxes/containers; however, this is somewhat different: when I use a small ...
0
votes
1answer
375 views

two-column lstlisting in landscape orientation

How can I divide my page in two to show my code with lstlisting? This is a large code and I want to set as 2 pages in one. Is an appendix of my project not all the document. EDIT thanks to ...
3
votes
1answer
58 views

Adjust width of listings including pagebreaks

I have my own lstlistings environments which are framed. Since I wanted to adjust the width so the frame starts with the text I used a minipage inside the lstlisting. (See MWE). But as I have quite ...
4
votes
1answer
142 views

Dirtree and lstset side by side

A \dirtree and a \lstset should be shown side by side. With the code below the \dirtree is vertically not on the same level as the \lstset (above the \dirtree is some empty space). How can I fix that? ...
1
vote
1answer
494 views

Using colorbox in a Listing/minipage with underscore “_”

I am having some issues with using \colorbox{}{} in combination with an underscore. The Listing will compile without issues and highlighting the text properly, but as soon as I have an underscore in ...
11
votes
2answers
944 views

highlight lines in listings

I have code that i have included into my document using the texcode below \begin{minipage}{.48\textwidth} \centering \lstinputlisting[numbers=left,xleftmargin=2em,frame=single,framexleftmargin=2em, ...
3
votes
1answer
1k views

Custom divider between 2 minipage and lstlisting

I am using the following code to have 2 boxes beside each other for code comparison: \documentclass[12pt]{article} \usepackage{listings} \begin{document} \begin{singlespace} ...
6
votes
1answer
93 views

Can I let a listing move up two lines without introducing a break in a paragraph? [duplicate]

Possible Duplicate: How to prevent lstlisting from splitting code between pages? I have a rather long listing on a page that has 3-4 lines on the following page. Just before the listing is ...
10
votes
1answer
5k views

lstlisting in two columns

I would like to have two listings, side by side. They have approximately the same length, therefore I don't care about how it's layed out if one part is longer. I tried \begin{minipage}{\textwidth} ...
3
votes
2answers
5k views

Frame around minipage containing listing in beamer

I am working on the sheets of a course on LaTeX and would like to have several sheets in which you see on the left an example of a source document and on the right its output. I have this working now ...