I currently have a project with a workflow that uses
pandoc in its Makefile to convert text from Markdown to LaTeX to PDF. This requires that a LaTeX engine be present in my path, or specified with the
--latex-engine option. The rest of my development is done in
cygwin64 on 64-bit Windows 7.
Somehow, I'd had this mostly working previously with an installation of MiKTeX, but I was becoming annoyed with receiving two User Account Control (UAC) prompts per compilation, presumably as MiKTeX checked for missing packages. After doing a full reinstall of MiKTeX 2.9 using the "64-bit Net Installer" and including all packages, now when I run the following Makefile (pared down from the original):
$(PANDOC) main.tex -o main.pdf --latex-engine="$(PDFLATEX)"
... I receive the following error:
pandoc.exe: /usr/bin/pdflatex not found. /usr/bin/pdflatex is needed for pdf output.
Makefile:4: recipe for target 'pdf' failed
make: *** [pdf] Error 41
I've confirmed that
/usr/bin/pdflatex does indeed exist, as a symlink to
pdftex.exe in the same directory. Putting a symlink in its place to
/cygdrive/c/Program Files/MiKTeX 2.9/miktex/bin/x64/pdflatex.exe (where the relevant MiKTeX binary is) doesn't help. What am I missing here?
It's worth noting that running
pandoc main.tex -o main.pdf from the Windows command line seems to work just fine, and gives no UAC prompts. Ideally, I would like a solution where I can run the same installation just as easily from either the Windows or cygwin command line, but being able to run it from cygwin is a must for my workflow (i.e., answers along the lines of "Why even bother with cygwin?" are not acceptable here). It seems there really ought to be a simple way to make this installation available to cygwin.