0

WHAT WORKS FINE.

When I compile a .tex file with C-c C-c, emacs knows that it should use pdflatex. I don't really know how, because I don't see pdflatex in my .emacs nor init.el (I can't find an .emacs.el file). On the other hand, which pdflatex returns the absolute path /Library/TeX/texbin/pdflatex so emacs knows where to find it.

WHAT I CAN'T MAKE TO WORK.

I recently package-install'ed markdown-mode, as well as pandoc using brew install pandoc. When I run C-c C-c m to compile, I get markdown failed with exit code 127. I think it means that emacs is not able to find pandoc. For one thing, pandoc is not listed under package-activated-list, but I guess it could never be there since pandoc is not an elisp package (is that correct?). On the other hand, which pandoc returns the absolute path /usr/local/bin/pandoc so it's not a problem of pandoc not being able to be found.

Following this answer I could add (setq pandoc-binary "/usr/local/bin/pandoc") in my .emacs, but I am not sure where since I don't see any other non-elisp packages included there. But again, I don't see any such line for pdflatex in my configuration files (.emacs or init.el), so this wouldn't answer my question:

How does emacs know to use pdflatex and not pandoc? In other words, which other files contain further configuration parameters?

1

You probably use the AUCTeX package to work on .tex files. This package actively searches for some programs related to TeX or LaTeX work. It's authors wrote that.

For markdown-mode this just wasn't done. For whatever reason. Maybe there are just too many different markdown converters out there that it makes sense to let the user decide. Thus, they gave you markdown-command. Please note, that markdown-mode does'nt use the pandoc-binary variable. Use markdown-command instead.

TL;DR: You can't really compare the approaches both packages take. One puts more effort into working out of the box, the other doesn't.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.