From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32256 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Julien Dutant Newsgroups: gmane.text.pandoc Subject: Re: Recursive citeproc with the multibib lua filter Date: Wed, 1 Mar 2023 07:41:56 -0800 (PST) Message-ID: References: <473da17f-5a82-4d44-9b83-eb1cf35d43e6n@googlegroups.com> <8719e317-4d02-4206-8f84-e6c394b32946n@googlegroups.com> <2c4287ce-ddf0-40b0-94ac-5d22ab3d5764n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2186_1835789948.1677685316089" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34161"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBC5Y3356IYIMLZH5T4DBUBC5QJO6I-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Mar 01 16:42:01 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-qv1-f61.google.com ([209.85.219.61]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pXOae-0008hk-Vr for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 01 Mar 2023 16:42:01 +0100 Original-Received: by mail-qv1-f61.google.com with SMTP id y6-20020ad457c6000000b00535261af1b1sf7249303qvx.13 for ; Wed, 01 Mar 2023 07:42:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=2zYkySkBJNVnje0eLFQ20AytAlNUlbMPF/su4qDDgQw=; b=liu8PN+XLU4mkXTcurCk9dpfxvrIiN+1rcmTpk9ZXtPimXOEci5z4aOFsN7drLoH6g ipVxUcKE1kYyluHmxXfD/U/hc7BWYX+bqpyyfm246BEVPz+Nswnv74Kc+FXWibEPg8BZ vNCleCCLdytR8Rrk592QTsBpdsOhzvI75DPY6qVP20wjT5KK6qdKNyiT9NaC2zMKlozl TR/1rD4LP1YqMFKZbiTQSNQmHFA4S+0ynS5fkqcCx1f7Pdpsz+JJHUqJUhI7wlwC0NXb coXa9nXlc889Gubzn7b7B9G1cu8v/wjv8pmSooZdZQk08tD88OWvnyflCtRpfb4NX5dE WTlA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=2zYkySkBJNVnje0eLFQ20AytAlNUlbMPF/su4qDDgQw=; b=J6J0PKQ1uRvUzHBXH4+uDAP34/2sapIqYtHgTY+lCsKfk6tzJ4F//NL/pNJLHXJ26N 4DOdPPvAKfANB8Dx8DkMUc1x5BLpDdqpknxLnLEWTMPtZex1len5+ds5Z0q3IyXpjwL4 vbDdNc4fekGgBJoiRikXj5yCGXlmdEbC5bfLL7tnlY7pU87H0Jww17Aa2Q7QHSTCTdP7 WV+gZLg6/3wTvDg+kIub/jXWkGnqoqhF8UCXr1VqPSdxnHEq2MwVs12Jr6QxFQsF6Jcj U6AdWdbY3rNBjDj8ctvBCKUDiNz3dSZOZCxXN2GoqviBk8gi5RkT86fvTWYc+IpkMqY+ FL6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=2zYkySkBJNVnje0eLFQ20AytAlNUlbMPF/su4qDDgQw=; b=fANCAtToRMQHaxEg6b7DjUlSiWfj2GYLXuHcuYKRjpoREY0awWKswVCqr1HsMTYzDR c7vJQE4tcwxDvICS1/ez1aSpleYm7lmpMdwLpomYDLzDlZSuR5na7S1ukTkLWY619yKA /nX9w9huZsOQAGgm/e1ZM/0DmiSXxUpNUV8B3OTlD15Ph1HX+W4CiGoHL2J9PcnKgg0k HA/kKFNU7LPs+0LXOAKlmwLRmHEoc3XwwAq+T/zJMVnLeddchCd2mU8D0MXtTB8MigkK ujrORXuU2tE+LEpR1i0z8IOY9LjLmdecut0nSE7byy8sgVoMgR4HZJeVSqZRmpz1Iz0A Hqcg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AO0yUKVbjm5ShoKIzKIat+Il+Gdtv2477YYRYh3GjZu0fHy6zGqyLslY uBGQNMI67gBZ+QkXVomnPaY= X-Google-Smtp-Source: AK7set9J5keDXTVuOrvEwDqw6rZFztxfS13e7myjYIg82v0+Fy00hH7Igg3WW2o+jqfl/NUr/bWycA== X-Received: by 2002:a37:a914:0:b0:742:7f24:4cdf with SMTP id s20-20020a37a914000000b007427f244cdfmr1646538qke.10.1677685319730; Wed, 01 Mar 2023 07:41:59 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:620a:98f:b0:73b:79fc:2f0 with SMTP id x15-20020a05620a098f00b0073b79fc02f0ls3633118qkx.9.-pod-prod-gmail; Wed, 01 Mar 2023 07:41:57 -0800 (PST) X-Received: by 2002:a05:620a:35a:b0:741:c182:d200 with SMTP id t26-20020a05620a035a00b00741c182d200mr1602583qkm.11.1677685316708; Wed, 01 Mar 2023 07:41:56 -0800 (PST) In-Reply-To: <2c4287ce-ddf0-40b0-94ac-5d22ab3d5764n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 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:32256 Archived-At: ------=_Part_2186_1835789948.1677685316089 Content-Type: multipart/alternative; boundary="----=_Part_2187_980125032.1677685316089" ------=_Part_2187_980125032.1677685316089 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The bug with quarto: I'm porting my filters to Quarto one by one, haven't= =20 done this one yet. Thanks for noticing the error, it's very puzzling:=20 there's no error or output log in this filter. Perhaps it's because it uses= =20 "pandoc.utils.run_json_filter" to call citeproc by running pandoc itself=20 (an approach suited to much older versions of pandoc!). But I'm puzzled how= =20 that could generate an error only if verbosity > ERROR. Perhaps the=20 document you've been trying has citations not found, and the pandoc=20 sub-process created by run_json_filter tries to print out a warning, which= =20 somehow causes Quarto to hang. I'm pretty confident I could add the feature to Albert's filters (my own=20 priority would be the section-bibs one though). I'd just ask him first=20 whether he'd be interested in the PR, otherwise it's best to create a=20 separate filter that is used in addition to those. I've posted issues in=20 the repos about this: https://github.com/pandoc-ext/section-bibliographies/issues/6 https://github.com/pandoc-ext/multibib/issues/3 All the best, On Wednesday, March 1, 2023 at 2:15:47=E2=80=AFPM UTC Bernardo C. D. A. Vas= concelos=20 wrote: > Hi Julien, I was looking through your code. Do you have a good idea about= =20 > how to implement your recursive solution to the current=20 > multibib/multiple-bibliographies filter? Or do we need to rely on Albert'= s=20 > expertise in the multibib/multiple-bibliographies filter for this?=20 > > While we're at this subject, I just noticed, after a full day's work=20 > trying to figure it out, that the filter will cause Quarto to hang=20 > indefinitively unless one adds `verbosity: ERROR` to opts. This does not= =20 > affect Pandoc apparently. > > On Thursday, February 23, 2023 at 11:40:39=E2=80=AFAM UTC-3 Julien Dutant= wrote: > >> Hi, >> >> I'd be interested in developing this feature for Pandoc-ext's multibib= =20 >> and especially section-bibliographies and multi-bib ( >> https://github.com/pandoc-ext/section-bibliographies), if Albert is=20 >> willing to consider the addition. I've already developed a recursive=20 >> bibliography filter: >> https://github.com/dialoa/dialectica-filters/tree/main/recursive-citepro= c >> It's not the most efficient solution for more recent versions of Pandoc= =20 >> (this was back in 2.6 I think, and my code isn't the most elegant), but = it=20 >> works.=20 >> >> It was developed for the journal Dialectica, which has citations within= =20 >> the bibliography. I'm thinking of porting dialectica to Quarto and make = use=20 >> of section-bibliographies, so I'd be needing that feature anyway.=20 >> >> Against the inclusion of such a feature: citations within bibliography= =20 >> entries are a Bib(La)Tex only feature, they may disappear as CSL/JSON ta= kes=20 >> over. >> >> J >> >> On Monday, February 20, 2023 at 3:01:35=E2=80=AFAM UTC Bernardo C. D. A.= =20 >> Vasconcelos wrote: >> >>> Hello everyone, I hope you are all doing well. >>> Basically, this is a case of using the multi bib lua filter=20 >>> with other citations within=20 >>> the bibliography. I was wondering if this could be pulled off. For cont= ext,=20 >>> one of the bibliography files is actually a glossary that could contain= =20 >>> other citations in the `note` field of the BibTeX entry. Here is a MWE= =20 >>> to=20 >>> illustrate what looks like in practice. What do you think? >>> Thanks, >>> Bernardo >>> >> --=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/edf2de69-c140-4c34-b549-68ee22910146n%40googlegroups.com. ------=_Part_2187_980125032.1677685316089 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The bug with quarto: I'm porting my filters to Quarto one by one, have= n't done this one yet. Thanks for noticing the error, it's very puzzling: t= here's no error or output log in this filter. Perhaps it's because it uses = "pandoc.utils.run_json_filter" to call citeproc by running pandoc itself (a= n approach suited to much older versions of pandoc!). But I'm puzzled how t= hat could generate an error only if verbosity > ERROR. Perhaps the docum= ent you've been trying has citations not found, and the pandoc sub-process = created by run_json_filter tries to print out a warning, which somehow caus= es Quarto to hang.

I'm pretty confident I could = add the feature to Albert's filters (my own priority would be the section-b= ibs one though). I'd just ask him first whether he'd be interested in the P= R, otherwise it's best to create a separate filter that is used in addition= to those. I've posted issues in the repos about this:
https://gi= thub.com/pandoc-ext/section-bibliographies/issues/6
https://githu= b.com/pandoc-ext/multibib/issues/3


<= div>All the best,



On Wednesday, = March 1, 2023 at 2:15:47=E2=80=AFPM UTC Bernardo C. D. A. Vasconcelos wrote= :
Hi Julien, = I was looking through your code. Do you have a good idea about how to imple= ment your recursive solution to the current multibib/multiple-bibliographie= s filter? Or do we need to rely on Albert's expertise in the multibib/m= ultiple-bibliographies filter for this?=C2=A0

While we&#= 39;re at this subject, I just noticed, after a full day's work trying t= o figure it out, that the filter will cause Quarto to hang indefinitively u= nless one adds `verbosity: ERROR` to opts. This does not affect Pandoc appa= rently.

On Thursday, February 23, 2023 at 11:40:39=E2=80=AFAM UTC-3 Jul= ien Dutant wrote:
Hi,

I'd be interested in developing this feat= ure for Pandoc-ext's multibib and especially section-bibliographies and= multi-bib (https://github.com/pandoc-ext/section-bibliographies)= , if Albert is willing to consider the addition. I've already developed= a recursive bibliography filter:
It's not the most efficient solution for = more recent versions of Pandoc (this was back in 2.6 I think, and my code i= sn't the most elegant), but it works.

It = was developed for the journal Dialectica, which has citations within the bi= bliography. I'm thinking of porting dialectica to Quarto and make use o= f section-bibliographies, so I'd be needing that feature anyway.

Against the inclusion of such a feature: citations = within bibliography entries are a Bib(La)Tex only feature, they may disappe= ar as CSL/JSON takes over.

J

On Mon= day, February 20, 2023 at 3:01:35=E2=80=AFAM UTC Bernardo C. D. A. Vasconce= los wrote:
Hello every= one, I hope you are all doing well.
Basically, this is a case of us= ing the multi bib lua = filter with other citations within the bibliography. I was wondering if= this could be pulled off. For context, one of the bibliography files is ac= tually a glossary that could contain other citations in the `note` field of= the BibTeX entry. Here is a MWE=C2=A0to illust= rate what looks like in practice. What do you think?
Thanks,
Bernardo

--
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/edf2de69-c140-4c34-b549-68ee22910146n%40googlegroups.= com.
------=_Part_2187_980125032.1677685316089-- ------=_Part_2186_1835789948.1677685316089--