public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: metadata changes merged
Date: Wed, 26 Jun 2013 10:16:11 -0700	[thread overview]
Message-ID: <20130626171611.GB1663@protagoras.phil.berkeley.edu> (raw)
In-Reply-To: <51CB17AE.5090108-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

+++ BP Jonsson [Jun 26 13 18:32 ]:
> 2013-06-26 18:15, John MacFarlane skrev:
> >The implemented system is a bit different than what I described before
> >(and not yet documented at all).  Markdown files can have a YAML
> >metadata block, but it must come at the very beginning of the file.
> >(Previously I'd considered allowing metadata anywhere in the file,
> >but I'm not sold on that -- external tools really wouldn't find metadata
> >that is not at the beginning of the file useful, because you'd have
> >to parse markdown to discover which sections were metadata.  I'm still
> >considering this issue.)
> 
> I suppose you can still have the metadata in a separate file as
> long as pandoc sees that file first?
> 
>     pandoc --template foo metadata.yaml bar.mkd -o bar.pdf

Yes.

> What about concatenating several source files which all have
> YAML blocks at the beginning. Will pandoc ignore them, filter
> them out or what?

Currently pandoc would try to parse the YAML blocks inside
the file as text.

> >One nice thing about this new system is that you can, for example,
> >have a letter.latex template with fields like $to$, $salutation$,
> >$closing$.  Then a letter can begin with:
> 
> What about relative precedence of variables defined on the
> command line and in-file?

Currently pandoc does a "merge."  So, if you have an "author"
defined in metadata, and you specify an additional "author"
variable on the command line, pandoc will behave as if you
had given a list of two authors.

I'm really not sure what the optimal behavior is here.



      parent reply	other threads:[~2013-06-26 17:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-26 16:15 John MacFarlane
     [not found] ` <20130626161505.GA88705-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
2013-06-26 16:32   ` BP Jonsson
     [not found]     ` <51CB17AE.5090108-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-06-26 17:16       ` John MacFarlane [this message]

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=20130626171611.GB1663@protagoras.phil.berkeley.edu \
    --to=fiddlosopher-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).