Closed utdrmac closed 4 years ago
I do have an example! Attached is 1 slide from my PDF deck and a screenshot of the result copy/paste on macos hyphen-issue.pdf
When I copy from your PDF, I get: kubectl apply <00ad>f deploy/rbac.yaml
, so it looks like it contains a soft hyphen instead of a regular one.
I've tried with other presentations, like https://astefanutti.github.io/decktape/examples/remark-js-coloured-terminal.pdf, and copying commands with regular dash works.
Would you mind double-checking that your source contains regular dash or try replacing the soft ones?
I had never heard of 'soft hyphen' before. I'm on a 2016 macbook pro and I'm just typing the 'hyphen' key next to '+' key. Using plain text editor, utf8 mode, English keyboard. I just re-printed the entire PDF and doesn't seem to be an issue now when I copy shell commands. Hrm. I'll keep investigating.
Let me close this. Feel free to re-open if the analysis above is not correct.
I wish I had more information to offer, but here's all I have. My slides are written in RemarkJS and I used decktape in the following format to create my pdf:
My bash env shows
LANG=en_US.UTF-8
After I exported the PDF, I shared it with 30 others. They all had various PDF readers, on mac, linux and windows. Many of them used different locales (I was the only "USA" guy). The issue was when copying and pasting monospaced text, the-
(hyphen, dash) got "translated" into some other character. It looked like a dash, but when pasted to a linux bash prompt, became something else that looked like dash, but was not. This caused command line utils with -flags to fail.I wish I had an example to show, but I was presenting and didn't have a chance to investigate further. Anyone experience such an issue? Should I change my LANG to something different? Is this a font issue?