4
votes
2answers
49 views

Intersection of equation with code frame in listings package

I used the listings package with single frame and I had an equation before my code. The problem is that the frame intersects a little with the equation and the output is ugly. This happens both when I ...
3
votes
1answer
41 views

Listings package split frame when the page ends

When I use the listings package with frame in my code the frame "breaks" when the page ends and it is open in the end of the page. I want the frame to be complete with four sides and continue in the ...
2
votes
1answer
90 views

How to prevent the source code overflow over the frame in a listing? [duplicate]

I am trying to ident my source code in a frame using the listing package. An example code is given below: \documentclass[article]{llncs} \usepackage[english]{babel} ...
3
votes
1answer
157 views

How to combine framed and listings packages in new environment

I always use this LaTeX code to display a source code in my article. \begin{listingbox}{VB style} \begin{singlespace} \begin{lstlisting}[style=BASIC] Private Sub Form_Load() Dim tex As String ...
8
votes
2answers
435 views

Combining `tikzpicture` and `lstlisting`

I'm working on a custom lstlisting environment, in which I use TikZ to add a frame and a title. Because of the widespread curly braces of node I cannot use newenvironment, so I have to resort to ...
3
votes
1answer
106 views

Globally set the justification in a framed box

I want to show the text from a Python Interpreter in a Windows console. This should be plain text (like you see in a command line terminal). I also want to show Python code snippets with highlighting. ...
1
vote
2answers
494 views

framebox does not work for lstlisting environment

I am looking a way to wrap something with a frame. I try different approaches but finally choose to use fancybox package and minipage (because I need to control the width of the frame). It works ...
2
votes
1answer
112 views

Getting lbr frame lines in a listing up to the caption box above it

I have a document similar to this: \documentclass[twoside,11pt,titlepage,a4paper]{report} %unterscheidung zwischen gerade und ungerade seite, 11pkt, kp, kp \usepackage[T1]{fontenc} %inputcodierung ...
1
vote
1answer
193 views

How can I add borders

Given this, how can I add a border around? \begin{ttfamily} \begin{lstlisting} g@g0001:~$ cd Desktop g@g0001:~/Desktop$ cat script.sh #!/bin/bash echo $1 `date` g@g0001:~/Desktop$ ./script.sh ...
7
votes
1answer
418 views

lstlisting border bug when breaking lines

I have a certain bug regarding listings. I have used the \lstset command to configure my lstlisting environment. Somehow, when I have a line that is too long to fit into one row the listing breaks ...
11
votes
4answers
2k views

lstlistings: framed code [closed]

I use lstlistings to write Pascal Code. I'd like my code to be numbered and framed. Here is what I have as of now : \lstset{numbers=left, numberstyle=\small, numbersep=8pt, frame = single, ...
4
votes
1answer
211 views

Using \underbrace interferes with frame around Listings

I am having some issue when it comes to use a frame around my listings. The usage of underbrace breaks the frame. Can anybody help out and let me know how to fix this? ...
1
vote
1answer
248 views

How to obtain Sweave(l) listings with rounded corners?

I downloaded the Sweavel.sty-File from here: http://biostat.mc.vanderbilt.edu/wiki/pub/Main/SweaveTemplate/Sweavel.sty Now, for a modern look, I would like to produce rounded corners in the R code ...
3
votes
1answer
614 views

How to set frame size in a listing

I'm trying to put a frame around my code, but the frame has the wrong dimension. How can I set them right? ...
6
votes
2answers
858 views

In listings, lines that are broken (option breaklines enabled) cause frame to be drawn badly. How do you fix this?

I have an lstlisting which has breaklines and frame enabled. The actual setting is as follows. \lstset{ basicstyle=\ttfamily, showstringspaces=false, breaklines=true, keywordstyle={}, ...
2
votes
1answer
939 views

Frame on lstlisting opened on the bottom when code longer than one page [duplicate]

In my \lstset I have: \lstset{ language=Java, % the language of the code basicstyle=\sffamily\large, % the size of the fonts that are used for the code %numbers=left, ...
2
votes
2answers
4k 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 ...
4
votes
1answer
694 views

How to avoid background / frame break in code listings with math / mathescape?

I have lots of C++ sources with LaTeX formulas in the comments. Ideal for using the listings packages to pretty print the source. However, most of the formulas break either, the background or the ...
4
votes
2answers
470 views

listings: framebox shows breaks in font

Using the listings package in LaTeX seems to put lines in the frame box. This happens for all frame box options and if I use a shadow box it is even more apparent... Is there any way I can stop this ...
5
votes
3answers
905 views

Smaller frame with listings

I am using listings to put java code in my beamer slides. Sometimes, I want to frame the code but I do not want the frame to occupy the whole width of the page. I want the frame to occupy only the ...
1
vote
2answers
522 views

Latex escape interrupts frame of listing

I am (ab)using a framed listings environment include an enumeration environment (by escaping to latex). This compiles fine but in the resulting pdf the frame around the listing is interrupted. ...
2
votes
1answer
167 views

Bug with framed, listings and xcolor are together

When using a combination of the packages framed, listings, and xcolor, that causes a strange bug, that I cannot manage to fix. The problem is that, when a box (made with the framed package, and ...
1
vote
1answer
768 views

How to set rulecolor in a listings frame only for the top line?

I use the following lstlisting (listings package): \documentclass{thesis} \usepackage{ucs} \usepackage[utf8]{inputenc} \usepackage{url} \usepackage{bbding} \usepackage{listings} \usepackage{tikz} ...
12
votes
1answer
9k views

Source code listing with frame around code?

I'd like to make my code listing looking more sexy. I found a good example on SO, but one problem is remaining: I would like to not only have a horizontal line at the bottom of the listing but also ...