public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* converting from and to a new bibliographic format in pandoc
@ 2022-07-25 13:14 A A
       [not found] ` <CAMwawgPP62P6=XwLSksRv-X11gW7p1A1+Uhg824n5HAtE_49vw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: A A @ 2022-07-25 13:14 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 958 bytes --]

Suppose that I would like to define my own markup format, something that is
not currently supported by pandoc. I could in theory write my own reader
and writer in Lua, making use of pandoc's AST elements, and would then be
able to convert to and from this new format to other recognized formats.

I'd like to know whether the same can be said of bibliographic formats.
Suppose I have a new one that I would like to bake into pandoc. Since the
bibliography seems to be decoupled from the AST, what would be the best way
to do this?

-- 
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/CAMwawgPP62P6%3DXwLSksRv-X11gW7p1A1%2BUhg824n5HAtE_49vw%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 1312 bytes --]

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

* Re: converting from and to a new bibliographic format in pandoc
       [not found] ` <CAMwawgPP62P6=XwLSksRv-X11gW7p1A1+Uhg824n5HAtE_49vw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-07-25 16:00   ` John MacFarlane
       [not found]     ` <04A5D7A1-B4AD-4A59-AB54-7D5849F23ACA-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: John MacFarlane @ 2022-07-25 16:00 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


If you do `pandoc yourbib.bib -t native -s` then you'll see how pandoc represents bibiographies in its AST.  All you need to do, then, is have your custom reader create this sort of structure in the metadata.



> On Jul 25, 2022, at 6:14 AM, A A <amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 
> Suppose that I would like to define my own markup format, something that is not currently supported by pandoc. I could in theory write my own reader and writer in Lua, making use of pandoc's AST elements, and would then be able to convert to and from this new format to other recognized formats.
> 
> I'd like to know whether the same can be said of bibliographic formats. Suppose I have a new one that I would like to bake into pandoc. Since the bibliography seems to be decoupled from the AST, what would be the best way to do this?
> 
> -- 
> 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/CAMwawgPP62P6%3DXwLSksRv-X11gW7p1A1%2BUhg824n5HAtE_49vw%40mail.gmail.com.

-- 
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/04A5D7A1-B4AD-4A59-AB54-7D5849F23ACA%40gmail.com.


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

* Re: converting from and to a new bibliographic format in pandoc
       [not found]     ` <04A5D7A1-B4AD-4A59-AB54-7D5849F23ACA-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2022-07-26 11:47       ` A A
  2022-07-26 14:53         ` John MacFarlane
  0 siblings, 1 reply; 10+ messages in thread
From: A A @ 2022-07-26 11:47 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 2937 bytes --]

Dear John,

Indeed, I see that there is an internal representation in the form of a
Meta object. I made a dummy bibliography with 4 entries. After converting
to JSON the following structure was apparent:

{
    "pandoc-api-version": [...],
    "meta": {
        "nocite": {...}
        "references":  {...}
    },
    "blocks": []
}

references contains a list of MetaMapswhich contain the recognizable BibTeX
data. blocks is empty and nocite contains some additional data which I
don’t understand.

What is the role of nocite and blocks in this AST?

Regards,

Amine

On Mon, 25 Jul 2022 at 18:01, John MacFarlane <fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:

>
> If you do `pandoc yourbib.bib -t native -s` then you'll see how pandoc
> represents bibiographies in its AST.  All you need to do, then, is have
> your custom reader create this sort of structure in the metadata.
>
>
>
> > On Jul 25, 2022, at 6:14 AM, A A <amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >
> > Suppose that I would like to define my own markup format, something that
> is not currently supported by pandoc. I could in theory write my own reader
> and writer in Lua, making use of pandoc's AST elements, and would then be
> able to convert to and from this new format to other recognized formats.
> >
> > I'd like to know whether the same can be said of bibliographic formats.
> Suppose I have a new one that I would like to bake into pandoc. Since the
> bibliography seems to be decoupled from the AST, what would be the best way
> to do this?
> >
> > --
> > 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/CAMwawgPP62P6%3DXwLSksRv-X11gW7p1A1%2BUhg824n5HAtE_49vw%40mail.gmail.com
> .
>
> --
> 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/04A5D7A1-B4AD-4A59-AB54-7D5849F23ACA%40gmail.com
> .
>

-- 
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/CAMwawgOt0AE-ibyTeUv-Ov_9pvNESyQWeqr%2BDwCjDdFQ9xHs%3DA%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 7902 bytes --]

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

* Re: converting from and to a new bibliographic format in pandoc
  2022-07-26 11:47       ` A A
@ 2022-07-26 14:53         ` John MacFarlane
       [not found]           ` <5BC2C9A0-8D21-43E6-B00B-99D7BC319AE4-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: John MacFarlane @ 2022-07-26 14:53 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

'blocks' is for the body of the document. We store the reference data in the metadata.  In this case it's all references, so no body.

The 'nocite' entry causes all the references to be included in the bibliography if you process this with --citeproc.  We include that by default so that you can do e.g.

pandoc my.bib -s -o my.html --citeproc

and get a formatted HTML bibliography with all the references.


> On Jul 26, 2022, at 4:47 AM, A A <amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 
> Dear John,
> Indeed, I see that there is an internal representation in the form of a Meta object. I made a dummy bibliography with 4 entries. After converting to JSON the following structure was apparent:
> 
> {
>     "pandoc-api-version": [...],
>     "meta": {
>         "nocite": {...}
>         "references":  {...}      
>     },
>     "blocks": []
> }
> 
> references contains a list of MetaMapswhich contain the recognizable BibTeX data. blocks is empty and nocite contains some additional data which I don’t understand.
> 
> What is the role of nocite and blocks in this AST?
> 
> Regards,
> 
> Amine
> 
> 
> On Mon, 25 Jul 2022 at 18:01, John MacFarlane <fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 
> If you do `pandoc yourbib.bib -t native -s` then you'll see how pandoc represents bibiographies in its AST.  All you need to do, then, is have your custom reader create this sort of structure in the metadata.
> 
> 
> 
> > On Jul 25, 2022, at 6:14 AM, A A <amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > 
> > Suppose that I would like to define my own markup format, something that is not currently supported by pandoc. I could in theory write my own reader and writer in Lua, making use of pandoc's AST elements, and would then be able to convert to and from this new format to other recognized formats.
> > 
> > I'd like to know whether the same can be said of bibliographic formats. Suppose I have a new one that I would like to bake into pandoc. Since the bibliography seems to be decoupled from the AST, what would be the best way to do this?
> > 
> > -- 
> > 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/CAMwawgPP62P6%3DXwLSksRv-X11gW7p1A1%2BUhg824n5HAtE_49vw%40mail.gmail.com.
> 
> -- 
> 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/04A5D7A1-B4AD-4A59-AB54-7D5849F23ACA%40gmail.com.
> 
> -- 
> 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/CAMwawgOt0AE-ibyTeUv-Ov_9pvNESyQWeqr%2BDwCjDdFQ9xHs%3DA%40mail.gmail.com.

-- 
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/5BC2C9A0-8D21-43E6-B00B-99D7BC319AE4%40gmail.com.


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

