Copy / Paste from PDF documents

Learning APL or new to Dyalog? Ask "silly" questions here, without fear...
Post Reply
johnlyn763
Posts: 10
Joined: Tue Dec 28, 2010 12:18 pm

Copy / Paste from PDF documents

Post by johnlyn763 »

I could've sworn there was a question here before about this, but I was not able to find it!

When I copy a line of APL code (with APL characters in it) from a PDF document, and then paste into my Dyalog session, usually the APL characters disappear on paste.

I'm using Version: 14.1.25329.0 64 Classic on Windows 10

What I'm trying to do is follow along in Mastering Dyalog APL, and copy / paste the example code as I go :-)

Thanks for any pointers
crishog
Posts: 61
Joined: Mon Jan 25, 2010 9:52 am

Re: Copy / Paste from PDF documents

Post by crishog »

The PDF font will almost certainly be Unicode, so you'll have to use "Paste as Unicode" from the Edit menu rather than just Ctrl-V or Shift-Insert
johnlyn763
Posts: 10
Joined: Tue Dec 28, 2010 12:18 pm

Re: Copy / Paste from PDF documents

Post by johnlyn763 »

That seems to work, but only sometimes, on certain statements.

I am running Dyalog Classic -- should I have instead installed Unicode?
johnlyn763
Posts: 10
Joined: Tue Dec 28, 2010 12:18 pm

Re: Copy / Paste from PDF documents

Post by johnlyn763 »

Well, I tried with Unicode version, and results are the same.

Something that looks like this:
      (Vec=19)/⍳⍴Vec


...end up pasting like this:
      (Vec=19)/<two red blocks>Vec
User avatar
AndyS|Dyalog
Posts: 263
Joined: Tue May 12, 2009 6:06 pm

Re: Copy / Paste from PDF documents

Post by AndyS|Dyalog »

This is an artifact of generating documents in PDF format from Word. We've have several attempts to improve matters in the non-core documentation, but without success - it's like whack-a-mole: we improve matters in one place only to find that things get worse elsewhere. We've also tried to ensure that in the core documentation (which is held in a CMS) copy and paste always work; if you find instances where you cannot do so, please let support know, and we'll attempt to fix those instances.

Going forwards there are likely to be more problems copying from documentation into Classic rather than Unicode interpreters .. new glyphs such as Rank and Key will never be able to be pasted into a Classic interpreter, since the Classic interpreter does not support them directly, but rather requires use of ⎕u2364 and ⎕u2338 respectively.
Post Reply