With OrgMark, you can use iPad to draw figures and insert them into Org files. You can also edit these figures later. I find it to be extremely handy for producing documents that mix LaTex and hand-drawn figures.
- Open the workspace with Xcode, you will see two projects, Build Org Mark for iPad and orgmark for Mac.
- Put the orgmark executable under PATH.
- Install the Org Mark app to your iPad (by whatever means).
- Put orgmark.el under your
load-path
and require it.
From Org mode: M-x orgmark-insert
, or M-x orgmark-edit
.
Alternately, you can use orgmark from command line. The extension has to be “pkdrawing”.
$ orgmark --help OVERVIEW: Send drawing to iPad to edit. USAGE: command <file-path> [--width <width>] [--height <height>] [--new] ARGUMENTS: <file-path> The drawing file. If --new option is set, this is the file that we save to. OPTIONS: -w, --width <width> Max width of the exported image in pixels. -h, --height <height> Max height of the exported image in pixels. -n, --new Create new drawing. -h, --help Show help information.
- Draw on iPad and iPad saves the drawing to a binary data.
- iPad sends the data and a generated png file to cli.
- Cli sends the binary data to iPad for edit, iPad sends the edited binary data and png to cli.
A better way would be using an open drawing library, so we can export the drawing to some open formats, like SVG. I just went with the most trivial route.
- Only support pkdrawing files (which is an extension I made up for storing Apple’s PencilKit binary drawing data). Update: Apple released API’s to it’s PKDrawing data structure, so this shouldn’t be a problem anymore. Although there is no one-line “export to SVG” feature, you can write some code to extract the stroke, speed, pressure, etc.
- Only works on WiFi. I tried with BLE, but the bandwidth is too low for the data we are transferring.