From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/23477 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Emmanuel Charpentier Newsgroups: gmane.text.pandoc Subject: Re: Options, extensions, variables : what can be specified in the YAML header of a Markdown file and what has to be on the command line ? Date: Sat, 28 Sep 2019 11:38:02 -0700 (PDT) Message-ID: <5e3c4113-1162-41fc-b348-8403976b93cb@googlegroups.com> References: <5ddf18fd-b35f-4bf2-99d0-03ca657adb28@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_522_561419455.1569695882597" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="94599"; mail-complaints-to="usenet@blaine.gmane.org" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBD62J4V3YQOBBC6RX3WAKGQESFEZT2I-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sat Sep 28 20:38:08 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-oi1-f186.google.com ([209.85.167.186]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1iEHbZ-000OUu-Ef for gtp-pandoc-discuss@m.gmane.org; Sat, 28 Sep 2019 20:38:05 +0200 Original-Received: by mail-oi1-f186.google.com with SMTP id u69sf4507904oia.13 for ; Sat, 28 Sep 2019 11:38:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=CwLRH+yA6XGJKqZbM1+sBo1ZnrxPRxIjzhKOR851Ink=; b=DykAukGDrpkqiBRj3JV8255mdfBlRqZZBmk9GOz5Olyx7pztFDQv8MTCuUy3KRSnRg LW5/zQZrAG0ul/KbwLUZSKpc7bans9YY3ZMP8ZAwMEj2nTvTHu4fz/45hrm3BHAPoFie irRW8A0u0KWLUs13WYK10oYgkHoDNovmPum6bp4nCmYu1dDu2id/xdLTjHb2+Zkxha3q GRy0Qbamt+XgOjcq7jO6/OkMspN3AqmzqMWqKw5bHzoOKIF6CAXtOApoK/RzvjUU4X6J iICpRe6H17UPbwfVs4HRLtW2guTZa3obogRhOdnDckX4gKyWR1+D638JbhaGaP8axJsH 4+VA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=CwLRH+yA6XGJKqZbM1+sBo1ZnrxPRxIjzhKOR851Ink=; b=S+6v/nCVKkTiOzGKueLmJRrKFDRDlMhcGKmUh6w6Q3KQ8m4svahNtmDJDKTYjj6J9m LshjMctQxAyQGJf30TZs/aJA/aMKbgDwzt+tNz6J8Cj5ixA7ubrnh3LrzDQgG6e5YHKc ay0ROBGR2zev7Rt9OdgaJOj1wj8ZT7CmJtE0Wi7sDIDpBBAUMg2Z5RNFbiDZpUMXq5KP GP90wS9TeyLZNU/GzVJmhxSHHO0VPEZZNIFkVBw1CPYoCYpAxcafxd5DgaldCPtG8y4+ PSuyUCjMXeRSTNzoYora5e6QBs861H/ufV8FCm83NhDnYrelM8pkWMnBH76iJb/epaAO n7GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=CwLRH+yA6XGJKqZbM1+sBo1ZnrxPRxIjzhKOR851Ink=; b=SRM5QV28s5vJmsbrh9Q9IZomNbmv4/5YPO27lEZklVrgfbTuMGXBDhBhRtynRqXEmx 2U8xSLS+A1PLo1SgOsS83UPZsP2593R951yAiqH0XNZTvMJNWoxSmXq/SkEfd0VbkQ6w J9gONuWI6hQ3ceiEKwUI02Qi2W9uDmV5FSfKAIjF0dLyiOyQ6ircVUpW4k9FNEoxK4cN vAZKaRrsU/2NA58xiqjSwLhUHsmGRsSwj4Yub2nBClzfubhdlmOyRoLyfaQcb/PxfTHq nKPSbg3G0bocK+yPYcjCM+gDGAQ1NcZPsUb+xyuUen+fkGypo6eIEq55x0tHZx9wIhck PGuQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAUgvYaDrX9M0pbWJyeo1EfzIDCjPHYWbdNjL2QzOGHx5Da3ot+Y Dkdx86ViWymUXfNsWRczpFw= X-Google-Smtp-Source: APXvYqzwzQoAphGGCtHOKfH0sPTDYSwjL3HGUdWEcjFKIozFKkQ7UUFL+l7aidOvNz9MnnI9+dA7rg== X-Received: by 2002:a9d:12ac:: with SMTP id g41mr7718224otg.362.1569695883909; Sat, 28 Sep 2019 11:38:03 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6830:1441:: with SMTP id w1ls790547otp.7.gmail; Sat, 28 Sep 2019 11:38:03 -0700 (PDT) X-Received: by 2002:a9d:aa8:: with SMTP id 37mr7876343otq.56.1569695883165; Sat, 28 Sep 2019 11:38:03 -0700 (PDT) In-Reply-To: X-Original-Sender: emanuel.charpentier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 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.org gmane.text.pandoc:23477 Archived-At: ------=_Part_522_561419455.1569695882597 Content-Type: multipart/alternative; boundary="----=_Part_523_802463970.1569695882597" ------=_Part_523_802463970.1569695882597 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable That's what I was afraid of... No way to have the document self-consistent.= =20 (BTW: A YAML option turning YAML off could result in an error message,=20 documenting the problem...). Thanks anyway ; a quick and precise answer. Back to the ol' drawing board... -- Emmanuel Charpentier Le samedi 28 septembre 2019 20:14:43 UTC+2, John MacFarlane a =C3=A9crit : > > Emmanuel Charpentier > writes:=20 > > > I wondered what part of the options, extensions and template variables= =20 > can=20 > > be specified in the YAML header of a Markdown file, thus ensuring that= =20 > the=20 > > "right" set of options is used at compilation. However, I have been=20 > unable=20 > > to find a description of what can be specified at command line.=20 > > It wouldn't make sense to put formats and extensions in the YAML=20 > header: after all, whether a document can even HAVE a YAML header=20 > is dependent on extensions. What would you do if the YAML header=20 > said to disable the yaml_metadata extension? You'd have a=20 > paradoxical document!=20 > > All template variables can be set via YAML metadata, because the=20 > writers populate variables from metadata values.=20 > > Command-line options can never be set via YAML metadata, in general,=20 > though in some cases it may seem as if they can. For example,=20 > you can specify `toc: true`; but this only works in formats where=20 > the only thing the `--toc` option has to do is set a `toc`=20 > template variable.=20 > > Rather than adding a comment to the source with installation=20 > instructions, I usually use a simple Makefile:=20 > > output.html: input.md=20 > pandoc $< -o $@ --my-options-here...=20 > > This way, I don't have to remember what options to use.=20 > I just type 'make' and it's done.=20 > > --=20 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 e= mail 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/5e3c4113-1162-41fc-b348-8403976b93cb%40googlegroups.com. ------=_Part_523_802463970.1569695882597 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
That's what I was afraid of... No way to have the docu= ment self-consistent. (BTW: A YAML option turning YAML off could result in = an error message, documenting the problem...).

