I am a Newbee on Emacs and AucTex. I just get started several days ago and installed some packages as some tutorials go along.
I installed some packages:
counsel. In particular,
auctex has version 12.2.0.
I installed it yesterday, and I could do C-c C-a to preview it entirely. However, I cannot do preview-latex (C-c C-p C-p). It gives me error with lots of "under construction triangles":
TeX Output exited as expected with code 1 at Thu Apr 23 00:21:29 Running `Preview-PDF2DSC' with ``pdf2dsc _region_.pdf _region_.prv/tmpQ3JlTM/preview.dsc'' /bin/sh: pdf2dsc: command not found Preview-PDF2DSC exited abnormally with code 127 at Thu Apr 23 00:21:29 PDF2DSC sentinel: Opening input file: No such file or directory, /myworkingdirectory/_region_.prv/tmpQ3JlTM/preview.dsc
I did not install
ghostscript. After I installed, the problem is still exist.
I found this answer really helpful How to use Auctex in MacOS El Capitan? At least for Mac OS Catalina, one shall use
;; Auctex configurations (setenv "PATH" "/usr/local/bin:/Library/TeX/texbin/:$PATH" t) (setq exec-path (append exec-path '("/Library/TeX/texbin")))
to set the environment path.
Shout out to @frougon for his patience on me! His code also works
(setenv "PATH" (concat (getenv "PATH") ":/usr/local/bin:/Library/TeX/texbin")) (setq exec-path (append exec-path '("/usr/local/bin" "/Library/TeX/texbin")))