I need to repeatedly use `Extensions -> Render -> Mathematics -> LaTeX (pdflatex)` in Inkscape. It is quite painful to browse through so many menu items to open it (I need to use this function ~30 times to create certain diagrams). I want to assign a shortcut to it.
I found this question in Ask Ubuntu, which suggests saving the following in ~/.config/inkscape/keys/default.xml.
It seems that the extension eqtexsvg is not even installed in my computer (I could not find it anywhere with `locate`). An extension called pdflatex is installed in usr/share/inkscape/extensions. Here are the contents of pdflatex.inx.
For some reason, this does not work in the development version of inkscape (1.2). I installed from source. I have the same configuration file, but nothing happens when I press the same key combination. Did the procedure of assigning a shortcut change?
I need to repeatedly use `Extensions -> Render -> Mathematics -> LaTeX (pdflatex)` in Inkscape. It is quite painful to browse through so many menu items to open it (I need to use this function ~30 times to create certain diagrams). I want to assign a shortcut to it.
I found this question in Ask Ubuntu, which suggests saving the following in
~/.config/inkscape/keys/default.xml.
However, it does not work in Inkscape 1.1.1,
When I run it form terminal, I get the error message
$ inkscape
Unable to find: org.inkscape.effect.eqtexsvg
Shortcut::read: invalid verb: org.inkscape.effect.eqtexsvg
That extension might not be updated for new versions of Inkscape.
Maybe this one will be helpful, or point you in the direction. https://github.com/seebk/LaTeXText
Just to clarify, this extension is present in the default installation. The extension you had suggested is something else.
Maybe you have seen this: https://github.com/julienvitard/eqtexsvg. Last updated in 2015.
It seems that the extension
eqtexsvg
is not even installed in my computer (I could not find it anywhere with `locate`). An extension calledpdflatex
is installed inusr/share/inkscape/extensions
. Here are the contents ofpdflatex.inx
.<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>LaTeX (pdflatex)</name>
<id>org.inkscape.generate.pdf_latex</id>
<dependency type="executable" location="path">pdflatex</dependency>
<param name="formule" type="string" gui-text="LaTeX input:">\(\displaystyle\frac{\pi^2}{6}=\lim_{n \to \infty}\sum_{k=1}^n \frac{1}{k^2}\)</param>
<param name="packages" type="string" gui-text="Additional packages (comma-separated):"></param>
<effect>
<object-type>all</object-type>
<effects-menu>
<submenu name="Render">
<submenu name="Mathematics" />
</submenu>
</effects-menu>
</effect>
<script>
<command location="inx" interpreter="python">pdflatex.py</command>
</script>
</inkscape-extension>
This must be the extension I had been using, as I can find it under `Render -> Mathematics`.
How do I assign a shortcut to that?
The solution is to add the following to
~/.config/inkscape/keys/default.xml
.<?xml version="1.0"?>
<keys name="My Customization">
<bind key="k" modifiers="Ctrl,Alt"
action="org.inkscape.generate.pdf_latex" display="true"/>
</keys>
I got the ID
org.inkscape.generate.pdf_latex
fromusr/share/inkscape/extensions/pdflatex.inx
Then, the extension works with
ctrl + alt + k
.For some reason, this does not work in the development version of inkscape (1.2). I installed from source. I have the same configuration file, but nothing happens when I press the same key combination. Did the procedure of assigning a shortcut change?
Development versions are recommended only for testing, and might not be complete.