From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32257 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Bernardo C. D. A. Vasconcelos" Newsgroups: gmane.text.pandoc Subject: Re: Recursive citeproc with the multibib lua filter Date: Wed, 1 Mar 2023 09:53:23 -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_120_1899456719.1677693203546" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1363"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDUKFWODQ4ARBFNC72PQMGQE6PNIGHA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Mar 01 18:53:28 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-qt1-f183.google.com ([209.85.160.183]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pXQds-00009o-8q for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 01 Mar 2023 18:53:28 +0100 Original-Received: by mail-qt1-f183.google.com with SMTP id c5-20020ac85185000000b003bfae3b8051sf7044467qtn.0 for ; Wed, 01 Mar 2023 09:53:28 -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=HBNwKWXpiSvhZk71Ac2YYjhADzYwwejVNqaB0keouGk=; b=byqHWYZYM9faA3hUCjYh/ipy8/KkgJ0Shh+Dp6n2AyaejnVx/d1pLtgHUVwLuTO2Hi +tO3LSBa6byJez1MyH/uEaoKC9OtZVJLWONBbQ1fMH9XX1KlbrFMer8e3RC9FDeP18H7 RzikClVIzH+rPTaa8zJxm/ZN9+8PpoBEF1GU9ZWQIlQicmN6uVWlbAMESnU/TUdH+54z ccyFdy46s7hZjdilurq6H9VninRlyq1xL433/QgXmSO0A7KjQltRg2UmbrSItOMO2aYv lTmHlJtaxbim9SMaZ5T/k+t2+AE4yumfEPVlMQJGwtdtZ5PWs4qv1GLxDrIhButovUkn L1fQ== 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=HBNwKWXpiSvhZk71Ac2YYjhADzYwwejVNqaB0keouGk=; b=KWoj85tICZvhj7E5JFr0PjqD9BDvScup4ROQjOfXxg1DSAYQB6OYWUQ5StETv9o+Ko IFkhwZ7N/RTjlNaOgdIGr1yj0MsPVMM3HKQmHvQI9xYEb0pdQ0NVdwykl7O1lLODuirV 6ktnLe1dPVpwqlRjrNv+k6cC+GXRURADo7t9mXtBnZPDpXANVtmXNVoM6HVNiyAMLMYk r80NRW4GJxJyPbuGuleHG1D0A4+QoDDkUz5lms1wR04CF9TKqUf/A1Ua5/CE7rMrJUA1 0T2M/pAVeG1QzemWoUTBLJi1XrdhLSNKQ43uds+yt6Hyd3yGY9qXsZQGY7vd3oHFgiyz eZnA== 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=HBNwKWXpiSvhZk71Ac2YYjhADzYwwejVNqaB0keouGk=; b=r80gl+1OpHSY7osDdZ8l0dYL7EXosapbUjKDwqmUc+M7e93He8n4diptJaknDhPNMq 1n6zwPtrZTtrL6D6JKOOvoZ0Uc/Cr5hoSVN7tcRCrOlnglVS3ef5SUW0tfzK9OCUtoAJ qHs7FJg7mcxzL7N4USs/BMI8hEfMlW2d2mHeiYocyYMfjujA3H1CZzUaQkW03aSPdKul SucBVQz39ESyRGvjrOOT/jL/WdmGbhJLSjtaECOa3FdzmrVt/v/5L4ZvWnL36qBOrn5F rk8jxZcQNH9nTHSI3BW9zwgR75V+Jq6nlgjZ1aK9dgSAOVVYfcdUzVdvvqo7akxJGLoA LfnQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AO0yUKUo9Gi8umwDRLNqxHPQcGPF/3LFjNcXmVgPdsvDpDfPIzz8iFea Ps5jEiXtyCyTdizCMRWVjQQ= X-Google-Smtp-Source: AK7set+nGG7/1XXADHO2symTWeABNffkHBXViRPedVb7uNAy+KqDf9wzDxSyJNT+kn07tXZy5/+Tkg== X-Received: by 2002:ac8:435d:0:b0:3bf:c62b:4651 with SMTP id a29-20020ac8435d000000b003bfc62b4651mr1960548qtn.3.1677693207245; Wed, 01 Mar 2023 09:53:27 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:620a:3199:b0:6fb:e284:cb6 with SMTP id bi25-20020a05620a319900b006fbe2840cb6ls3774196qkb.3.-pod-prod-gmail; Wed, 01 Mar 2023 09:53:24 -0800 (PST) X-Received: by 2002:a05:620a:11b1:b0:742:a923:7cc8 with SMTP id c17-20020a05620a11b100b00742a9237cc8mr1615423qkk.4.1677693204452; Wed, 01 Mar 2023 09:53:24 -0800 (PST) In-Reply-To: X-Original-Sender: bernardovasconcelos-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:32257 Archived-At: ------=_Part_120_1899456719.1677693203546 Content-Type: multipart/alternative; boundary="----=_Part_121_1231576349.1677693203546" ------=_Part_121_1231576349.1677693203546 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Only the filter knows the path to the bibliography files. The=20 multiple-bibliographies filter uses multiple variables, such as=20 `bibliography_primary`, `bibliography_secondary` (which I prefer) while the= =20 multibib uses the `bibliography` but in the format of key:value pairs and= =20 not as a string as it would be expected by Pandoc (I think). (By the way,= =20 another warning, this means one needs to add `validate-yaml: false` or=20 Quarto will throw an error.) So, in either case, there will be citations=20 not found. I will keep an eye out for updates to your git repos, in case you get=20 around to it. These are very useful filters indeed. So much so that it=20 could be a native Pandoc/Citeproc feature, I think. On Wednesday, March 1, 2023 at 12:41:56=E2=80=AFPM UTC-3 Julien Dutant wrot= e: > 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 us= es=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 h= ow=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, whic= h=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.= =20 > Vasconcelos wrote: > >> Hi Julien, I was looking through your code. Do you have a good idea abou= t=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 Dutan= t 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-citepr= oc >>> 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 t= akes=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 con= text,=20 >>>> one of the bibliography files is actually a glossary that could contai= n=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/a1d5895e-5706-4b4c-a634-a27da9017007n%40googlegroups.com. ------=_Part_121_1231576349.1677693203546 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Only the filter knows the path to the bibliography files. The multiple-bibl= iographies filter uses multiple variables, such as `bibliography_primary`, = `bibliography_secondary` (which I prefer) while the multibib uses the `bibl= iography` but in the format of key:value pairs and not as a string as it wo= uld be expected by Pandoc (I think). (By the way, another warning, this mea= ns one needs to add `validate-yaml: false` or Quarto will throw an error.) = So, in either case, there will be citations not found.

