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 "angle ABC" instead.)
In order to do this, I'm using: \newcommand{\ang}[1]{$\BeginAccSupp{method=escape,ActualText={angle #1}} \angle {#1} \EndAccSupp{}$}
.
It works fine, unless the angle is at the end of a line, in which case it refuses to highlight that, instead moving onto the next line.
Is there any way this can be resolved?
Sample:
\documentclass[12pt,a4paper]{article}\usepackage[utf8]{inputenc}\usepackage{accsupp}\newcommand{\ang}[1]{$\BeginAccSupp{method=escape,ActualText={angle #1}} \angle {#1} \EndAccSupp{}$}\begin{document}Lorem ipsum \ang{ABC} dolor sit amet, consectetur adipiscing elit. \ang{DEF} Nam metus odio, laoreet varius convallis...\end{document}