Script for managing inkscape figures
Project description
Inkscape figure manager.
Setup
Add the following code to the preamble of your LateX document.
\usepackage{import}
\usepackage{xifthen}
\usepackage{pdfpages}
\usepackage{transparent}
\newcommand{\incfig}[1]{%
\def\svgwidth{\columnwidth}
\import{./figures/}{#1.pdf_tex}
}
\pdfsuppresswarningpagegroup=1
This assumes the following directory structure:
master.tex
figures/
figure1.pdf_tex
figure1.svg
figure1.pdf
figure2.pdf_tex
figure2.svg
figure2.pdf
- Watch for figures:
inkscape-figures watch
. - Creating a figure:
inkscape-figures create 'title'
. This uses~/.config/inkscape-figures/template.svg
as a template. - Creating a figure in a specific folder:
inkscape-figures create 'title' path/to/figures/
. - Select figure and edit it:
inkscape-figures edit
. This depends onrofi
:sudo apt install rofi
. - Select figure in a specific and edit it:
inkscape-figures edit /path/to/figures/
.
Vim mappings
This uses the b:vimtex.root
variable in vim to determine the location of the figures directory.
inoremap <C-f> <Esc>: silent exec '.!inkscape-figures create "'.getline('.').'" "'.b:vimtex.root.'/figures/"'<CR><CR>:w<CR>
nnoremap <C-f> : silent exec '!inkscape-figures edit "'.b:vimtex.root.'/figures/" > /dev/null 2>&1 &'<CR><CR>:redraw!<CR>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
inkscape-figures-1.0.0.tar.gz
(5.9 kB
view hashes)
Built Distribution
Close
Hashes for inkscape_figures-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c733db15bd7a8ec498f60f8b14e46edca2a210f6af21d7b3601c05eadd8be7ab |
|
MD5 | 1ff71e6a7998605d2c739b352b1a8a45 |
|
BLAKE2b-256 | e49ccc7216a4704a4de5ccdd6e6420607dd14c7ce0031af2e5faccf643bd44a7 |