From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/6653 Path: news.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: metadata changes merged Date: Wed, 26 Jun 2013 09:15:05 -0700 Message-ID: <20130626161505.GA88705@Johns-MacBook-Pro.local> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1372263319 3377 80.91.229.3 (26 Jun 2013 16:15:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Jun 2013 16:15:19 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDW7ZIEHTIIBBFVHVSHAKGQEFVUG7HA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Jun 26 18:15:21 2013 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ie0-f183.google.com ([209.85.223.183]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UrsNL-0001iR-T7 for gtp-pandoc-discuss@m.gmane.org; Wed, 26 Jun 2013 18:15:20 +0200 Original-Received: by mail-ie0-f183.google.com with SMTP id k5sf4586601iea.20 for ; Wed, 26 Jun 2013 09:15:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=x-beenthere:date:from:to:subject:message-id:mime-version:x-pgp-key :user-agent:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:x-google-group-id :list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type:content-disposition; bh=CkyTbSU4y/PoMhrmnQTB6+33IBvKXhh7ht/eun9mORA=; b=muR5Rv2y7/+Bh4PFShoG22OFbmmeqDXYX9RTvLywv2YYiMQEeNvyTpOMqEJfiM8Lux 9eoLJ8uHUE/tpguM0sNUTZlpal/JCpKV0qMwXQd36mSfxd/+bZvSapDttPVAZj6GoNeh hSiY1ozF2X+u0SwOCWKAsNZ7h1Aq2jxanfxvu8vSevOlFNQ2QJDo0bX6ch8ZcaFVKobX dl8GWU7Xln5VBWd6794hHH8YB4r+SwPRpaSBITel7R3fL4+6bvbG2ztlGFES8uxoKgFp 9RS1C79RE1kFmm+aTAN+z2nIKxi2YKHXYDNy9FIVMyDKcoZ8q4pTXH9jnfnPSUCwO6q8 pUWg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-beenthere:date:from:to:subject:message-id:mime-version:x-pgp-key :user-agent:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:x-google-group-id :list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type:content-disposition; bh=CkyTbSU4y/PoMhrmnQTB6+33IBvKXhh7ht/eun9mORA=; b=ZPfL2gFOa+wGQpvWSBK46RtuGWFQUiJV95NVgL0kwMebT7clqXmGKJ9/UgBPpwZwnl z0mexAvBOz5+++PKXZcClQMTlY77VrV7tk9h7ddV0oTbDq2+cI4KwkIUPP/gBaEijbAf 5R6K7zmtGsonF7sXX8zmg1yRV9A2Xyhz2CVpVayB5d6J6i+XXHl+IAYoNgku+aBTBGtC 4gi+Im5OWVVeZ1IowSzakpYjQIeVGEbbeUNypXdQn/BdI9msClJN4/rbWOZtO7Md7WpS 0g047AFD6cEHRxg4+l3q5yl9MKUIEVJORiB7uQY9GGNT8U+lI4vFIFXVQr624UktxpgU OaVA== X-Received: by 10.50.3.74 with SMTP id a10mr252192iga.2.1372263319049; Wed, 26 Jun 2013 09:15:19 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.50.8.105 with SMTP id q9ls719490iga.16.gmail; Wed, 26 Jun 2013 09:15:17 -0700 (PDT) X-Received: by 10.66.121.4 with SMTP id lg4mr1701732pab.41.1372263317885; Wed, 26 Jun 2013 09:15:17 -0700 (PDT) Original-Received: from cm04fe.IST.Berkeley.EDU (cm04fe.IST.Berkeley.EDU. [169.229.218.145]) by gmr-mx.google.com with ESMTPS id sd8si4541914pac.2.2013.06.26.09.15.17 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 26 Jun 2013 09:15:17 -0700 (PDT) Received-SPF: neutral (google.com: 169.229.218.145 is neither permitted nor denied by best guess record for domain of jgm-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org) client-ip=169.229.218.145; Original-Received: from li55-134.members.linode.com ([74.82.3.134] helo=johnmacfarlane.net) by cm04fe.ist.berkeley.edu with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (auth plain:jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org) (envelope-from ) id 1UrsNI-00030w-D1 for pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; Wed, 26 Jun 2013 09:15:17 -0700 Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 97E9ABB9E1; Wed, 26 Jun 2013 12:16:03 -0400 (EDT) X-PGP-Key: http://johnmacfarlane.net/jgm.asc User-Agent: Mutt/1.5.21 (2010-09-15) X-Original-Sender: fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 169.229.218.145 is neither permitted nor denied by best guess record for domain of jgm-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org) smtp.mail=jgm-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@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: Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-Subscribe: , List-Unsubscribe: , Content-Disposition: inline Xref: news.gmane.org gmane.text.pandoc:6653 Archived-At: I've merged in the (very extensive) metadata changes discussed earlier. If you are brave, you can try them. But before you can 'cabal install' the latest pandoc, you'll need to install the git version of pandoc-types and then recompile citeproc-hs. This procedure should work: git clone git://github.com/jgm/pandoc.git pandoc cd pandoc git submodule update --init git clone git://github.com/jgm/pandoc-types.git pandoc-types cd pandoc-types cabal install cd .. darcs get http://gorgias.mine.nu/repos/citeproc-hs/ cd citeproc-hs cabal install cd .. cabal install 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.) 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: --- to: | | Mr. John Smith | 25221 Lana Lane | Gotham, XY 23423 salutation: Dear John, closing: Yours sincerely, ... (text of letter here) And you can just do pandoc --template letter myletter.txt -o myletter.pdf to get a nicely typeset letter. Because the metadata values are structured, you can also do things like this (though you'll need to adjust templates to support it): --- author: - name: John Doe affiliation: University of Western Tasmania - name: Sarah Smith affiliation: National Institute of Health ... Your template can then contain something like this: $for(author)$ $author.name$ ($author.affiliation$) $endfor$ I have not yet implemented the YAML blocks in the markdown writer, but I plan to do that in time. John