gillescastel / inkscape-figures

Inkscape figure manager
MIT License
557 stars 119 forks source link

Saving the figure #34

Open cristianpjensen opened 3 years ago

cristianpjensen commented 3 years ago

When saving the figure on macOS, using cmd+S, the figure is not automatically saved as a pdf and pdf_tex file. I have to manually use cmd+shift+S to save it as pdf. The file is only saved as SVG when using cmd+S.

Shouldn't the file be automatically saved as pdf when saving the file, according to the README?

pstaerk commented 3 years ago

Had the same problem. Unfortunately the automatic save does not work for me on ubuntu as well.

pstaerk commented 3 years ago

Just ran the debug option that i found in the closed issues. My inkscape version is Inkscape 0.92.5 (2060ec1f9f, 2020-04-08), which resulted in the wrong savecode in the script. Manually fixing the command worked, but I am unsure why the inkscape_version_number < [1, 0, 0]: did not work in my case.

cristianpjensen commented 3 years ago

I am running inkscape on the 1.1 beta version, I am getting [1, 1, 0] correctly as output. I don't know why the autosave function isn't working for me. Does the autosave only work on < 1.0 or maybe only on linux? I am using inkscape-figures watch before going into vim.

kiryph commented 2 years ago

@cristianpjensen @pstaerk Did you install fswatch, e.g. via $ brew install fswatch?

It is used by main.py for non-linux systems:

https://github.com/gillescastel/inkscape-figures/blob/78d0572a7e101d0df45c0b9f43b8005845ae1ded/inkscapefigures/main.py#L102-L105

https://github.com/gillescastel/inkscape-figures/blob/78d0572a7e101d0df45c0b9f43b8005845ae1ded/inkscapefigures/main.py#L230-L232

You should find a running background job with

❯ pgrep fswatch
39997

see also https://github.com/gillescastel/inkscape-figures/issues/31