public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Recursive citeproc with the multibib lua filter
@ 2023-02-20  3:01 Bernardo C. D. A. Vasconcelos
       [not found] ` <473da17f-5a82-4d44-9b83-eb1cf35d43e6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Bernardo C. D. A. Vasconcelos @ 2023-02-20  3:01 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 953 bytes --]

Hello everyone, I hope you are all doing well.
Basically, this is a case of using the multi bib lua filter 
<https://github.com/pandoc-ext/multibib> with other citations within the 
bibliography. I was wondering if this could be pulled off. For context, one 
of the bibliography files is actually a glossary that could contain other 
citations in the `note` field of the BibTeX entry. Here is a MWE 
<https://www.dropbox.com/s/diiwwjds8kha214/Multibib.zip?dl=1> to illustrate 
what looks like in practice. What do you think?
Thanks,
Bernardo

-- 
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/473da17f-5a82-4d44-9b83-eb1cf35d43e6n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 1293 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Recursive citeproc with the multibib lua filter
       [not found] ` <473da17f-5a82-4d44-9b83-eb1cf35d43e6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2023-02-23 14:40   ` Julien Dutant
       [not found]     ` <8719e317-4d02-4206-8f84-e6c394b32946n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Julien Dutant @ 2023-02-23 14:40 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 2004 bytes --]

Hi,

I'd be interested in developing this feature 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:
https://github.com/dialoa/dialectica-filters/tree/main/recursive-citeproc
It's not the most efficient solution for more recent versions of Pandoc 
(this was back in 2.6 I think, and my code isn't the most elegant), but it 
works. 

It was developed for the journal Dialectica, which has citations within the 
bibliography. I'm thinking of porting dialectica to Quarto and make use of 
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 disappear as CSL/JSON takes 
over.

J

On Monday, February 20, 2023 at 3:01:35 AM 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 filter 
> <https://github.com/pandoc-ext/multibib> with other citations within the 
> bibliography. I was wondering if this could be pulled off. For context, one 
> of the bibliography files is actually a glossary that could contain other 
> citations in the `note` field of the BibTeX entry. Here is a MWE 
> <https://www.dropbox.com/s/diiwwjds8kha214/Multibib.zip?dl=1> to 
> illustrate what looks like in practice. What do you think?
> Thanks,
> Bernardo
>

-- 
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/8719e317-4d02-4206-8f84-e6c394b32946n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 3092 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Recursive citeproc with the multibib lua filter
       [not found]     ` <8719e317-4d02-4206-8f84-e6c394b32946n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2023-03-01 14:15       ` Bernardo C. D. A. Vasconcelos
       [not found]         ` <2c4287ce-ddf0-40b0-94ac-5d22ab3d5764n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Bernardo C. D. A. Vasconcelos @ 2023-03-01 14:15 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 2666 bytes --]

Hi Julien, I was looking through your code. Do you have a good idea about 
how to implement your recursive solution to the current 
multibib/multiple-bibliographies filter? Or do we need to rely on Albert's 
expertise in the multibib/multiple-bibliographies filter for this? 

While we're at this subject, I just noticed, after a full day's work trying 
to figure 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 AM UTC-3 Julien Dutant wrote:

> Hi,
>
> I'd be interested in developing this feature 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:
> https://github.com/dialoa/dialectica-filters/tree/main/recursive-citeproc
> It's not the most efficient solution for more recent versions of Pandoc 
> (this was back in 2.6 I think, and my code isn't the most elegant), but it 
> works. 
>
> It was developed for the journal Dialectica, which has citations within 
> the bibliography. I'm thinking of porting dialectica to Quarto and make use 
> of 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 disappear as CSL/JSON takes 
> over.
>
> J
>
> On Monday, February 20, 2023 at 3:01:35 AM 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 filter 
>> <https://github.com/pandoc-ext/multibib> with other citations within the 
>> bibliography. I was wondering if this could be pulled off. For context, one 
>> of the bibliography files is actually a glossary that could contain other 
>> citations in the `note` field of the BibTeX entry. Here is a MWE 
>> <https://www.dropbox.com/s/diiwwjds8kha214/Multibib.zip?dl=1> to 
>> illustrate what looks like in practice. What do you think?
>> Thanks,
>> Bernardo
>>
>

-- 
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/2c4287ce-ddf0-40b0-94ac-5d22ab3d5764n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 4555 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Recursive citeproc with the multibib lua filter
       [not found]         ` <2c4287ce-ddf0-40b0-94ac-5d22ab3d5764n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2023-03-01 15:41           ` Julien Dutant
       [not found]             ` <edf2de69-c140-4c34-b549-68ee22910146n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Julien Dutant @ 2023-03-01 15:41 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 3899 bytes --]

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's because it uses 
"pandoc.utils.run_json_filter" to call citeproc by running pandoc itself 
(an approach suited to much older versions of pandoc!). But I'm puzzled how 
that could generate an error only if verbosity > ERROR. Perhaps the 
document 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 causes Quarto to hang.

I'm pretty confident I could add the feature to Albert's filters (my own 
priority would be the section-bibs one though). I'd just ask him first 
whether he'd be interested in the PR, 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://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 PM UTC Bernardo C. D. A. Vasconcelos 
wrote:

