{"id":15021272,"url":"https://github.com/sleepymalc/vscode-latex-inkscape","last_synced_at":"2025-05-15T15:07:51.181Z","repository":{"id":45480287,"uuid":"410180958","full_name":"sleepymalc/VSCode-LaTeX-Inkscape","owner":"sleepymalc","description":"✍️ A way to integrate LaTeX, VS Code, and Inkscape in macOS","archived":false,"fork":false,"pushed_at":"2024-10-23T19:26:34.000Z","size":77323,"stargazers_count":432,"open_issues_count":0,"forks_count":29,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-10T03:25:38.345Z","etag":null,"topics":["inkscape","latex","macos","math","snippets","vscode"],"latest_commit_sha":null,"homepage":"https://pbb.wtf/posts/VSCode-LaTeX-Inkscape/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sleepymalc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-25T05:05:20.000Z","updated_at":"2025-05-06T06:45:52.000Z","dependencies_parsed_at":"2023-02-10T07:15:25.383Z","dependency_job_id":"ce2461d3-8990-474c-96e8-d86f11482775","html_url":"https://github.com/sleepymalc/VSCode-LaTeX-Inkscape","commit_stats":{"total_commits":228,"total_committers":3,"mean_commits":76.0,"dds":"0.19298245614035092","last_synced_commit":"1961e0fadef72fc005435458c7335760cc9222ac"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleepymalc%2FVSCode-LaTeX-Inkscape","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleepymalc%2FVSCode-LaTeX-Inkscape/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleepymalc%2FVSCode-LaTeX-Inkscape/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleepymalc%2FVSCode-LaTeX-Inkscape/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sleepymalc","download_url":"https://codeload.github.com/sleepymalc/VSCode-LaTeX-Inkscape/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254364270,"owners_count":22058878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["inkscape","latex","macos","math","snippets","vscode"],"created_at":"2024-09-24T19:56:22.966Z","updated_at":"2025-05-15T15:07:46.150Z","avatar_url":"https://github.com/sleepymalc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ***VSCode-LaTeX-Inkscape***\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"./preview.png\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\u003cb\u003e\u003ci\u003e\n\tA way to integrate LaTeX, VS Code, and Inkscape in macOS.\n\u003c/i\u003e\u003c/b\u003e\u003c/p\u003e\n\n## Table of Content \u003c!-- omit in toc --\u003e\n\n- [Abstract](#abstract)\n- [Disclaimer](#disclaimer)\n- [Setup For Typing Blasting Fast](#setup-for-typing-blasting-fast)\n\t- [Tex Conceal](#tex-conceal)\n\t- [HyperSnips](#hypersnips)\n\t- [Sympy and Mathematica](#sympy-and-mathematica)\n\t- [Correcting Spelling Mistakes on the Fly](#correcting-spelling-mistakes-on-the-fly)\n- [Drawing Like a Pro - With Inkscape](#drawing-like-a-pro---with-inkscape)\n\t- [Inkscape Figure Manager](#inkscape-figure-manager)\n\t- [Inkscape Shortcut Manager](#inkscape-shortcut-manager)\n\t\t- [Reference Card for Key Chords](#reference-card-for-key-chords)\n\t- [Summary](#summary)\n- [Updates](#updates)\n\t- [~~About Inkscape Shortcut Manager (09.27.21)~~](#about-inkscape-shortcut-manager-092721)\n\t- [Quiver - For commutative diagram (01.24.22)](#quiver---for-commutative-diagram-012422)\n\t- [Migrate to HyperSnips (02.18.22)](#migrate-to-hypersnips-021822)\n\t- [Documenting Inkscape Shortcut Manager (07.30.22)](#documenting-inkscape-shortcut-manager-073022)\n- [Credits](#credits)\n- [Related Project](#related-project)\n- [Star History](#star-history)\n\n## Abstract\n\nI use $\\LaTeX$ heavily for both academic work and professional work, and I think I'm quite proficient in terms of typing things out in $\\LaTeX$. But when I see the mind-blowing blog posts from **Gilles Castel (RIP)**-[How I'm able to take notes in mathematics lectures using LaTeX and Vim](https://castel.dev/post/lecture-notes-1/) and also [How I draw figures for my mathematical lecture notes using Inkscape](https://castel.dev/post/lecture-notes-2/), I realize that I'm still far from *fast*, so I decided to adapt the whole setup from Linux-Vim to macOS-VS Code.\n\n\u003e This setup is universal for VS Code users indeed. The only part that'll be macOS-specific is the Inkscape part ([Inkscape-figures](#inkscape-figure-manager) and [Inkscape-shortcut-manager](#inkscape-shortcut-manager)). While the first part can be replaced by [super-figure](https://github.com/Joao-Peterson/super-figure) (while I still prefer my setup, you can still try it out even if you're in macOS), and you can certainly achieve a similar result in Windows as in my [Notes](./Notes), the drawing speed will be slower without the shortcut manager. Just keep that in mind.\n\nIf you still don't know what to expect, please check out my [Notes](https://github.com/sleepymalc/Notes) taken in this setup. Also, due to the VS Code recent update (1.76.1), we have the [profile](https://code.visualstudio.com/docs/editor/profiles) functionality available. Specifically, this is [my current minimal profile](https://vscode.dev/profile/github/70b175ba903a4f1cc5dcd271ce8fcb51) for $\\LaTeX$ I'm currently using, but since some configurations are not included in the [profile](https://code.visualstudio.com/docs/editor/profiles), you should still read through everything.\n\n\u003e Available: [My website](https://pbb.wtf/posts/VSCode-LaTeX-Inkscape)\n\n## Disclaimer\n\nPlease look through the two blog posts above by Gilles Castel! They are incredible and worth spending your time to understand how all things work, and what's the motivation behind all these. I'm only mimicking his workflow, with a little patience to set up the whole thing in my environment. Show respect to the original author!\n\nBefore we start anything serious, just copy the [`keybindings.json`](./VSCode-setting/keybindings.json) and [`settings.json`](./VSCode-setting/settings.json) into your own `keybindings.json` and `settings.json`. Don't worry, I'll explain what they do later.\n\n\u003chttps://github.com/sleepymalc/VSCode-LaTeX-Inkscape/blob/6c8773992ebd0af338bf49c76d062e8dead61ba1/VSCode-setting/keybindings.json#L1-L133\u003e\n\n\u003chttps://github.com/sleepymalc/VSCode-LaTeX-Inkscape/blob/4e4d36481cb5d61562a8ad2d6188321384fc0c16/VSCode-setting/settings.json#L1-L915\u003e\n\nAlso, create a snippet file for $\\LaTeX$ in the following steps:\n\n1. Press `shift`+`cmd`+`p` to open the VS Code command.\n2. Type `snippets`, and choose `Snippets: Configure Snippets`.\n3. Choose `New Global Snippets file...`.\n4. Enter `latex` to create a new file.\n5. Paste the [`latex.json`](./VSCode-setting/Snippets/latex.json) into that file.\n\n   \u003chttps://github.com/sleepymalc/VSCode-LaTeX-Inkscape/blob/b98c21536371a270736ec9ac841aacaa82664123/VSCode-setting/Snippets/latex.json#L1-L14\u003e\n\n## Setup For Typing Blasting Fast\n\nFirst thing first, please set up your [VS Code](https://code.visualstudio.com/) with $\\LaTeX$ properly with [LaTeX Workshop](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop), there are lots of tutorials online, just check them out and set them up properly. Basically, it can be done in the following steps:\n\n1. Download [MacTex](https://www.tug.org/mactex/). This can be replaced by something more lightweight, but in my opinion, this doesn't really help much in terms of speed or wasting your disk. But if you want something like this, check out [TeXLive](https://www.tug.org/texlive/).\n2. Download [LaTeX Workshop](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop)\n3. Copy-pasting the following configuration file into your `settings.json`\n\n\t```JSON\n\t\"latex-workshop.latex.autoBuild.run\": \"onSave\"\n\t```\n\n\t\u003e This will save your time by compiling your $\\LaTeX$ project whenever you save your file by `cmd`+`s`.\n\nNow, we go through things one by one following Gilles Castel's blog post.\n\n### Tex Conceal\n\nTo achieve a similar result as in Gilles Castel's setup, there is an extension called [vsc-conceal](https://github.com/Pancaek/vsc-conceal) for VS Code. All the setup is in the `setting.json`, and since this setup is quite straightforward, I'll just give a snapshot to show how it looks in practice.\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"./demo/figures/conceal.png\"/\u003e\n\u003c/p\u003e\n\nNote that I set the `\"conceal.revealOn\"` to `\"active-line\"`, which is why you will see the source code in line 51. There are other options you can choose, see the original repo for details.\n\n### HyperSnips\n\nIf you look around in the VS Code extension marketplace to find UltiSnips' equivalence, you probably will find [Vsnips](https://marketplace.visualstudio.com/items?itemName=corvofeng.Vsnips). But I'm not sure why this is the case, I can't figure out how to set it up properly. Hence, I find another alternative, which is [HyperSnips](https://marketplace.visualstudio.com/items?itemName=draivin.hsnips). Please first download [HyperSnips](https://marketplace.visualstudio.com/items?itemName=draivin.hsnips) and just follow the instructions, copy [`latex.hsnips`](./VSCode-setting/Snippets/latex.hsnips) into `$HOME/Library/Application Support/Code/User/globalStorage/draivin.hsnips/hsnips/`, and you're good to go!\n\nTo modify this file, you can either go to this file in your finder or use the VS Code built-in command function. For commands function,\n\n1. Press `shift+cmd+space` to type in some commands to VS Code.\n2. Type `\u003eHyperSnips: Open Snippet File`\n3. Choose `latex.hsnips`\n\nAfter doing this, you're all set. But a big question is, what exactly is a snippet?\n\n#### Snippets \u003c!-- omit in toc --\u003e\n\nA snippet is a short reusable piece of text that can be triggered by some other text. For example, when I type `dm` (stands for display math), the word `dm` will be expanded to a display math environment:\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"./demo/gifs/dm.gif\"/\u003e\n\u003c/p\u003e\n\nIf you are a math guy, you may need to type some inline math like `\\(\\)`, which is kind of painful. But with snippets, you can have\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"./demo/gifs/fm.gif\"/\u003e\n\u003c/p\u003e\n\nSee? You just type `fm` (not the best choice here, but since `im` is a common prefix, so can't really use that as our snippet 🥲), and then your snippet not only automatically types `\\(\\)` for you, but it also sends your cursor between `\\(\\)`! With this, you can type something **really** fast:\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"./demo/gifs/fast.gif\"/\u003e\n\u003c/p\u003e\n\nNote that in the above demo, I use a very common snippet, `qs` for `^{2}`.\n\nAs you can imagine, this can be quite complex. For example, you can even have something like this:\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"./demo/gifs/table.gif\"/\u003e\n\u003c/p\u003e\n\nor this:\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"./demo/gifs/pmatrix.gif\"/\u003e\n\u003c/p\u003e\n\nFor the first snippet, I type `table2 5`, and then it generates a table with 2 rows and 5 columns. For the second one, I type `pmat` for matrix, and then type `2 5` to indicate that I want a 2 by 5 matrix, then boom! My snippets do that for me in an instant!\n\nMy snippet file includes commonly used snippets as suggested in the original posts, you can look into it to better understand how it works. And maybe you can create your snippets also! Here are some useful snippets for you.\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"./demo/gifs/useful.gif\"/\u003e\n\u003c/p\u003e\n\n#### Math Environment \u003c!-- omit in toc --\u003e\n\nIn the recent update of [HyperSnips](https://marketplace.visualstudio.com/items?itemName=draivin.hsnips), the *context* functionality is implemented, which is very useful, and you should understand how it works. If you look at the top of the snippet file, you will see\n\n```javascript\nglobal\nfunction math(context) {\n    return  context.scopes.findLastIndex(s =\u003e s.startsWith(\"meta.math\")) \u003e context.scopes.findLastIndex(s =\u003e s.startsWith(\"comment\") || s.startsWith(\"meta.text.normal.tex\"));\n}\nendglobal\n```\n\nAnd for some snippets, you will see `context math(context)` in front of which, e.g., the *greater or equal* snippet:\n\n```javascript\ncontext math(context)\nsnippet `\u003e=|(?\u003c!\\\\)geq` \"greater or equal to\" A\n\\geq $0\nendsnippet\n```\n\nwhile some do not, e.g., the *display math* snippet:\n\n```javascript\nsnippet dm \"display Math\" bA\n\\[\n\t${1}\n\\]$0\nendsnippet\n```\n\nBasically, the `context` specifies when the snippet will be triggered, and I define the function `math(context)` to determine when we are in the *math* environment. This is quite important since the official `math(context)` function for detecting math scope for $\\LaTeX$ is given by\n\n```javascript\nglobal\nfunction math(context) {\n    return context.scopes.some(s =\u003e s.startsWith(\"meta.math\")) \u0026\u0026 !context.scopes.some(s =\u003e s.startsWith(\"comment\") || s.startsWith(\"meta.text.normal.tex\"));\n}\nendglobal\n```\n\nHowever, this leads to some problems. For example, sometimes, in the equation, I want to write\n\n```latex\n\\[\n    x_n = x \\text{ for some \\(n\\) large enough},\n\\]\n```\n\nSuch a case is fine since the math I want to write in the text scope is simple, just `\\(n\\)`. However, in the current (and perhaps most popular) scope function, it happens that `\\(\\text{ \\( not in the math mode \\) }\\)`.\n\nTo overcome this, I write the following more generic version:\n\n```javascript\nglobal\nfunction math(context) {\n    return  context.scopes.findLastIndex(s =\u003e s.startsWith(\"meta.math\")) \u003e context.scopes.findLastIndex(s =\u003e s.startsWith(\"comment\") || s.startsWith(\"meta.text.normal.tex\"));\n}\nendglobal\n```\n\nSo, since the nested environment is ordered in the scope, this will always return the correct mode. Even better, there will be no undefined behavior since if the `.findLastIndex` can't find either, it will return `-1` instead of something undefined, so everything is handled.\n\n### Sympy and Mathematica\n\nUnlike Gilles Castel's approach, there is an available extension out there for you to simplify your math calculation already! Please go check out [Latex SYMPY Calculator](https://marketplace.visualstudio.com/items?itemName=OrangeX4.latex-sympy-calculator). It works like follows:\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"./demo/gifs/integral.gif\"/\u003e\n\u003c/p\u003e\n\nMagic right? Let's set it up! First, please look at the installation document provided by [Latex Sympy Calculator](https://marketplace.visualstudio.com/items?itemName=OrangeX4.latex-sympy-calculator). After your installation, you can set up the keybinding for calculating the math expression. I use `shift`+`e`, where `e` stands for evaluating, to calculate so that it will append an equal sign and the answer right after your formula, just like above. If you want to avoid showing the intermediate steps of your calculation, you can use `shift`+`r`, where `r` stands for replacing, to directly replace the whole formula and give me the answer only. See the demo below:\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"./demo/gifs/integral2.gif\"/\u003e\n\u003c/p\u003e\n\n\u003e This plugin is indeed more powerful than just this, see the documentation for detail.\n\nLet's go to the last thing covered in Gilles Castel's post, correcting spelling mistakes.\n\n### Correcting Spelling Mistakes on the Fly\n\nAlthough my typing speed is quite high, I have typos all the time. So this is a must for me. And surprisingly, this is the hardest thing until now for me to set it upright. Let's see how we can configure this functionality in VS Code! There are three plugins we need:\n\n1. [multi-command](https://marketplace.visualstudio.com/items?itemName=ryuta46.multi-command): This is a very powerful extension, which allows you to do a sequence of actions in one shortcut. We will use this later on also, and that's the place it shines.\n\n2. [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker): This is a popular spelling checker out there that meets our needs.\n\n3. [LTeX](https://marketplace.visualstudio.com/items?itemName=valentjn.VSCode-ltex): If you are bad at grammar like me, you definitely want to install to check some simple grammar mistakes for you. Although it's not as powerful as [Grammarly](https://www.grammarly.com/), not even comparable, it's still a good reference for you to keep your eyes on some simple mistakes you may overlook.\n\n   \u003e There is an unofficial API for Grammarly, and the plugin can be found [here](https://marketplace.visualstudio.com/items?itemName=znck.grammarly). Though it's quite slow...\n\nHere is a quick demo of how it works when typing:\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"./demo/gifs/spell.gif\"/\u003e\n\u003c/p\u003e\n\nAdditionally, if you also want to correct your grammar error, I use the shortcut `cmd`+`k` to trigger a quick-fix for a general error.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch4\u003eDetail Explanation\u003c/h\u003e\u003c/summary\u003e\n\n\u003e You can skip this part if you don't want to know the working mechanism. But if you're interested, please follow! The following code snippet in `settings.json` is responsible for correcting your spelling mistakes by just clicking `cmd`+`l`.\n\u003e\n\u003e ```json\n\u003e {\n\u003e     \"key\": \"cmd+l\",\n\u003e     \"command\": \"extension.multiCommand.execute\",\n\u003e     \"args\": {\n\u003e         \"sequence\": [\n\u003e \t    \"cSpell.goToPreviousSpellingIssue\",\n\u003e \t    {\n\u003e \t        \"command\": \"editor.action.codeAction\",\n\u003e \t        \"args\": {\n\u003e \t            \"kind\": \"quickfix\",\n\u003e \t\t    \"apply\": \"first\"\n\u003e                 }\n\u003e \t    },\n\u003e \t    \"cursorUndo\",\n\u003e         ]\n\u003e     }\n\u003e },\n\u003e ```\n\u003e\n\u003e \u003e Make sure that the curly braces above have a trailing comma, otherwise, VS Code will complain about it.\n\u003e\n\u003e The working mechanism is as follows. When you press `cmd`+`l`, the [multi-command](https://marketplace.visualstudio.com/items?itemName=ryuta46.multi-command) will do the following:\n\u003e\n\u003e 1. Use one of the default function from cSpell's: `goToPreviousSpellingIssue`, which jump your cursor on that spelling error word\n\u003e 2. Triggered a default editor action, with the argument being `quickfix` to open a quick fix drop-down list, and choose the `first` suggestion\n\u003e 3. Move your cursor back by `cursorUndo`\n\u003e\n\u003e And likewise, the following code snippet is responsible for correcting grammar mistakes.\n\u003e\n\u003e ```json\n\u003e {\n\u003e     \"key\": \"cmd+k\",\n\u003e     \"command\": \"extension.multiCommand.execute\",\n\u003e     \"args\": {\n\u003e         \"sequence\": [\n\u003e             \"editor.action.marker.prev\",\n\u003e             {\n\u003e                 \"command\": \"editor.action.codeAction\",\n\u003e                 \"args\": {\n\u003e                     \"kind\": \"quickfix\",\n\u003e                     \"apply\": \"first\"\n\u003e                 }\n\u003e             },\n\u003e             \"cursorUndo\",\n\u003e         ]\n\u003e     }\n\u003e  },\n\u003e ```\n\n\u003c/details\u003e\n\nNow, the first part is over. Let's go to the next truly beautiful, elegant, and exciting world, drawing with [Inkscape](https://inkscape.org/zh-hant/).\n\n## Drawing Like a Pro - With Inkscape\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"./demo/figures/inkscape_example.png\"/\u003e\n\u003c/p\u003e\n\nFor more examples, check out the original blog. Or for more figures I draw, you can check out [Note](https://github.com/sleepymalc/Notes).\n\nOne last thing is that I'll assume you have already installed [VS Code Vim](https://marketplace.visualstudio.com/items?itemName=vscodevim.vim). While this is not required, if you don't want to use it, then you'll need to assign different keybinding. Anyway, you'll see what I mean until then!\n\n### Inkscape \u003c!-- omit in toc --\u003e\n\nA big question is, why Inkscape? In the original blog, he had already explained it. One reason is that although $\\texttt{TikZ}$ can do the job of drawing vector figures in $\\LaTeX$ with original support, it's too slow to set all diagrams right. This is so true since my experience with $\\texttt{TikZ}$ is *nice looking* and *intuitive* but also *slow* and *bulky*. Also, the $\\texttt{TikZ}$ code tends to be **long**. A large file will take [*latexindent*](https://ctan.org/pkg/latexindent) and *pdfLaTeX* **a minute** to compile for one save. That's not efficient at all, especially when you want some instant feedback for some small changes.\n\n#### Download Inkscape \u003c!-- omit in toc --\u003e\n\nYou need to install [Inkscape](https://inkscape.org/zh-hant/) first. I recommend you install this in a terminal. I assume that you have your [`homebrew`](https://brew.sh/) installed. Then, just type the following into your terminal:\n\n```sh\n\u003e brew install --cask inkscape\n```\n\n#### Set up the Environment in LaTeX \u003c!-- omit in toc --\u003e\n\nFirst thing first, include the following in your preamble\n\n```latex\n\\usepackage{import}\n\\usepackage{xifthen}\n\\usepackage{pdfpages}\n\\usepackage{transparent}\n\n\\newcommand{\\incfig}[1]{%\n    \\def\\svgwidth{\\columnwidth}\n    \\import{./Figures/}{#1.pdf_tex}\n}\n```\n\nAnd to use it in your code, it's like the following:\n\n```latex\n\\begin{figure}[H]\n    \\centering\n    \\incfig{figure's name}\n    \\caption{Your caption}\n    \\label{fig:label}\n\\end{figure}\n```\n\nAnd then you're done! Also, the compilation time for this is shorter than you can ever expect. Let's get started then!\n\nThis assumes that your $\\LaTeX$ project's home directory looks like this:\n\n```sh\nLaTeX_project\n    ├── main.tex\n    ├── main.pdf\n    ├── Figures\n    │    ├── fig.pdf\n    │    ├── fig.pdf_tex\n    │    ├── fig.svg\n    │    .\n    .\n```\n\nNow, let's get into the fun part, i.e., setting up the shortcut for this.\n\n### Inkscape Figure Manager\n\nThis is a figure manager developed by Gilles Castel, and here is the [repo](https://github.com/gillescastel/inkscape-figures). I recommend you follow the installation instructions there. Here are just some guidelines for you.\n\n1. Install [choose](https://github.com/chipsenkbeil/choose) (specifically for macOS, [rofi](https://github.com/davatorium/rofi) for Linux instead):\n\n   ```sh\n   \u003e brew install choose-gui\n   ```\n\n2. Install [fswatch](https://github.com/emcrisostomo/fswatch):\n\n   ```sh\n   \u003e brew install fswatch\n   ```\n\n3. Install the Inkscape figure manager:\n\n   ```sh\n   \u003e pip3 install inkscape-figures\n   ```\n\n   \u003e After installing it, type `inkscape-figures` in your terminal to make sure you have corrected install it.\n\nIf you're using Linux and Vim, then you are done already. But since you're using macOS and VS Code, please follow me, there are some more things for you to configure.\n\n\u003e If you're using Windows, then check out [super-figure](https://github.com/Joao-Peterson/super-figure). It implements similar functionalities but in a more chunky way. Even if you're using macOS, you can try it too, although I prefer my setup.\n\n#### Set up Inkscape Figure Manager \u003c!-- omit in toc --\u003e\n\nFirstly, install the [Command Runner](https://marketplace.visualstudio.com/items?itemName=edonet.vscode-command-runner). This will allow you to send commands into a terminal with the shortcut. The configuration is in [`settings.json`](./VSCode-setting/settings.json), and we'll see how it works later. Now, this is a tricky part: you need to find the source code of the inkscape-figures manager. In my case, it's in `/Users/pbb/opt/anaconda3/lib/python3.8/site-packages/inkscapefigures`.\n\n\u003e Using global finding may be helpful...\n\nOpen this directory by VS Code, there is something for you to modify. Ok, I know you probably don't have that much patience now, so I have a modified version available [here](./Inkscape-setting/Inkscape-figure-manager/). Just replace the whole directory with mine, and you're good to go.\n\n\u003e Notice that the directory in this repo is named `Inkscape-figure-manager`, while in your system, it should be `inkscapefigures`.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch4\u003eDetail Explanation\u003c/h\u003e\u003c/summary\u003e\n\n\u003e In Gilles Castel's approach, he uses the shortcut `ctrl`+`f` to trigger this script, which will copy the whole line's content depending on the cursor's position, and the script will send the snippets by the function\n\u003e\n\u003e ```python\n\u003e def latex_template(name, title):\n\u003e     return '\\n'.join((r\"\\begin{figure}[ht]\",\n\u003e                       r\"    This is a custom LaTeX template!\",\n\u003e                       r\"    \\centering\",\n\u003e                       rf\"    \\incfig[1]{{{name}}}\",\n\u003e                       rf\"    \\caption{{{title}}}\",\n\u003e                       rf\"    \\label{{fig:{name}}}\",\n\u003e                       r\"\\end{figure}\"))\n\u003e ```\n\u003e\n\u003e to `stdout`, and then create a figure by the `name`, which is the content of the line.\n\u003e\n\u003e But this in VS Code is impossible, hence we don't need this, we'll use command line. And if we leave this function as it was, then it will send all these snippets into our terminal, which is quite annoying. So the modified version just removes this snippet completely.\n\u003e\n\u003e But let me explain it to you, in case you want to modify it to meet your need later on. First thing first, we see that in the given code in [`keybindings.json`](./VSCode-setting/keybindings.json) and [`settings.json`](./VSCode-setting/settings.json), we're using [Command Runner](https://marketplace.visualstudio.com/items?itemName=edonet.vscode-command-runner), so let me tell you how to set this up first.\n\n\u003c/details\u003e\n\nWe're now prepared to see a detailed explanation of commands provided in [Inkscape figure manager](https://github.com/gillescastel/inkscape-figures). There are three different commands in the [Inkscape figure manager](https://github.com/gillescastel/inkscape-figures). We break it down one by one.\n\n#### Watch \u003c!-- omit in toc --\u003e\n\nSince Inkscape by default does not save the file in `pdf+latex`, we need [Inkscape figure manager](https://github.com/gillescastel/inkscape-figures) to help us. We need to first open the file watcher to *watch* the file for any changes. If there is any, then the file watcher will tell Inkscape to save the file in `pdf+latex` format.\n\nTo open the file watcher, you can type `inkscape-figures watch` in the terminal. But remember the [Command Runner](https://marketplace.visualstudio.com/items?itemName=edonet.vscode-command-runner) we just installed? We can assign this command with a keybinding! In my case, since I don't want to introduce more than one keybinding for Inkscape-figures manager, I use `mode` provided by `vim` to help us. In `VISUAL` mode (enter by `v` in `NORMAL` mode), press `ctrl`+`f`.\n\n\u003e You should trigger this at the beginning. i.e., use this after you open your project folder. To check whether `watch` is triggered correctly, you can simply open the terminal and see what's the output when you press `ctrl`+`f`: If it's already triggered, then it'll show\n\u003e\n\u003e ```sh\n\u003e \u003e inkscape-figures watch\n\u003e Unable to lock on the pidfile.\n\u003e ```\n\u003e\n\u003e Otherwise it'll simply show nothing. (Remember to select the terminal corresponds to `runCommand`!)\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch5\u003eDetail Explanation\u003c/h\u003e\u003c/summary\u003e\n\n\u003e In [`keybindings.json`](./VSCode-setting/keybindings.json), we have\n\u003e\n\u003e ```json\n\u003e {\n\u003e     \"key\": \"ctrl+f\",\n\u003e     \"command\": \"command-runner.run\",\n\u003e     \"args\": {\n\u003e         \"command\": \"inkscapeStart\",\n\u003e         \"terminal\": {\n\u003e             \"name\": \"runCommand\",\n\u003e             \"shellArgs\": [],\n\u003e             \"autoClear\": true,\n\u003e             \"autoFocus\": false\n\u003e         }\n\u003e     },\n\u003e     \"when\": \"editorTextFocus \u0026\u0026 vim.active \u0026\u0026 vim.use\u003cC-f\u003e \u0026\u0026 !inDebugRepl \u0026\u0026 vim.mode == 'Visual'\"\n\u003e }\n\u003e ```\n\u003e\n\u003e for starting the [Inkscape figure manager](https://github.com/gillescastel/inkscape-figures). And the command is defined in [`settings.json`](./VSCode-setting/settings.json):\n\u003e\n\u003e ```json\n\u003e \"command-runner.commands\": {\n\u003e     \"inkscapeStart\": \"inkscape-figures watch\"\n\u003e }\n\u003e ```\n\u003e\n\u003e In detail, we just use [Command Runner](https://marketplace.visualstudio.com/items?itemName=edonet.vscode-command-runner) to run the command we defined in [`settings.json`](./VSCode-setting/settings.json), in this case, I explicitly tell the keybinding `ctrl`+`f` will trigger `inkscapeStart` when I'm in `VISUAL` mode in Vim, which is just `inkscape-figures watcher` as defined above.\n\u003e\n\u003e Notice that we set the `autoFocus=false` for the terminal [Command Runner](https://marketplace.visualstudio.com/items?itemName=edonet.vscode-command-runner) uses since we don't want a pop-up terminal to distract us. If you want to see whether the command is triggered correctly every time, you can set it to `true`.\n\n\u003c/details\u003e\n\n#### Create \u003c!-- omit in toc --\u003e\n\nSame as above, we also use `ctrl`+`f` to trigger `inkscape-figures create` command. But in this case, we use `INSERT` for creating a new Inkscape figure. Specifically, we first type out the image's name we want our image to be called, then, in this case, we're already in `INSERT` mode, we just press `ctrl`+`f` to create this image after naming.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch5\u003eDetail Explanation\u003c/h\u003e\u003c/summary\u003e\n\n\u003e We set up our [`keybindings.json`](./VSCode-setting/keybindings.json) as\n\u003e\n\u003e ```json\n\u003e {\n\u003e     \"key\": \"ctrl+f\",\n\u003e     \"command\": \"extension.multiCommand.execute\",\n\u003e     \"args\": {\n\u003e         \"sequence\": [\n\u003e \t    \"editor.action.clipboardCopyAction\",\n\u003e \t    \"editor.action.insertLineAfter\",\n\u003e \t    \"cursorUp\",\n\u003e \t    \"editor.action.deleteLines\",\n\u003e \t    {\n\u003e \t        \"command\": \"editor.action.insertSnippet\",\n\u003e \t\t\"args\": {\n\u003e \t\t    \"name\": \"incfig\"\n\u003e \t\t}\n\u003e             },\n\u003e             {\n\u003e \t        \"command\": \"command-runner.run\",\n\u003e \t\t\"args\": {\n\u003e \t\t    \"command\": \"inkscapeCreate\",\n\u003e \t\t},\n\u003e \t\t\"terminal\": {\n\u003e \t\t    \"name\": \"runCommand\",\n\u003e \t\t    \"shellArgs\": [],\n\u003e \t\t    \"autoClear\": true,\n\u003e \t\t    \"autoFocus\": false\n\u003e \t\t}\n\u003e             },\n\u003e \t]\n\u003e     },\n\u003e     \"when\": \"editorTextFocus \u0026\u0026 vim.active \u0026\u0026 vim.use\u003cC-f\u003e \u0026\u0026 !inDebugRepl \u0026\u0026 vim.mode == 'Insert'\"\n\u003e },\n\u003e ```\n\u003e\n\u003e and also in [`settings.json`](./VSCode-setting/settings.json):\n\u003e\n\u003e ```json\n\u003e \"command-runner.commands\": {\n\u003e     \"inkscapeCreate\": \"inkscape-figures create ${selectedText} ${fileDirname}/Figures/\"\n\u003e }\n\u003e ```\n\u003e\n\u003e We break down what `ctrl`+`f` do in `INSERT` mode exactly step by step. We see that when we press `ctrl`+`f` in `INSERT` mode, we trigger `multiCommand.execute` to execute a sequence of instructions, which are\n\u003e\n\u003e 1. Copy the content into your clipboard of the line your cursor at\n\u003e 2. Insert a blank line after since we need to insert a snippet, and that will delete an additional line. You can try to delete this and the next instruction, and see what happens.\n\u003e 3. Move back our cursor after inserting that new line.\n\u003e 4. Delete that copied content by removing this line.\n\u003e 5. Insert a snippet defined in [`latex.json`](./VSCode-setting/Snippets/latex.json). **Notice that this is the default snippet functionality built-in VS Code, not [HyperSnips](https://marketplace.visualstudio.com/items?itemName=draivin.hsnips) we have used before**. I'll explain where to copy this file in a minute.\n\u003e 6. Lastly, we send a command in a terminal by [Command Runner](https://marketplace.visualstudio.com/items?itemName=edonet.vscode-command-runner), with the command `inkscapeCreate` we defined in [`settings.json`](./VSCode-setting/settings.json).\n\u003e\n\u003e In the fifth instruction, the snippet we used is\n\u003e\n\u003e \u003chttps://github.com/sleepymalc/VSCode-LaTeX-Inkscape/blob/b98c21536371a270736ec9ac841aacaa82664123/VSCode-setting/Snippets/latex.json#L1-L14\u003e\n\u003e\n\u003e which is just the snippet we remove from [Inkscape figure manager](https://github.com/gillescastel/inkscape-figures)'s source code! It's back again, in a different approach.\n\n\u003c/details\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"./demo/gifs/demo-create-inkscape.gif\"/\u003e\n\u003c/p\u003e\n\nLet me break it down for you. Firstly, I changed into `INSERT` mode in VS Code Vim and typed my new figure's name `figure-test`. Then, I press `ctrl`+`f` to trigger the keybinding, which will automatically create an Inkscape figure named `figure-test` for me and open it.\n\n\u003e The three files will be created along the way: `figure-test.pdf`, `figure-test.pdf_tex` and `figure-test.svg`. Unfortunately, to rename a file, you'll need to manually rename three of them.\n\n#### Edit \u003c!-- omit in toc --\u003e\n\nAgain, we also use `ctrl`+`f` to trigger `inkscape-figures edit` command, but this time in `NOMAL` mode. Here, [choose](https://github.com/chipsenkbeil/choose) comes into play. After you select the image you want to edit in Inkscape, you simply press `enter` and it'll open that image for you to edit.\n\n\u003e You can modify the styling of [choose](https://github.com/chipsenkbeil/choose). For example, in [`picker.py`](./Inkscape-setting/Inkscape-figure-manager/picker.py), we have the following:\n\u003e\n\u003e ```python\n\u003e def get_picker_cmd(picker_args=None, fuzzy=True):\n\u003e     \"\"\"\n\u003e     Create the shell command that will be run to start the picker.\n\u003e     \"\"\"\n\u003e     if SYSTEM_NAME == \"Darwin\":\n\u003e         args = [\"choose\"]\n\u003e     #   args = [\"choose\", \"-u\", \"-n\", \"15\", \"-c\", \"BB33B7\", \"-b\", \"BF44C8\"]\n\u003e ```\n\u003e\n\u003e We see that we don't have any additional argument for `choose`, but if you want, you can replace this line by the next line, which modify the style of `choose`. For detail information, type `choose -h` to see all the options.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch5\u003eDetail Explanation\u003c/h\u003e\u003c/summary\u003e\n\n\u003e The corresponding keybinding in ['keybindings.json'](./VSCode-setting/keybindings.json) is:\n\u003e\n\u003e ```json\n\u003e {\n\u003e     \"key\": \"ctrl+f\",\n\u003e     \"command\": \"command-runner.run\",\n\u003e     \"args\": {\n\u003e         \"command\": \"inkscapeEdit\",\n\u003e         \"terminal\": {\n\u003e             \"name\": \"runCommand\",\n\u003e             \"shellArgs\": [],\n\u003e             \"autoClear\": true,\n\u003e             \"autoFocus\": false\n\u003e         }\n\u003e     },\n\u003e     \"when\": \"editorTextFocus \u0026\u0026 vim.active \u0026\u0026 vim.use\u003cC-f\u003e \u0026\u0026 !inDebugRepl \u0026\u0026 vim.mode == 'Normal'\"\n\u003e },\n\u003e ```\n\u003e\n\u003e and also in [`settings.json`](./VSCode-setting/settings.json):\n\u003e\n\u003e ```json\n\u003e \"command-runner.commands\": {\n\u003e     \"inkscapeEdit\": \"inkscape-figures edit ${fileDirname}/Figures/\"\n\u003e }\n\u003e ```\n\u003e\n\u003e I think now it's clear enough how all these work together to trigger the corresponding command. When you press `ctrl`+`f` in `NORMAL` mode, you'll trigger the `inkscape-figures edit` command, and it'll look into your `Figures/` subfolder to see what figures you have and pop out a window for you to choose, which is the functionality provided by [choose](https://github.com/chipsenkbeil/choose).\n\n\u003c/details\u003e\n\nIn the following demo, I create another figure named `figure-test2`, then modify it a little, and compile it again.\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"./demo/gifs/demo-edit-inkscape.gif\"/\u003e\n\u003c/p\u003e\n\n### Inkscape Shortcut Manager\n\nIn this section, we'll set up a very efficient shortcut manager to help you draw any mathematical figures faster than you can ever imagine! Notice that this setup is quite complicated, but the result is quite good. It depends on\n\n- [Hammerspoon](https://www.hammerspoon.org/): For windows focus.\n- [Karabiner Elements](https://karabiner-elements.pqrs.org/): For capturing the overlapping key chords.\n\nPlease download the above two apps.\n\n\u003e This section is contributed **purely** by [@kiryph](https://github.com/kiryph) in [#1](https://github.com/sleepymalc/VSCode-LaTeX-Inkscape/issues/1).\n\n#### Karabiner Elements \u003c!-- omit in toc --\u003e\n\nWe'll need [Karabiner Elements](https://karabiner-elements.pqrs.org)' [Complex Modifications](https://karabiner-elements.pqrs.org/docs/json/root-data-structure/#custom-json-file-in-configkarabinerassetscomplex_modifications) to help us. The steps are the following (adapted from [️⌨ How to type?](https://pbb.wtf/posts/How2TypeFast#import-settings)).\n\n1. Open [Karabiner-Elements](https://karabiner-elements.pqrs.org/), go to *Misc* and click on *Export \u0026 Import*.\n    \u003cdiv align=\"center\"\u003e\n\t\t\u003cimg src=\"demo/figures/sourcecode-1.png\"/\u003e\n\t\u003c/div\u003e\n2. Copy [`Inkscape.json`](https://github.com/sleepymalc/VSCode-LaTeX-Inkscape/blob/main/Inkscape-setting/Inkscape-shortcut-manager/Inkscape.json) into `.config/karabiner/assets/complex_modifications`.\n    \u003cdiv align=\"center\"\u003e\n\t\t\u003cimg src=\"demo/figures/sourcecode-2.png\"/\u003e\n\t\u003c/div\u003e\n3. Again open [Karabiner-Elements](https://karabiner-elements.pqrs.org/), go to *Complex Modifications* and click on *Add rule*.\n\t\u003cdiv align=\"center\"\u003e\n\t\t\u003cimg src=\"demo/figures/sourcecode-3.png\"/\u003e\n\t\u003c/div\u003e\n4. Enable it.\n\t\u003cdiv align=\"center\"\u003e\n\t\t\u003cimg src=\"demo/figures/sourcecode-4.png\"/\u003e\n\t\u003c/div\u003e\n\nIf you're interested in how [`Inkscape.json`](https://github.com/sleepymalc/VSCode-LaTeX-Inkscape/blob/main/Inkscape-setting/Inkscape-shortcut-manager/Inkscape.json) is created, see the following.\n\n\u003cdetails\u003e\n\n\u003csummary\u003e\u003cb\u003eDetail Explanation\u003c/b\u003e\u003c/summary\u003e\n\nThe [`Inkscape.json`](https://github.com/sleepymalc/VSCode-LaTeX-Inkscape/blob/main/Inkscape-setting/Inkscape-shortcut-manager/Inkscape.json) is created by using a [`jsonnet`](https://jsonnet.org) file. The file can be found [here](https://github.com/sleepymalc/VSCode-LaTeX-Inkscape/blob/main/Inkscape-setting/Inkscape-shortcut-manager/karabiner-Inkscape.jsonnet),\n\n\u003chttps://github.com/sleepymalc/VSCode-LaTeX-Inkscape/blob/3b92e170a20f0dd3b745510c0aaf2da0e81b3d57/Inkscape-setting/Inkscape-shortcut-manager/karabiner-inkscape.jsonnet#L1-L39\u003e\n\nand the `jsonnet` tool can be installed via `\u003e brew install jsonnet`.\n\nConverting the `jsonnet` file into the `json` file for [Karabiner Elements](https://karabiner-elements.pqrs.org/) can be done as follows\n\n```sh\n\u003e jsonnet karabiner-Inkscape.jsonnet \u003e ~/.config/karabiner/assets/complex_modifications/karabiner-Inkscape.json\n```\n\n\u003c/details\u003e\n\n#### Hammerspoon \u003c!-- omit in toc --\u003e\n\nFirstly, open the [Hammerspoon](https://www.hammerspoon.org/) console and run `hs.ipc.cliInstall()` to install the cli command `hs`. Then, just add the following code to your [`~/.hammerspoon/init.lua`](./Inkscape-setting/Inkscape-shortcut-manager/init.lua).\n\n\u003chttps://github.com/sleepymalc/VSCode-LaTeX-Inkscape/blob/e136c6692aa0c32513c713dbb702b71248b8f51e/Inkscape-setting/Inkscape-shortcut-manager/init.lua#L1-L153\u003e\n\n#### Reference Card for Key Chords\n\nAs a reference for the key chords, I added the original picture from [the original blog](https://castel.dev/post/lecture-notes-2/) but with the key chords included in the picture.\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"./demo/figures/inkscape_shortcut.png\"/\u003e\n\u003c/p\u003e\n\n#### Missing Key Chords \u003c!-- omit in toc --\u003e\n\nI did not add the *ergonomic* rebinding `x`, `w`, `f`, and `shift`+`z`. This should be possible in Inkscape itself. This setup also misses the bindings `t`, `shift`+`t`, `a`, `shift`+`a`, `s`, and `shift`+`s`. Since I encountered issues I did not pursue these.\n\n### Summary\n\nThis is the whole setup I have, and let's wrap this up since I know this may be quite overwhelming.\n\n1. Before you start your project, enter the `VISUAL` mode by pressing `v` in `NORMAL` mode. And then press `ctrl`+`f`. This will set up the file watcher.\n2. When you want to create a new figure, go into a new line, type the name of your figure in `INSERT` mode, then press `ctrl`+`f`. This will create a new figure with the name you typed, and open it in Inkscape for you.\n3. When you have drawn your figure, as long as you press `cmd`+`s` in Inkscape, it will automatically save the figure in `pdf+latex` for you, then you can close Inkscape.\n4. When you want to edit one of your figures, you press `ctrl`+`f` in `NORMAL` mode, it will pop out a window for you to choose the figure you want to edit. And the rest is the same as 3.\n\n## Updates\n\n### ~~About Inkscape Shortcut Manager (09.27.21)~~\n\n~~After some research, although there is a way to let the original script in [inkscape-shortcut-manager](https://github.com/gillescastel/inkscape-shortcut-manager) run correctly since it depends on `xlib`, which is no longer used by macOS for almost every application(including Inkscape, as expected), hence the only thing I can do now is to give up. In a perceivable future, if I have time to find an alternative way to interrupt the window activity in macOS, I'll try to configure it for macOS.~~\n\n\u003e Now the Inkscape Shortcut Manager is fully functional, see [here](#inkscape-shortcut-manager).\n\n### Quiver - For commutative diagram (01.24.22)\n\nI have been working on Category Theory for a while, and I found out that [quiver](https://q.uiver.app/) is quite appealing, hence I integrate it into my workflow. You can also pull it to your local environment, configure the VS Code Task, and combine it with a hotkey to use it **locally**. Specifically, I added the following code to my [`keybindings.json`](./VSCode-setting/keybindings.json):\n\n```json\n{\n    \"key\": \"ctrl+c\",\n    \"command\": \"command-runner.run\",\n    \"args\": {\n        \"command\": \"quiver\",\n        \"terminal\": {\n            \"name\": \"runCommand\",\n            \"shellArgs\": [],\n            \"autoClear\": true,\n            \"autoFocus\": false\n        }\n    },\n    \"when\": \"editorTextFocus\"\n},\n```\n\nand also, define the command `quiver` as\n\n```json\n\"command-runner.commands\": {\n    \"quiver\": \"open -na 'Google Chrome' --args --new-window \u003cpath-to-quiver\u003e/quiver/src/index.html\"\n},\n```\n\nNotice that you'll need to build it first if you want to use it offline! Please follow the tutorial [here](https://github.com/varkor/quiver). Otherwise, it's totally fine to use `\"quiver\": \"open -na 'Google Chrome' --args --new-window https://q.uiver.app/\"` as your command.\n\nThis is what the workflow looks like.\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"./demo/gifs/quiver.gif\"/\u003e\n\u003c/p\u003e\n\nTo use the package `tikz-cd`, you need to include the following in your header:\n\n```latex\n% quiver style\n\\usepackage{tikz-cd}\n% `calc` is necessary to draw curved arrows.\n\\usetikzlibrary{calc}\n% `pathmorphing` is necessary to draw squiggly arrows.\n\\usetikzlibrary{decorations.pathmorphing}\n\n% A TikZ style for curved arrows of a fixed height, due to AndréC.\n\\tikzset{curve/.style={settings={#1},to path={(\\tikztostart)\n\t\t\t\t\t.. controls ($(\\tikztostart)!\\pv{pos}!(\\tikztotarget)!\\pv{height}!270:(\\tikztotarget)$)\n\t\t\t\t\tand ($(\\tikztostart)!1-\\pv{pos}!(\\tikztotarget)!\\pv{height}!270:(\\tikztotarget)$)\n\t\t\t\t\t.. (\\tikztotarget)\\tikztonodes}},\n\tsettings/.code={\\tikzset{quiver/.cd,#1}\n\t\t\t\\def\\pv##1{\\pgfkeysvalueof{/tikz/quiver/##1}}},\n\tquiver/.cd,pos/.initial=0.35,height/.initial=0}\n\n% TikZ arrowhead/tail styles.\n\\tikzset{tail reversed/.code={\\pgfsetarrowsstart{tikzcd to}}}\n\\tikzset{2tail/.code={\\pgfsetarrowsstart{Implies[reversed]}}}\n\\tikzset{2tail reversed/.code={\\pgfsetarrowsstart{Implies}}}\n% TikZ arrow styles.\n\\tikzset{no body/.style={/tikz/dash pattern=on 0 off 1mm}}\n```\n\nYou can certainly follow my [Template](https://github.com/sleepymalc/Academic-Template), which already includes all the requirement headers for you.\n\n### Migrate to HyperSnips (02.18.22)\n\nNow, instead of using [HyperSnips for Math](https://marketplace.visualstudio.com/items?itemName=OrangeX4.hsnips), we're using [HyperSnips](https://marketplace.visualstudio.com/items?itemName=draivin.hsnips), namely the **original one**! Since I just found out that we can trigger the snippets **only in math mode** by using the special keyword called `context`, I migrated to the original one. To migrate, you just need to uninstall [HyperSnips for Math](https://marketplace.visualstudio.com/items?itemName=OrangeX4.hsnips), install [HyperSnips](https://marketplace.visualstudio.com/items?itemName=draivin.hsnips) with the updated [latex.hsnips](./VSCode-setting/Snippets/latex.hsnips) I prepared for you, and then enjoy!\n\n### Documenting Inkscape Shortcut Manager (07.30.22)\n\nI finally have time to document the configuration of the [Inkscape shortcut manager](#inkscape-shortcut-manager) and make some changes to make this document more readable. Personally, I have used this workflow for more than half of a year, so I think this is stable and will not be changed shortly.\n\n## Credits\n\nAgain, thanks to Gilles Castel, this workflow fits my style. Although it originally worked in Linux+Vim only, the idea is the most important thing. Without his wonderful post, I can't even imagine this is possible. But now it is! Go to his original post to show him some love.\n\n## Related Project\n\n1. [LaTeX-Template](https://github.com/sleepymalc/LaTeX-Template)\n2. [Notes](https://github.com/sleepymalc/Notes)\n3. [gillescastel/inkscape-figures](https://github.com/gillescastel/inkscape-figures)\n4. [gillescastel/inkscape-shortcut-manager](https://github.com/gillescastel/inkscape-shortcut-manager)\n5. [chipsenkbeil/choose](https://github.com/chipsenkbeil/choose)\n6. [varkor/quiver](https://github.com/varkor/quiver)\n\n## Star History\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"https://api.star-history.com/svg?repos=sleepymalc/VSCode-LaTeX-Inkscape\u0026type=Date)](https://star-history.com/#sleepymalc/VSCode-LaTeX-Inkscape\u0026Date\"/\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsleepymalc%2Fvscode-latex-inkscape","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsleepymalc%2Fvscode-latex-inkscape","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsleepymalc%2Fvscode-latex-inkscape/lists"}