0

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 make it like this:

g : b -> a

Or perhaps maybe even:

g : b \rightarrow a

That way it could be added to a latex document. Wikipedia has this when you copy/paste:

isomorphisms with a {\displaystyle {\overset {\sim }{\rightarrow }}} \overset{\sim}{\rightarrow}.

https://en.wikipedia.org/wiki/Commutative_diagram

Maybe it is possible in latex like this:

\begin{copypaste}\copy{g : b -> a}
\begin{equation}
g : b \rightarrow a
\end{equation}
\end{copypaste}

Wondering if any of this sort of thing is possible and how it could be accomplished.

Lance
  • 1,799
  • 3
    Have a look at accsup I think, see e.g. https://tex.stackexchange.com/questions/233390/in-which-way-have-fake-spaces-made-it-to-actual-use/233397#233397 – Torbjørn T. Mar 21 '18 at 18:06
  • I don't see anywhere in the docs about copy-paste http://ctan.math.illinois.edu/macros/latex/contrib/oberdiek/accsupp.pdf. Tried it with PDF Preview and just copied the visible text as is as if there was no copy-paste stuff. – Lance Apr 02 '18 at 17:10
  • As the manual says, you need to look in the PDF reference for specifics. Did you try the example in the question I linked to? That worked fine here, and for example \begin{equation} \BeginAccSupp{method=escape,ActualText={g : b -> a}} g : b \rightarrow a \EndAccSupp{} \end{equation} also worked fine. – Torbjørn T. Apr 02 '18 at 17:22

0 Answers0