Modifying selected text with Autohotkey

Autohotkey is an amazing tool to define hotkeys such as s# that get automatically expanded to \section{}. On earlier occasions I had already written some blog posts on this topic. Today (encouraged by a question on tex.stackexchange) I managed to compile a short script, which takes some selected text, inserts a specific command and pastes the selected text again. Quite helpful if one want’s to define a shortcut to e.g. make the selected text bold.

Send ^c
Send \command{{}{}}{LEFT}
Send ^v


Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website