RE: LaTeX and the PATH variable...
Hi pj123,
There could be several reasons why this happened. But basically the path to the TeX binaries must no longer be in your PATH variable. So to solve your problem, you have to re-add the proper path to your PATH variable.
I use the MacTeX.pkg version of 2012 Tex Live, so it depends on which particular version you use and to where the binaries may be located. First check if you have a /usr/texbin directory on your boot drive, and if so, is there a "latex" executable in this directory? If this is the case, then you will need to add this directory to your PATH variable. You might use the following code to do so (execute this temporarily in the Terminal window that you wish to run LaTeX from):
Code:
PATH=/usr/texbin:$PATH; export PATH
[It is important not to include any spaces besides the ones that I have included above.]
If this works and you can now run LaTeX, then you might consider adding this line to your ~/.bashrc file, if you have one. Or make a bash shell script with this line in it to execute before you attempt to LaTeX anything.
If you didn't find an /usr/texbin directory, then you might check for the /usr/local/texlive/2012/bin/x86_64-darwin directory and see if the "latex" executable is there. If so, then add this directory to your PATH variable via a bash command line similar to the above code line.
If you are using Tex Live, then in your System Preferences there is a TeX Distribution pane in the Other line. Make sure that your TeXLive-2012 distribution is checked. If you are using TeX Live, then run the TeX Live Utility.app and under Actions do "Update All Packages".
When you installed Tex Live initially, did you install it for all users? Have you changed your user account?
Do you use Fink or MacPorts? These systems also have versions of LaTeX packages, and sometimes if you install something from Fink or MacPorts it will automatically install teTeX which may conflict with your Tex Live installation. For instance, if you install fig2ps in MacPorts it will install teTeX which includes its own LaTeX, and depending upon how your PATH variable is setup, the MacPorts "latex" may be executed instead of the Tex Live "latex". All of these things should be checked.
Good luck,
Switon
P.S. If it is not your PATH variable that is giving you this problem, then you may have more serious issues. Find the "latex" executable on your system...it is probably a link to the "pdftex" executable. Try running this executable directly from the command line, with something like:
Code:
/usr/texbin/latex testlatexfile.tex
If this works, then do a "which latex" and see if it finds your latex. If not, then you are back to a PATH problem.