public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
To: Denis Maier
	<denis.maier.lists-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>,
	pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Convert paragraphs to
Date: Fri, 18 Sep 2020 09:29:37 -0700	[thread overview]
Message-ID: <m2zh5nujym.fsf@MacBook-Pro.hsd1.ca.comcast.net> (raw)
In-Reply-To: <e9ca8ffe-2004-24a4-154f-3ea94a2ded75-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>


You might be able to use pandoc's templating language to do this.

If you can put the citations in metadata, then you can add
something to your template that iterates over the elements
and adds them to the document between the appropriate tags.

This will generate the citations section.  You'd need to
insert it into the main document in a separate step, using
a filter (since the main JATS template just has $body$).

Denis Maier <denis.maier.lists-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org> writes:

> Hi,
>
> converting markdown to JATS XML, I need to wrap the bibliography in 
> special tags. Looks like the Jats writer does that already when the 
> bibliography is produced via pandoc-citeproc. But I receive them as 
> preformatted paragraphs.
>
> So, I get this:
>
> ```
> # References
>
> First citation
>
> Second citation
>
> Another citation
> ```
>
> And this is what I need:
>
> ```
> <ref-list>
>    <title>References</title>
>    <ref>
>      <mixed-citation>
>        First citation
>      </mixed-citation>
>    </ref>
>    <ref>
>      <mixed-citation>
>        Second citation
>      </mixed-citation>
>    </ref>
>    <ref>
>      <mixed-citation>
>        Another citation
>      </mixed-citation>
>    </ref>
> </ref-list>
> ```
>
> The whole thing must be a child element under `<back/>`.
>
> Any suggestions?
>
> Best
> Denis
>
> -- 
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e9ca8ffe-2004-24a4-154f-3ea94a2ded75%40mailbox.org.

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/m2zh5nujym.fsf%40MacBook-Pro.hsd1.ca.comcast.net.


  parent reply	other threads:[~2020-09-18 16:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-18 14:20 Denis Maier
     [not found] ` <e9ca8ffe-2004-24a4-154f-3ea94a2ded75-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
2020-09-18 14:27   ` Convert paragraphs to xml structure (markdown to jats) Denis Maier
2020-09-18 16:29   ` John MacFarlane [this message]
     [not found]     ` <m2zh5nujym.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2020-09-18 19:02       ` Convert paragraphs to Denis Maier
     [not found]         ` <7e377dff-fee5-bf9b-690e-b60837e6313b-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
2020-09-18 19:49           ` Denis Maier
     [not found]             ` <54131db9-87b3-47bd-0f93-c65f9f19a4bd-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
2020-09-18 20:15               ` BPJ
2020-09-18 17:26   ` Albert Krewinkel
     [not found]     ` <87imcbm1xy.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2020-09-18 19:00       ` Denis Maier
2020-09-18 22:26       ` John MacFarlane
     [not found]         ` <m2tuvuvi0s.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2020-09-19  6:59           ` Albert Krewinkel
     [not found]             ` <87d02imetv.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2020-09-19 18:13               ` John MacFarlane

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=m2zh5nujym.fsf@MacBook-Pro.hsd1.ca.comcast.net \
    --to=jgm-tvlzxgkolnx2fbvcvol8/a@public.gmane.org \
    --cc=denis.maier.lists-cl+VPiYnx/1AfugRpC6u6w@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).