Have you googled "make for windows"?

The greatest advantage of make is that if you list all source files, default files, metadata files, filters etc. as prerequisites for the output files make will run pandoc for each individual output file if and only if any of the prerequisite files for that output file has been changed.
Moreover you don't really need to list every common prerequisite for every output file. You can just write a line with all the output files on the lhs and all the common prerequisites on the rhs.

Den tors 7 okt. 2021 13:38Pranesh Prakash <the.solipsist-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
On Thursday, 7 October, 2021 at 1:37:34 pm UTC+5:30 BP wrote:
It isn't. Pandoc only ever produces a single output per run, unless something has changed very recently.

Thanks. That clarifies this.

Then you can use a Makefile to run pandoc once for each output with each defaults file:
(watch out for spaces where there should be tabs!)

``````make
all: document.html document.pdf

.PHONY: all

document.html: document.md html.yaml common.yaml
pandoc -d html.yaml $< -o $@

document.pdf: document.md pdf.yaml common.yaml
pandoc -d pdf.yaml $< -o $@
``````

Still nicer than including a loooong command line in the Makefile!

Thanks for this. I've never used a Makefile before, and thought I'd try. I renamed `defaults/cis_ihrl_69a.defaults.yaml` to `defaults/cis_ihrl_69a.common.defaults.yaml` to make it clearer what it was. I included a reference to it in both the html and the pdf defaults files. I then created this as my Makefile:

```make
.PHONY: all html pdf

all : html pdf

html : defaults/cis_ihrl_69a.html.defaults.yaml source/cis_ihrl_69a.md
pandoc -d $<

pdf : defaults/cis_ihrl_69a.pdf.defaults.yaml source/cis_ihrl_69a.md
pandoc -d $<
```
That works great. However, I was hoping for something that would work easily on Windows as well, for collaborators.  I think I'll just have to provide them instructions to run two `pandoc -d` commands in sequence.

--
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-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/7a342f8f-63d7-45d0-9a5d-8e820cae1826n%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/CADAJKhAQJ718Oj0Z%3D23UvxBGgoQr%3DFwa_U3eh8PQWFpodagtRQ%40mail.gmail.com.