* Re: converting from and to a new bibliographic format in pandoc
       [not found]           ` <5BC2C9A0-8D21-43E6-B00B-99D7BC319AE4-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2022-08-23 14:42             ` A A
       [not found]               ` <CAMwawgNAjuyXpG0M-FZhzuS=aBEZZ4Uanb6gX3NjB9fv0YASAQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: A A @ 2022-08-23 14:42 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 5076 bytes --]

In my case, nocite contains a value of "[@*]". Would you please elaborate
on what that means?
As far as I know using --citeproc or not has no impact on the final result.
I tried both variants as shown below:

pandoc .\bibliography.bib -t markdown -s --citeproc
pandoc .\bibliography.bib -t markdown -s

I get the same output for either command. Both have a nocite of "[@*]".

On Tue, 26 Jul 2022 at 14:53, John MacFarlane fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
<http://mailto:fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

'blocks' is for the body of the document. We store the reference data in
> the metadata.  In this case it's all references, so no body.
>
> The 'nocite' entry causes all the references to be included in the
> bibliography if you process this with --citeproc.  We include that by
> default so that you can do e.g.
>
> pandoc my.bib -s -o my.html --citeproc
>
> and get a formatted HTML bibliography with all the references.
>
>
> > On Jul 26, 2022, at 4:47 AM, A A <amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >
> > Dear John,
> > Indeed, I see that there is an internal representation in the form of a
> Meta object. I made a dummy bibliography with 4 entries. After converting
> to JSON the following structure was apparent:
> >
> > {
> >     "pandoc-api-version": [...],
> >     "meta": {
> >         "nocite": {...}
> >         "references":  {...}
> >     },
> >     "blocks": []
> > }
> >
> > references contains a list of MetaMapswhich contain the recognizable
> BibTeX data. blocks is empty and nocite contains some additional data which
> I don’t understand.
> >
> > What is the role of nocite and blocks in this AST?
> >
> > Regards,
> >
> > Amine
> >
> >
> > On Mon, 25 Jul 2022 at 18:01, John MacFarlane <fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> wrote:
> >
> > If you do `pandoc yourbib.bib -t native -s` then you'll see how pandoc
> represents bibiographies in its AST.  All you need to do, then, is have
> your custom reader create this sort of structure in the metadata.
> >
> >
> >
> > > On Jul 25, 2022, at 6:14 AM, A A <amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > >
> > > Suppose that I would like to define my own markup format, something
> that is not currently supported by pandoc. I could in theory write my own
> reader and writer in Lua, making use of pandoc's AST elements, and would
> then be able to convert to and from this new format to other recognized
> formats.
> > >
> > > I'd like to know whether the same can be said of bibliographic
> formats. Suppose I have a new one that I would like to bake into pandoc.
> Since the bibliography seems to be decoupled from the AST, what would be
> the best way to do this?
> > >
> > > --
> > > 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/CAMwawgPP62P6%3DXwLSksRv-X11gW7p1A1%2BUhg824n5HAtE_49vw%40mail.gmail.com
> .
> >
> > --
> > 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/04A5D7A1-B4AD-4A59-AB54-7D5849F23ACA%40gmail.com
> .
> >
> > --
> > 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/CAMwawgOt0AE-ibyTeUv-Ov_9pvNESyQWeqr%2BDwCjDdFQ9xHs%3DA%40mail.gmail.com
> .
>
> --
> 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/5BC2C9A0-8D21-43E6-B00B-99D7BC319AE4%40gmail.com
> .


>

-- 
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/CAMwawgNAjuyXpG0M-FZhzuS%3DaBEZZ4Uanb6gX3NjB9fv0YASAQ%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 17899 bytes --]

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

* Re: converting from and to a new bibliographic format in pandoc
       [not found]               ` <CAMwawgNAjuyXpG0M-FZhzuS=aBEZZ4Uanb6gX3NjB9fv0YASAQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-08-26  7:31                 ` A A
       [not found]                   ` <CAMwawgOs=bC6eVyWqMs1ae-_334Lgzq43-OhQxGgJPWMmkCyKQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: A A @ 2022-08-26  7:31 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 5714 bytes --]

Dear John (or anyone else),

Would you please respond to the query below? Or perhaps point to some
resources I can use online to begin answering the question?

I've searched up and down the official pandoc reference but I really can't
find a detailed explanation as to what the `--citeproc` flag actually
*does*, and why the `nocite` key is important in the bibliographic metadata.

Regards,

Amine

On Tue, 23 Aug 2022 at 14:42, A A <amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> In my case, nocite contains a value of "[@*]". Would you please elaborate
> on what that means?
> As far as I know using --citeproc or not has no impact on the final
> result. I tried both variants as shown below:
>
> pandoc .\bibliography.bib -t markdown -s --citeproc
> pandoc .\bibliography.bib -t markdown -s
>
> I get the same output for either command. Both have a nocite of "[@*]".
>
> On Tue, 26 Jul 2022 at 14:53, John MacFarlane fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> <http://mailto:fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> 'blocks' is for the body of the document. We store the reference data in
>> the metadata.  In this case it's all references, so no body.
>>
>> The 'nocite' entry causes all the references to be included in the
>> bibliography if you process this with --citeproc.  We include that by
>> default so that you can do e.g.
>>
>> pandoc my.bib -s -o my.html --citeproc
>>
>> and get a formatted HTML bibliography with all the references.
>>
>>
>> > On Jul 26, 2022, at 4:47 AM, A A <amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> >
>> > Dear John,
>> > Indeed, I see that there is an internal representation in the form of a
>> Meta object. I made a dummy bibliography with 4 entries. After converting
>> to JSON the following structure was apparent:
>> >
>> > {
>> >     "pandoc-api-version": [...],
>> >     "meta": {
>> >         "nocite": {...}
>> >         "references":  {...}
>> >     },
>> >     "blocks": []
>> > }
>> >
>> > references contains a list of MetaMapswhich contain the recognizable
>> BibTeX data. blocks is empty and nocite contains some additional data which
>> I don’t understand.
>> >
>> > What is the role of nocite and blocks in this AST?
>> >
>> > Regards,
>> >
>> > Amine
>> >
>> >
>> > On Mon, 25 Jul 2022 at 18:01, John MacFarlane <fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> wrote:
>> >
>> > If you do `pandoc yourbib.bib -t native -s` then you'll see how pandoc
>> represents bibiographies in its AST.  All you need to do, then, is have
>> your custom reader create this sort of structure in the metadata.
>> >
>> >
>> >
>> > > On Jul 25, 2022, at 6:14 AM, A A <amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> > >
>> > > Suppose that I would like to define my own markup format, something
>> that is not currently supported by pandoc. I could in theory write my own
>> reader and writer in Lua, making use of pandoc's AST elements, and would
>> then be able to convert to and from this new format to other recognized
>> formats.
>> > >
>> > > I'd like to know whether the same can be said of bibliographic
>> formats. Suppose I have a new one that I would like to bake into pandoc.
>> Since the bibliography seems to be decoupled from the AST, what would be
>> the best way to do this?
>> > >
>> > > --
>> > > 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/CAMwawgPP62P6%3DXwLSksRv-X11gW7p1A1%2BUhg824n5HAtE_49vw%40mail.gmail.com
>> .
>> >
>> > --
>> > 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/04A5D7A1-B4AD-4A59-AB54-7D5849F23ACA%40gmail.com
>> .
>> >
>> > --
>> > 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/CAMwawgOt0AE-ibyTeUv-Ov_9pvNESyQWeqr%2BDwCjDdFQ9xHs%3DA%40mail.gmail.com
>> .
>>
>> --
>> 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/5BC2C9A0-8D21-43E6-B00B-99D7BC319AE4%40gmail.com
>> .
>
>
>>

