Tagged Questions
8
votes
2answers
142 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 ...
1
vote
0answers
55 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
134 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
56 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
143 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 ...
6
votes
1answer
234 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 ...
10
votes
4answers
464 views
lstlistings: framed code
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
143 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
157 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
358 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
407 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={},
...
1
vote
1answer
530 views
Frame on lstlisting opened on the bottom when code longer than one page
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
2k 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
425 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
405 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
640 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
388 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
152 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 ...
0
votes
1answer
637 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}
...
10
votes
1answer
5k 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 ...