Thanks an= yway ; a quick and precise answer.

Back to the ol&= #39; drawing board...

--
Emmanuel Charpe= ntier

Le samedi 28 septembre 2019 20:14:43 UTC+2, John MacFarlane a = =C3=A9crit=C2=A0:
Emmanuel Char= pentier <emanuel.c...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> I wondered what part of the options, extensions and template varia= bles can=20
> be specified in the YAML header of a Markdown file, thus ensuring = that the=20
> "right" set of options is used at compilation. However, = I have been unable=20
> to find a description of what can be specified at command line.

It wouldn't make sense to put formats =C2=A0and extensions in the Y= AML
header: after all, whether a document can even HAVE a YAML header
is dependent on extensions. =C2=A0What would you do if the YAML header
said to disable the yaml_metadata extension? =C2=A0You'd have a
paradoxical document!

All template variables can be set via YAML metadata, because the
writers populate variables from metadata values.

Command-line options can never be set via YAML metadata, in general,
though in some cases it may seem as if they can. =C2=A0For example,
you can specify `toc: true`; but this only works in formats where
the only thing the `--toc` option has to do is set a `toc`
template variable.

Rather than adding a comment to the source with installation
instructions, I usually use a simple Makefile:

output.html: input.md
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pandoc $< -o $@ --my= -options-here...

This way, I don't have to remember what options to use.
I just type 'make' and it's done.

--
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://groups.google.com/d/= msgid/pandoc-discuss/5e3c4113-1162-41fc-b348-8403976b93cb%40googlegroups.co= m.
------=_Part_523_802463970.1569695882597-- ------=_Part_522_561419455.1569695882597--