I am trying to emulate the command presented in this Stack Exchange question, about
...implement a way in Mathematica to export graphics to PDF and then use Inkscape from within Mathematica to post process the resulting output with the pdf-latex export option in Inkscape.
The code snippet is as follows:
Module[{fig, str = NotebookDirectory[]},
fig = Plot[Cos[2 x], {x, 0, 2 Pi},
AxesLabel -> {"$x$", "$\\cos{2x}$"}];
Export[str <> "in.pdf", fig];
RunProcess[{"inkscape", "-z", "-D", "--file=" <> str <> "in.pdf",
"--export-pdf=" <> str <> "out.pdf", "--export-latex"},
ProcessEnvironment ->
Association[
DeleteCases[GetEnvironment[All], "LD_LIBRARY_PATH" -> _]]];]
But I get the following error when executing the command:
RunProcess: Program inkscape not found. Check Environment["PATH"].
I tried also "/Applications/Inkscape.app/"
as the path argument to RunProcess
but the same error is printed.
I am running Mac OS 10.14.6, with Inkscape 1.0.0.
Can anyone indicate me with a correct path? Or am I missing something else about Inkscape here?