From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/13547 Path: news.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Specifying location of bibliography in document Date: Mon, 31 Aug 2015 08:11:28 -0700 Message-ID: <20150831151128.GF60949@MacBook-Air.local> References: <20150829140403.GA47273@MacBook-Air.local> <20150829142113.GA47586@MacBook-Air.local> <20150829154527.GA49705@MacBook-Air.local> <20150831055419.GC60048@MacBook-Air.local> <42c762b6-b9b7-4748-b2b9-12daa5046c78@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1441033911 10097 80.91.229.3 (31 Aug 2015 15:11:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 31 Aug 2015 15:11:51 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBLO5SGXQKGQE5LR7OVI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Aug 31 17:11:44 2015 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ig0-f183.google.com ([209.85.213.183]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZWQkH-0003pD-NB for gtp-pandoc-discuss@m.gmane.org; Mon, 31 Aug 2015 17:11:41 +0200 Original-Received: by igbuu8 with SMTP id uu8sf22026559igb.1 for ; Mon, 31 Aug 2015 08:11:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=from:date:to:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent: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 :sender:list-subscribe:list-unsubscribe; bh=LvlENP5/FGonqMODNqEvn0UQYZ3yA7gbq8NK1CA55gk=; b=KNuGF0l5FJIdlA5036B7ONLQ/BZIsU2b6/ZbSKR/Z1mpFuLeFDeAErqmBXif/+7jY3 xPE1G4iyY78IiZsQQfp71eFA9sMpSrLp6EPAxSnqf7ifskLHxAH0E+OmcQaPW8ULKSZs n8X/2xc8s6PcZ/sBlJc4swdldA3Gc/35OO5yVC8ST0Ij9cXuh5VXvU53FypybAWA1xns yab4tx5CG5hYRFh6KS0lrA2e9Y7FM+tVXDPFaAOgTSsWJM5G6MhmU5SO7fyrEAkjwv8g rnlH9rRDCOzBh0VrbBFtMmJX3mufdMdZneLWUaD9M X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:subject:message-id:references :mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent: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 :sender:list-subscribe:list-unsubscribe; bh=LvlENP5/FGonqMODNqEvn0UQYZ3yA7gbq8NK1CA55gk=; b=Ss2xkVEgJDCdCcscnRy6QGf3WedaX3hN1/YflzsxKxmdk+ltYapeifCV5N8nUuylK2 INUcNRWLLlXarWXi8UefLYpfYOQ61/BMSyFq86azzBX+uebGdlCnLzN/8rZ8zis4hng+ BdhSh5YvMzd02swxU5csEf4aunWy/PF2eE5EMcL9Fypz+z3JGyihffEOES1zVOd+2F+Q 2FP6EwnFs3yPah3fYc/C+GxfKdLLuCF2mWcl9/ouwpSSY5wm/AYdzbZcMT97KU18oupt wL5TnTuBBDwvc0J6VAik X-Received: by 10.50.50.148 with SMTP id c20mr154533igo.6.1441033901854; Mon, 31 Aug 2015 08:11:41 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.50.152.41 with SMTP id uv9ls877861igb.33.canary; Mon, 31 Aug 2015 08:11:41 -0700 (PDT) X-Received: by 10.50.25.233 with SMTP id f9mr20389030igg.8.1441033901319; Mon, 31 Aug 2015 08:11:41 -0700 (PDT) Original-Received: from mail-ig0-f177.google.com (mail-ig0-f177.google.com. [209.85.213.177]) by gmr-mx.google.com with ESMTPS id j1si1081700igv.0.2015.08.31.08.11.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 31 Aug 2015 08:11:41 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 209.85.213.177 as permitted sender) client-ip=209.85.213.177; Original-Received: by mail-ig0-f177.google.com with SMTP id uu8so48883098igb.0 for ; Mon, 31 Aug 2015 08:11:41 -0700 (PDT) X-Gm-Message-State: ALoCoQnOWJ/ZLNBJIvKChqiCRCiXFPaZx+8pvxGCzv0CGOIetpsXOU0OvP3zIzFTohSlLMWAsmMg X-Received: by 10.50.78.133 with SMTP id b5mr10838578igx.0.1441033900977; Mon, 31 Aug 2015 08:11:40 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id lp3sm10996642igb.12.2015.08.31.08.11.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 31 Aug 2015 08:11:40 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id D9BB7A65A; Mon, 31 Aug 2015 11:11:28 -0400 (EDT) Content-Disposition: inline In-Reply-To: <42c762b6-b9b7-4748-b2b9-12daa5046c78-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-PGP-Key: http://johnmacfarlane.net/jgm.asc User-Agent: Mutt/1.5.23 (2014-03-12) X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 209.85.213.177 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@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-Spam-Checked-In-Group: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.org gmane.text.pandoc:13547 Archived-At: I changed from adding a Div with class 'references' to adding a Div with id 'references'. It would be easy to change the script: match on Div ("references",[],[]) instead of Div ("",["references"],[]) Or I could change the writer so that it adds both a class 'references' and an id. Perhaps the latter is the most robust fix. John +++ nickbart1980-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [Aug 31 15 00:09 ]: > I have a filter that adds the needed raw latex commands: > ~~~ > #!/usr/bin/env runhaskell > -- addRefEnvItem.hs > import Text.Pandoc.JSON > main :: IO () > main =3D toJSONFilter addRefEnvItem > addRefEnvItem :: Maybe Format -> Block -> Block > addRefEnvItem (Just (Format "latex")) > (Div ("",["references"],[]) (h@(Header _ _ _) : blocks)) =3D > Div ("",["references"],[]) > ( [h, latex "\\begin{references}\\sloppy"] ++ > concatMap addItem blocks ++ [latex "\\end{references}"] ) > where latex =3D RawBlock (Format "latex") > addRefEnvItem _ x =3D x > addItem :: Block -> [Block] > addItem x =3D [RawBlock (Format "latex") "\\item", x] > ~~~ > =E2=80=A6 but it has stopped working after the latest updates. What are= the > adjustments needed? > On Monday, August 31, 2015 at 5:54:33 AM UTC, John MacFarlane wrote: > > +++ Andrew Dunning [Aug 30 15 13:06 ]: > > Will this also allow for the insertion of extra markup through a > > template? (For instance, a LaTeX class I am using wants the > > bibliography to be surrounded > > by \begin{thebibliography}...\end{thebibliography}, and it would > be > > fantastic to be able to achieve that.) > The bibliography was never part of a template and still > isn't. It is inserted directly into the document body. > There are various ways to achieve what you want. One is > write a simple filter that can run after pandoc-citeproc. > It would intercept a Div with id =3D references, and > add the needed raw latex commands to the beginning and end > of its contents. > > -- > 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 [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to > [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > [3]https://groups.google.com/d/msgid/pandoc-discuss/42c762b6-b9b7-4748- > b2b9-12daa5046c78%40googlegroups.com. > For more options, visit [4]https://groups.google.com/d/optout. > >References > > 1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > 2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > 3. https://groups.google.com/d/msgid/pandoc-discuss/42c762b6-b9b7-4748-= b2b9-12daa5046c78-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=3Demail&utm_source=3Dfooter > 4. https://groups.google.com/d/optout --=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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/20150831151128.GF60949%40MacBook-Air.local. For more options, visit https://groups.google.com/d/optout.