Quantcast
Channel: Active questions tagged copy-paste - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 70

Fixing issue with copy-paste with AccSupp

$
0
0

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}

Image showing problem


Viewing all articles
Browse latest Browse all 70

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>