# mmap/cmap problem: text in equations is not properly copy-pastable

\documentclass[12pt,a4paper]{article}
\usepackage[noTeX]{mmap}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\begin{document}
$(A\to B)\vdash B$
sample text
\end{document}


The text copied from the resulted pdf is not pasted correctly. It pastes only math signs and brackets, letters are pasted as some unicode characters: ( � → � ) ⊢ �.

As egreg pointed out letters are interpreted as MATHEMATICAL ITALIC CAPITAL characters.

If I remove \usepackage[noTeX]{mmap} then it will be shown almost correctly in common editors (notepad++, notepad): "( A → B )  B sample text", turnstile symbol becomes a backtick.

How to make this work correctly?

• If I try your document, the “A” is interpreted, on copying, as U+1D434 MATHEMATICAL ITALIC CAPITAL A and similarly for the other letters. If your editor has no font substitution capability, it won't display those symbols unless you set the editor's font to one that supports those characters, such as FreeSerif. I copied it in Emacs and the characters were shown. – egreg Dec 11 '14 at 16:34
• Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – cfr Dec 11 '14 at 22:37
• I get the wrong characters with Adobe Reader, not with other PDF viewers. – egreg Dec 12 '14 at 17:58

You can apply the method in this answer

\input{glyphtounicode}
\pdfgentounicode=1

\documentclass[12pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\begin{document}
$(A\to B)\vdash B$
sample text
\end{document}


(A → B) ⊢ B sample text
`