“PDFlatex not installed”: How to fix

Since upgrading to Emacs 29.4, I haven’t printed to pdf yet until I tried to export the file over the weekend. To my dismay, the conversion failed because according to emacs pdflatex is not installed. I checked the required apps and files and found everything intact. So why isn’t it working? Is it because of the emacs upgrade and it made changes affecting pdf export? Well, kinda it did, and here’s why and how I made it to work on my computer. Disclaimer: This is how I did it and may not be the same the solution to your problem. I list here the different ways to locate and ways to declare the pdflatex path therefore you can use one or any combination and see what works.

  • Hardware & OS : Macbook Pro M1 iOS 15.5 (24F74)
  • Emacs version: 29.4
  • Doom core: 3.0.0
  • Doom modules version: 25

Process:

Step 1. Download MacTex 2025 (mactex.pkg) here: https://www.tug.org/mactex/mactex-download.html


  • This is a large file, about 6GB+ but I think this is better than the lighter version to make sure that the necessary packages are installed and to maximize the capacities of Latex especially is you use maths symbols and/or citations, or simply want to export your org file to PDF.

The package includes Ghostscript the following gui programs:

  • TexShop
  • TexLive Utility
  • LaTeXit
  • hintview
  • BibDesk

Check MD5 are the same with your downloaded file. In Terminal type in MD5 then the location mactex.pkg

Follow the installer instruction and in case you encounter installation errors the website has instructions on how to troubleshoot.

Step 2. Once installed, open TeXShop. Let’s test is pdf export is working:

Click Template and choose Latex Template. It will open a file that looks like this:

In between the headings \begin{document} and \end{document}, add any text and save the file. You can save it as Untitled. Example:

 \begin{document} \maketitle %\section{} %\subsection{} 
ENTER TEXT HERE 
\end{document}

Then on the leftmost of the toolbar click on Typeset. The app will automatically generate a pdf file. Yey! That’s it.

Step 3. Open your terminal and enter which pdflatex

If it is not found, don’t worry we’ll tell the computer where to find it.

find / -name pdflatex

or

find / -type d -iname ’pdflatex’ 2> /dev/null

Step 4. So could it be that pdflatex is not installed in its proper location? Let’s open TexLive Utility.

Under Actions, press the option key then choose Install TeXLive Manager.

If you encounter an online article about tlmgr, TeXLive Utitlity is the gui version so don’t fuss about it in the terminal not finding tlmgr, or even use sudo tlmgr.

After installing tlmgr, you can update the other packages.

Step 5. Now here is the important part. You can actually go to this point immediately. Haha! If you already had pdflatex installed before the upgrade, just open your bash or zshrc file and change the previous version location to the updated version. Mine was 2022, I changed it to 2025, because that is still the same /usr/local/texlive location but since we installed MaacTex 2025, it placed itself in the 2025 folder. Btw, I think I deleted the old installation of MacTex before installing the 2025 version. Deleting the old distrubution is not necessary.

Update or add to bash:
export PATH="/usr/local/texlive/2025/bin/universal-darwin/:$PATH"
export PDFLATEX=/usr/local/texlive/2025/bin/universal-darwin//pdflatex

 Now that you know the path, do a which pdflatex  in Terminal to test if the computer can see pdflatex.

Find path of pdflatex via terminal:
which pdflatex
/usr/local/texlive/2025/bin/universal-darwin//pdflatex

Step 6. Let’s open to Emacs and see if it can find pdflatex with MX-getenv.  Open your emacs folder ( / .emacs ) and find the env file. Mine is in .emacs.d/.local/  If you find the line below, then pdf is registered.

"PDFLATEX=/usr/local/texlive/2025/bin/universal-darwin//pdflatex"

Step 7. Open emacs and test if emacs gets the memo. You can also add the line below in the config file.

#+begin_src emacs-lisp :tangle yes
 (add-to-list 'load-path "/usr/local/texlive/2025/bin/universal-darwin//pdflatex")
#+end_src

or

#+begin_src emacs-lisp :tangle yes
(setenv "PATH" (concat (getenv "PATH") ":/usr/local/texlive/2025/bin/universal-darwin"))
#+end_src

You can also export your org file to pdf using the toolbar Org > Export/Publish or MX-org-latex-export-to-pdf. That’s it!

I hope this helps. Next, we need lualatex to show unicode characters in the pdf file. Then make some templates for thesis, dissertation, transcription. etc.

Enjoy using Emacs. 🥳

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.