Skip to content

figures.ahk

bloodbornebi edited this page Dec 4, 2020 · 4 revisions

Requirements

This one requires Inkscape. It also requires you to have a bit more patience with configuration. It is recommended you read the original article because it has some important information re. packages, etc.

Configuration

You'll need to check all of the directories to make sure they're correct, since they're mostly hard-coded in. Additionally, this one requires the same code that Castel has in his preamble.

Set-up

Load into AHK, change requisite files and run script. (If you're unsure of exactly how to do that, I wrote more detailed instructions here. You'll also need to find the directories (mine all start with C:, and yours probably do too) and replace them with your personal directories.

Differences/Usage

This is run with two separate hotkeys: first, alt p starts the figure process, then once you're done with the figure in Inkscape, alt s saves it, then recompiles your latex document. So your workflow should look like this:

  1. alt p
  2. type your file name (you won't see it, but it will be recorded).
  3. tab
  4. wait for inkscape to load
  5. make figure
  6. alt s
  7. back to writing

The alt s command is always active in Inkscape, so if you (for some reason) are using alt s to mean something else sometimes, make sure you end this script when you're not writing.

Issues

If you're getting issues, first, make sure the directories are right. Writing this, that was what gave me the biggest trouble.

After that, the saving code for Inkscape is the buggiest part. If it's really giving you trouble in the moment, just manually save - you don't break anything by not hitting alt s, since it's two different hotkeys.

Clone this wiki locally