Questions tagged [copy-paste]

{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.

Filter by
Sorted by
Tagged with
2
votes
1answer
47 views

PDF text search doesn't find first word in section title

When I run lualatex on the following MWE, open the resulting PDF in either Evince or Okular, and search for foo, I get zero matches. If I instead search for f oo (note the space between the f and oo) ...
0
votes
0answers
38 views

Copyable code blocks in LaTeX using verbatim or lstlisting

I tried to copy code blocks from the compiled pdf using the following code I used pdflatex to compile it. If I used 3 lines of code, copying worked as expected, I got back the same arrangement as the ...
5
votes
3answers
219 views

Disable copying text from minted listing

I want my minted listings not to have copyable text. I've found this: Is it possible to produce a PDF with un-copyable text? But after a few hours of trials I am not able to integrate it with my ...
0
votes
0answers
25 views

Proper copy-pasteable single quotes in listing

Yes, I know this is VERY similar to previous questions but my specific problem seems to be unaddressed. No matter what I do I always end up with code that copy-pastes as such: Notice the unwanted ...
0
votes
0answers
60 views

Speeding up repetitive typing

If I am writing a document say, \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} y = some long equation \end{equation \end{document} and some really long equation ...
2
votes
1answer
77 views

Quotation marks and hyphen in listings generate un-copyable PDF

I'm writing a document for general purpose so that anyone can follow it and the idea is to copy and paste this command in a Linux terminal. But when I do that in a terminal give me error because ...
4
votes
1answer
412 views

How to configure tcblisting with minted to allow copy/paste from listing with whitespace characters?

This answer from a similar question gets very close to a final copy/paste solution, but does not work for me as it does not select whitespace. I am asking a new question as the linked one is several ...
2
votes
1answer
387 views

Included PDF image has invisible, but selectable text

I am currently facing some problem when I tried to import a PDF as a graphic. The PDF with some original text beside was first cropped to remove the text and then imported using \includegraphics. ...
1
vote
0answers
126 views

How to keep formating when copy-paste code sections with minted?

I am using the minted package for syntax highlighting code in my slides, but I have some problem to make this code easily copyable directly from the PDF to the console. it seems that the whitespaces ...
8
votes
1answer
443 views

How to copy minus as hyphen?

There is a question about minuses in listings. Is it possible to make (document-wide) the minus sign (−) to look like the typographic minus, but be copied from the resulting PDF as the hyphen (-), ...
5
votes
0answers
388 views

Package cmap or `\input glyphtounicode`?

I'm sending PDFs to some folks who are supposed to copy some of the content elsewhere. It is important that my files are searchable and copyable (while I doubt these words to be proper English...) So ...
2
votes
3answers
273 views

How to reuse code

This might have been asked before, but I am not sure what to search for. I am often in the situation that I want to print identical portions of text (or images, tables, etc) on a single A4 page in ...
1
vote
0answers
50 views

Character Encoding pdf [duplicate]

I compile my latex with pdflatex in texniccenter. The produced pdf looks good. But when I select a word and copy it over to a texteditor, some of the characters are wrong. for instance all german ö,ü,...
0
votes
0answers
90 views

How to remove indent characters when copying from PDF document using listings package

I am pretty sure I read something about this before, but I can not find it. Mark it as a duplicate if so please. I am coding inside lstlisting environment using SPACEBAR for separate words and TAB ...
2
votes
1answer
47 views

Using stringstyle with quotation marks does not fit properly using listings package

Please consider this MWE with stringstyle=\bfseries\color{blue}: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[spanish]{babel} \usepackage{color} \usepackage{enumitem} \usepackage{...
4
votes
1answer
245 views

Is it possible to not copy numeration using lstlisting?

Please consider the following MWE: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[spanish]{babel} \usepackage{color} \usepackage{enumitem} \usepackage{listings} \definecolor{...
2
votes
0answers
83 views

Make automatically equation copyable in pdf

I would like to write a .pdf where all rendered equations can be copied and pasted correctly as TeX code. Someone had posted a similar question : https://tex.stackexchange.com/questions/119713/making-...
0
votes
0answers
266 views

Control the copy/paste output of latex text

Wondering if there is a way to control the copy/paste output of latex generated PDF text. For example, say I have this in the output PDF: g : b → a If I could control the copy/paste output I would ...
1
vote
0answers
173 views

Copy pastable code in tex

I have XML code which I need to copy paste. Here's is the code <joint name="joint1" type="continuous"> <parent link="link1"/> <child link="link2"/> <origin xyz="5 3 0" ...
2
votes
1answer
188 views

How do I copy WhatsApp chats and retain linebreaks

I am looking to copy many whatsapp chats into a document and retain the linebreaks. If I just copy them in, then there are no linebreaks. How do I do this? Thanks Verbatim (alone) doesn't work ...
7
votes
1answer
508 views

How to increase minimum space between words in XeLaTex output?

Update: The problem seems to be that the spacing between some words is too small, and the ATS thinks it's one word. So, the ideal solution would be to set a minimum spacing across the entire document,...
0
votes
1answer
317 views

Print any utf-8 character to copy-paste from pdf

I have this code: \documentclass[varwidth,border=10pt]{standalone} \usepackage{graphicx} \newcommand{\MyBrand}{% \includegraphics[width=3em]{myBrand}% } \begin{document} I always use \MyBrand , ...
2
votes
2answers
735 views

LaTeX - Copy and paste º

I have a LaTeX document. I can copy from PDF (º), but it pastes as (o). How can I handle it? Use: \documentclass[12pt,a4paper]{report} \usepackage[utf8]{inputenc} \usepackage[brazil]{babel} \...
2
votes
0answers
113 views

How does one make \textls text copy-and-pasteable in PDF?

Consider the following document: \documentclass{article} \usepackage{microtype} %\usepackage{adobecaslon} \begin{document} Some \textls[250]{letterspaced text}. \textls*[100]{SPEECH} \end{document} ...
1
vote
1answer
250 views

Integral in math messes up copy-and-paste of text [duplicate]

For a document like \documentclass{article} \usepackage[T1]{fontenc} \input glyphtounicode.tex \input glyphtounicode-cmr.tex \pdfgentounicode=1 \pagestyle{empty} % for quick CTRL+A \begin{document}...
0
votes
1answer
229 views

importing equation images

I'm currently writing a summary of a paper, and to make things easier for me, I decided to just use the windows snipping tool, to copy the equations from the paper, and insert them in my latex summary ...
3
votes
1answer
322 views

Why is there no spacing between words in the table of contents?

When I make a table of contents in LaTeX and execute the TeX File with pdflatex, some spaces (the most of them) in it are deleted for search function (and for me in braille). My question is: why ...
1
vote
0answers
422 views

Can't compile a PDF with UTF-8 in Sweave [duplicate]

I try to compile in Sweave (R Studio) a PDF which contains cyrillic characters. The PDF-file looks nice, and the cyrillic characters display correctly. But when I try to copy some text from the PDF to ...
3
votes
1answer
121 views

Why LuxiMono's dashes disappear when copying-pasting from Acrobat Reader?

Consider the following MCE: \documentclass{article} \usepackage[T1]{fontenc} \usepackage{luximono} \begin{document} \texttt{foo-bar} \end{document} When copying-pasting "foo-bar" from Acrobat Reader,...
3
votes
0answers
82 views

Displaying a copy-pastable and well structured BibTeX key in my document

Context: I want to insert the BibTeX entry of my document at the beginning thereof. I thus want this code snippet meet two criteria: Be easily copy-paste-able (code seen = code copy-pasted) Looks ...
1
vote
0answers
338 views

Find apostrophe symbol ' in PDF file

I'm writing in french, with AZERTY keyboard and I don't know why I not can find the apostrophe symbol ' in my PDF file ? \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \...
3
votes
0answers
329 views

XeLaTeX/LuaLaTeX copy and paste broken and document not searchable?

I am on Windows using TeX Live 2016 and both xelatex and lualatex produce broken encodings when building the following \documentclass{scrartcl} \usepackage{fontspec,unicode-math} \...
1
vote
1answer
404 views

Type: Badbox , Overfull \hbox for text

i get from external file ... xtras/intro.tex a badbox warning with the following line 1 Overfull/hbox (54,60191 pt too wide) in paragraph at lines 1---1 i copied and pasted text from word. I also ...
4
votes
2answers
2k views

Copying continuous text from PDF file to TXT file

My question doesn't explicitly refer to LaTeX itself, but the resulting PDF. To make long story short: I want to be able to copy text from PDF to TXT file as a continuous text. I believe this is ...
3
votes
1answer
118 views

Is there a way to make the page numbering nonselectable

Is there any way in pdflatex to make the page numbers non selectable in the outputed documents. I know that there are some pdfs floating around out there where the page number is not included in ...
2
votes
1answer
97 views

How to re-use a Theorem's number when repeating it for convenience

I want to have an appendix with a theorem's proof. The theorem appears in the main body of the document, and I would like to have it replicated in the appendix as well for convenience. If I simply ...
1
vote
0answers
93 views

How to compile a document that you can search the pdf for latex math formulas? [duplicate]

Is it possible to compile a latex-document in such a way, that you can search for math formulas in the resulting pdf file by searching for the corresponding latex code? For example open the resulting ...
1
vote
0answers
160 views

fontspec does not create a searchable document with copyable text

My documents aren't copyable or searchable with the Apple pdf engine when using fontspec. using cmap doesn't help. \documentclass[oneside, 12pt]{book} \usepackage{fontspec} \setmainfont[Ligatures=TeX]...
1
vote
1answer
118 views

Pipe gets changed from PDF

When using MikTex I've noticed the pipe | (vertical bar) looks fine in a pdf when when saved out as text it gets changed to j so Always five, acting as one | Dedicated | Inseparable | Invincible ...
14
votes
1answer
325 views

Can we get maths in PDFs that can be copy-pasted and screen-read?

Mathematics in PDFs can be cumbersome for any purpose but reading or printing. In particular, copying mathematics in order to use it in another document, and screen-reading for visually impaired ...
3
votes
1answer
1k views

Issue with diacritics in Romanian language document

I have a document that uses Romanian language, characters with diacritics. It is created using TexWorks. My document looks like this: \usepackage[utf8]{inputenc} \usepackage[romanian]{babel} ca ...
1
vote
1answer
66 views

key binding in LyX for c=entering matm mode and copying previous equation

Is there any specific way in LyX of binding a key to the following operation: a) go into math mode b) copy the immediately preceding piece of math, eg the last equation at the current point of the ...
0
votes
1answer
836 views

Words containing “ff” in PDF created by LyX are not searchable [duplicate]

My setting under LyX "Document" command: language encoding--unicode utf-8; output--default A minimal example: type "coefficient" and generate PDF, then search it in PDF result: not showing up I ...
3
votes
0answers
494 views

Listing cut and paste in PDF

I am trying to get good copy-n-paste'able text from a LaTeX generated PDF using the listings package. I have three listings that all behave not as I'd like: Long lines are broken using breaklines ...
1
vote
1answer
88 views

Saving Image Rather Than Pasting

I think I might have accidentally pressed some combination of keys that messed up texstudio, because every time of press ctrl+v to paste it saves a picture file rather than paste. What did I do ...
4
votes
1answer
2k views

How to copy text from PDF created by LaTeX?

I'm writing some texts in Brazilian Portuguese using LaTeX. Eventually I have to copy/paste some parts of those texts in Word, but with character problems. I use the following code: \...
12
votes
2answers
8k views

Text copied from pdf is missing spaces, or has extra ones

When I create a pdf with pdflatexand copy text from that pdf (using Adobe Reader DC on Windows 10), some of the spaces are missing. Here's an MWE: \documentclass{article} \usepackage{newtxtext} \...
0
votes
1answer
398 views

Okular doesn't recognize text [duplicate]

I am writing articles using Kile on Windows 7. I have a problem with search in the output file. For some reason, Okular doesn't recognize the text. Trying to copy something with the option text ...
2
votes
0answers
351 views

Text in pdf output not recognized

I am writing my first document with Latex, so please be patient ;-) I've searched through forums again and again but was unable to find a solution. I am working with Texmaker and when compiling my ...
4
votes
1answer
477 views

Copy and paste unicode math

Consider the following example compiled with luatex. \documentclass{standalone} \usepackage{unicode-math} \setmathfont{Latin Modern Math} \begin{document} $A_1$ \end{document} Since Latin Modern ...