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.
214
questions
1
vote
1
answer
128
views
Can't copy-paste text from my latex pdf
I am using TexStudio to write my latex document, wich is using utf-8 encoding. All the pdf file generated can't be copy-paste. It seems like the pdf is generated as an image. Even when I change PDF ...
1
vote
0
answers
60
views
Fixing issue with copy-paste with AccSupp
I am preparing a math-heavy document and am using the AccSupp package to control what is copied and pasted (for example, $\angle ABC$ usually results in \ABC being copied, but I have it set to copy &...
1
vote
0
answers
63
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 ...
0
votes
0
answers
37
views
Fixed width listings columns without extra spaces after copy from pdf
I would like the code listings from my Beamer slides to have the same spacing after having been copied from the pdf, and pasted into a text editor. I have been working with the columns option of the ...
0
votes
0
answers
167
views
I can't copy and paste underscore
I have a problem that I have not been able to solve. When I generate my PDF document and want to copy the text to a terminal or a WORD document, the underscores are not copied. In the PDF it does ...
6
votes
1
answer
170
views
Big LaTeX delimiters have a weird encoding in the pdf. How can I avoid this?
I noticed recently that changing the size of parentheses in LaTeX results in a different encoding of the text in the pdf (as determined using the copy/paste functionality in my pdf viewer). For ...
0
votes
1
answer
75
views
How to make copying something ignore linebreaks?
I have following code:
\documentclass{article}
\setlength{\arrayrulewidth}{0.5mm}
\setlength{\tabcolsep}{18pt}
\renewcommand{\arraystretch}{2.5}
\usepackage{longtable}
\usepackage{array}
\usepackage{...
0
votes
2
answers
411
views
A practical way to create, copy and paste LaTeX-generated equations in png format with transparent background?
In order of priority:
Online (I use Overleaf on a daily basis, Idk if it can help) (latex2png website seemed perfect at first but many packages are missing [e.g. I can't use the \mathscr{} command])
...
3
votes
0
answers
293
views
Making text clickable so that when clicked on, the text is copied
I was wondering if there was some way to make it so that when you click on certain text in a latex document, it is immediately copied. I am trying to make an address book for myself and it would be ...
1
vote
1
answer
3k
views
Overleaf: Is it possible to copy and paste one or multiple files(folders, tex, images....) in overleaf project?
I am trying to copy many tex. files from one folder to another (tex. files will have same name but a little different content which I would change after copy/paste) at a same project but nothing ...
0
votes
0
answers
89
views
Customize copy-text for box
Motivation
My end goal is to include more Mathematica expressions in LaTeX-pdfs that are copy-paste-able back into Mathematica notebooks. For instance, the code
\usepackage{mmacells}
...
\begin{...
3
votes
1
answer
178
views
Writing in Greek, but can't copy Greek?
So, I have a file in Gree, with some English letters. Everything works fine, no syntactic errors or anything. When I go into the PDF to copy from it or search for something, it never returns my query. ...
0
votes
0
answers
45
views
Convert PDF to PDF of images? [duplicate]
I have recently written a PDF with LaTeX. That means that you are able to copy and parse the PDF text.
Out of pure interest: How is it possible to convert all pages to images (collected in a big PDF), ...
1
vote
1
answer
441
views
Copy a text file and display it as it is
I have a log file from an analysis software which is in ".txt" form. Data is arranged in some useful order with symbols, matrices etc. in the file. I want to make the contents of it an ...
0
votes
1
answer
62
views
How to make symbols (written by using $$), look like something in the pdf and different if you copy-paste it? [duplicate]
Is there a way to make symbols, written by using the function $$, in LaTeX look like something in the pdf document, but different if you copy-paste it?
Here is an example of what I would like:
...
3
votes
1
answer
115
views
How to make text look different in PDF compared to copy-paste [duplicate]
Is there a way to make text written in LateX look like something in the pdf document, but different if you copy-paste it?
Here is an example of what I would like:
In the pdf document: there is 10 km ...
0
votes
1
answer
150
views
prevent text selection on pdf in \ruby context
I was wondering if there is an "easy" way to prevent selection on furigana produced by \ruby command so it's easier to select>copy>paste on translator or other place.
%!TEX TS-program =...
3
votes
0
answers
2k
views
Produce copy-paste friendly code blocks in PDFs
I have used lslisting for inserting the code blocks. Requirement is to make the code blocks displayed correctly in the compiled PDF and make them as easy as possible to copy as plain text. Please take ...
3
votes
0
answers
482
views
Copy linked text to clipboard in PDF output
How can I realize the following:
Click on a linked text in my PDF file. This copies the linked text to my clipboard and I can then copy the text into an email etc.
0
votes
1
answer
102
views
unable to extract devanagari from XeLaTeX generated PDF using ebook-convert
I'm using TeXLive 2020 in Debian Bullseye. I generated a PDF document using XeLaTeX containing Devanagari characters. By using the option \XeTeXgenerateactualtext=1, I'm able to copy the Devanagari ...
2
votes
0
answers
409
views
pdflatex make text unselectable (uncopyable)
How would i go about making the pdf output of a document have unselectable sections? (So you can't directly copy and paste from them). Is there some way of converting all the text into vectors? This ...
0
votes
1
answer
595
views
Making a copy of a project breaks the bibliography
I made a copy of my latex project for version control purposes and it broke the bibliography in my compiled document. All the citations are question marks and the bibliography is not listed. Nothing ...
1
vote
1
answer
174
views
Can Latex copy external files around the computer's file system
I have a latex document like the below
\documentclass{article}
\usepackage{graphicx}
\newcommand{\plott}[1]{
\begin{figure}
\includegraphics{#1}
\end{figure}
}
\begin{document}
\plott{"c:...
0
votes
0
answers
432
views
copy a section from another .tex file
I'll try my best to explain..
I need to make a LaTex document every week for a lab. In it, I have the safety sheet of chemicals. Often, I've already done a chemical in an earlier document.
Now, I just ...
1
vote
0
answers
72
views
When tried to copy from PDF generated with LaTeX, I got garbled code instead
So I was trying to copy text from PDF files generated from XeLaTeX, but for whatever reason, it results in garbled sign.
But it does work when opened through the built in pdf viewer in TeXShop
Also, ...
0
votes
1
answer
164
views
Restate statements before declaration
TLDR
How to throw all dirty but necessary "lemmas/proofs" in the appendix, and restate them in the main text?
I had a few attempts, and it seemed that my requests are weird.. so I would ...
2
votes
0
answers
177
views
Quoting from the same document?
How to quote from the same document? For example
SECTION 3. Explanation
Before discussing the main theorem, let's quote it's statement.
Theorem 7.1. (Main lemma) 1 + 1 = 2
...
SECTION 7. Appendix
...
1
vote
2
answers
129
views
Locally and one-slot-oriented font encoding definition change
Related to "Ð vs Đ": Wrong mappings when copying from PDF with \pdfgentounicode with newtx.
I have even tried changing /Eth to /Dcroat in lm-ec.enc and tested new MWE using lmodern and ð Ð đ ...
0
votes
0
answers
303
views
How to know if my file is inserted correctly `glyphtounicode`
In several suggestions for making pdflatex output copy-and-pasteable, is part of the suggestion to insert the code,
\input glyphtounicode.tex
\pdfgentounicode=1
\pdfcompresslevel=0
TeXstudio marks in ...
3
votes
0
answers
228
views
LuaHBTeX: \copy contents behave differently from \box for copy-paste -- by making contents tofu for reordered glyphs or by adding spurious space
Here's an example of a tex \vbox with some devanagari text in it. My code adds contents of \vbox to document twice, first its copy (using \copy), and later itself (using \box). Both copies look ...
3
votes
0
answers
1k
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 ...
1
vote
0
answers
160
views
Using \EveryShipout corrupts the copyable text
This is a strange bug. I'm using the textpos package (which in turn uses the everyshi package) to place text at a certain position on the page. Consider this document:
% !TEX TS-program = lualatex
\...
1
vote
1
answer
253
views
Getting correct searchable text for Devanagari text
Consider this fairly minimal document, which AFAIK is the recommended way of typesetting Devanagari-script Sanskrit-language text:
\documentclass{article}
\usepackage{fontspec}
\usepackage{...
0
votes
0
answers
94
views
Strings contain fi misparsed in resume parsers
I am having a consistent bug with resume parsers and was wondering if anybody has suggestions
Any word that has the substring "fi" essentially removes the substring
Do you guys have any ...
2
votes
1
answer
20
views
IEEEtran: How to copy a snippet up without changing the cited number?
I want to prevent the changing of the reference number when I duplicate a portion of the content.
The following code works when using the plain bibliography style, but I need to use the IEEEtran style....
0
votes
0
answers
886
views
How to copy and paste text with formatting removed
I am using the clipboard package to copy and paste some text. When I paste the text, the formatting also gets pasted.
This is a very basic minimal working skeleton of my code:
\documentclass{report}
\...
1
vote
0
answers
213
views
Code environment that supports copy-paste
Is there a LaTeX package that can generate code in PDF file and allow users to copy-paste the generated code?
I have tried the lstlisting environment. This is my test code:
\documentclass{article}
\...
6
votes
1
answer
7k
views
Copyable math formulas
I'm curious whether there is a package that allows to copy math formulas correctly.
For example, this one should highlight like so
but, not like so
And if I copy one, I should get:
∫₃⁵ (x/(1-x²)) ...
0
votes
0
answers
300
views
text editor to copy math symbols/notations and formulas
i'm trying to copy some notes from a pdf(opened in document viewer) which contain maths symbols and notations, like, epsilon. i've tried texmaker, LeX, gedit(of course), with different encodings, ...
1
vote
0
answers
74
views
Copy-able math code via accsupp breaks in align environment at pagebreaks
I'm using align extensively as my display math environment and I'd like for the selectable text in the pdf for math equations to be the latex code used to generate it.
Ideally, I'd redefine the align ...
0
votes
1
answer
265
views
How to use mmap in XeLaTeX?
I want to map math characters in my PDF output to Unicode characters. XeLaTeX already does this somewhat, but with very unsatisfactory results.
Just for comparison, consider the very simple example $\...
0
votes
0
answers
588
views
Time New Roman - hyphens are not visible when copied from PDF (xelatex issue?)
A similar problem to this Why LuxiMono's dashes disappear when copying-pasting from Acrobat Reader?
The solution from that post does not work for me:
Undefined control sequence.
<recently ...
4
votes
1
answer
123
views
Text difficult to copy-paste in some reader only on a specific PDF generated with PDFLatex
So, it's a strange question: I know that LaTeX has some problems with the copy-paste from a PDF which, sometimes, need thing like the package cmap. But at this point I never needed such thing, as my ...
2
votes
2
answers
143
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) ...
5
votes
3
answers
2k
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
0
answers
46
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
0
answers
63
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
1
answer
401
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 ...
6
votes
1
answer
2k
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 ...
4
votes
2
answers
2k
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.
...