-- 
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/CAMwawgOs%3DbC6eVyWqMs1ae-_334Lgzq43-OhQxGgJPWMmkCyKQ%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 18739 bytes --]

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

* Re: converting from and to a new bibliographic format in pandoc
       [not found]                   ` <CAMwawgOs=bC6eVyWqMs1ae-_334Lgzq43-OhQxGgJPWMmkCyKQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-08-26  8:20                     ` Bastien DUMONT
  2022-09-21 10:38                       ` A A
  0 siblings, 1 reply; 10+ messages in thread
From: Bastien DUMONT @ 2022-08-26  8:20 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

By default, when converting to markdown, the "citations" extension is enabled, so the output file is formatted as a Pandoc Markdown file to be processed by citeproc, with the bibliographic data in the YAML header but no formatted citations. nocite lists all the bibliographic items not actually cited in the document that should be included in the bibliography: a value of [@*] means "include all". If you wanted a formatted bibliography in markdown, you could use:

pandoc pandoc .\bibliography.bib -t markdown-citations

(You may or may not have to add -V nocite="[*@]", I have not tested it with a bibliography file.)

If your goal is to convert your bibliography file into another bibliographic format, then you can follow this route and write a CSL stylesheet that outputs the desired formatting. In this case, converting to "plain" (witout "-citations") would be preferable in order to avoid undesired wrapping in divs.

Le Friday 26 August 2022 à 07:31:39AM, A A a écrit :
> Dear John (or anyone else),
> 
> Would you please respond to the query below? Or perhaps point to some resources
> I can use online to begin answering the question?
> 
> I've searched up and down the official pandoc reference but I really can't find
> a detailed explanation as to what the `--citeproc` flag actually *does*, and
> why the `nocite` key is important in the bibliographic metadata.
> 
> Regards,
> 
> Amine
> 
> On Tue, 23 Aug 2022 at 14:42, A A <[1]amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 
> 
>     In my case, nocite contains a value of "[@*]". Would you please elaborate
>     on what that means?
>     As far as I know using --citeproc or not has no impact on the final result.
>     I tried both variants as shown below:
> 
>     pandoc .\bibliography.bib -t markdown -s --citeproc
>     pandoc .\bibliography.bib -t markdown -s
> 
>     I get the same output for either command. Both have a nocite of "[@*]".
> 
>     On Tue, 26 Jul 2022 at 14:53, John MacFarlane [2]fiddlosopher@gmail.com
>     wrote:
> 
>         'blocks' is for the body of the document. We store the reference data
>         in the metadata.  In this case it's all references, so no body.
> 
>         The 'nocite' entry causes all the references to be included in the
>         bibliography if you process this with --citeproc.  We include that by
>         default so that you can do e.g.
> 
>         pandoc my.bib -s -o my.html --citeproc
> 
>         and get a formatted HTML bibliography with all the references.
> 
> 
>         > On Jul 26, 2022, at 4:47 AM, A A <[3]amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>         wrote:
>         >
>         > Dear John,
>         > Indeed, I see that there is an internal representation in the form of
>         a Meta object. I made a dummy bibliography with 4 entries. After
>         converting to JSON the following structure was apparent:
>         >
>         > {
>         >     "pandoc-api-version": [...],
>         >     "meta": {
>         >         "nocite": {...}
>         >         "references":  {...}     
>         >     },
>         >     "blocks": []
>         > }
>         >
>         > references contains a list of MetaMapswhich contain the recognizable
>         BibTeX data. blocks is empty and nocite contains some additional data
>         which I don’t understand.
>         >
>         > What is the role of nocite and blocks in this AST?
>         >
>         > Regards,
>         >
>         > Amine
>         >
>         >
>         > On Mon, 25 Jul 2022 at 18:01, John MacFarlane <[4]
>         fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>         >
>         > If you do `pandoc yourbib.bib -t native -s` then you'll see how
>         pandoc represents bibiographies in its AST.  All you need to do, then,
>         is have your custom reader create this sort of structure in the
>         metadata.
>         >
>         >
>         >
>         > > On Jul 25, 2022, at 6:14 AM, A A <[5]amine.aboufirass@gmail.com>
>         wrote:
>         > >
>         > > Suppose that I would like to define my own markup format, something
>         that is not currently supported by pandoc. I could in theory write my
>         own reader and writer in Lua, making use of pandoc's AST elements, and
>         would then be able to convert to and from this new format to other
>         recognized formats.
>         > >
>         > > I'd like to know whether the same can be said of bibliographic
>         formats. Suppose I have a new one that I would like to bake into
>         pandoc. Since the bibliography seems to be decoupled from the AST, what
>         would be the best way to do this?
>         > >
>         > > --
>         > > 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 [6]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>         > > To view this discussion on the web visit [7]https://
>         groups.google.com/d/msgid/pandoc-discuss/
>         CAMwawgPP62P6%3DXwLSksRv-X11gW7p1A1%2BUhg824n5HAtE_49vw%40mail.gmail.com
>         .
>         >
>         > --
>         > 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 [8]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>         > To view this discussion on the web visit [9]https://groups.google.com
>         /d/msgid/pandoc-discuss/
>         04A5D7A1-B4AD-4A59-AB54-7D5849F23ACA%40gmail.com.
>         >
>         > --
>         > 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 [10]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>         > To view this discussion on the web visit [11]https://
>         groups.google.com/d/msgid/pandoc-discuss/
>         CAMwawgOt0AE-ibyTeUv-Ov_9pvNESyQWeqr%2BDwCjDdFQ9xHs%3DA%40mail.gmail.com
>         .
> 
>         --
>         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 [12]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>         To view this discussion on the web visit [13]https://groups.google.com/
>         d/msgid/pandoc-discuss/5BC2C9A0-8D21-43E6-B00B-99D7BC319AE4%40gmail.com
>         .
> 
> 
> 
> --
> 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 [14]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit [15]https://groups.google.com/d/msgid/
> pandoc-discuss/
> CAMwawgOs%3DbC6eVyWqMs1ae-_334Lgzq43-OhQxGgJPWMmkCyKQ%40mail.gmail.com.
> 
> References:
> 
> [1] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> [2] http://mailto-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org/
> [3] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> [4] mailto:fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> [5] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> [6] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [7] https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgPP62P6%3DXwLSksRv-X11gW7p1A1%2BUhg824n5HAtE_49vw%40mail.gmail.com
> [8] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [9] https://groups.google.com/d/msgid/pandoc-discuss/04A5D7A1-B4AD-4A59-AB54-7D5849F23ACA%40gmail.com
> [10] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [11] https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgOt0AE-ibyTeUv-Ov_9pvNESyQWeqr%2BDwCjDdFQ9xHs%3DA%40mail.gmail.com
> [12] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [13] https://groups.google.com/d/msgid/pandoc-discuss/5BC2C9A0-8D21-43E6-B00B-99D7BC319AE4%40gmail.com
> [14] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [15] https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgOs%3DbC6eVyWqMs1ae-_334Lgzq43-OhQxGgJPWMmkCyKQ%40mail.gmail.com?utm_medium=email&utm_source=footer

-- 
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/YwiCYQlHqYv1Qo5A%40localhost.


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

* Re: converting from and to a new bibliographic format in pandoc
  2022-08-26  8:20                     ` Bastien DUMONT
@ 2022-09-21 10:38                       ` A A
       [not found]                         ` <CAMwawgMRA-Ki8hcj-jrwjBLmgbt8K9OYb3Z_Kz2v1moLCA320g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: A A @ 2022-09-21 10:38 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 11903 bytes --]

Bastien,

If your goal is to convert your bibliography file into another
bibliographic format, then you can follow this route and write a CSL
stylesheet that outputs the desired formatting

My goal is actually going from markdown metadata-style bibliography to
BibTeX/BibLaTeX. The implementation already available in Pandoc is great,
but I need something more minimal and customizable for my purposes. I
believe this can be done using panflute which has Metadata capabilities
<http://scorreia.com/software/panflute/code.html#panflute.elements.MetaBlocks>.


I’m quite unfamiliar with CSL, and have some doubts whether I would
actually require it for what I’m trying to achieve here. I would, however,
like to understand the *current* way Pandoc does the markdown to
BibLaTeX/LaTeX conversion, so that I can implement a similar pattern in my
code. Hence why I am asking questions about how Pandoc internally handles
this conversion (using citeproc and such). Does CSL really play a major
role within this conversion?

I tried the commands you recommended, but the *only* difference between the
output for pandoc .\bibliography.bib -t markdown -s and pandoc
.\bibliography.bib -t markdown-citation -s is that the first command
has nocite:
"[@*]" and the second command has nocite: \[@\*\]. No additional
information is generated with markdown-citation as far as I can tell.

I’m still not sure what citeproc actually does. Furthermore I’m also very
confused as to whether CSL plays a role here or not. Any clarifications
would be very welcome.

Regards,

Amine

On Fri, 26 Aug 2022 at 10:20, Bastien DUMONT <bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org>
wrote:

> By default, when converting to markdown, the "citations" extension is
> enabled, so the output file is formatted as a Pandoc Markdown file to be
> processed by citeproc, with the bibliographic data in the YAML header but
> no formatted citations. nocite lists all the bibliographic items not
> actually cited in the document that should be included in the bibliography:
> a value of [@*] means "include all". If you wanted a formatted bibliography
> in markdown, you could use:
>
> pandoc pandoc .\bibliography.bib -t markdown-citations
>
> (You may or may not have to add -V nocite="[*@]", I have not tested it
> with a bibliography file.)
>
> If your goal is to convert your bibliography file into another
> bibliographic format, then you can follow this route and write a CSL
> stylesheet that outputs the desired formatting. In this case, converting to
> "plain" (witout "-citations") would be preferable in order to avoid
> undesired wrapping in divs.
>
> Le Friday 26 August 2022 à 07:31:39AM, A A a écrit :
> > Dear John (or anyone else),
> >
> > Would you please respond to the query below? Or perhaps point to some
> resources
> > I can use online to begin answering the question?
> >
> > I've searched up and down the official pandoc reference but I really
> can't find
> > a detailed explanation as to what the `--citeproc` flag actually *does*,
> and
> > why the `nocite` key is important in the bibliographic metadata.
> >
> > Regards,
> >
> > Amine
> >
> > On Tue, 23 Aug 2022 at 14:42, A A <[1]amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >
> >
> >     In my case, nocite contains a value of "[@*]". Would you please
> elaborate
> >     on what that means?
> >     As far as I know using --citeproc or not has no impact on the final
> result.
> >     I tried both variants as shown below:
> >
> >     pandoc .\bibliography.bib -t markdown -s --citeproc
> >     pandoc .\bibliography.bib -t markdown -s
> >
> >     I get the same output for either command. Both have a nocite of
> "[@*]".
> >
> >     On Tue, 26 Jul 2022 at 14:53, John MacFarlane [2]
> fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> >     wrote:
> >
> >         'blocks' is for the body of the document. We store the reference
> data
> >         in the metadata.  In this case it's all references, so no body.
> >
> >         The 'nocite' entry causes all the references to be included in
> the
> >         bibliography if you process this with --citeproc.  We include
> that by
> >         default so that you can do e.g.
> >
> >         pandoc my.bib -s -o my.html --citeproc
> >
> >         and get a formatted HTML bibliography with all the references.
> >
> >
> >         > On Jul 26, 2022, at 4:47 AM, A A <[3]
> amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >         wrote:
> >         >
> >         > Dear John,
> >         > Indeed, I see that there is an internal representation in the
> form of
> >         a Meta object. I made a dummy bibliography with 4 entries. After
> >         converting to JSON the following structure was apparent:
> >         >
> >         > {
> >         >     "pandoc-api-version": [...],
> >         >     "meta": {
> >         >         "nocite": {...}
> >         >         "references":  {...}
> >         >     },
> >         >     "blocks": []
> >         > }
> >         >
> >         > references contains a list of MetaMapswhich contain the
> recognizable
> >         BibTeX data. blocks is empty and nocite contains some additional
> data
> >         which I don’t understand.
> >         >
> >         > What is the role of nocite and blocks in this AST?
> >         >
> >         > Regards,
> >         >
> >         > Amine
> >         >
> >         >
> >         > On Mon, 25 Jul 2022 at 18:01, John MacFarlane <[4]
> >         fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >         >
> >         > If you do `pandoc yourbib.bib -t native -s` then you'll see how
> >         pandoc represents bibiographies in its AST.  All you need to do,
> then,
> >         is have your custom reader create this sort of structure in the
> >         metadata.
> >         >
> >         >
> >         >
> >         > > On Jul 25, 2022, at 6:14 AM, A A <[5]
> amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >         wrote:
> >         > >
> >         > > Suppose that I would like to define my own markup format,
> something
> >         that is not currently supported by pandoc. I could in theory
> write my
> >         own reader and writer in Lua, making use of pandoc's AST
> elements, and
> >         would then be able to convert to and from this new format to
> other
> >         recognized formats.
> >         > >
> >         > > I'd like to know whether the same can be said of
> bibliographic
> >         formats. Suppose I have a new one that I would like to bake into
> >         pandoc. Since the bibliography seems to be decoupled from the
> AST, what
> >         would be the best way to do this?
> >         > >
> >         > > --
> >         > > 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 [6]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> >         > > To view this discussion on the web visit [7]https://
> >         groups.google.com/d/msgid/pandoc-discuss/
> >         CAMwawgPP62P6%3DXwLSksRv-X11gW7p1A1%2BUhg824n5HAtE_49vw%
> 40mail.gmail.com
> >         .
> >         >
> >         > --
> >         > 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 [8]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> >         > To view this discussion on the web visit [9]
> https://groups.google.com
> >         /d/msgid/pandoc-discuss/
> >         04A5D7A1-B4AD-4A59-AB54-7D5849F23ACA%40gmail.com.
> >         >
> >         > --
> >         > 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 [10]pandoc-discuss+unsubscribe-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm
> .
> >         > To view this discussion on the web visit [11]https://
> >         groups.google.com/d/msgid/pandoc-discuss/
> >         CAMwawgOt0AE-ibyTeUv-Ov_9pvNESyQWeqr%2BDwCjDdFQ9xHs%3DA%
> 40mail.gmail.com
> >         .
> >
> >         --
> >         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 [12]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> >         To view this discussion on the web visit [13]
> https://groups.google.com/
> >         d/msgid/pandoc-discuss/5BC2C9A0-8D21-43E6-B00B-99D7BC319AE4%
> 40gmail.com
> >         .
> >
> >
> >
> > --
> > 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 [14]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To view this discussion on the web visit [15]
> https://groups.google.com/d/msgid/
> > pandoc-discuss/
> > CAMwawgOs%3DbC6eVyWqMs1ae-_334Lgzq43-OhQxGgJPWMmkCyKQ%40mail.gmail.com.
> >
> > References:
> >
> > [1] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> > [2] http://mailto-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org/
> > [3] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> > [4] mailto:fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> > [5] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> > [6] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> > [7]
> https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgPP62P6%3DXwLSksRv-X11gW7p1A1%2BUhg824n5HAtE_49vw%40mail.gmail.com
> > [8] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> > [9]
> https://groups.google.com/d/msgid/pandoc-discuss/04A5D7A1-B4AD-4A59-AB54-7D5849F23ACA%40gmail.com
> > [10] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> > [11]
> https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgOt0AE-ibyTeUv-Ov_9pvNESyQWeqr%2BDwCjDdFQ9xHs%3DA%40mail.gmail.com
> > [12] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> > [13]
> https://groups.google.com/d/msgid/pandoc-discuss/5BC2C9A0-8D21-43E6-B00B-99D7BC319AE4%40gmail.com
> > [14] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> > [15]
> https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgOs%3DbC6eVyWqMs1ae-_334Lgzq43-OhQxGgJPWMmkCyKQ%40mail.gmail.com?utm_medium=email&utm_source=footer
>
> --
> 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/YwiCYQlHqYv1Qo5A%40localhost
> .
>

-- 
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/CAMwawgMRA-Ki8hcj-jrwjBLmgbt8K9OYb3Z_Kz2v1moLCA320g%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 23212 bytes --]

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

* Re: converting from and to a new bibliographic format in pandoc
       [not found]                         ` <CAMwawgMRA-Ki8hcj-jrwjBLmgbt8K9OYb3Z_Kz2v1moLCA320g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-09-21 15:26                           ` Bastien DUMONT
  2022-09-21 16:51                             ` John MacFarlane
  0 siblings, 1 reply; 10+ messages in thread
From: Bastien DUMONT @ 2022-09-21 15:26 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Sorry if it sounds a bit rude, but it seems that the problem with this whole discussion is that nobody really understands what you want to do. Could you provide a simple input file and the desired output, describing your use case rather than the different partial solutions you have thought of? Then someone (not necessarily me) could advise you more effectively.

Le Wednesday 21 September 2022 à 12:38:52PM, A A a écrit :
> Bastien,
> 
>     If your goal is to convert your bibliography file into another
>     bibliographic format, then you can follow this route and write a CSL
>     stylesheet that outputs the desired formatting
> 
> My goal is actually going from markdown metadata-style bibliography to BibTeX/
> BibLaTeX. The implementation already available in Pandoc is great, but I need
> something more minimal and customizable for my purposes. I believe this can be
> done using panflute which has [1]Metadata capabilities.
> 
> I’m quite unfamiliar with CSL, and have some doubts whether I would actually
> require it for what I’m trying to achieve here. I would, however, like to
> understand the current way Pandoc does the markdown to BibLaTeX/LaTeX
> conversion, so that I can implement a similar pattern in my code. Hence why I
> am asking questions about how Pandoc internally handles this conversion (using
> citeproc and such). Does CSL really play a major role within this conversion?
> 
> I tried the commands you recommended, but the only difference between the
> output for pandoc .\bibliography.bib -t markdown -s and pandoc .\
> bibliography.bib -t markdown-citation -s is that the first command has nocite:
> "[@*]" and the second command has nocite: \[@\*\]. No additional information is
> generated with markdown-citation as far as I can tell.
> 
> I’m still not sure what citeproc actually does. Furthermore I’m also very
> confused as to whether CSL plays a role here or not. Any clarifications would
> be very welcome.
> 
> Regards,
> 
> Amine
> 
> 
> On Fri, 26 Aug 2022 at 10:20, Bastien DUMONT <[2]bastien.dumont-VwIFZPTo/vqzQB+pC5nmwQ@public.gmane.orgt>
> wrote:
> 
>     By default, when converting to markdown, the "citations" extension is
>     enabled, so the output file is formatted as a Pandoc Markdown file to be
>     processed by citeproc, with the bibliographic data in the YAML header but
>     no formatted citations. nocite lists all the bibliographic items not
>     actually cited in the document that should be included in the bibliography:
>     a value of [@*] means "include all". If you wanted a formatted bibliography
>     in markdown, you could use:
> 
>     pandoc pandoc .\bibliography.bib -t markdown-citations
> 
>     (You may or may not have to add -V nocite="[*@]", I have not tested it with
>     a bibliography file.)
> 
>     If your goal is to convert your bibliography file into another
>     bibliographic format, then you can follow this route and write a CSL
>     stylesheet that outputs the desired formatting. In this case, converting to
>     "plain" (witout "-citations") would be preferable in order to avoid
>     undesired wrapping in divs.
> 
>     Le Friday 26 August 2022 à 07:31:39AM, A A a écrit :
>     > Dear John (or anyone else),
>     >
>     > Would you please respond to the query below? Or perhaps point to some
>     resources
>     > I can use online to begin answering the question?
>     >
>     > I've searched up and down the official pandoc reference but I really
>     can't find
>     > a detailed explanation as to what the `--citeproc` flag actually *does*,
>     and
>     > why the `nocite` key is important in the bibliographic metadata.
>     >
>     > Regards,
>     >
>     > Amine
>     >
>     > On Tue, 23 Aug 2022 at 14:42, A A <[1][3]amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>     wrote:
>     >
>     >
>     >     In my case, nocite contains a value of "[@*]". Would you please
>     elaborate
>     >     on what that means?
>     >     As far as I know using --citeproc or not has no impact on the final
>     result.
>     >     I tried both variants as shown below:
>     >
>     >     pandoc .\bibliography.bib -t markdown -s --citeproc
>     >     pandoc .\bibliography.bib -t markdown -s
>     >
>     >     I get the same output for either command. Both have a nocite of "[@*]
>     ".
>     >
>     >     On Tue, 26 Jul 2022 at 14:53, John MacFarlane [2][4]
>     fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>     >     wrote:
>     >
>     >         'blocks' is for the body of the document. We store the reference
>     data
>     >         in the metadata.  In this case it's all references, so no body.
>     >
>     >         The 'nocite' entry causes all the references to be included in
>     the
>     >         bibliography if you process this with --citeproc.  We include
>     that by
>     >         default so that you can do e.g.
>     >
>     >         pandoc my.bib -s -o my.html --citeproc
>     >
>     >         and get a formatted HTML bibliography with all the references.
>     >
>     >
>     >         > On Jul 26, 2022, at 4:47 AM, A A <[3][5]
>     amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>     >         wrote:
>     >         >
>     >         > Dear John,
>     >         > Indeed, I see that there is an internal representation in the
>     form of
>     >         a Meta object. I made a dummy bibliography with 4 entries. After
>     >         converting to JSON the following structure was apparent:
>     >         >
>     >         > {
>     >         >     "pandoc-api-version": [...],
>     >         >     "meta": {
>     >         >         "nocite": {...}
>     >         >         "references":  {...}     
>     >         >     },
>     >         >     "blocks": []
>     >         > }
>     >         >
>     >         > references contains a list of MetaMapswhich contain the
>     recognizable
>     >         BibTeX data. blocks is empty and nocite contains some additional
>     data
>     >         which I don’t understand.
>     >         >
>     >         > What is the role of nocite and blocks in this AST?
>     >         >
>     >         > Regards,
>     >         >
>     >         > Amine
>     >         >
>     >         >
>     >         > On Mon, 25 Jul 2022 at 18:01, John MacFarlane <[4]
>     >         [6]fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>     >         >
>     >         > If you do `pandoc yourbib.bib -t native -s` then you'll see how
>     >         pandoc represents bibiographies in its AST.  All you need to do,
>     then,
>     >         is have your custom reader create this sort of structure in the
>     >         metadata.
>     >         >
>     >         >
>     >         >
>     >         > > On Jul 25, 2022, at 6:14 AM, A A <[5][7]
>     amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>     >         wrote:
>     >         > >
>     >         > > Suppose that I would like to define my own markup format,
>     something
>     >         that is not currently supported by pandoc. I could in theory
>     write my
>     >         own reader and writer in Lua, making use of pandoc's AST
>     elements, and
>     >         would then be able to convert to and from this new format to
>     other
>     >         recognized formats.
>     >         > >
>     >         > > I'd like to know whether the same can be said of
>     bibliographic
>     >         formats. Suppose I have a new one that I would like to bake into
>     >         pandoc. Since the bibliography seems to be decoupled from the
>     AST, what
>     >         would be the best way to do this?
>     >         > >
>     >         > > --
>     >         > > 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 [6][8]
>     pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>     >         > > To view this discussion on the web visit [7]https://
>     >         [9]groups.google.com/d/msgid/pandoc-discuss/
>     >         CAMwawgPP62P6%3DXwLSksRv-X11gW7p1A1%2BUhg824n5HAtE_49vw%[10]
>     40mail.gmail.com
>     >         .
>     >         >
>     >         > --
>     >         > 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 [8][11]
>     pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>     >         > To view this discussion on the web visit [9][12]https://
>     groups.google.com
>     >         /d/msgid/pandoc-discuss/
>     >         04A5D7A1-B4AD-4A59-AB54-7D5849F23ACA%[13]40gmail.com.
>     >         >
>     >         > --
>     >         > 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 [10][14]
>     pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>     >         > To view this discussion on the web visit [11]https://
>     >         [15]groups.google.com/d/msgid/pandoc-discuss/
>     >         CAMwawgOt0AE-ibyTeUv-Ov_9pvNESyQWeqr%2BDwCjDdFQ9xHs%3DA%[16]
>     40mail.gmail.com
>     >         .
>     >
>     >         --
>     >         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 [12][17]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>     >         To view this discussion on the web visit [13][18]https://
>     groups.google.com/
>     >         d/msgid/pandoc-discuss/5BC2C9A0-8D21-43E6-B00B-99D7BC319AE4%[19]
>     40gmail.com
>     >         .
>     >
>     >
>     >
>     > --
>     > 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 [14][20]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>     > To view this discussion on the web visit [15][21]https://
>     groups.google.com/d/msgid/
>     > pandoc-discuss/
>     > CAMwawgOs%3DbC6eVyWqMs1ae-_334Lgzq43-OhQxGgJPWMmkCyKQ%[22]
>     40mail.gmail.com.
>     >
>     > References:
>     >
>     > [1] mailto:[23]amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>     > [2] [24]http://mailto-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org/
>     > [3] mailto:[25]amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>     > [4] mailto:[26]fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>     > [5] mailto:[27]amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>     > [6] mailto:[28]pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>     > [7] [29]https://groups.google.com/d/msgid/pandoc-discuss/
>     CAMwawgPP62P6%3DXwLSksRv-X11gW7p1A1%2BUhg824n5HAtE_49vw%40mail.gmail.com
>     > [8] mailto:[30]pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>     > [9] [31]https://groups.google.com/d/msgid/pandoc-discuss/
>     04A5D7A1-B4AD-4A59-AB54-7D5849F23ACA%40gmail.com
>     > [10] mailto:[32]pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>     > [11] [33]https://groups.google.com/d/msgid/pandoc-discuss/
>     CAMwawgOt0AE-ibyTeUv-Ov_9pvNESyQWeqr%2BDwCjDdFQ9xHs%3DA%40mail.gmail.com
>     > [12] mailto:[34]pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>     > [13] [35]https://groups.google.com/d/msgid/pandoc-discuss/
>     5BC2C9A0-8D21-43E6-B00B-99D7BC319AE4%40gmail.com
>     > [14] mailto:[36]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>     > [15] [37]https://groups.google.com/d/msgid/pandoc-discuss/
>     CAMwawgOs%3DbC6eVyWqMs1ae-_334Lgzq43-OhQxGgJPWMmkCyKQ%40mail.gmail.com?
>     utm_medium=email&utm_source=footer
> 
>     --
>     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 [38]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>     To view this discussion on the web visit [39]https://groups.google.com/d/
>     msgid/pandoc-discuss/YwiCYQlHqYv1Qo5A%40localhost.
> 
> --
> 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 [40]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit [41]https://groups.google.com/d/msgid/
> pandoc-discuss/
> CAMwawgMRA-Ki8hcj-jrwjBLmgbt8K9OYb3Z_Kz2v1moLCA320g%40mail.gmail.com.
> 
> References:
> 
> [1] http://scorreia.com/software/panflute/code.html#panflute.elements.MetaBlocks
> [2] mailto:bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org
> [3] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> [4] mailto:fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> [5] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> [6] mailto:fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> [7] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> [8] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [9] http://groups.google.com/d/msgid/pandoc-discuss/
> [10] http://40mail.gmail.com/
> [11] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [12] https://groups.google.com/
> [13] http://40gmail.com/
> [14] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [15] http://groups.google.com/d/msgid/pandoc-discuss/
> [16] http://40mail.gmail.com/
> [17] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [18] https://groups.google.com/
> [19] http://40gmail.com/
> [20] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [21] https://groups.google.com/d/msgid/
> [22] http://40mail.gmail.com/
> [23] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> [24] http://mailto-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org/
> [25] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> [26] mailto:fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> [27] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> [28] mailto:pandoc-discuss%252Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [29] https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgPP62P6%3DXwLSksRv-X11gW7p1A1%2BUhg824n5HAtE_49vw%40mail.gmail.com
> [30] mailto:pandoc-discuss%252Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [31] https://groups.google.com/d/msgid/pandoc-discuss/04A5D7A1-B4AD-4A59-AB54-7D5849F23ACA%40gmail.com
> [32] mailto:pandoc-discuss%252Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [33] https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgOt0AE-ibyTeUv-Ov_9pvNESyQWeqr%2BDwCjDdFQ9xHs%3DA%40mail.gmail.com
> [34] mailto:pandoc-discuss%252Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [35] https://groups.google.com/d/msgid/pandoc-discuss/5BC2C9A0-8D21-43E6-B00B-99D7BC319AE4%40gmail.com
> [36] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [37] https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgOs%3DbC6eVyWqMs1ae-_334Lgzq43-OhQxGgJPWMmkCyKQ%40mail.gmail.com?utm_medium=email&utm_source=footer
> [38] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [39] https://groups.google.com/d/msgid/pandoc-discuss/YwiCYQlHqYv1Qo5A%40localhost
> [40] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [41] https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgMRA-Ki8hcj-jrwjBLmgbt8K9OYb3Z_Kz2v1moLCA320g%40mail.gmail.com?utm_medium=email&utm_source=footer

-- 
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/YystCS6s5UOToSd2%40localhost.


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

* Re: converting from and to a new bibliographic format in pandoc
  2022-09-21 15:26                           ` Bastien DUMONT
