From: nickbart1980-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Specifying location of bibliography in document
Date: Mon, 31 Aug 2015 00:09:15 -0700 (PDT) [thread overview]
Message-ID: <42c762b6-b9b7-4748-b2b9-12daa5046c78@googlegroups.com> (raw)
In-Reply-To: <20150831055419.GC60048-jF64zX8BO08aTFSqC7bH4WZHpeb/A1Y/@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 2136 bytes --]
I have a filter that adds the needed raw latex commands:
~~~
#!/usr/bin/env runhaskell
-- addRefEnvItem.hs
import Text.Pandoc.JSON
main :: IO ()
main = toJSONFilter addRefEnvItem
addRefEnvItem :: Maybe Format -> Block -> Block
addRefEnvItem (Just (Format "latex"))
(Div ("",["references"],[]) (h@(Header _ _ _) : blocks)) =
Div ("",["references"],[])
( [h, latex "\\begin{references}\\sloppy"] ++
concatMap addItem blocks ++ [latex "\\end{references}"] )
where latex = RawBlock (Format "latex")
addRefEnvItem _ x = x
addItem :: Block -> [Block]
addItem x = [RawBlock (Format "latex") "\\item", x]
~~~
… 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 = 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 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/42c762b6-b9b7-4748-b2b9-12daa5046c78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #1.2: Type: text/html, Size: 2886 bytes --]
next prev parent reply other threads:[~2015-08-31 7:09 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-27 20:46 Jason White
[not found] ` <E7B49542-12BD-4183-958A-A46D43F5380B-4rxGbHaoKybk1uMJSBkQmQ@public.gmane.org>
2015-08-29 14:04 ` John MacFarlane
[not found] ` <20150829140403.GA47273-jF64zX8BO08aTFSqC7bH4WZHpeb/A1Y/@public.gmane.org>
2015-08-29 14:21 ` John MacFarlane
[not found] ` <20150829142113.GA47586-jF64zX8BO08aTFSqC7bH4WZHpeb/A1Y/@public.gmane.org>
2015-08-29 15:04 ` Pablo Rodríguez
2015-08-29 15:45 ` John MacFarlane
[not found] ` <20150829154527.GA49705-jF64zX8BO08aTFSqC7bH4WZHpeb/A1Y/@public.gmane.org>
2015-08-30 20:06 ` Andrew Dunning
[not found] ` <a0b4a70c-7667-4bd1-9c6c-436546d70ddd-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-08-31 5:54 ` John MacFarlane
[not found] ` <20150831055419.GC60048-jF64zX8BO08aTFSqC7bH4WZHpeb/A1Y/@public.gmane.org>
2015-08-31 7:09 ` nickbart1980-Re5JQEeQqe8AvxtiuMwx3w [this message]
[not found] ` <42c762b6-b9b7-4748-b2b9-12daa5046c78-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-08-31 9:28 ` nickbart1980-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <ea6da5d7-d98f-47f9-be3e-193adaa10333-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-08-31 14:13 ` Andrew Dunning
[not found] ` <cf0e31df-abc1-41c9-a947-b13066f11da2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-08-31 16:25 ` nickbart1980-Re5JQEeQqe8AvxtiuMwx3w
2015-08-31 15:11 ` John MacFarlane
[not found] ` <20150831151128.GF60949-jF64zX8BO08aTFSqC7bH4WZHpeb/A1Y/@public.gmane.org>
2015-09-25 8:38 ` nickbart1980-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <e1ffc34d-9306-4988-9218-47c6996c6c3e-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-09-25 18:07 ` John MACFARLANE
[not found] ` <20150925180738.GD76212-4kKid1p5UN4xFjuZnxJpBp3lxR28IOakuDuwTybUTCk@public.gmane.org>
2015-09-25 21:18 ` nickbart1980-Re5JQEeQqe8AvxtiuMwx3w
2015-09-06 1:15 ` Jason White
2015-08-30 19:06 ` Pablo Rodríguez
[not found] ` <55E35446.2000009-S0/GAf8tV78@public.gmane.org>
2015-08-31 5:52 ` John MacFarlane
[not found] ` <20150831055213.GB60048-jF64zX8BO08aTFSqC7bH4WZHpeb/A1Y/@public.gmane.org>
2015-08-31 18:28 ` Pablo Rodríguez
[not found] ` <55E49CBC.9060009-S0/GAf8tV78@public.gmane.org>
2015-08-31 19:55 ` John MACFARLANE
2015-08-31 8:57 ` BP Jonsson
[not found] ` <CAFC_yuTgry38Odx_CFy5akpY7gfhEfhoPqi9U4=J=dRh8jA1Qw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-08-31 18:12 ` Pablo Rodríguez
[not found] ` <55E498FA.90500-S0/GAf8tV78@public.gmane.org>
2015-08-31 19:29 ` Daniel Staal
2015-09-01 17:55 ` Pablo Rodríguez
[not found] ` <55E5E686.10900-S0/GAf8tV78@public.gmane.org>
2015-09-01 19:31 ` Daniel Staal
2015-09-02 18:37 ` Pablo Rodríguez
2015-09-02 3:03 ` John MacFarlane
[not found] ` <20150902030325.GI61652-jF64zX8BO08aTFSqC7bH4WZHpeb/A1Y/@public.gmane.org>
2015-09-02 18:46 ` Pablo Rodríguez
[not found] ` <13393D201344655C5B10B6A5@192.168.1.50>
[not found] ` <13393D201344655C5B10B6A5-Q0ErXNX1RuZz+/J76PBWHg@public.gmane.org>
2015-09-01 7:18 ` BP Jonsson
[not found] ` <CAFC_yuSTg2S8f3wVBagmFNnsW=_r1hQFWoFumrv4YoDDavgbhw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-01 18:00 ` Pablo Rodríguez
[not found] ` <55E5E7CD.7060000-S0/GAf8tV78@public.gmane.org>
2015-09-02 10:35 ` BP Jonsson
[not found] ` <55E6D101.5060205-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-02 17:37 ` Daniel Staal
2015-09-02 19:02 ` Pablo Rodríguez
2015-09-02 18:54 ` Pablo Rodríguez
2016-01-23 18:04 ` John Muccigrosso
2016-01-23 18:04 ` John Muccigrosso
[not found] ` <5b3abc65-a90e-49ab-80d5-3c6296bf5980-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-01-23 22:14 ` John MacFarlane
[not found] ` <20160123221456.GC82743-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org>
2016-01-23 22:24 ` John Muccigrosso
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=42c762b6-b9b7-4748-b2b9-12daa5046c78@googlegroups.com \
--to=nickbart1980-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).