This works! Thank you!

On Monday, August 2, 2021 at 2:15:33 AM UTC+4 John MacFarlane wrote:

for f in *.md; do pandoc --pdf-engine=/Library/TeX/texbin/pdflatex "$f" -s -o "${f%.txt}.pdf"; done

SlyFox <ivan.c...@gmail.com> writes:

> So how do you combine the two commands to batch convert?
>
> for f in *.md; do pandoc "$f" -s -o "${f%.txt}.pdf"; done
>
> --pdf-engine=/Library/TeX/texbin/pdflatex
>
> On Wednesday, June 9, 2021 at 7:40:37 PM UTC+4 John MacFarlane wrote:
>
>> "Jason Davies" <ophi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>>
>> > Hi folks,
>> >
>> > I just tried to convert three short Word files one at a time; one worked
>> > fine but two gave errors like this:
>> >
>> > pandoc(24405,0x209984e00) malloc: can't allocate region
>> > :*** mach_vm_map(size=1048576, flags: 100) failed (error code=268435465)
>> > pandoc(24405,0x209984e00) malloc: *** set a breakpoint in
>> > malloc_error_break to debug
>> > pandoc: pdflatex: createProcess: runInteractiveProcess: exec: resource
>> > exhausted (Cannot allocate memory)
>> >
>>
>> I just got an M1 mac, and I ran into this same error.
>>
>> I found that if I fully specify the pdflatex path, it works:
>>
>> pandoc -o my.pdf --pdf-engine=/Library/TeX/texbin/pdflatex
>>
>> It's a bit mysterious why this should be needed, since
>> `which pdflatex` returns this path!
>> And running pandoc with --verbose shows that the PATH is
>> correctly passed through to the process running pdflatex.
>>
>> Anyone have any ideas? AT least this gives a workaround...
>>
>
> --
> You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discus...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/c70c1da4-1ec9-4d34-aed3-7abf1c689adan%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/90890444-d6c0-43e3-a8be-9c005c750e4dn%40googlegroups.com.