Brett on 23 Feb, 2021 12:51 PM
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.
on 23 Feb, 2021 03:20 PM
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...
Brett on 23 Feb, 2021 06:05 PM
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