5

The Rust documentation has a wonderful feature where you can click an icon for the source code examples and it will copy it to the clipboard.

Can this functionality be emulated in a LaTeX-generated PDF?

Bonus question: A few of the example snippets elide the main along with other uninteresting scaffolding for a particular example; see here. But when you click the copy button, the scaffolding and the main are present on the clipboard. Can this be emulated in a LaTex-generated PDF?

user14717
  • 651
  • 4
  • 10
  • As far as I know: No. –  Feb 15 '19 at 03:03
  • 1
    The first part: probably yes although it might be viewer-dependent (read: for Adobe). The second part will be hard as this piece of information is not contained in the PDF, so you would have to use an attachfile/embedfile solution. – TeXnician Feb 15 '19 at 05:50
  • Maybe you can check ou this https://tex.stackexchange.com/questions/174637/copy-to-clipboard-feature-in-pdf-output – Manuel Alves Jun 19 '23 at 10:29

0 Answers0