> Hi Julien, I was looking through your code. Do you have a good idea about 
> how to implement your recursive solution to the current 
> multibib/multiple-bibliographies filter? Or do we need to rely on Albert's 
> expertise in the multibib/multiple-bibliographies filter for this? 
>
> While we're at this subject, I just noticed, after a full day's work 
> trying to figure 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 AM UTC-3 Julien Dutant wrote:
>
>> Hi,
>>
>> I'd be interested in developing this feature 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:
>> https://github.com/dialoa/dialectica-filters/tree/main/recursive-citeproc
>> It's not the most efficient solution for more recent versions of Pandoc 
>> (this was back in 2.6 I think, and my code isn't the most elegant), but it 
>> works. 
>>
>> It was developed for the journal Dialectica, which has citations within 
>> the bibliography. I'm thinking of porting dialectica to Quarto and make use 
>> of 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 disappear as CSL/JSON takes 
>> over.
>>
>> J
>>
>> On Monday, February 20, 2023 at 3:01:35 AM 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 filter 
>>> <https://github.com/pandoc-ext/multibib> with other citations within 
>>> the bibliography. I was wondering if this could be pulled off. For context, 
>>> one of the bibliography files is actually a glossary that could contain 
>>> other citations in the `note` field of the BibTeX entry. Here is a MWE 
>>> <https://www.dropbox.com/s/diiwwjds8kha214/Multibib.zip?dl=1> to 
>>> illustrate what looks like in practice. What do you think?
>>> Thanks,
>>> Bernardo
>>>
>>

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

[-- Attachment #1.2: Type: text/html, Size: 6044 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Recursive citeproc with the multibib lua filter
       [not found]             ` <edf2de69-c140-4c34-b549-68ee22910146n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2023-03-01 17:53               ` Bernardo C. D. A. Vasconcelos
  0 siblings, 0 replies; 5+ messages in thread
From: Bernardo C. D. A. Vasconcelos @ 2023-03-01 17:53 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 4792 bytes --]

Only the filter knows the path to the bibliography files. The 
multiple-bibliographies filter uses multiple variables, such as 
`bibliography_primary`, `bibliography_secondary` (which I prefer) while the 
multibib uses the `bibliography` but in the format of key:value pairs and 
not as a string as it would be expected by Pandoc (I think). (By the way, 
another warning, this means 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 
around 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 PM UTC-3 Julien Dutant 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's because it uses 
> "pandoc.utils.run_json_filter" to call citeproc by running pandoc itself 
> (an approach suited to much older versions of pandoc!). But I'm puzzled how 
> that could generate an error only if verbosity > ERROR. Perhaps the 
> document 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 causes Quarto to hang.
>
> I'm pretty confident I could add the feature to Albert's filters (my own 
> priority would be the section-bibs one though). I'd just ask him first 
> whether he'd be interested in the PR, 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://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 PM UTC Bernardo C. D. A. 
> Vasconcelos wrote:
>
>> Hi Julien, I was looking through your code. Do you have a good idea about 
>> how to implement your recursive solution to the current 
>> multibib/multiple-bibliographies filter? Or do we need to rely on Albert's 
>> expertise in the multibib/multiple-bibliographies filter for this? 
>>
>> While we're at this subject, I just noticed, after a full day's work 
>> trying to figure 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 AM UTC-3 Julien Dutant wrote:
>>
>>> Hi,
>>>
>>> I'd be interested in developing this feature 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:
>>> https://github.com/dialoa/dialectica-filters/tree/main/recursive-citeproc
>>> It's not the most efficient solution for more recent versions of Pandoc 
>>> (this was back in 2.6 I think, and my code isn't the most elegant), but it 
>>> works. 
>>>
>>> It was developed for the journal Dialectica, which has citations within 
>>> the bibliography. I'm thinking of porting dialectica to Quarto and make use 
>>> of 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 disappear as CSL/JSON takes 
>>> over.
>>>
>>> J
>>>
>>> On Monday, February 20, 2023 at 3:01:35 AM 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 filter 
>>>> <https://github.com/pandoc-ext/multibib> with other citations within 
>>>> the bibliography. I was wondering if this could be pulled off. For context, 
>>>> one of the bibliography files is actually a glossary that could contain 
>>>> other citations in the `note` field of the BibTeX entry. Here is a MWE 
>>>> <https://www.dropbox.com/s/diiwwjds8kha214/Multibib.zip?dl=1> to 
>>>> illustrate what looks like in practice. What do you think?
>>>> Thanks,
>>>> Bernardo
>>>>
>>>

-- 
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/a1d5895e-5706-4b4c-a634-a27da9017007n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 7728 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-01 17:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20  3:01 Recursive citeproc with the multibib lua filter Bernardo C. D. A. Vasconcelos
     [not found] ` <473da17f-5a82-4d44-9b83-eb1cf35d43e6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-02-23 14:40   ` Julien Dutant
     [not found]     ` <8719e317-4d02-4206-8f84-e6c394b32946n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-03-01 14:15       ` Bernardo C. D. A. Vasconcelos
     [not found]         ` <2c4287ce-ddf0-40b0-94ac-5d22ab3d5764n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-03-01 15:41           ` Julien Dutant
     [not found]             ` <edf2de69-c140-4c34-b549-68ee22910146n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-03-01 17:53               ` Bernardo C. D. A. Vasconcelos

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).