0

I am using following in gedit external tools

#!/bin/sh
file=${GEDIT_CURRENT_DOCUMENT_NAME%}
filename="${file%.*}"
ext=${file##*.}
latexmk $filename; xdg-open $filename.pdf

Wheni run the command, i got the following output

/home/quanta/.config/gedit/tools/new-tool-2: 27: /home/quanta/.config/gedit/tools/new-tool-2: latexmk: not found

I have latexmk installed and the file gets compiled easily in terminal using latexmk. Kindly guide me on why gedit is unable to locate latexmk.

1 Answers1

1

That has to be a problem with $PATH. Put the directory where you find latexmk (result of which latexmk) in front of the latexmk in your script.

Rinzwind
  • 309,379