1

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?

  • As far as I know: No. – user156344 Feb 15 at 3:03
  • 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 at 5:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.