gedit external tools cannot locate latexmk












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.










share|improve this question



























    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.










    share|improve this question

























      0












      0








      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.










      share|improve this question














      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.







      gedit latex






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 22 at 15:12









      neutrinoneutrino

      113




      113






















          1 Answer
          1






          active

          oldest

          votes


















          0














          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.






          share|improve this answer
























          • Thanks, it worked. Is there a robust method as gedit handles latex(which is in the same directory) very well. Here are the contents of my bashrc file export PATH=/usr/local/texlive/2018/bin/x86_64-linux:$PATH; export MANPATH=/usr/local/texlive/2018/texmf-dist/doc/man:$MANPATH; export INFOPATH=/usr/local/texlive/2018/texmf-dist/doc/info:$INFOPATH;

            – neutrino
            Jan 22 at 17:15













          • If latexmk was installed from latexmk package, then it should be located in /usr/bin/latexmk. AFAIK the /usr/bin is a standard path. @neutrino for me it seems that you chose non-optimal method of installing LaTeX tools...

            – N0rbert
            Jan 22 at 19:57













          • I understood my problem from askubuntu.com/questions/694021/…. It appears in addition to bashrc, one has to edit path in /etc/environment as well.

            – neutrino
            Jan 22 at 21:15













          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1111986%2fgedit-external-tools-cannot-locate-latexmk%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          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.






          share|improve this answer
























          • Thanks, it worked. Is there a robust method as gedit handles latex(which is in the same directory) very well. Here are the contents of my bashrc file export PATH=/usr/local/texlive/2018/bin/x86_64-linux:$PATH; export MANPATH=/usr/local/texlive/2018/texmf-dist/doc/man:$MANPATH; export INFOPATH=/usr/local/texlive/2018/texmf-dist/doc/info:$INFOPATH;

            – neutrino
            Jan 22 at 17:15













          • If latexmk was installed from latexmk package, then it should be located in /usr/bin/latexmk. AFAIK the /usr/bin is a standard path. @neutrino for me it seems that you chose non-optimal method of installing LaTeX tools...

            – N0rbert
            Jan 22 at 19:57













          • I understood my problem from askubuntu.com/questions/694021/…. It appears in addition to bashrc, one has to edit path in /etc/environment as well.

            – neutrino
            Jan 22 at 21:15


















          0














          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.






          share|improve this answer
























          • Thanks, it worked. Is there a robust method as gedit handles latex(which is in the same directory) very well. Here are the contents of my bashrc file export PATH=/usr/local/texlive/2018/bin/x86_64-linux:$PATH; export MANPATH=/usr/local/texlive/2018/texmf-dist/doc/man:$MANPATH; export INFOPATH=/usr/local/texlive/2018/texmf-dist/doc/info:$INFOPATH;

            – neutrino
            Jan 22 at 17:15













          • If latexmk was installed from latexmk package, then it should be located in /usr/bin/latexmk. AFAIK the /usr/bin is a standard path. @neutrino for me it seems that you chose non-optimal method of installing LaTeX tools...

            – N0rbert
            Jan 22 at 19:57













          • I understood my problem from askubuntu.com/questions/694021/…. It appears in addition to bashrc, one has to edit path in /etc/environment as well.

            – neutrino
            Jan 22 at 21:15
















          0












          0








          0







          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.






          share|improve this answer













          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.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 22 at 15:19









          RinzwindRinzwind

          206k28395527




          206k28395527













          • Thanks, it worked. Is there a robust method as gedit handles latex(which is in the same directory) very well. Here are the contents of my bashrc file export PATH=/usr/local/texlive/2018/bin/x86_64-linux:$PATH; export MANPATH=/usr/local/texlive/2018/texmf-dist/doc/man:$MANPATH; export INFOPATH=/usr/local/texlive/2018/texmf-dist/doc/info:$INFOPATH;

            – neutrino
            Jan 22 at 17:15













          • If latexmk was installed from latexmk package, then it should be located in /usr/bin/latexmk. AFAIK the /usr/bin is a standard path. @neutrino for me it seems that you chose non-optimal method of installing LaTeX tools...

            – N0rbert
            Jan 22 at 19:57













          • I understood my problem from askubuntu.com/questions/694021/…. It appears in addition to bashrc, one has to edit path in /etc/environment as well.

            – neutrino
            Jan 22 at 21:15





















          • Thanks, it worked. Is there a robust method as gedit handles latex(which is in the same directory) very well. Here are the contents of my bashrc file export PATH=/usr/local/texlive/2018/bin/x86_64-linux:$PATH; export MANPATH=/usr/local/texlive/2018/texmf-dist/doc/man:$MANPATH; export INFOPATH=/usr/local/texlive/2018/texmf-dist/doc/info:$INFOPATH;

            – neutrino
            Jan 22 at 17:15













          • If latexmk was installed from latexmk package, then it should be located in /usr/bin/latexmk. AFAIK the /usr/bin is a standard path. @neutrino for me it seems that you chose non-optimal method of installing LaTeX tools...

            – N0rbert
            Jan 22 at 19:57













          • I understood my problem from askubuntu.com/questions/694021/…. It appears in addition to bashrc, one has to edit path in /etc/environment as well.

            – neutrino
            Jan 22 at 21:15



















          Thanks, it worked. Is there a robust method as gedit handles latex(which is in the same directory) very well. Here are the contents of my bashrc file export PATH=/usr/local/texlive/2018/bin/x86_64-linux:$PATH; export MANPATH=/usr/local/texlive/2018/texmf-dist/doc/man:$MANPATH; export INFOPATH=/usr/local/texlive/2018/texmf-dist/doc/info:$INFOPATH;

          – neutrino
          Jan 22 at 17:15







          Thanks, it worked. Is there a robust method as gedit handles latex(which is in the same directory) very well. Here are the contents of my bashrc file export PATH=/usr/local/texlive/2018/bin/x86_64-linux:$PATH; export MANPATH=/usr/local/texlive/2018/texmf-dist/doc/man:$MANPATH; export INFOPATH=/usr/local/texlive/2018/texmf-dist/doc/info:$INFOPATH;

          – neutrino
          Jan 22 at 17:15















          If latexmk was installed from latexmk package, then it should be located in /usr/bin/latexmk. AFAIK the /usr/bin is a standard path. @neutrino for me it seems that you chose non-optimal method of installing LaTeX tools...

          – N0rbert
          Jan 22 at 19:57







          If latexmk was installed from latexmk package, then it should be located in /usr/bin/latexmk. AFAIK the /usr/bin is a standard path. @neutrino for me it seems that you chose non-optimal method of installing LaTeX tools...

          – N0rbert
          Jan 22 at 19:57















          I understood my problem from askubuntu.com/questions/694021/…. It appears in addition to bashrc, one has to edit path in /etc/environment as well.

          – neutrino
          Jan 22 at 21:15







          I understood my problem from askubuntu.com/questions/694021/…. It appears in addition to bashrc, one has to edit path in /etc/environment as well.

          – neutrino
          Jan 22 at 21:15




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1111986%2fgedit-external-tools-cannot-locate-latexmk%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

          Mangá

           ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