{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

3
votes
1answer
849 views

Weird behaviour of copying - no space between words

\documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{tgtermes} \begin{document} Polska, Rzeczpospolita Polska -- państwo unitarne w Europie Środkowej, położone ...
5
votes
2answers
294 views

Unable to copy _ from pdf

\documentclass{article} \usepackage[T1,OT4]{fontenc} \begin{document} Text with \_. \end{document} In PDF there is a correct output: Text with _. But when I select and copy it I get: Text with . It ...
12
votes
1answer
472 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 ...
14
votes
2answers
745 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 ...
8
votes
3answers
785 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} ...
57
votes
5answers
4k 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 ...
4
votes
1answer
411 views

How to copy contents of one file to another?

So I have a .txt-file and I need to import the data line per line. That works like it should. I need however to adapt the contents loaded into a command an write it to another .txt file that later ...
14
votes
1answer
748 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 ...
4
votes
2answers
312 views

Cannot copy letters with diacritics from pdflatex PDF

I have problem with copying text from PDF file. I am using these packages in my document: \usepackage[slovak]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} However when I generate ...
10
votes
2answers
533 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 ...
58
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, ...
4
votes
2answers
502 views

Problems with copy and paste from PDF using lstlisting (Again)

So I had already posted a similar question concerning the minus sign (-), but now I have an issue with the apostrophe (') that the previous solutions do not seem to solve. This seems to be a problem ...
7
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 ...
6
votes
1answer
371 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 ...
4
votes
1answer
190 views

What exactly does \pagenumbering do?

I am trying to squelch the page numbers using the code from here. This works fine, if one uses ordinary page numbers. If the page numbers are modified with the pagenumbering command, it doesn't work ...
5
votes
1answer
283 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 ...
26
votes
1answer
647 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 ...
49
votes
1answer
2k 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} ...
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 ...
3
votes
1answer
3k views

Copy and paste disabled in LyX 2.0

I try to copy and paste in a LyX document I am editing and it says that the command (paste) is disabled. This happens with anything, be it normal text, figures or formulae. I am working on a 64 bit PC ...
27
votes
1answer
649 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 ...
7
votes
1answer
1k 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 ...
11
votes
2answers
961 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 ...
7
votes
2answers
610 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 ...
5
votes
1answer
185 views

Selectable picture environment in PDF

I'd like to be able of copy & pasting the results of a picture environment in a PDF file to a plain text file. The problem is that once I copy the text the results are unsatisfactory: for ...
1
vote
0answers
389 views

Cannot copy from pdflatex-created PDF [closed]

When I create a PDF using pdflatex, I can neither copy from it nor search across lines. Is there any way to make these things possible? I tried cmap, but it doesn't help at all. Here is an example ...
19
votes
1answer
827 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 ...
7
votes
1answer
2k 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 ...
9
votes
3answers
3k 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 ...
5
votes
1answer
874 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} ...
12
votes
1answer
5k 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 ...
34
votes
7answers
11k 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.
33
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 ...