Linked Questions
10 questions linked to/from Phantom spaces in listings
20 votes
1 answer
9k views
How to copy/paste from lstlistings? [duplicate]
I'm trying to write code in a LaTeX document that can be copy/pasted from an outputted pdf using Adobe Reader and that also word wraps, rather than breach the right margin. I've found that in ...
0 votes
1 answer
82 views
Remove spaces inside quote in Listings [duplicate]
I'm using TexMaker with PDFLatex. My problem is that the code lines in the listing ress := 'articles'; test := 'something'; test := 'somethingarticles'; test := 'arrtticclleess'; are ...
2 votes
0 answers
84 views
Sources to be copied from PDF [duplicate]
Possible Duplicate: Phantom spaces in listings (pdf) I would like to create PDF using luatex and it's important that listings where copied from this PDF in the original form (to keep them working)....
0 votes
0 answers
42 views
Making output of \texttt and \lstlisting copy-pasteable [duplicate]
I use \texttt{} and lstlisting in Beamer to make text look like code in fixed-width font. But when I copy-paste it, it gets altered and fails to run. Here is a minimal example: \documentclass[xcolor=...
31 votes
4 answers
16k views
How to make listings code indentation remain unchanged when copied from PDF?
So I am using listings package for code examples. But there is a problem. When I copy the code examples from the final PDF document, they are usually not the same - the indentation is gone, there are ...
13 votes
4 answers
5k views
Problems with copy and paste from PDF using lstlisting
I'm using lstlisting to create course notes from which I am hoping that code can be copy&paste'd I've already implemented the suggestions in Phantom spaces in listings (pdf) to make sure that ...
12 votes
2 answers
7k views
Copy-pasting leading whitespace and blank lines in listings package (pdf) [duplicate]
I'm trying to use the listings package to typeset some code in a PDF document, in a way that allows me to copy-paste the resulting code. This mostly works well, if basicstyle=\ttfamily,columns=...
3 votes
0 answers
2k views
How make a LaTeX document that generates a PDF from which copy-paste works correctly for empty lines and leading space indentation?
We are writing a PDF document in LaTeX that contains various installation instructions and other technology text. Our idea is that the user reads various instructions in Serif font and then there's ...
2 votes
1 answer
154 views
How can I enable search within verbatim sections of a LaTeX document rendered to PDF?
I'm generating a LaTeX document as so: \documentclass{article} \usepackage[letterpaper, margin=0.75in]{geometry} \usepackage[tocindentauto]{tocstyle} \usetocstyle{standard} \usepackage{parskip}% http:...
1 vote
0 answers
196 views
Copy code from lstlisting excluding line number
I have this latex code \documentclass{article} \usepackage[lmargin=2.5cm,rmargin=2.5cm,tmargin=1.5cm,bmargin=3.5cm]{geometry} \usepackage{listings} % Environment meant for source code (useful for ...