Sometimes in my research I need to extract tabular data from a pdf paper. I can copy and paste the table into an Emacs buffer but the data is generally not formatted in a usable way. Luckily Emacs has a wealth of tools to reformat this sort of data.
Here is an animated gif illustrating some tools I use to do this (of course there are lots of other ways to do the same thing).
In the animation I use the following tools
C-x hto select the whole buffer.
C-c |to run
org-table-create-or-convert-from-regionto convert the region to an org table. This doesn’t get me all the way to where I want to be, but I find it helpful to see the data clearly.
M-S-<left>to delete some unwanted columns
mc/mark-next-like-thisfrom multiple cursors to give me a cursor on each line (I bind this to
M-fto move forward by word
shrink-whitespaceto remove whitespace (I bind this to
C-c -to run
org-table-insert-hlineto add a nice horizontal line to my table
This restructures the data in the way I need, and I can now use
org-table-export to export to other useful formats.