pdflatex not found

Doron Shiffer-Sebba's Avatar

Doron Shiffer-Sebba

23 Feb, 2021 09:07 AM

Hello,

I am using Marked 2 on Mac Big Sur 11.2.1 with pandoc 2.11.4 and pdflatex 3.14. I am using a pandoc custom processor with arguments "--resource-path=/Users/doronshiffer-sebba/Dropbox/writing_resources/. --bibliography=library.bib --csl=american-sociological-association.csl -F pandoc-crossref -C -t pdf" but every time I try to render the file I get an error: "Error running custom processor pdflatex not found. Please select a different --pdf-engine or install pdflatex".

I have tried creating a symlink between /Library/TeX/Distributions/.DefaultTeX/Contents/Programs/texbin and /Library/TeX/texbin, which is in PATH, but this did not fix the issue.

Would appreciate any suggestions!

Many thanks,
Doron

  1. Support Staff 1 Posted by Brett on 23 Feb, 2021 12:51 PM

    Brett's Avatar

    First question: duress running pandoc with the exact arguments in marked work from the command line?

    Second question: why are you outputting to PDF? Marked can't properly display PDF output.

    Your PATH as you know it does not exist for a custom processor. It's run in a shell outside of your user. Is the path you specified for resources the one needed for pdflatex, or is it looking for it elsewhere? I do include /use/local/bin in the path, so you could install it there, or you could use a shell script that actually sourced your user files and then ran pandoc.

    - Brett

  2. 2 Posted by Doron Shiffer-S... on 23 Feb, 2021 03:20 PM

    Doron Shiffer-Sebba's Avatar

    Dear Brett,

    Thank you so much for your reply.

    First: Yes, pandocs from the command line works except instead of the "-t pdf" argument I write "-o blabla.pdf".

    Second: My whole problem is that when it produces the .md preview the .csl formatting does not appear correctly, so I thought forcing it into a pdf would produce the correct csl formatting. If you have another idea for producing the correct formatting I would really appreciate it!

    I'm not sure I understand the last point exactly. If the custom processor doesn't rely on PATH where does it look for (and fail to find) pdflatex? I'm sorry I don't quite understand what you mean by a shell script that sources my user files and then runs pandoc. When I use a shell script to run pandoc I have no problem - the problem is when I try to use Marked 2...

    Thanks so much for your help,
    Doron

  3. Support Staff 3 Posted by Brett on 23 Feb, 2021 06:05 PM

    Brett's Avatar

    Unfortunately I'm no expert with pandoc and have zero experience with
    the csl issue. Forcing into a PDF might fix formatting, but it will make
    Marked pretty useless. At that point you're better off just generating
    PDFs on the command line and viewing in Preview...

    What I'm referring to with the shell script is not running on the
    command line, but rather writing a shell script and using it as the
    processor instead of pandoc. The shell script would set your path up
    using `export PATH=` commands, then calling pandoc. Input is passed to
    the script via STDIN, so you can just `cat|pandoc [arguments...]`. It
    provides the ability to manually set up the environment in the way that
    works from the command line. It sounds like that might be more trouble
    for you than it's worth, though.

    I haven't heard from anyone else that there have been issues with
    formatting .csl in Marked, so either you have expectations that aren't
    feasible (e.g. exactly mimicking PDF output in HTML), or there are
    pandoc settings I'm just not familiar with and can't be of much help
    with.

    -Brett

  4. 4 Posted by Doron Shiffer-S... on 24 Feb, 2021 06:25 AM

    Doron Shiffer-Sebba's Avatar

    Dear Brett,

    Got it - thanks so much for your assistance! It may be that my expectations are too high but I will also try to play around with the csl itself to see if that changes anything..

    Best,
    Doron

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac