Thanks to visit codestin.com
Credit goes to lib.rs

#svg #latex #ink-scape #cli #watcher

app inktex-watch

A companion binary for inktex.nvim that monitors a directory for SVG file changes and autogenerates PDF and LaTeX overlays using Inkscape

1 unstable release

Uses new Rust 2024

0.1.1 Aug 3, 2025

#567 in Images

MIT license

20KB
466 lines

Inkwatch

Inkwatch is a background CLI tool that watches a directory for changes to SVG files and automatically exports them to PDF and LaTeX overlay files using Inkscape. It is designed to be used alongside the inkfig.nvim plugin to automate figure workflows in LaTeX documents.

Usage

To start watching the ./figures directory for changes, simply run:

inkscape ./figures

Whenever you create or save a file like:

./figures/picture.svg

inkwatch will automatically generate overlay files:

./figures/picture.pdf
./figures/picture.pdf_tex

If you delete picture.svg, the corresponding .pdf and .pdf_tex files will be deleted.

Avaliable options are:

inkwatch [DIR] (OPTIONS)

[DIR] - REQUIRED
  directory to watch for changes

(OPTIONS)
  --help or -h            Print this message
  --version or -v         Print version
  --inkscape-path [PATH]  Set path to inkscape binary
  --aux-prefix [STR]      Set prefix added to pdf and pdf_tex files
  --do-not-regenerate     Do not regenerate pdf and pdf_tex files at first run
  --not-recursively       Do not watch for changes in subdirectories

Build

Prerequisites:

Run:

cargo install inkwatch

Or build locally:

git clone https://github.com/JuTonic/inkwatch.git
cd inkwatch
cargo build --release

The binary will be created at ./target/release/inkwatch.

To install system-wide run:

cargo install --path .

Make sure that ~/.cargo/bin is in your PATH

Dependencies

~2–11MB
~82K SLoC