inkscape-shortcut-manager

Inkscape shorcut manager
授权协议 MIT License
开发语言
所属分类 企业应用、 LaTeX排版系统
软件类型 开源软件
地区 不详
投 递 者 林子石
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Inkscape shortcut manager

A shortcut manager that speeds up drawing (mathematical) figures in Inkscape.

Problem

I write my lecture notes in LaTeX and I want to draw figures in real time, i.e. while the lecturer is drawing on the blackboard. While the figures I want to draw quite simple, drawing them in Inkscape with default shortcuts takes too much time to keep up with a fast paced lecture. My goal is to draw figures like this:

Solution

I created a custom shortcut manager that intercepts all keyboard events sent to Inkscape windows giving me full control of user input. The script has the following features

  • Press clusters of keys (key chords) to apply common styles. Pressing d+a gives a dotted arrow, f+s fills the selection in gray and adds a stroke. You want a circle that's dotted and filled? Press f + d. Try pressing combinations of s, a, d, g, h, x, e, b, f, w. Being able to combine these common styles by pressing key chords feels quite intuitive after a while.
  • Save custom styles and objects. Press Shift+S or Shift+A to give a style or object a name. Use it by pressing s or a and typing the name. For common styles that aren't covered by the key chords, this comes in handy.
  • Use your editor to write LaTeX. Pressing t opens an instance of vim (or any editor you want). Write some LaTeX, close it, and the shortcut manager pastes the text in the figure. Pressing Shift+T does the same but renders the LaTeX as an svg and adds it to the document.
  • Ergonomic shortcuts for frequently used functions. Press w for pencil, x to toggle snapping, f for Bézier, z to undo, Shift+z to delete and ` to dis/enable the shortcut manager.

For more details and context, feel free to read my blog post.

Installing

Note that this script only works on GNU/Linux using Python ≥ 3.6.It also has the following dependencies:

  • Xlib python library to intercept keyboard events
  • pdflatex and pdf2svg to render LaTeX in Inkscape
  • xclip to access the clipboard
  • rofi for a selection dialog when saving styles and objects

Use the shortcut manager by running python3 main.py and opening an Inkscape window.

Configuration

You can configure the shortcut manager by creating a file located at ~/.config/inkscape-shortcut-manager/config.py. You can override the rofi theme, font, editor, as well as the LaTeX template that's being used. It's merged with the default config located at config.py. An example configuration file is located in the examples directory.

Related

 相关资料
  • Inkscape 是开源的矢量图形编辑软件,与 Illustrator、Freehand、CorelDraw、Xara X 等软件很相似,它使用 W3C 标准的 Scalable Vector Graphics (SVG) 文件格式,支持包括形状、路径、文本、标记、克隆、alpha 混合、变换、渐变、图案、组合等 SVG 特性。它也支持创作共用的元数据、节点编辑、图层、复杂的路径运算、位图描摹、文

  • Inkscape figure manager. A script I use to manage figures for my LaTeX documents.More information in this blog post. Requirements You need Python >= 3.7, as well as a picker. Current supported pickers

  • Shortcut Manager 这个扩展不但可以修改 Chrome 预置的各个快捷键和增加用户自定义快捷键,甚至还可以将快捷键定义为执行一段 JavaScript 代码,比如我就把 ctrl+shift+U 设置为生成 guao.cc 短网址的 bookmarklet 快捷键,十分的方便。

  • ChatGPT Shortcut 是根据不同领域和功能划分的 ChatGPT 快捷指令表,可通过标签筛选、关键词搜索和一键复制来使用提示词,旨在简化你的工作流程,并提高生产力。 即使是初学者,你只需复制提示词,稍加修改后发送给 ChatGPT,就能获得指定输出,让你的生产力加倍! 提示词(即 Prompt)通常是用户提供的问题或文本,以激活模型生成回复。简单来说,prompt 就是用户想要询问的内

  • Shuttle是Mac下一个简单的SSH快捷方式软件,它会在任务栏添加一个下拉菜单,点击菜单项目就可以直接开启终端连接相应的SSH服务器。

  • shortcut=<目标类型 >,<源名>,<目标文件夹 >,<描述>,<快捷方式名 >,<快捷方式图标> 为解压的文件常见一个快捷方式。 目标类型 是一个一个字符宽的区域,可以有下列值: D 在桌面创建快捷方式 P 在开始菜单/ 程序中创建快捷方式 T 在启动菜单中创建快捷方式 源名 是压缩文件名。如果它是可执行文件,您可以在用引号包围的名称之后指定额外的参数。 目标文件夹 是创建快捷方式的文件

相关阅读

相关文章

相关问答

相关文档