I am having problems with copying and pasting code from a R Markdown pdf file opened in Apple Preview.
When the pdf is opened using the Preview app on macOS, some of the code is cut off if it goes wider than the page length, though it shows the full code on the R Markdown file. If any code is longer than the gray text box indicating sections of R script code when converted to a docx. or pdf., it can no longer be copied. The copy function also doesn't pick up all of the code that I highlight if it isn't in the R script code gray text box, and I am unable to copy the code that goes off the Preview page view. I've asked Apple support and they didn't help, saying that I either wipe my computer (which I'm not in a position to dedicate time to) or ask the developer to change the code (which they don't provide direct support for R studio issues). The Preview app seems to be working well based on the Preview app encryption window.
The copy and paste code issue still occurs if the file is exported to a different file type (word document) or if the R Markdown pdf file is copied using the select all function.
Are there any suggestions? This isn't fixed by restarting R Studio. The only solution I have found is to get the original R Markdown file.
I have already tried to restart R studio, reach out to Apple support, reach out to R studio, export R markdown pdf file to word, select all text in the R markdown pdf file and pasting in another document.