@ 2022-09-21 16:51                             ` John MacFarlane
  0 siblings, 0 replies; 10+ messages in thread
From: John MacFarlane @ 2022-09-21 16:51 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Citeproc doesn’t play any role in converting from one bibliographic format to another.  It is only used for resolving citations and generating a formatted bibliography .

> On Sep 21, 2022, at 08:26, Bastien DUMONT <bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org> wrote:
> 
> Sorry if it sounds a bit rude, but it seems that the problem with this whole discussion is that nobody really understands what you want to do. Could you provide a simple input file and the desired output, describing your use case rather than the different partial solutions you have thought of? Then someone (not necessarily me) could advise you more effectively.
> 
>> Le Wednesday 21 September 2022 à 12:38:52PM, A A a écrit :
>> Bastien,
>> 
>>    If your goal is to convert your bibliography file into another
>>    bibliographic format, then you can follow this route and write a CSL
>>    stylesheet that outputs the desired formatting
>> 
>> My goal is actually going from markdown metadata-style bibliography to BibTeX/
>> BibLaTeX. The implementation already available in Pandoc is great, but I need
>> something more minimal and customizable for my purposes. I believe this can be
>> done using panflute which has [1]Metadata capabilities.
>> 
>> I’m quite unfamiliar with CSL, and have some doubts whether I would actually
>> require it for what I’m trying to achieve here. I would, however, like to
>> understand the current way Pandoc does the markdown to BibLaTeX/LaTeX
>> conversion, so that I can implement a similar pattern in my code. Hence why I
>> am asking questions about how Pandoc internally handles this conversion (using
>> citeproc and such). Does CSL really play a major role within this conversion?
>> 
>> I tried the commands you recommended, but the only difference between the
>> output for pandoc .\bibliography.bib -t markdown -s and pandoc .\
>> bibliography.bib -t markdown-citation -s is that the first command has nocite:
>> "[@*]" and the second command has nocite: \[@\*\]. No additional information is
>> generated with markdown-citation as far as I can tell.
>> 
>> I’m still not sure what citeproc actually does. Furthermore I’m also very
>> confused as to whether CSL plays a role here or not. Any clarifications would
>> be very welcome.
>> 
>> Regards,
>> 
>> Amine
>> 
>> 
>> On Fri, 26 Aug 2022 at 10:20, Bastien DUMONT <[2]bastien.dumont@posteo.net>
>> wrote:
>> 
>>    By default, when converting to markdown, the "citations" extension is
>>    enabled, so the output file is formatted as a Pandoc Markdown file to be
>>    processed by citeproc, with the bibliographic data in the YAML header but
>>    no formatted citations. nocite lists all the bibliographic items not
>>    actually cited in the document that should be included in the bibliography:
>>    a value of [@*] means "include all". If you wanted a formatted bibliography
>>    in markdown, you could use:
>> 
>>    pandoc pandoc .\bibliography.bib -t markdown-citations
>> 
>>    (You may or may not have to add -V nocite="[*@]", I have not tested it with
>>    a bibliography file.)
>> 
>>    If your goal is to convert your bibliography file into another
>>    bibliographic format, then you can follow this route and write a CSL
>>    stylesheet that outputs the desired formatting. In this case, converting to
>>    "plain" (witout "-citations") would be preferable in order to avoid
>>    undesired wrapping in divs.
>> 
>>>    Le Friday 26 August 2022 à 07:31:39AM, A A a écrit :
>>> Dear John (or anyone else),
>>> 
>>> Would you please respond to the query below? Or perhaps point to some
>>    resources
>>> I can use online to begin answering the question?
>>> 
>>> I've searched up and down the official pandoc reference but I really
>>    can't find
>>> a detailed explanation as to what the `--citeproc` flag actually *does*,
>>    and
>>> why the `nocite` key is important in the bibliographic metadata.
>>> 
>>> Regards,
>>> 
>>> Amine
>>> 
>>> On Tue, 23 Aug 2022 at 14:42, A A <[1][3]amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>    wrote:
>>> 
>>> 
>>>      In my case, nocite contains a value of "[@*]". Would you please
>>    elaborate
>>>      on what that means?
>>>      As far as I know using --citeproc or not has no impact on the final
>>    result.
>>>      I tried both variants as shown below:
>>> 
>>>      pandoc .\bibliography.bib -t markdown -s --citeproc
>>>      pandoc .\bibliography.bib -t markdown -s
>>> 
>>>      I get the same output for either command. Both have a nocite of "[@*]
>>    ".
>>> 
>>>      On Tue, 26 Jul 2022 at 14:53, John MacFarlane [2][4]
>>    fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>>>      wrote:
>>> 
>>>          'blocks' is for the body of the document. We store the reference
>>    data
>>>          in the metadata.  In this case it's all references, so no body.
>>> 
>>>          The 'nocite' entry causes all the references to be included in
>>    the
>>>          bibliography if you process this with --citeproc.  We include
>>    that by
>>>          default so that you can do e.g.
>>> 
>>>          pandoc my.bib -s -o my.html --citeproc
>>> 
>>>          and get a formatted HTML bibliography with all the references.
>>> 
>>> 
>>>          > On Jul 26, 2022, at 4:47 AM, A A <[3][5]
>>    amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>>          wrote:
>>>          >
>>>          > Dear John,
>>>          > Indeed, I see that there is an internal representation in the
>>    form of
>>>          a Meta object. I made a dummy bibliography with 4 entries. After
>>>          converting to JSON the following structure was apparent:
>>>          >
>>>          > {
>>>          >     "pandoc-api-version": [...],
>>>          >     "meta": {
>>>          >         "nocite": {...}
>>>          >         "references":  {...}     
>>>          >     },
>>>          >     "blocks": []
>>>          > }
>>>          >
>>>          > references contains a list of MetaMapswhich contain the
>>    recognizable
>>>          BibTeX data. blocks is empty and nocite contains some additional
>>    data
>>>          which I don’t understand.
>>>          >
>>>          > What is the role of nocite and blocks in this AST?
>>>          >
>>>          > Regards,
>>>          >
>>>          > Amine
>>>          >
>>>          >
>>>          > On Mon, 25 Jul 2022 at 18:01, John MacFarlane <[4]
>>>          [6]fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>          >
>>>          > If you do `pandoc yourbib.bib -t native -s` then you'll see how
>>>          pandoc represents bibiographies in its AST.  All you need to do,
>>    then,
>>>          is have your custom reader create this sort of structure in the
>>>          metadata.
>>>          >
>>>          >
>>>          >
>>>          > > On Jul 25, 2022, at 6:14 AM, A A <[5][7]
>>    amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>>          wrote:
>>>          > >
>>>          > > Suppose that I would like to define my own markup format,
>>    something
>>>          that is not currently supported by pandoc. I could in theory
>>    write my
>>>          own reader and writer in Lua, making use of pandoc's AST
>>    elements, and
>>>          would then be able to convert to and from this new format to
>>    other
>>>          recognized formats.
>>>          > >
>>>          > > I'd like to know whether the same can be said of
>>    bibliographic
>>>          formats. Suppose I have a new one that I would like to bake into
>>>          pandoc. Since the bibliography seems to be decoupled from the
>>    AST, what
>>>          would be the best way to do this?
>>>          > >
>>>          > > --
>>>          > > 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 [6][8]
>>    pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>>          > > To view this discussion on the web visit [7]https://
>>>          [9]groups.google.com/d/msgid/pandoc-discuss/
>>>          CAMwawgPP62P6%3DXwLSksRv-X11gW7p1A1%2BUhg824n5HAtE_49vw%[10]
>>    40mail.gmail.com
>>>          .
>>>          >
>>>          > --
>>>          > 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 [8][11]
>>    pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>>          > To view this discussion on the web visit [9][12]https://
>>    groups.google.com
>>>          /d/msgid/pandoc-discuss/
>>>          04A5D7A1-B4AD-4A59-AB54-7D5849F23ACA%[13]40gmail.com.
>>>          >
>>>          > --
>>>          > 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 [10][14]
>>    pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>>          > To view this discussion on the web visit [11]https://
>>>          [15]groups.google.com/d/msgid/pandoc-discuss/
>>>          CAMwawgOt0AE-ibyTeUv-Ov_9pvNESyQWeqr%2BDwCjDdFQ9xHs%3DA%[16]
>>    40mail.gmail.com
>>>          .
>>> 
>>>          --
>>>          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 [12][17]pandoc-discuss+unsubscribe-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm.
>>>          To view this discussion on the web visit [13][18]https://
>>    groups.google.com/
>>>          d/msgid/pandoc-discuss/5BC2C9A0-8D21-43E6-B00B-99D7BC319AE4%[19]
>>    40gmail.com
>>>          .
>>> 
>>> 
>>> 
>>> --
>>> 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 [14][20]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>> To view this discussion on the web visit [15][21]https://
>>    groups.google.com/d/msgid/
>>> pandoc-discuss/
>>> CAMwawgOs%3DbC6eVyWqMs1ae-_334Lgzq43-OhQxGgJPWMmkCyKQ%[22]
>>    40mail.gmail.com.
>>> 
>>> References:
>>> 
>>> [1] mailto:[23]amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>>> [2] [24]http://mailto-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org/
>>> [3] mailto:[25]amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>>> [4] mailto:[26]fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>>> [5] mailto:[27]amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>>> [6] mailto:[28]pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>>> [7] [29]https://groups.google.com/d/msgid/pandoc-discuss/
>>    CAMwawgPP62P6%3DXwLSksRv-X11gW7p1A1%2BUhg824n5HAtE_49vw%40mail.gmail.com
>>> [8] mailto:[30]pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>>> [9] [31]https://groups.google.com/d/msgid/pandoc-discuss/
>>    04A5D7A1-B4AD-4A59-AB54-7D5849F23ACA%40gmail.com
>>> [10] mailto:[32]pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>>> [11] [33]https://groups.google.com/d/msgid/pandoc-discuss/
>>    CAMwawgOt0AE-ibyTeUv-Ov_9pvNESyQWeqr%2BDwCjDdFQ9xHs%3DA%40mail.gmail.com
>>> [12] mailto:[34]pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>>> [13] [35]https://groups.google.com/d/msgid/pandoc-discuss/
>>    5BC2C9A0-8D21-43E6-B00B-99D7BC319AE4%40gmail.com
>>> [14] mailto:[36]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>>> [15] [37]https://groups.google.com/d/msgid/pandoc-discuss/
>>    CAMwawgOs%3DbC6eVyWqMs1ae-_334Lgzq43-OhQxGgJPWMmkCyKQ%40mail.gmail.com?
>>    utm_medium=email&utm_source=footer
>> 
>>    --
>>    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 [38]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>    To view this discussion on the web visit [39]https://groups.google.com/d/
>>    msgid/pandoc-discuss/YwiCYQlHqYv1Qo5A%40localhost.
>> 
>> --
>> 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 [40]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> To view this discussion on the web visit [41]https://groups.google.com/d/msgid/
>> pandoc-discuss/
>> CAMwawgMRA-Ki8hcj-jrwjBLmgbt8K9OYb3Z_Kz2v1moLCA320g%40mail.gmail.com.
>> 
>> References:
>> 
>> [1] http://scorreia.com/software/panflute/code.html#panflute.elements.MetaBlocks
>> [2] mailto:bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org
>> [3] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>> [4] mailto:fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>> [5] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>> [6] mailto:fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>> [7] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>> [8] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>> [9] http://groups.google.com/d/msgid/pandoc-discuss/
>> [10] http://40mail.gmail.com/
>> [11] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>> [12] https://groups.google.com/
>> [13] http://40gmail.com/
>> [14] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>> [15] http://groups.google.com/d/msgid/pandoc-discuss/
>> [16] http://40mail.gmail.com/
>> [17] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>> [18] https://groups.google.com/
>> [19] http://40gmail.com/
>> [20] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>> [21] https://groups.google.com/d/msgid/
>> [22] http://40mail.gmail.com/
>> [23] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>> [24] http://mailto-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org/
>> [25] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>> [26] mailto:fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>> [27] mailto:amine.aboufirass-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>> [28] mailto:pandoc-discuss%252Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>> [29] https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgPP62P6%3DXwLSksRv-X11gW7p1A1%2BUhg824n5HAtE_49vw%40mail.gmail.com
>> [30] mailto:pandoc-discuss%252Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>> [31] https://groups.google.com/d/msgid/pandoc-discuss/04A5D7A1-B4AD-4A59-AB54-7D5849F23ACA%40gmail.com
>> [32] mailto:pandoc-discuss%252Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>> [33] https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgOt0AE-ibyTeUv-Ov_9pvNESyQWeqr%2BDwCjDdFQ9xHs%3DA%40mail.gmail.com
>> [34] mailto:pandoc-discuss%252Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>> [35] https://groups.google.com/d/msgid/pandoc-discuss/5BC2C9A0-8D21-43E6-B00B-99D7BC319AE4%40gmail.com
>> [36] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>> [37] https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgOs%3DbC6eVyWqMs1ae-_334Lgzq43-OhQxGgJPWMmkCyKQ%40mail.gmail.com?utm_medium=email&utm_source=footer
>> [38] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>> [39] https://groups.google.com/d/msgid/pandoc-discuss/YwiCYQlHqYv1Qo5A%40localhost
>> [40] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>> [41] https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgMRA-Ki8hcj-jrwjBLmgbt8K9OYb3Z_Kz2v1moLCA320g%40mail.gmail.com?utm_medium=email&utm_source=footer
> 
> -- 
> 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/YystCS6s5UOToSd2%40localhost.

-- 
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/4D2B175B-5E53-4D96-9D43-3B4D73B3358D%40gmail.com.


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

end of thread, other threads:[~2022-09-21 16:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-25 13:14 converting from and to a new bibliographic format in pandoc A A
     [not found] ` <CAMwawgPP62P6=XwLSksRv-X11gW7p1A1+Uhg824n5HAtE_49vw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-07-25 16:00   ` John MacFarlane
     [not found]     ` <04A5D7A1-B4AD-4A59-AB54-7D5849F23ACA-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2022-07-26 11:47       ` A A
2022-07-26 14:53         ` John MacFarlane
     [not found]           ` <5BC2C9A0-8D21-43E6-B00B-99D7BC319AE4-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2022-08-23 14:42             ` A A
     [not found]               ` <CAMwawgNAjuyXpG0M-FZhzuS=aBEZZ4Uanb6gX3NjB9fv0YASAQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-08-26  7:31                 ` A A
     [not found]                   ` <CAMwawgOs=bC6eVyWqMs1ae-_334Lgzq43-OhQxGgJPWMmkCyKQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-08-26  8:20                     ` Bastien DUMONT
2022-09-21 10:38                       ` A A
     [not found]                         ` <CAMwawgMRA-Ki8hcj-jrwjBLmgbt8K9OYb3Z_Kz2v1moLCA320g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-09-21 15:26                           ` Bastien DUMONT
2022-09-21 16:51                             ` John MacFarlane

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