Tagged Questions
2
votes
0answers
48 views
spacing before scope resolution operator
I'm new to LaTeX and I have encountered a problem with the listings package, I have a space before the :: operator of C++ .
after reading lstlisting with c++: spaces around scope resolution operator ...
2
votes
1answer
136 views
Removing small gaps between lines in LaTeX lstlisting output
Whenever I set a somewhat dark background color in a code listing it becomes obvious that there are small line separations, these of course stay white making the overall appearance not desirable. My ...
1
vote
0answers
38 views
\lstlistoflistings does not add spaces by chapter [duplicate]
I'm quite new in LaTeX and ended up with this problem: I'm using list of tables and list of lstlistings (\listoftables, \lstlistoflistings), both numbered by chapter. List of tables does add spaces ...
0
votes
1answer
119 views
LaTeX source code listing with less Space between characters
I'm trying out LaTex and I want to write shell Code in my document.
Therefore I took this code from: http://stackoverflow.com/a/742069
\documentclass{report}
\usepackage{color}
\usepackage{xcolor}
...
7
votes
2answers
70 views
How do I add a line automatically before a listing
I am using the listings package and I want to automatically add a blank line before every listing. Any idea on how to do this?
6
votes
1answer
197 views
Unequal letter spacing in 'listings'
I am wondering why in the pdf of the example below the letters of the word "function" and the word "sum" seem to have different spacing. This somehow looks ugly.
Apart from that, I am wondering if ...
1
vote
0answers
26 views
Distance between text and \lstlisting [duplicate]
Possible Duplicate:
Increase space between listings env. and surrounding text
Is it possible to increase the distance between text and an \lstlisting? In my resulting PDF the listing ...
3
votes
1answer
98 views
Linebreak after \lstinputlisting
Is there any way for me to insert a linebreak after a \lstinputlisting? At the moment text proceeding the code in the lstinputlisting follows directly after but I'd prefer to have a linebreak but ...
5
votes
2answers
371 views
Increase space between listings env. and surrounding text
How can I set the space between a listing (lstlisting) and text that surrounds it? Is there a parameter I can set at the beginning of my document, that controls this? I tried framesep, but it just ...
2
votes
1answer
99 views
How to define different spaces below float and non float listing?
I am using listings from the listings-package.
I'm having a problem with spaces below the listings. I use both, float- with h and non-float listings. The problem now is, that the spaces below the ...
2
votes
0answers
99 views
Headers and footers for listing environment?
What I need to be able to do is apply a header and footer when I use the listings environment. I have a few requirements:
The header and footer should be outside the listing itself, i.e. they are ...
4
votes
1answer
319 views
Adjusting Vertical Spacing between a listing and its Caption
I am very new to LaTeX.
I am inserting a listing as follows:
\lstinputlisting[float=hk,
caption=My Caption comes here,
captionpos=b,
...
2
votes
1answer
1k views
Adjust bottom margin of a listing environment
I use the following settings for code listings.
\usepackage{listings}
\usepackage{textcomp}
\lstset{language=Java,
keywordstyle=\color{RoyalBlue},
basicstyle=\scriptsize\ttfamily,
...
3
votes
1answer
287 views
Strange spacing in inline listings (listings package)
I am using the listings package to typeset some code. I've defined a lstlisting environment, based upon the standard Haskell environment, and added a number of literate replacements, including:
...
5
votes
1answer
429 views
listings bug: space after literate replacement lost with spaceflexible/fullflexible columns
Problem with space being lost in listings immediately after a literate replacement when using columns=spaceflexible or columns=fullflexible (appears correctly with columns=flexible). A small example ...
2
votes
0answers
98 views
listings bug: space after quote collapsed when inlined with spaceflexible/fullflexible columns [duplicate]
Possible Duplicate:
listings bug: space after literate replacement lost with spaceflexible/fullflexible columns
I seem to have stumbled upon a minor bug in listings (version 1.4 as of ...
5
votes
1answer
650 views
Remove top and bottom margins around listings
When using the lstlisting environment, or similar ones from the listings package, there are paragraph-like margins above and below the actual text. This makes sense in a paper, but gets in the way if ...
1
vote
1answer
208 views
How to remove the skip after a listing when “\parskip” is increased with “\baselineskip”?
I've increased \parskip with \baselineskip to use the "skipped" paragrahs style instead of the default "indented" style. However, this causes all listings to automatically include a baselineskip ...
4
votes
1answer
300 views
lstlisting produces empty row when used inside a tabular
Is there any way I can get rid of the empty new row produced by lstlisting inside a tabular?
Here's a minimum working example:
\documentclass[11pt]{article}
\usepackage{listings}
\lstset{
...
3
votes
2answers
768 views
How do I prevent LaTeX from showing a whitespace following a quote when in an lstlistings environment?
When I am inside the lstlistings environment, it seems that using a quote such as (') or (") will toggle on the showing of whitespace indicators (small little half rectangles). Am I doing something ...
2
votes
1answer
282 views
Listings, literate, and space at the start of the line.
I am trying to use the literate option to replace the prompt (>>>) and continuations (...) in python input with symbols that "hang" in the margin. I can almost do this with something like ...
5
votes
2answers
421 views
How can I set columns=fixed for lstinline globally?
I typeset my listings using listings with a proportional font. This looks good for the lstlisting environment. However, when I use \lstinline|code|, the spacing reverts to variable-width. I would like ...
2
votes
1answer
138 views
Increase listings spacing through the package listings or use figure instead?
This is more a conceptional question on how to use LaTeX in the right way. So far I have striven to customize only those things in LaTeX which are supposed to be without messing to much with print ...
7
votes
2answers
833 views
Grouping the list of listings by chapter
I am using the listings package. I want to print out a list of listings, which I can do. The thing is that in the other listings the typesetter "groups" figures/tables by chapter. Is it possible to ...
1
vote
1answer
215 views
Program listing outputs text wider than usual
\documentclass[12pt]{article}
\usepackage{listings}
\lstset{basicstyle=\ttfamily}
\begin{document}
\texttt{int main(void)} is rendered tighter than in the listing.
What lstlisting option would need ...
10
votes
3answers
2k views
Phantom spaces in listings (pdf)
I have a problem with SQL code in a PDF document. For code representation I'm using the listings package. Everything works perfect until I copy-paste that code from the created PDF document. I get ...
