From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29344 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: BPJ Newsgroups: gmane.text.pandoc Subject: Re: Create multiple outputs from single defaults file Date: Thu, 7 Oct 2021 10:07:18 +0200 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000012be0805cdbec103" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36467"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCWMVYEK54FRBQ6V7KFAMGQEKDKIO5Y-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Oct 07 10:07:33 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wr1-f57.google.com ([209.85.221.57]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mYORB-0009In-EC for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 07 Oct 2021 10:07:33 +0200 Original-Received: by mail-wr1-f57.google.com with SMTP id k16-20020a5d6290000000b00160753b430fsf4037871wru.11 for ; Thu, 07 Oct 2021 01:07:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1633594053; cv=pass; d=google.com; s=arc-20160816; b=KbB+z+BALm7RA6oasTk0bOP0Gp7QXkr+4pRV4XII593IGrIi4RsCjezG8CSkWIruZE m8O0s+nc6hZBOmRThsLRx7ZH3Lwji84EHzA8nR5xiaW+jUP+aZ7AMBR1flMlfSBLMFgQ uCOf9Em1PWFCbkXQ3rb6RyYsdBWwtKusuPsaYtZRJvqIJ4AupOUHmDIqQ9uHXeswZUwP yiC7ctLcyioQ8vXpExjaq5A/mko+DMoX9aLDpe+OjHjQ7v9Tt/LSvGbBi9VFR5WsMJcL vVCTIiKk/RZ4ZKxWIV8chl1ZSDEjNCcBOJpToB2d5OAFQ3c7fCtzBDpY3A87G4EbGOPq UiJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date :from:in-reply-to:references:mime-version:sender:dkim-signature :dkim-signature; bh=Y5bJmsraOI1NMKIzOJG7at/Em6z6hIMQaMSuq7hRydI=; b=xKjmwW1b81r+RLZ9evcx0mvmzLCV20aPXFffjA7fU313BLUh8bqN8AxhjMkU3dHPpV bLeivjxzuZvG4sHJ3s4926kazD4HbPpqA0KX+oZWAC2CNZj4u6mdLKY1fsF/kW48P4s6 2kIT2AuNgOpgaylDNo/nSCdeLBOxXGJRowygqSGYdvQv5mh/C09bGsMLP/16SDdinNgE SN6LMkf2F3oSje0tGAk3x7tyPWKr4fKyA4q+uKGNfkSlx1n5WlNVl75lPF6PtSo6s9ee P/vEHB66jPuynnDsaDm1jzli9eQ8cVZL4eKbRNrpVdSO6XBv8KXUfVmQupp7BBMgW/WH U6eg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=B0Yh6j2M; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::12d as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:mime-version:references:in-reply-to:from:date:message-id :subject:to:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=Y5bJmsraOI1NMKIzOJG7at/Em6z6hIMQaMSuq7hRydI=; b=CiFg/Jy1F5tILWXsTx8KbqzodAzE74Y/VdQI4/CXovs0GWfqZOn6/usEtIZ2zJdu1H KR1gg7pyZPKr3EkBqHSF9nLbDEGXr0cMn3HAcLfz/pTyHG+tfr1PZBeTquPtrMgpt5ex mRQyrJKO4jjc+k4NtZLlv484jHVeOlnmgdQQbxHoCTXEOW3pwUsgPbS5UQCUL1DCDkoO 9393gZI3qcgYrT98GuPaLxj3RldmOlSPsYbr4KCv3ytMgltkeEfI3V8Zd48c5550/CgK 9ffvIyO2hthJUF/bBA7kEHKi+DfyiMCvfmlloufXrx32AUEscLsIS6xH/ojJulLNkzM8 lRjQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=Y5bJmsraOI1NMKIzOJG7at/Em6z6hIMQaMSuq7hRydI=; b=kx08hkfS3IhDf6ns9CElBBG4xEmOH+yM2MTM7yQuL/8ZbT199FL55szixFbcmjOGRB umMGJq5VLt01GQ2V1RCwBj8pmowEo/fE2Ldmq3KuyDx7XzimAB112S2aaE1gQJeIo6Ne kO8OezmO3X2yM4t7oHLD8fchKPE5Kb4bFezi9kVu7Y95SccLLQ4SngvM9sYrKHYWelCJ rCmJTi1Sq2rfeE8iGC6NEckMQVcGWlp/Be6gPimpBxSZliOV8PAhGwmYvLF7En5+sQ8I tqiWL8Iur8Ji0urllxw/Y2PLnIu8rgjXNR1uD58w4pyiiLVf3hLIbzAsr3ff3X4Op6aL 9B5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:mime-version:references:in-reply-to:from :date:message-id:subject:to:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=Y5bJmsraOI1NMKIzOJG7at/Em6z6hIMQaMSuq7hRydI=; b=aAPkEKeNoqF7AFwf0vecRBLpNQ6sAhZqfiRfTlLDXxeCdi5i31SQY+5gO3iGcHCh1c 0UMpZn85/SNxaMIXB3DSXH6DmEiIkZZE2FPIVe9NA8y/CNOiT3waah4pkun/JTsgbRwp I0glLOiqAWq4B46FFjj5kgtzkfBqsmEJLZDnxKCR7/FWyOAISuuRqWE0AP9jhiN2GHut tSguay1bv1im41v4BEPEJTy3qz6Zw7Yyn+GwLzdRuQg4Zh1Ipu/sSa645IFlf0hB/UTe zB5x/xYh3dlPEidSVNP+Do4lg8GMGO1fRmwj6yLSSaEsiETEAAPEfqC/3ai2AeDUnHxl XgGA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM530CsBcAPfwYypQh4M0Pd0ZI/X3/4soMGGd77y5gmZs1cIacwMiD pHyo6HRhNgRIZ7CCJoSngfc= X-Google-Smtp-Source: ABdhPJwYvKm0BmObxCHm89YrNDkZgXmj3u1XRDfnEK+O9bZWrP0nRLnxRvtlIFc2QdkH5UBWn4fKgg== X-Received: by 2002:a7b:c006:: with SMTP id c6mr3100323wmb.30.1633594053150; Thu, 07 Oct 2021 01:07:33 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:adf:a285:: with SMTP id s5ls385875wra.1.gmail; Thu, 07 Oct 2021 01:07:30 -0700 (PDT) X-Received: by 2002:a5d:690c:: with SMTP id t12mr3620351wru.56.1633594050776; Thu, 07 Oct 2021 01:07:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633594050; cv=none; d=google.com; s=arc-20160816; b=rOA6qW1ijN2+mRmhS/0e5wO7RnGjfHeFfrvoHb/5EE3e0MbAwNqbhvTObwHJGOZ/D6 BfuxlG1u7/ZSq+F50J2PRS6fojZMUeCuivernQru5vIemxWBpXdOUCdJugiHTB93PemQ WGrVObLnu3GDFU6yLO59KvmT8bRTKzoDbA8ERyWVEZdhf+4jNLcQKnhychgbaoIywSmg 5GFXB1Rn/NRvT3+ZYgWl8yqYw4IhLer5qTrd018kKNyEVqe8JF1yKkUIlBBvSsk3CB/r //u4BiVpNoX1VahJazFS2Ul5gOxQti46NSZeUZGR8WX5m++3E++Ej/mHQEF7AbvOrX0K 61jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=oO4P8AGhksJZa14Rfychrgx0qUG5IzY1ngEQYcmYXkA=; b=wQsqePtxKc3lnvSk573Vw0hlUBylTuaK96vYA7WrwGnYnqOYn9AAfK4QOH6bAU8qUt uIPjRp/Jlq6yN63u50JNQYTwWzqc7Ege+WdOrLB9oh4El5avpkzgrlmkAZZpPhgGG2Bz 7PUeIRALWnXqu3DOeuT4W59KiI8dYFXhHIK4rP82gkdLIlKA7iwFRrG9YSi33u82y7wp otV2+yc4H2ktaz0NbcLA5RtK5mAtsIrGNqR5mi4AguCe5BWJ2rOhPz+JGMTC2aFR4Znl Cne8gcmNnIYlOP92ZZLPDVX0hauhpW0R7NATVjVxwTQSg1/TdYshCBZCzxJm/ImGTH3e ST8A== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=B0Yh6j2M; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::12d as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com. [2a00:1450:4864:20::12d]) by gmr-mx.google.com with ESMTPS id d197si312509wmd.1.2021.10.07.01.07.30 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 Oct 2021 01:07:30 -0700 (PDT) Received-SPF: pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::12d as permitted sender) client-ip=2a00:1450:4864:20::12d; Original-Received: by mail-lf1-x12d.google.com with SMTP id z11so13264667lfj.4 for ; Thu, 07 Oct 2021 01:07:30 -0700 (PDT) X-Received: by 2002:a05:6512:3b93:: with SMTP id g19mr2897708lfv.583.1633594050263; Thu, 07 Oct 2021 01:07:30 -0700 (PDT) In-Reply-To: X-Original-Sender: melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=B0Yh6j2M; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::12d as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:29344 Archived-At: --00000000000012be0805cdbec103 Content-Type: text/plain; charset="UTF-8" Den ons 6 okt. 2021 13:14Pranesh Prakash skrev: > > Dear all, > > Since pandoc can now reference multiple defaults files within a single defaults file, I thought it would be possible to run a single command to generate multiple outputs. It isn't. Pandoc only ever produces a single output per run, unless something has changed very recently. > > > ``` > > $ cat defaults.yaml > > --- > > # General options > > defaults: > > - defaults/cis_ihrl_69a.defaults.yaml > > - defaults/cis_ihrl_69a.html.defaults.yaml > > - defaults/cis_ihrl_69a.pdf.defaults.yaml > > ... > > ``` > > > The files `cis_ihrl_69a.html.defaults.yaml` and `cis_ihrl_69a.pdf.defaults.yaml` have different `to:` lines. I'd expect both an HTML output as well as a PDF output when I do: You can invert the pattern by having a file, say `common.yaml`, which contains the settings common to HTML and PDF output and include it from `html.yaml` and `pdf.yaml`: ``````yaml to: html defaults: - common.yaml `````` ``````yaml to: latex pdf-engine: xelatex defaults: - common.yaml `````` 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! -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhBMDq22wSp0Z%3D%3DAgxRf7e-b4M%2BxZpddv7UjA8_Z2kW2zw%40mail.gmail.com. --00000000000012be0805cdbec103 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Den ons 6 okt. 2021 13:14Pranesh Prakas= h <the.solipsist-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:



You can invert the p= attern by having a file, say `common.yaml`, which contains the settings com= mon to HTML and PDF output and include it from `html.yaml` and `pdf.yaml`:<= /div>

``````yaml
to: html
defaults:
= =C2=A0 - common.yaml
``````
<= br>
``````yaml
to: latex
pdf-engine: xelatex
defaults:
=C2=A0 - common.yaml
``````

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

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

document.pdf: document.md pdf.yaml co= mmon.yaml
pa= ndoc -d pdf.yaml $< -o $@
``````

Still nicer than including a loooong com= mand line in the Makefile!

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to
pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://g= roups.google.com/d/msgid/pandoc-discuss/CADAJKhBMDq22wSp0Z%3D%3DAgxRf7e-b4M= %2BxZpddv7UjA8_Z2kW2zw%40mail.gmail.com.
--00000000000012be0805cdbec103--