# How to set PATH variable to latex, so that I can use latex layer? [closed]

I installed the latest version of MacTex, and I am sure the latex is in the Libray/TeX/texbin/, I just don't know how to set the PATH variable, also I cannot install the AUCtex, I assume these two are the same PATH problem. I have no idea how to solve these.

• Can you compile a LaTeX document from the command line? How did you install AUCTeX? – giordano Oct 15 '16 at 8:13
• I could use LaTex and pdflatex to compile and get the output PDF file, even I got some warning like Underfull \hbox (badness 10000) in paragraph at lines 12--22. The problem is I could not directly use latex or pdflatex in the commend line to do it, I need give the full path (such as '/Library/TeX/texbin/latex blabla.tex), I think the problem is I don't have PATH variable to locate the executable. – bagMan Oct 15 '16 at 14:10
• What does this question have to do with Emacs? Yes, AUCTex is in Emacs, but this is a question about your OS PATH value, no? – Drew Oct 15 '16 at 15:50
• I'm voting to close this question as off-topic because it doesn't seem to be about Emacs. – Drew Oct 15 '16 at 15:50
• Ok, where should I change the PATH value, I am new with the shell and command line interface. I've looked up some similar problem, but I still don't know how to solve it. – bagMan Oct 15 '16 at 15:56

Try adding (setenv "PATH" "/usr/local/bin:/Library/TeX/texbin/:\$PATH" t)` to your .emacs :)