{copy-paste} is about copying text and other elements from one place (often a PDF file) and allowing it to be pasted. Searching for text (in a PDF file) is a process closely related to copying because both use the OCR (optical character recognition) layer in the PDF file.

learn more… | top users | synonyms

124
votes
1answer
3k views

Making equations copyable in pdf

I would like to write a .pdf, where my readers could copy the rendered formulae and paste them directly in their TeX documents. And the copied text would automatically be: \int x\sin ...
66
votes
6answers
5k views

What are good ways to make pdflatex output copy-and-pasteable?

One frequent aspect of pdflatex output that could be improved is to what extent one can select text output from the generated pdf-file and copy-and-paste it. This is essentially an issue of having the ...
62
votes
3answers
2k views

Is there a LaTeX trick to prevent a PDF viewer from copying the line number?

A PDF output is obtained by compiling the following code. \documentclass{article} \usepackage{xcolor} \usepackage{listings} \lstset { language={[LaTeX]TeX}, numbers=left, ...
51
votes
1answer
3k views

Small-caps, old-style numbers, and some ligatures produce odd symbols in PDF copy text?

This is a problem I've had consistently with XeLaTeX. Here's a small example: \documentclass{article} \usepackage{fontspec} \setmainfont[Ligatures=TeX,Numbers={OldStyle,Proportional}]{Minion Pro} ...
42
votes
7answers
17k views

Is it possible to produce a PDF with un-copyable text?

Is it possible to produce a PDF with un-copyable text? I mean, when you want to copy text from the PDF, you can't copy it or what you copy is nonsense characters.
37
votes
2answers
1k views

Making “C♯” on my resume searchable

As discussed on How to make the correct hash-symbol in C Sharp, I chose to render the name of the C# language on my resume as C$^\sharp$ I'd like to keep that typographical touch. But I'm afraid ...
35
votes
1answer
2k views

Make ligatures in Linux Libertine copyable (and searchable)

I'm currently working on an essay written in LaTeX form. I'm facing problems with ligatures - in my pdf output (rendered using pdftex) opened in Adobe Reader I get X's and V's when copy-pasting words ...
35
votes
2answers
676 views

Viewer-independent copyable spaces at the beginning of a line?

I need to include a couple of Python code listings, where the indentation of the lines (using some number of spaces) is significant. I would like for the code listings to be copyable, so the spaces at ...
28
votes
1answer
766 views

Make hyphenated words in PDF searchable

Is there a way to make hyphenated words in a PDF generated by LuaTeX searchable? If the MWE below is converted to a PDF, searching for "lexicon" (in Acrobat X for example) will not find the word since ...
26
votes
1answer
771 views

Is it possible to prevent some part of text (headers, footers) from selection?

I'm looking for a solution that will allow me to prevent some parts of the final pdf file (header, footer) from being selected and copied. It is to allow easier quoting of longer parts of texts from ...
22
votes
1answer
1k views

How to make text copy in PDF previewers ignore lineno line numbers?

I'm using lineno for a document. I have it configured to put line numbers in the margins of the document. I generate PDF using pdflatex. Here's the problem: when people copy a region of text in a ...
17
votes
2answers
2k views

Cannot copy text from the simplest PDF file?

Consider the following code: \documentclass{article} \begin{document} We define multiplication by $$v_1x = 0,\quad v_2x = v_1,\quad v_1y = -v_1,\quad v_2y = v_1$$ \end{document} which looks ...
16
votes
1answer
535 views

Are there any (La)TeX editors that accept pasting rich text?

If I copy text to the clipboard from a PDF file, web page, email, or Word document and then paste it to Word or Thunderbird, it is recognized as rich text and converted to Word's or Thunderbird's ...
15
votes
1answer
1k views

Remove hyphen from word spanning two lines in text copied from a pdf file

If I copy text from a PDF and a word is hyphenated and spans two lines, the copied text contains the "-". For example: Examp- le should be copied as Example not Examp-le The problem is ...
14
votes
2answers
916 views

How to fix missing or incorrect mappings from glyphtounicode.tex

glyphtounicode.tex has been described as the best solution for generating copy-and-pasteable symbols. However, I find that various symbols that I need to use do not paste as the appropriate Unicode ...
14
votes
2answers
1k views

Copy from PDF without line breaks at end of each line

When I produce the PDF, open it and copy the paragraph into notepad, there is a forced line break at the end of every line in the PDF. Is there a way to get over this, so that I can copy the paragraph ...
13
votes
2answers
367 views

How to produce character-by-character-pastable visual output that is a function of the (intended-to-paste-as-such) source code input?

Note: The original phrasing of my question was this: How to use accsupp to produce all-upercase in the visual output from input that should paste in its original, ordinary-case form? However I think a ...
13
votes
1answer
628 views

Can we make ligatures copy-and-pastable? [duplicate]

Is there a straightforward way to make ligatures more copy-and-pastable? I know that by using \usepackage[t1]{fontenc} that many glyphs like accented and umlauted characters become ...
13
votes
1answer
376 views

Hyphens at end of line disappear upon pasting, even if they were present in the input

When I paste text from pdflatex output, there are two things about hyphens that I would like to change: Hyphens paste as "hyphen-minus" (U+002D, "-"), but I would prefer the newer Unicode character ...
12
votes
2answers
447 views

Encoding to be able to search pdf

I am writing a document in Czech. I want To be able to fully search the pdf (at the moment I can search only for words with non-Czech characters, but I want to be able to search with Czech ...
12
votes
1answer
7k views

Protect text in PDF from being copied [duplicate]

Possible Duplicate: PDF with un-copyable text What is the most effective ways to protect text in a PDF from being copied with Ctrl+C? I know about standard PDF copy protection, and also ...
12
votes
1answer
551 views

Can PDF search find words with ligatures in XeLaTeX-documents?

Is there some way allow PDF search to find words with ligatures? I use XeLaTeX. \documentclass{book} \begin{document} Prefix. \end{document} In the resulting pdf file, searching for the word ...
11
votes
2answers
1k views

What can cause generated PDF document whose text are not correctly copyable?

I was wondering why some PDF documents compiled from some LaTeX code does not make its text correctly copyable, i.e. what you can get is nonsense text? For example, this pdf document (I don't have the ...
11
votes
4answers
2k views

Copy-and-paste of mathematical formulas pastes the unformatted, raw TeX

For instance: Copy Paste in a new location Result: x^{2} LyX 2.0.4 (new)/MiKTeX/Windows 7 Ultimate 64 bit
11
votes
1answer
297 views

How to produce unicode copyable alternative text? (with accsupp)

In the following example, I can't manage to make accsupp store the unicode alternative text. The resulting PDF looks as expected but the copyable text is not the correct one. I tried this with ...
11
votes
1answer
248 views

Make a command to mark a text and class them for text analyze

Sorry for my English, I'm French and it's my first post on this forum, but I'm a frequent visitor of this forum, thanks for all ;) My problem is this : I'm working with transcriptions of 35 ...
10
votes
5answers
2k views

I just want to have the text in my pdf the same way I have it in my editor

I want to paste from the clipboard a plain text copied from a text editor (line wordpad++, vim, notepad etc), and I want TeX to respect the same line break formatting that the editor has. This works ...
10
votes
3answers
4k 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 ...
10
votes
2answers
656 views

pdf files show “fi”, but searching for or copying them does not work

When I pdflatex text containing "fi", e.g. "infinite", the resulting pdf-file looks correct, e.g. "infinite" is shown in the text. But when I search the pdf file for "infinite", 0 occurrences are ...
9
votes
2answers
170 views

How to insert searchable value for PDF reader?

In a dictionary a headword can consist of special characters like in this example : Eyja·fjalla··jök|ull. I would like to achieve that the user in PDF reader in PDF file can search for ...
9
votes
1answer
55 views

Protect footnotemarks from selection in pdf

Inspired by this question i used accsupp to protect the headers of my pdf from being copied which works nicely so far. I tried to do the same thing for the footnotemarks which hasn't worked so far. ...
9
votes
1answer
278 views

Searching for Euro symbol

I found egreg's answer to the question "eurosym seems to not be working" some time ago and it works perfect if I compile using pdflatex, but if I compile using latex dvips ps2pdf the Euro symbol is ...
8
votes
3answers
1k views

Incompatibilities of cmap with fontenc/hyperref?

The following code doesn't compile (with pdflatex) \documentclass{article} \usepackage{cmap} \usepackage[T1]{fontenc} \usepackage[pdfa=true]{hyperref} \begin{document} Hello. \end{document} ...
8
votes
1answer
779 views

Copying LaTeX from a PDF

Is there a way to copy from a PDF to a LaTeX document? Whenever I do it, it copies in with weird symbols in the place of LaTeX commands for example: $$f:\mathbb{R}\rightarrow \mathbb{R}$$ copies in ...
8
votes
3answers
1k 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 ...
8
votes
1answer
403 views

How can I make source code included with minted copyable?

Is it possible to make source code with minted copyable? Here is a minimal example how I include source code (completely, with minimal java code, on GitHub): \documentclass{beamer} ...
7
votes
2answers
215 views

How to make ligatures searchable and copiable in LuaTeX? [closed]

I have a problem with ligatures in LuaLaTeX when using the font Adobe Minion Pro. The fi ligature displays fine but is neither searchable nor copiable. If I copy it, I get some Asian character. ...
7
votes
1answer
451 views

Copy-able Matrix/Grid

I have grid-formatted data: 1 2 3 4 5 6 7 7 9 I'd like to display this as above in a LaTeX document compiled with pdfLaTeX. I've thought about using the TikZ Matrix library and the AMSMath Matrix ...
7
votes
1answer
2k views

Copy pasting of underscore

When I use \textunderscore to print an underscore "_" character, the copy-paste functionality of Adobe Acrobat Reader does not appear to work properly. For instances, when I copy test_case from ...
7
votes
1answer
3k views

Problem copying text from pdf - spaces being stripped

I have the following minimal working example: \documentclass{book} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \begin{document} é canção \end{document} I need to use the utf8 argument ...
7
votes
2answers
662 views

How do I encode foreign characters so that they are searchable in the resultant PDF file?

This may be a PDF problem rather than a LaTeX problem, but as it involves pdfLaTeX output I'm hoping I won't get my wrist slapped too hard. I'm creating a bibliography, and inevitably some of the ...
7
votes
1answer
291 views

Copy Czech characters from PDF with charter font

I wanna be able to copy czech characters from PDF, but for some reason it doesn´t work. here is my code: \usepackage{cmap} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{charter} ...
7
votes
1answer
182 views

Change the way XeTeX sees a string before running/building PDF

For some reason, I'm really struggling to articulate my question, so let me apologise in advance. I may not be approaching this from the right angle. I'm working in XeTeX (and it's far too late to ...
6
votes
2answers
112 views

copy and reuse the content of an environment

is there a way to embed an text in several environments (or structures, \chapter, \section etc.) in one file and "copy"/insert the content of single environment items in other files? i've noticed the ...
6
votes
2answers
14k views

How to make apostrophes appear normally when copy-pasting from a MS Word document?

I have a report written in MS Word which I would like to turn into a LaTeX document. I copy-pasted the content of the document in my LaTeX editor (TeXShop, LaTeX, pdfTeX) and everything comes out fine ...
6
votes
1answer
333 views

Create alternative uppercase text automatically with accsupp

This is a follow-up question to Is it possible to provide alternative text to use when copying text from the PDF?. I am essentially trying to redefine textsc/scshape in order to use accsupp ...
6
votes
2answers
2k 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 ...
6
votes
1answer
937 views

PDF with un-copyable text in LuaLaTeX

In Is it possible to produce a PDF with un-copyable text?, it was suggested the following code to disable the coyable text from a pdf viewer. % pdflatex is required \documentclass{article} ...
6
votes
1answer
266 views

Weird text when copying from PDF

\documentclass[12pt, a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[swedish]{babel} \usepackage{fullpage} \begin{document} åäö \end{document} Making a PDF from this creates a ...
6
votes
0answers
189 views

PDF that can be scanned faster by a PDF reader [closed]

Searching words with Ctrl+F in common PDF readers takes sometimes very long. The time does not correlate with the number of pages, or the number of embedded pictures. What causes slow fulltext ...