macostexmaker

How to open a tex file in Texmaker from terminal in MacOS?


In Ubuntu I could simply run from the terminal:

texmaker file.tex

which opened my tex file in Texmaker. In MacOS, the texmaker command is not found, even though I have Texmaker installed.

How can I achieve this in MacOS? Is there an equivalent command?


Solution

  • Once Texmaker is installed, you can add:

    alias texmaker="open -a texmaker"
    

    to your .profile. From now on, it should be possible to simply run from the command line:

    texmaker file.tex
    

    at the location where the file.tex is.