1

I am wondering if there is a way to include code samples in a Latex document, such that the code can easily be copied from the exported pdf into a code editor?

I am using Latex in Gummi on Linux and I am trying to include some samples of Julia code. If I put the code inside a verbatim environment and then export the pdf, when I try to copy the code from the pdf and paste it into the editor I am using (Juno/Atom), it is adding spaces between every character of the variable/function names, so that the code can't easily be run.

I would greatly appreciate any advice.

Time4Tea
  • 111
  • 3
    copy & paste from a pdf doesn't work reliable. Embed or attach the file. See https://tex.stackexchange.com/a/323354/2388 and https://tex.stackexchange.com/a/472112/2388 – Ulrike Fischer Feb 16 '22 at 13:30
  • @UlrikeFischer Hi and thanks for your comment. Yes, it seems like it is not easy to do in a reliable way. – Time4Tea Feb 17 '22 at 16:13

0 Answers0