public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
To: Emmanuel Charpentier
	<emanuel.charpentier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	pandoc-discuss
	<pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
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:14:28 -0700	[thread overview]
Message-ID: <m2o8z4z3sr.fsf@johnmacfarlane.net> (raw)
In-Reply-To: <5ddf18fd-b35f-4bf2-99d0-03ca657adb28-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

Emmanuel Charpentier <emanuel.charpentier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

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

It wouldn't make sense to put formats  and extensions in the YAML
header: after all, whether a document can even HAVE a YAML header
is dependent on extensions.  What would you do if the YAML header
said to disable the yaml_metadata extension?  You'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.  For 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
             pandoc $< -o $@ --my-options-here...

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


  parent reply	other threads:[~2019-09-28 18:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-28 17:10 Emmanuel Charpentier
     [not found] ` <5ddf18fd-b35f-4bf2-99d0-03ca657adb28-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-09-28 18:14   ` John MacFarlane [this message]
     [not found]     ` <m2o8z4z3sr.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2019-09-28 18:38       ` Emmanuel Charpentier
     [not found]         ` <5e3c4113-1162-41fc-b348-8403976b93cb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-09-29 19:41           ` John MacFarlane
2019-09-29  6:23       ` Axel Kielhorn
     [not found]         ` <F829EA44-5A95-404B-9B05-76FE9ADE965B-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-09-29 18:17           ` BPJ

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2o8z4z3sr.fsf@johnmacfarlane.net \
    --to=jgm-tvlzxgkolnx2fbvcvol8/a@public.gmane.org \
    --cc=emanuel.charpentier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).