pdflatex not found

I am having problems using a post-process to compile with Pandoc. I get the following message ‘pdflatex not found. Please select a different --pdf-engine or install pdflatex’ I am on on Scrivener 3.0.3. The processing command that I am using is:

-r markdown+smart+fenced_divs -s --filter pandoc-crossref --filter pandoc-citeproc --filter pandoc-latex-environment  --pdf-engine=pdflatex --template=/Users/kyle/Documents/IT/Pandoc/templates/thesis.latex "<$inputfile>" -o "<$outputname>.pdf"

Pdflatex is installed on the following path (when I type ‘which pdflatex’ in the Terminal): ‘/Library/TeX/texbin/pdflatex’

Am currently getting around this by simply compiling to plain text and running Pandoc on the command line but I would like to compile straight from Scrivener.

Looks like I have solved my own problem by placing ‘/Library/TeX/texbin’ in the environment section of the processing options. Interestingly it looks like my Multimarkdown tables aren’t been processed. The leading ‘|’ of each line is being stripped.

Yup, the post-processing environment is pretty stripped down from what you might be more accustomed to when running a full interactive shell. You definitely need to add the texbin for any kind of LaTeX post-processing.

As for MMD pipe tables, you might need to use the pipe_tables extension, as documented in the Pandoc PDF.

You are right - that worked. Interestingly I have never used the pipe_tables extension on the command line and Pandoc has always created pipe tables correctly