From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/27584 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Julien Dutant Newsgroups: gmane.text.pandoc Subject: Re: recursive citeproc? Date: Mon, 25 Jan 2021 09:58:53 -0800 (PST) Message-ID: <73b2c062-8ea8-4142-b9e3-9ad852c5dfeen@googlegroups.com> References: <22fc94e0-d1e7-44b9-a683-a387f3c24e58n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2646_1037053163.1611597533738" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39216"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBC5Y3356IYIN7DN4QADBUBF6W3MVW-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Jan 25 18:58:57 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f64.google.com ([209.85.210.64]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1l468f-000A4I-7t for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 25 Jan 2021 18:58:57 +0100 Original-Received: by mail-ot1-f64.google.com with SMTP id t1sf5855926otp.13 for ; Mon, 25 Jan 2021 09:58:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=BSSkijO/i7JonmcsxQgfjkEfchrvWS8B6iWS5zewyHE=; b=ZlRU+JG4QO/CsUSLB59aOMaKRns1bpWow5rAFcX51VS/8BqPuxyPQIoGqTLz9D0jAE LQHLsUTzomkuMpIunCaiRB2UF9KuXIJVIcd+ysPy49EK1Aa3KfEo1mg1mtt7jrau3XPU IzYFvdUxkY1mdbg3+7vqdu3mNt53ubsPlxwXSMqSem42z4mSZe45Q1mtMIL3bM2nEvwI Wg2vEop+mRuUdXytnxgNzD1BE0u7edDWXnMbTDobRkV4nnObjc7PpfPRAPHj+lP2x6m8 49tFrvlW4MT4KC4Edess2nTkX31HFmZ9v38O9XUpNJjzGbiIkAwNthTT1zHSnc3iWFPi 3cWQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=BSSkijO/i7JonmcsxQgfjkEfchrvWS8B6iWS5zewyHE=; b=LI6K1lhOp698TVVc99D64jhbaaZ0ULg2jebiJG253Fh9x5QiOijr35kou5lj+1NVsx uvRUEz3HeudTmezsJYiLo6LtO68nxfJkDuL6gFNSQlvR/+umLuprmJlIqkQugwDNglwR 0OiadO4wEoUQM/yQ/DSPihbowW34NNxK8YLs6jWlHaAU0m+NoOzPIyhAss2yODJB48Fj 1yE8CPbIwXmUlqSoJZWbhBFOxR0YkNtmusJnF+g9X1jfUqdhSGCU2D699mMmEKL2Zhdx 91MQxSmVWD5w/y9uTU/KCiwf+Op1r/4HckFrsXHpM7nKdXqs0O5iWEz+o5Zb+L+SCmYc Wttw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=BSSkijO/i7JonmcsxQgfjkEfchrvWS8B6iWS5zewyHE=; b=EV+hx1hbnkoub1hylGyBfQUAqZn5/0MmNJs6N4PZjuQGVym1UHlmTistcgAt5ydbAM KcrAx3+nUyY+J2PwIeUTSUXqAZG/kJq+FyDam0fohrNWQnauthYiN1NbWvuXInOEuCTI snJbU2NGWvkuJWgfqyfJZFWTuUTgz+nn2qec7xozxlzYRdipV4lbNsZYrwyMEOSZatWQ lyb7nI0IV6aeazQ3MH0aQr2oWEkQbgRnV/dD1kwAx9M1fR56D1Z0t1/DJT8nG0fxKixs rFlubATnzCPQRoGaFce4I9jH4vlKBAU0iM5hCWUmIhbK8Pi3vf+WVrtNOnQCMXEFBFLY Dx6A== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM530uWBzqbW2NDalBp1DjM1wH4dVzFe5WLq4k3OQlYTzuxsYIoyxD SxuWU3zIxLvxDsc0iN6GZK8= X-Google-Smtp-Source: ABdhPJzB/GAHCFPD4yXLheo6tUip2RczQpCNMkmeMQAqPPN3vhZFzCxLkvUxMerY99jLabz4ebwCVg== X-Received: by 2002:aca:5290:: with SMTP id g138mr884057oib.44.1611597536274; Mon, 25 Jan 2021 09:58:56 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:aca:1204:: with SMTP id 4ls3405287ois.6.gmail; Mon, 25 Jan 2021 09:58:54 -0800 (PST) X-Received: by 2002:aca:418a:: with SMTP id o132mr859050oia.53.1611597534564; Mon, 25 Jan 2021 09:58:54 -0800 (PST) In-Reply-To: X-Original-Sender: julien.dutant-Re5JQEeQqe8AvxtiuMwx3w@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: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:27584 Archived-At: ------=_Part_2646_1037053163.1611597533738 Content-Type: multipart/alternative; boundary="----=_Part_2647_1507243687.1611597533738" ------=_Part_2647_1507243687.1611597533738 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks John. Just to clarify: my sources are already in pandoc's markdown.= =20 So I have a markdown file with, say, "@aaron_ri-etal:1961" and an=20 associated .bib file that cites some of its own keys.=20 If I understand well, the idea is to run these: pandoc -s test.md --citeproc -t markdown-citations -o intermediate.md pandoc -s intermediate.md -o intermediate.pdf/html With the test.md file's metadata referencing the self-citing .bib file. (I= =20 didn't know the markdown-citations flag btw!) In my test there's a problem: the self-cites are either left as LaTeX or=20 printed as link with the bibtex key for text. Here's the test.bib file: ``` @article{aaron_ri-etal:1961, author =3D { Aaron, Richard Ithamar and Rotenstreich, Nathan and Passmore,= =20 John A. and Mercier, Andr{\'e} and Russell, Leonard and Moreau, Joseph }, year =3D { 1961 }, title =3D { Discussion sur \citet{hersch_j:1961} et \citet{marias:1961} }, journal =3D { dialectica }, volume =3D { 15 }, number =3D { 57--58 }, pages =3D { 253--257 }, } @article{hersch_j:1961, author =3D { Hersch, J. }, year =3D { 1961 }, title =3D { Some paper }, journal =3D { dialectica }, volume =3D { 15 }, number =3D { 57--58 }, pages =3D { 253--257 }, } @article{marias:1961, author =3D { Marias, T. }, year =3D { 1961 }, title =3D { Some paper }, journal =3D { dialectica }, volume =3D { 15 }, number =3D { 57--58 }, pages =3D { 253--257 }, } ``` The test.md source: ``` --- author: John Dodd title: My Paper bibliography: test.bib link-citations: true --- I'm citing @aaron_ri-etal:1961 [165]. ``` And the result of pandoc -s test.md -t markdown-citations --citeproc (note= =20 the \citet and the "marias:1961" link; no idea why one is treated one way= =20 and the other another way): ``` --- author: John Dodd bibliography: test.bib link-citations: true title: My Paper --- I'm citing [Aaron et al.](#ref-aaron_ri-etal:1961) ([1961, 165](#ref-aaron_ri-etal:1961)). ::: {#refs .references .csl-bib-body .hanging-indent} ::: {#ref-aaron_ri-etal:1961 .csl-entry} Aaron, Richard Ithamar, Nathan Rotenstreich, John A. Passmore, Andr=C3=A9 Mercier, Leonard Russell, and Joseph Moreau. 1961. "Discussion Sur `\citet{hersch_j:1961}`{=3Dlatex} Et [marias:1961]{.nocase}." *Dialectica* 15 (57--58): 253--57. ::: ::: ``` Or did I misunderstand the idea? On Monday, January 25, 2021 at 4:48:43 PM UTC John MacFarlane wrote: > John MacFarlane writes: > > > One approach that might work is to first convert to markdown > > using --citeproc, and then to process this markdown document, > > again using --citeproc, to your target format. That would be > > like what you do in LaTeX, running it multiple times. > > To make this work, you'd need the first conversion to be > > -t markdown-citations > > This will give you the md citations in the body text, > where they can be interpreted on the next pass with --citeproc. > > --=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 view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/73b2c062-8ea8-4142-b9e3-9ad852c5dfeen%40googlegroups.com. ------=_Part_2647_1507243687.1611597533738 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks John. Just to clarify: my sources are already in pandoc's markdown. = So I have a markdown file with, say, "@aaron_ri-etal:1961" and an associate= d .bib file that cites some of its own keys. 

If I = understand well, the idea is to run these:
pandoc -s test.md --ci= teproc -t markdown-citations -o intermediate.md
pandoc -s interme= diate.md -o intermediate.pdf/html

With the test.md= file's metadata referencing the self-citing .bib file. (I didn't know the = markdown-citations flag btw!)

In my test there's a= problem: the self-cites are either left as LaTeX or printed as link with t= he bibtex key for text. Here's the test.bib file:

=
```
@article{aaron_ri-etal:1961,
author =3D { <= /span>Aaron, Richard Ithamar and Rotenstreich, Nathan and Passmore,= John A. and Mercier, Andr{\'e} and Russell, Leonard and Moreau, Joseph },
year =3D { 1961 },
title =3D { Discussion su= r \citet{hersch_j:1961} et \citet{marias:1961} },
journal =3D= { dialectica },
volum= e =3D { 15 },
number = =3D { 57--58 },
pages = =3D { 253--257 },
}

@article{hersch_j= :1961,
author =3D { Hersch, J. },
year =3D { 1961 <= /span>},
title =3D { Some paper },
journal =3D = { dialectica },
volume= =3D { 15 },
number = =3D { 57--58 },
pages = =3D { 253--257 },
}

@article{marias:1= 961,
author =3D { Marias, T. = },
year =3D { 1961 },
title =3D { Some paper= },
journal =3D {<= span style=3D"white-space:pre"> dialectica },
volume = =3D { 15 },
number =3D= { 57--58 },
pages =3D= { 253--257 },
}
```

The te= st.md source:

```
---
aut= hor: John Dodd
title: My Paper
bibliography: test.bib
link-citations: true
---

I'm ci= ting @aaron_ri-etal:1961 [165].
```

And the result of pandoc -s test.md -t markdown-citations --citeproc (not= e the \citet and the "marias:1961" link; no idea why one is treated one way= and the other another way):

```
--= -
author: John Dodd
bibliography: test.bib
li= nk-citations: true
title: My Paper
---

I'm citing [Aaron et al.](#ref-aaron_ri-etal:1961) ([1961,
165](#ref-aaron_ri-etal:1961)).

::: {#refs .ref= erences .csl-bib-body .hanging-indent}
::: {#ref-aaron_ri-etal:19= 61 .csl-entry}
Aaron, Richard Ithamar, Nathan Rotenstreich, John = A. Passmore, Andr=C3=A9
Mercier, Leonard Russell, and Joseph More= au. 1961. "Discussion Sur
`\citet{hersch_j:1961}`{=3Dlatex} Et [m= arias:1961]{.nocase}." *Dialectica*
15 (57--58): 253--57.
:::
:::
```

Or did I = misunderstand the idea?

On Monday, January 25, 2021 at 4:48:43 = PM UTC John MacFarlane wrote:
John MacFarlane <fiddlo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> One approach that might work is to first convert to markdown
> using --citeproc, and then to process this markdown document,
> again using --citeproc, to your target format. That would be
> like what you do in LaTeX, running it multiple times.

To make this work, you'd need the first conversion to be

-t markdown-citations

This will give you the md citations in the body text,
where they can be interpreted on the next pass with --citeproc.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/73b2c062-8ea8-4142-b9e3-9ad852c5dfeen%40googlegroups.= com.
------=_Part_2647_1507243687.1611597533738-- ------=_Part_2646_1037053163.1611597533738--