Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

When including marginpar and/or todonotes marking text in a PDF viewer always selects the body of the text and the note together: enter image description here

Some of us unfortunately have collaborateurs not using LaTeX and hence they prefer to copy & paste large chunks from the PDF to Word to edit the places. Hence my question: Is it possible to make text selectable per "column". I.e, either select the body OR select the note?

enter image description here

If that is not possible, one alternative would be to make the note completely inselectable using accsupp (although the other way would be preferable). But accsupp does not appear to work for todonotes, but it works for marginpar.

\documentclass{scrartcl}

\usepackage{todonotes,accsupp}

% Does not work
\newcommand{\mytodo}[1]{\todo{\BeginAccSupp{ActualText={}}#1\EndAccSupp{}}}


\begin{document}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras in neque
felis.\todo{In viverra luctus metus id elementum. Class aptent taciti
sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.}
Pellentesque bibendum, nisi ac rhoncus tincidunt, tortor velit egestas
erat, nec cursus lectus lectus non leo. Suspendisse et leo eros, id
malesuada risus. Etiam commodo quam a magna pulvinar vehicula vestibulum
lacus blandit. Aliquam id tortor non tellus laoreet dictum. Aenean
eleifend, arcu a vestibulum vulputate, orci tellus sodales ante, nec
convallis orci lacus ac erat. Sed lacinia justo vitae ligula euismod
auctor. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices
posuere cubilia Curae; In viverra luctus metus id elementum. Class aptent
taciti sociosqu ad litora torquent per conubia nostra, per inceptos
himenaeos.\marginpar{\BeginAccSupp{ActualText={}}In viverra luctus metus
id elementum. Class aptent taciti sociosqu ad litora torquent per conubia
nostra, per inceptos himenaeos.\EndAccSupp{}}

Sed convallis tincidunt justo sit amet fermentum. Vestibulum ante ipsum
primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla at
velit metus, ut blandit sapien. Maecenas lacinia congue sem, et pulvinar
arcu iaculis molestie. Lorem ipsum dolor sit amet, consectetur adipiscing
elit.


\end{document}
share|improve this question
    
In acrobat (at least) the margin note code in that other answer (although it's probably not fully usable yet) would solve this as in that case the margin note is added later in the output routine so doesn't break up the paragraph flow in the internal structure in the pdf. –  David Carlisle Dec 4 '12 at 13:27
    
@DavidCarlisle Okay, but it wouldn't solve it for todonotes. –  Jörg Dec 4 '12 at 13:35
    
well actually todonotes doesn't mind if you say \let\marginpar\mpnote and it uses the alternative marginnote underneath and still does its other stuff. (at least it worked in one case where I tried it) –  David Carlisle Dec 4 '12 at 13:39
add comment

1 Answer

up vote 3 down vote accepted

As noted in the comments the code in a previous answer addresses this (more or less by accident). In the margin note as implemented there the note is added later in the output routine so they are two separate blocks in the internal pdf structure, and can be selected separately. If you redefine \marginpar to use that mechanism then the todonotes package will pick up that positioning code but still be able to do its annotations and styling.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.