I will keep an eye out for updates to your git repos, in case you get arou= nd to it. These are very useful filters indeed. So much so that it could be= a native Pandoc/Citeproc feature, I think.


On Wednesday, March 1, 2023 at 12:41:56=E2=80=AFPM UTC-3 Julien D= utant wrote:
=
The bug with quarto: I'm porting my filters to Quarto one by one, = haven't done this one yet. Thanks for noticing the error, it's very= puzzling: there's no error or output log in this filter. Perhaps it= 9;s because it uses "pandoc.utils.run_json_filter" to call citepr= oc by running pandoc itself (an approach suited to much older versions of p= andoc!). But I'm puzzled how that could generate an error only if verbo= sity > ERROR. Perhaps the document you've been trying has citations = not found, and the pandoc sub-process created by run_json_filter tries to p= rint out a warning, which somehow causes Quarto to hang.

I'm pretty confident I could add the feature to Albert's fil= ters (my own priority would be the section-bibs one though). I'd just a= sk him first whether he'd be interested in the PR, otherwise it's b= est to create a separate filter that is used in addition to those. I've= posted issues in the repos about this:
ht= tps://github.com/pandoc-ext/multibib/issues/3

=
All the best,



On Wednesda= y, March 1, 2023 at 2:15:47=E2=80=AFPM UTC Bernardo C. D. A. Vasconcelos wr= ote:
Hi Julien, I was = looking through your code. Do you have a good idea about how to implement y= our recursive solution to the current multibib/multiple-bibliographies filt= er? Or do we need to rely on Albert's expertise in the multibib/multipl= e-bibliographies filter for this?=C2=A0

While we're = at this subject, I just noticed, after a full day's work trying to figu= re it out, that the filter will cause Quarto to hang indefinitively unless = one adds `verbosity: ERROR` to opts. This does not affect Pandoc apparently= .

On Thursday, February 23, 2023 at 11:40:39=E2=80=AFAM UTC-3 Julien Du= tant wrote:
Hi,

I'd be interested in developing this feature fo= r 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 re= cursive bibliography filter:
It's not the most efficient solution for mor= e recent versions of Pandoc (this was back in 2.6 I think, and my code isn&= #39;t the most elegant), but it works.

It was= developed for the journal Dialectica, which has citations within the bibli= ography. I'm thinking of porting dialectica to Quarto and make use of s= ection-bibliographies, so I'd be needing that feature anyway.

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

J

=
On Monday= , February 20, 2023 at 3:01:35=E2=80=AFAM UTC Bernardo C. D. A. Vasconcelos= wrote:
Hello everyone= , I hope you are all doing well.
Basically, this is a case of using= the multi bib lua f= ilter with other citations within the bibliography. I was wondering if = this could be pulled off. For context, one of the bibliography files is act= ually a glossary that could contain other citations in the `note` field of = the BibTeX entry. Here is a MWE=C2=A0to illustr= ate 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/a1d5895e-5706-4b4c-a634-a27da9017007n%40googlegroups.= com.
------=_Part_121_1231576349.1677693203546-- ------=_Part_120_1899456719.1677693203546--