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-equations-copyable-in-pdf#=
Here is a response he gets for copy and paste one equation :
\documentclass{article}
\usepackage{accsupp}
\newcommand*{\copyable}[1]{%
\BeginAccSupp{%
ActualText=\detokenize{#1},%
method=escape,
}%
#1%
\EndAccSupp{}%
}
\begin{document}
\[
\copyable{\int x\sin ax\;\mathrm{d}x = \frac{\sin ax}{a^2}-\frac{x\cos ax}{a}+C}
\]
\end{document}
I would like to apply this command to all mathmode script. A sort of
\AtEveryMath{\copyable}
Is it possible ?
Thanks in advance