Skip to main content
Share Your Experience: Take the 2024 Developer Survey
14 votes

Making equations copyable in pdf

It is also possible to use the Mathpix desktop app (for Mac and PC(beta)) to take a screenshot of the PDF and it will render the LaTeX instantly (and already have it copied to your clipboard, all you ...
Kaitlin's user avatar
  • 201
10 votes
Accepted

How to copy minus as hyphen?

\documentclass{article} \usepackage{accsupp} \newcommand\pdfminus{\BeginAccSupp{method=escape,ActualText=-}-\EndAccSupp{}} \begin{document} $\pdfminus A \pdfminus B = C$ $-A - B = C$ \end{document} ...
Steven B. Segletes's user avatar
9 votes
Accepted

Issue with diacritics in Romanian language document

There is currently no font encoding fully supporting Romanian, I'm afraid. New fonts should be created: not from scratch, but it would be a big job and you'd not have many of them available anyway. ...
egreg's user avatar
  • 1.1m
9 votes

LaTeX - Copy and paste º

The Unicode symbol is U+00BA (MASCULINE ORDINAL INDICATOR). It is available in encoding TS1 as provided by package textcomp: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{textcomp} ...
Heiko Oberdiek's user avatar
9 votes
Accepted

Is it possible to not copy numeration using lstlisting?

You have one obvious problem in your code: You set numberstyle to make it non-copyable and then you reset it with fancy font stuff. Any option is overwritten at a later use. The effects do not add up. ...
TeXnician's user avatar
  • 33.7k
7 votes
Accepted

Search text in cyrillic alphabet

The problem here is that by default PdfLaTeX uses some 8-bit font encoding (T2 for Cyrillic) and doesn't provide the Unicode mapping for it. So your viewer thinks that these characters aren't Cyrillic ...
Sergei Golovan's user avatar
7 votes
Accepted

Disable copying text from minted listing

First, I fully agree with Jesse Knight: Whoever made this requirement at your faculty is a sadist But if you use LuaTeX you can destroy the glyph to unicode mapping in the PDF file by ...
Marcel Krüger's user avatar
7 votes
Accepted

Copyable math formulas

I managed to do that! Thanks for this answer. \documentclass{article} \usepackage{fontspec} \usepackage{accsupp} \usepackage{tikz} \usepackage{stringenc} \usepackage{pdfescape} \usetikzlibrary{calc} ...
antshar's user avatar
  • 4,497
6 votes

Greek text copy & paste fails

This could be an issue with your pdf viewer. For me, copy-paste works fine with your MWE (compiled with pdflatex) when viewed in Evince, but with Acrobat Reader I get the behaviour you describe. Both ...
Marijn's user avatar
  • 38.2k
6 votes
Accepted

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

You have the restatable environment from thmtools + thmrestate. See details and explanations in §1.4, Repeating theorems of the documentation of thmtools. Note this package cooperates with amsthm as ...
Bernard's user avatar
  • 272k
6 votes
Accepted

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

This is at least partly a known issue with Adobe Reader. Adobe Reader fails to recognise spaces between words in certain cases (e.g. where the spacing is smaller than average) or recognises one space ...
cfr's user avatar
  • 202k
6 votes
Accepted

How to copy text from PDF created by LaTeX?

Try to load \usepackage[T1]{fontenc} \documentclass[12pt,a4paper]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[portuguese]{babel} \usepackage{amsmath} \usepackage{...
mostafax80's user avatar
6 votes

Is there a way to make the page numbering nonselectable

The following is reader-specific: \documentclass{article} \usepackage{fancyhdr,accsupp,lipsum} \pagestyle{fancy} \fancyhf{}% Clear header/footer \renewcommand{\headrulewidth}{0pt}% Remove header ...
Werner's user avatar
  • 605k
6 votes
Accepted

How to reuse code

You can save either the code itself in a \newcommand (in the more dangerous TeX world, you can use \def or else \long\def if it includes paragraph breaks) or you can save the rendered object for later ...
Steven B. Segletes's user avatar
6 votes
Accepted

Big LaTeX delimiters have a weird encoding in the pdf. How can I avoid this?

How glyphs are copied and pasted depends on the ToUnicode values of the font. Setting them is not trivial with the old type1 fonts. The easiest way to improve copy&paste and accessibility of math ...
Ulrike Fischer's user avatar
5 votes
Accepted

Greek text copy & paste fails

Don't use utf8x and also add the bits I show below; then also Adobe Reader seems to be happy. \input{glyphtounicode} \pdfgentounicode=1 \documentclass{article} \usepackage[utf8]{inputenc} \...
egreg's user avatar
  • 1.1m
5 votes
Accepted

How to increase minimum space between words in XeLaTex output?

fontspec has an option WordSpace that you can use to increase the word space. Be aware that is a global option of a font. If you want to use the same font with a different word space you must e.g. ...
Ulrike Fischer's user avatar
5 votes

How to make text look different in PDF compared to copy-paste

This is doable with the accsupp package however be warned it only works on some PDF viewers. It works for me with Adobe Acrobat Pro, but not with Apple Preview. The general form is \BeginAccSupp{...
Dan's user avatar
  • 3,707
4 votes

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

Old thread, but I had the same problem as you and after a lot of searching online I was able to find a fix that really helped me. \fontdimen2 controls the spacing between words in LaTeX so we can use ...
Chris Pavlopoulos's user avatar
4 votes

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

You can use Ghostscript for that. Just create your PDF as usual and run gs -o output.pdf -dNoOutputFonts -sDEVICE=pdfwrite input.pdf Please note that you cannot prevent people from using OCR ...
Martin Thoma's user avatar
  • 18.9k
4 votes

Copy Czech characters from PDF with charter font

This can be done by altering the Virtual font, to put the accent after the base letter, rather than before it, and ... (CHARACTER O 260 (CHARWD R 0.382) (CHARHT R 0.741) (MAP (PUSH) ...
Ross Moore's user avatar
4 votes

Copy to clipboard feature in PDF output

I'm happy to report that it is possible, even if with some limitations: Acrobat only solution (but cross-platform, I think) You need to trust the PDF (e.g. "Acrobat Pro DC > Preferences > Security (...
steve's user avatar
  • 2,174
4 votes
Accepted

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

You can map the glyph name to the correct unicode position: \documentclass{article} \usepackage[T1]{fontenc} \usepackage{luximono} \pdfglyphtounicode{hyphen}{002D} \pdfgentounicode=1 \begin{document}...
Ulrike Fischer's user avatar
4 votes

How to reuse code

Instead of define a table/tabular environments in a macro, another option is write the tabular or table floats in external files (e.g. mytableA.tex and mytableB.tex) and then include them in the main ...
Fran's user avatar
  • 81.6k
4 votes
Accepted

Included PDF image has invisible, but selectable text

What (likely) happened It is very likely, that your imported PDF was imported with the complete content -- but part of that content was just hidden by applying a different 'CropBox' (smaller than ...
Kurt Pfeifle's user avatar
  • 3,811
4 votes
Accepted

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

In my opinion it won't work reliably. The pdf viewers don't respect space chars and don't handle them in the same way. E.g. if you compile this document with lualatex (pdflatex gives similar results): ...
Ulrike Fischer's user avatar
4 votes

Overleaf: Is it possible to copy and paste one or multiple files(folders, tex, images....) in overleaf project?

I think the only way is to download the project to your local. Then right-click the folder you want to paste and click upload. Then choose all the files from your local. Thats it.
Sanjay's user avatar
  • 141
3 votes

Copying ligatures from XeLaTeX PDF

Try adding \XeTeXgenerateactualtext=1 at the start of your document. (IIRC, I think this requires XeTeX from TeX Live 2016 or later, or an equivalent from other distributions such as MikTeX; and the ...
jfkthame's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible