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.