public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* how to generate the bibliography for a document?
@ 2020-11-18 12:07 King John Unn
       [not found] ` <89f878c1-770d-4d21-b372-15961fb5e385n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: King John Unn @ 2020-11-18 12:07 UTC (permalink / raw)
  To: pandoc-discuss


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


hello community, 

I am a new user to pandoc. I am trying to generate the bibliography for a 
document. My template looks like this:

```
$body$
```

This allows me to create a plain text document from markdown without 
header, title, toc, etc. 

```
body text with references...

References

reference 1
...
reference n
```

I want to remove the body, too and only stick with:

```
References

reference 1
...
reference n
```
```

Is it possible to generate the reference only? If possible i would like to 
further modify the format of references, too.

-- 
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/89f878c1-770d-4d21-b372-15961fb5e385n%40googlegroups.com.

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

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

* AW: how to generate the bibliography for a document?
       [not found] ` <89f878c1-770d-4d21-b372-15961fb5e385n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-11-18 12:28   ` denis.maier-FfwAq0itz3ofv37vnLkPlQ
  2020-11-18 13:12   ` Joseph Reagle
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 15+ messages in thread
From: denis.maier-FfwAq0itz3ofv37vnLkPlQ @ 2020-11-18 12:28 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

Hi,

the problem here is that the references are part of the $body$.

You can use filters to keep only the references and remove everything else.

Best,
Denis

Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag von King John Unn
Gesendet: Mittwoch, 18. November 2020 13:08
An: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Betreff: how to generate the bibliography for a document?


hello community,

I am a new user to pandoc. I am trying to generate the bibliography for a document. My template looks like this:

```
$body$
```

This allows me to create a plain text document from markdown without header, title, toc, etc.

```
body text with references...

References

reference 1
...
reference n
```

I want to remove the body, too and only stick with:

```
References

reference 1
...
reference n
```
```

Is it possible to generate the reference only? If possible i would like to further modify the format of references, too.
--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/89f878c1-770d-4d21-b372-15961fb5e385n%40googlegroups.com<https://groups.google.com/d/msgid/pandoc-discuss/89f878c1-770d-4d21-b372-15961fb5e385n%40googlegroups.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/388b1c905a6b433a9a369349aa731fcf%40ub.unibe.ch.

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

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

* Re: how to generate the bibliography for a document?
       [not found] ` <89f878c1-770d-4d21-b372-15961fb5e385n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2020-11-18 12:28   ` AW: " denis.maier-FfwAq0itz3ofv37vnLkPlQ
@ 2020-11-18 13:12   ` Joseph Reagle
  2020-11-18 13:18   ` Gabriel Nützi
  2020-11-18 13:19   ` Pranesh Prakash
  3 siblings, 0 replies; 15+ messages in thread
From: Joseph Reagle @ 2020-11-18 13:12 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On 11/18/20 7:07 AM, King John Unn wrote:
> Is it possible to generate the reference only? 
> If possible i would like to further modify the format of references, too. 

You can use pandoc's `nocite`.

  https://pandoc.org/MANUAL.html#including-uncited-items-in-the-bibliography

You specify the format of references via CSL. For example, I use apa-cv.csl for my CV.


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

* Re: how to generate the bibliography for a document?
       [not found] ` <89f878c1-770d-4d21-b372-15961fb5e385n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2020-11-18 12:28   ` AW: " denis.maier-FfwAq0itz3ofv37vnLkPlQ
  2020-11-18 13:12   ` Joseph Reagle
@ 2020-11-18 13:18   ` Gabriel Nützi
  2020-11-18 13:19   ` Pranesh Prakash
  3 siblings, 0 replies; 15+ messages in thread
From: Gabriel Nützi @ 2020-11-18 13:18 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

You can use --standalone flag: 
https://pandoc.org/MANUAL.html#option--standalone

Then you can write a Lua filter which removes everything except a 
*attributed tagged* paragraph

# References  {keep=true}

You need to check that attribute `keep` in the filter
as a start:

https://pandoc.org/lua-filters.html#setting-the-date-in-the-metadata
https://github.com/pandoc/lua-filters

Maybe something like:
```lua
function remove(block)
     if block.attributes["keep"] == "true" then
         return nil -- keep the block
     end
    else pandoc.List() -- remove the whole block
end

function Pandoc(el)
     pandoc.walk_block(pandoc.Div(el.blocks), {Blocks = remove} )
     os.exit(0)
end
```

Am 18.11.2020 um 13:07 schrieb King John Unn:
>
> hello community,
>
> I am a new user to pandoc. I am trying to generate the bibliography 
> for a document. My template looks like this:
>
> ```
> $body$
> ```
>
> This allows me to create a plain text document from markdown without 
> header, title, toc, etc.
>
> ```
> body text with references...
>
> References
>
> reference 1
> ...
> reference n
> ```
>
> I want to remove the body, too and only stick with:
>
> ```
> References
>
> reference 1
> ...
> reference n
> ```
> ```
>
> Is it possible to generate the reference only? If possible i would 
> like to further modify the format of references, too.
> -- 
> 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
> <mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/89f878c1-770d-4d21-b372-15961fb5e385n%40googlegroups.com 
> <https://groups.google.com/d/msgid/pandoc-discuss/89f878c1-770d-4d21-b372-15961fb5e385n%40googlegroups.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/92029b56-4758-2713-16d1-ffca9f3ac786%40gmail.com.

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

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

* Re: how to generate the bibliography for a document?
       [not found] ` <89f878c1-770d-4d21-b372-15961fb5e385n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
                     ` (2 preceding siblings ...)
  2020-11-18 13:18   ` Gabriel Nützi
@ 2020-11-18 13:19   ` Pranesh Prakash
       [not found]     ` <538a99b8-3ed4-4145-a4b7-c42145b61fefn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  3 siblings, 1 reply; 15+ messages in thread
From: Pranesh Prakash @ 2020-11-18 13:19 UTC (permalink / raw)
  To: pandoc-discuss


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

Hi,
I too recently went through the process of creating a document with a list 
of all my publications.  

Here's the command I used:
``
$ pandoc -d bib-defaults.yaml
```

And here's the content of the bib-defaults.yaml file:
https://gist.github.com/the-solipsist/8fcab57c2d7771ef3758f927ec79ae34

And here's the publications.md file that I used as the input:
```
---
nocite: '@*'
...

# Books, book chapters & reports

:::{#refs_book}
:::

# Journal articles & conference papers

:::{#refs_journal}
:::

# Op-eds & press articles

:::{#refs_press}
:::
```

I hope that helps.
On Wednesday, 18 November, 2020 at 5:37:34 pm UTC+5:30 King John Unn wrote:

>
> hello community, 
>
> I am a new user to pandoc. I am trying to generate the bibliography for a 
> document. My template looks like this:
>
> ```
> $body$
> ```
>
> This allows me to create a plain text document from markdown without 
> header, title, toc, etc. 
>
> ```
> body text with references...
>
> References
>
> reference 1
> ...
> reference n
> ```
>
> I want to remove the body, too and only stick with:
>
> ```
> References
>
> reference 1
> ...
> reference n
> ```
> ```
>
> Is it possible to generate the reference only? If possible i would like to 
> further modify the format of references, too.
>

-- 
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/538a99b8-3ed4-4145-a4b7-c42145b61fefn%40googlegroups.com.

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

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

* Re: how to generate the bibliography for a document?
       [not found]     ` <538a99b8-3ed4-4145-a4b7-c42145b61fefn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-11-18 19:59       ` King John Unn
       [not found]         ` <d3fd4aa4-cfe2-4d7f-be3d-f844dfd676aan-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: King John Unn @ 2020-11-18 19:59 UTC (permalink / raw)
  To: pandoc-discuss


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

There are quite some solutions to choose from. `nocite` is awesome. It's 
beginner friendly and i could solve my problem. Didn't even have to mess 
with templates or filters :)

thank you for all your help. 
On Wednesday, November 18, 2020 at 1:19:01 PM UTC the.so...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:

> Hi,
> I too recently went through the process of creating a document with a list 
> of all my publications.  
>
> Here's the command I used:
> ``
> $ pandoc -d bib-defaults.yaml
> ```
>
> And here's the content of the bib-defaults.yaml file:
> https://gist.github.com/the-solipsist/8fcab57c2d7771ef3758f927ec79ae34
>
> And here's the publications.md file that I used as the input:
> ```
> ---
> nocite: '@*'
> ...
>
> # Books, book chapters & reports
>
> :::{#refs_book}
> :::
>
> # Journal articles & conference papers
>
> :::{#refs_journal}
> :::
>
> # Op-eds & press articles
>
> :::{#refs_press}
> :::
> ```
>
> I hope that helps.
> On Wednesday, 18 November, 2020 at 5:37:34 pm UTC+5:30 King John Unn wrote:
>
>>
>> hello community, 
>>
>> I am a new user to pandoc. I am trying to generate the bibliography for a 
>> document. My template looks like this:
>>
>> ```
>> $body$
>> ```
>>
>> This allows me to create a plain text document from markdown without 
>> header, title, toc, etc. 
>>
>> ```
>> body text with references...
>>
>> References
>>
>> reference 1
>> ...
>> reference n
>> ```
>>
>> I want to remove the body, too and only stick with:
>>
>> ```
>> References
>>
>> reference 1
>> ...
>> reference n
>> ```
>> ```
>>
>> Is it possible to generate the reference only? If possible i would like 
>> to further modify the format of references, too.
>>
>

-- 
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/d3fd4aa4-cfe2-4d7f-be3d-f844dfd676aan%40googlegroups.com.

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

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

* Re: how to generate the bibliography for a document?
       [not found]         ` <d3fd4aa4-cfe2-4d7f-be3d-f844dfd676aan-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-11-18 20:57           ` hex
       [not found]             ` <3881d8c8-1c42-d10a-ec51-c209d989579a-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2020-11-19  0:00           ` John MacFarlane
  1 sibling, 1 reply; 15+ messages in thread
From: hex @ 2020-11-18 20:57 UTC (permalink / raw)
  To: pandoc-discuss

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

I noticed one small problem: i would like to add the citekey to each entry:

|``` [ref]: Doe, John "Title" https://somegroups.md ``` the format is 
not really important to me. I care most about citekey and url. What i 
have now: ```|
||Doe, John "Title" https://somegroups.md| ``` |||

Can this be achieved with a citation style? There are sooo many i didn't 
find any with citekeys. Alternatively, it would already be helpful to 
know in which order citations are listed.



On 18/11/2020 19:59, King John Unn wrote:
> There are quite some solutions to choose from. `nocite` is awesome. 
> It's beginner friendly and i could solve my problem. Didn't even have 
> to mess with templates or filters :)
>
> thank you for all your help.
> On Wednesday, November 18, 2020 at 1:19:01 PM UTC the.so...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 
> wrote:
>
>     Hi,
>     I too recently went through the process of creating a document
>     with a list of all my publications.
>
>     Here's the command I used:
>     ``
>     $ pandoc -d bib-defaults.yaml
>     ```
>
>     And here's the content of the bib-defaults.yaml file:
>     https://gist.github.com/the-solipsist/8fcab57c2d7771ef3758f927ec79ae34
>
>     And here's the publications.md file that I used as the input:
>     ```
>     ---
>     nocite: '@*'
>     ...
>
>     # Books, book chapters & reports
>
>     :::{#refs_book}
>     :::
>
>     # Journal articles & conference papers
>
>     :::{#refs_journal}
>     :::
>
>     # Op-eds & press articles
>
>     :::{#refs_press}
>     :::
>     ```
>
>     I hope that helps.
>     On Wednesday, 18 November, 2020 at 5:37:34 pm UTC+5:30 King John
>     Unn wrote:
>
>
>         hello community,
>
>         I am a new user to pandoc. I am trying to generate the
>         bibliography for a document. My template looks like this:
>
>         ```
>         $body$
>         ```
>
>         This allows me to create a plain text document from markdown
>         without header, title, toc, etc.
>
>         ```
>         body text with references...
>
>         References
>
>         reference 1
>         ...
>         reference n
>         ```
>
>         I want to remove the body, too and only stick with:
>
>         ```
>         References
>
>         reference 1
>         ...
>         reference n
>         ```
>         ```
>
>         Is it possible to generate the reference only? If possible i
>         would like to further modify the format of references, too.
>
> -- 
> You received this message because you are subscribed to a topic in the 
> Google Groups "pandoc-discuss" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/pandoc-discuss/pbT4p_13Kt0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
> <mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/d3fd4aa4-cfe2-4d7f-be3d-f844dfd676aan%40googlegroups.com 
> <https://groups.google.com/d/msgid/pandoc-discuss/d3fd4aa4-cfe2-4d7f-be3d-f844dfd676aan%40googlegroups.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/3881d8c8-1c42-d10a-ec51-c209d989579a%40gmail.com.

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

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

* Re: how to generate the bibliography for a document?
       [not found]         ` <d3fd4aa4-cfe2-4d7f-be3d-f844dfd676aan-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2020-11-18 20:57           ` hex
@ 2020-11-19  0:00           ` John MacFarlane
       [not found]             ` <m2a6ve5i7u.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
  1 sibling, 1 reply; 15+ messages in thread
From: John MacFarlane @ 2020-11-19  0:00 UTC (permalink / raw)
  To: King John Unn, pandoc-discuss


Just one note: you can simply do

pandoc mybib.bib --citeproc -s -o formatted-bibliography.html

or any format you like.

If the input is a bibliography format (bibtex, biblatex,
csl json), pandoc will automatically generate a document
as if you had nocite in the metadata.


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

* Re: how to generate the bibliography for a document?
       [not found]             ` <3881d8c8-1c42-d10a-ec51-c209d989579a-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2020-11-19  0:02               ` John MacFarlane
  0 siblings, 0 replies; 15+ messages in thread
From: John MacFarlane @ 2020-11-19  0:02 UTC (permalink / raw)
  To: hex, pandoc-discuss


Pandoc adds the citekey as an attribute in the enclosing div.

You can extract it (take the id attribute of the Div and
subtract the 'ref-').

A style could also be told to print the citekey, I assume.

As for URLs, this is style dependent.

hex <hex7c3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> I noticed one small problem: i would like to add the citekey to each entry:
>
> |``` [ref]: Doe, John "Title" https://somegroups.md ``` the format is 
> not really important to me. I care most about citekey and url. What i 
> have now: ```|
> ||Doe, John "Title" https://somegroups.md| ``` |||
>
> Can this be achieved with a citation style? There are sooo many i didn't 
> find any with citekeys. Alternatively, it would already be helpful to 
> know in which order citations are listed.
>
>
>
> On 18/11/2020 19:59, King John Unn wrote:
>> There are quite some solutions to choose from. `nocite` is awesome. 
>> It's beginner friendly and i could solve my problem. Didn't even have 
>> to mess with templates or filters :)
>>
>> thank you for all your help.
>> On Wednesday, November 18, 2020 at 1:19:01 PM UTC the.so...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 
>> wrote:
>>
>>     Hi,
>>     I too recently went through the process of creating a document
>>     with a list of all my publications.
>>
>>     Here's the command I used:
>>     ``
>>     $ pandoc -d bib-defaults.yaml
>>     ```
>>
>>     And here's the content of the bib-defaults.yaml file:
>>     https://gist.github.com/the-solipsist/8fcab57c2d7771ef3758f927ec79ae34
>>
>>     And here's the publications.md file that I used as the input:
>>     ```
>>     ---
>>     nocite: '@*'
>>     ...
>>
>>     # Books, book chapters & reports
>>
>>     :::{#refs_book}
>>     :::
>>
>>     # Journal articles & conference papers
>>
>>     :::{#refs_journal}
>>     :::
>>
>>     # Op-eds & press articles
>>
>>     :::{#refs_press}
>>     :::
>>     ```
>>
>>     I hope that helps.
>>     On Wednesday, 18 November, 2020 at 5:37:34 pm UTC+5:30 King John
>>     Unn wrote:
>>
>>
>>         hello community,
>>
>>         I am a new user to pandoc. I am trying to generate the
>>         bibliography for a document. My template looks like this:
>>
>>         ```
>>         $body$
>>         ```
>>
>>         This allows me to create a plain text document from markdown
>>         without header, title, toc, etc.
>>
>>         ```
>>         body text with references...
>>
>>         References
>>
>>         reference 1
>>         ...
>>         reference n
>>         ```
>>
>>         I want to remove the body, too and only stick with:
>>
>>         ```
>>         References
>>
>>         reference 1
>>         ...
>>         reference n
>>         ```
>>         ```
>>
>>         Is it possible to generate the reference only? If possible i
>>         would like to further modify the format of references, too.
>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "pandoc-discuss" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/pandoc-discuss/pbT4p_13Kt0/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
>> <mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/d3fd4aa4-cfe2-4d7f-be3d-f844dfd676aan%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/d3fd4aa4-cfe2-4d7f-be3d-f844dfd676aan%40googlegroups.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/3881d8c8-1c42-d10a-ec51-c209d989579a%40gmail.com.


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

* Re: how to generate the bibliography for a document?
       [not found]             ` <m2a6ve5i7u.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
@ 2020-11-20 21:38               ` jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
       [not found]                 ` <ce80a7a2-bfb3-4ff8-ac1f-26f8a0a1fa9en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org @ 2020-11-20 21:38 UTC (permalink / raw)
  To: pandoc-discuss


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

On Wednesday, 18 November 2020 at 19:00:23 UTC-5 John MacFarlane wrote:

>
> Just one note: you can simply do 
>
> pandoc mybib.bib --citeproc -s -o formatted-bibliography.html 
>
> or any format you like. 
>
> If the input is a bibliography format (bibtex, biblatex, 
> csl json), pandoc will automatically generate a document 
> as if you had nocite in the metadata. 
>

This isn't working for me with json input (from Zotero). bib (also from 
Zotero) works just fine. I'm getting this error with the json:

```JSON parse error: Error in $: mempty``` 

even with a json file with only one entry that json_verify is happy with. 
The pandoc command is barfing on it. The old, nocite way works fine still.

PS A side note: the new method with --citeproc generates html spans every 
place the bib has double curly brackets to preserve cases in title. Seems 
unnecessary.

-- 
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/ce80a7a2-bfb3-4ff8-ac1f-26f8a0a1fa9en%40googlegroups.com.

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

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

* Re: how to generate the bibliography for a document?
       [not found]                 ` <ce80a7a2-bfb3-4ff8-ac1f-26f8a0a1fa9en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-11-21  0:22                   ` John MacFarlane
       [not found]                     ` <m2h7pjftjg.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: John MacFarlane @ 2020-11-21  0:22 UTC (permalink / raw)
  To: jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, pandoc-discuss

"jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <jmuccigr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> This isn't working for me with json input (from Zotero). bib (also from 
> Zotero) works just fine. I'm getting this error with the json:
>
> ```JSON parse error: Error in $: mempty``` 
>
> even with a json file with only one entry that json_verify is happy with. 
> The pandoc command is barfing on it. The old, nocite way works fine still.

Post it here; maybe it's a bug?

> PS A side note: the new method with --citeproc generates html spans every 
> place the bib has double curly brackets to preserve cases in title. Seems 
> unnecessary.

True, but also pretty harmless.  We could get rid of them but
there might be some performance penalty.


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

* Re: how to generate the bibliography for a document?
       [not found]                     ` <m2h7pjftjg.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
@ 2020-11-21 14:23                       ` Pranesh Prakash
       [not found]                         ` <22933182-2014-4210-a47f-02f754995774n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Pranesh Prakash @ 2020-11-21 14:23 UTC (permalink / raw)
  To: pandoc-discuss


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

When using CSL-JSON, the input format needs to be specified explicitly:
```
$ pandoc -f csljson mybib.json -s -o formatted-bibliography.html
```

It won't work without the `-f csljson`.  It will still work without that 
flag when the bibliography input format is CSL-YAML or BibLaTeX though, 
since the former is read as Markdown and the latter's format is guessed 
using its extension (.bib).

I hope that helps.

As a side note, perhaps including a more descriptive warning/error message 
might be helpful.  For .y{a}ml input files, the warning says:

[WARNING] Could not deduce format from file extension .y{a}ml
  Defaulting to markdown

Regards,
Pranesh

On Saturday, 21 November, 2020 at 5:52:30 am UTC+5:30 John MacFarlane wrote:

> "jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > This isn't working for me with json input (from Zotero). bib (also from 
> > Zotero) works just fine. I'm getting this error with the json:
> >
> > ```JSON parse error: Error in $: mempty``` 
> >
> > even with a json file with only one entry that json_verify is happy 
> with. 
> > The pandoc command is barfing on it. The old, nocite way works fine 
> still.
>
> Post it here; maybe it's a bug?
>
> > PS A side note: the new method with --citeproc generates html spans 
> every 
> > place the bib has double curly brackets to preserve cases in title. 
> Seems 
> > unnecessary.
>
> True, but also pretty harmless. We could get rid of them but
> there might be some performance penalty.
>

-- 
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/22933182-2014-4210-a47f-02f754995774n%40googlegroups.com.

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

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

* Re: how to generate the bibliography for a document?
       [not found]                         ` <22933182-2014-4210-a47f-02f754995774n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-11-21 15:38                           ` jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
       [not found]                             ` <87b8a4f1-8abc-4c7a-80bf-c62408dc1b60n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org @ 2020-11-21 15:38 UTC (permalink / raw)
  To: pandoc-discuss


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



On Saturday, 21 November 2020 at 09:23:45 UTC-5 the.so...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:

> When using CSL-JSON, the input format needs to be specified explicitly:
> ```
> $ pandoc -f csljson mybib.json -s -o formatted-bibliography.html
> ```
>
> It won't work without the `-f csljson`.  It will still work without that 
> flag when the bibliography input format is CSL-YAML or BibLaTeX though, 
> since the former is read as Markdown and the latter's format is guessed 
> using its extension (.bib).
>
> I hope that helps.
>
>>
>>
It does! That's the issue.

@jgm, I would suggest this "just working" rather than having to include the 
flag. Are there issues with just guessing from the extension as with .bib?

Regarding the span additions I noted, these are gone now, though there are 
now some differences in the treatment of spaces and double hyphens, 
straight quotation marks, etc. that weren't there before. The spaces aren't 
a big deal for me  (and are mostly in places where a space has crept in 
before punctuation - usually an issue with Italian titles in JSTOR in my 
case), though I have to admit I don't quite understand all the choices that 
are being made. The changes to punctuation marks are less desirable. For 
example, I'd like curly quotes, not straight ones, and no double hyphens. 
(Happy to make this a separate thread.) 

-- 
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/87b8a4f1-8abc-4c7a-80bf-c62408dc1b60n%40googlegroups.com.

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

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

* Re: how to generate the bibliography for a document?
       [not found]                             ` <87b8a4f1-8abc-4c7a-80bf-c62408dc1b60n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-11-21 20:59                               ` John MacFarlane
       [not found]                                 ` <m2blfqfmtr.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: John MacFarlane @ 2020-11-21 20:59 UTC (permalink / raw)
  To: jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, pandoc-discuss

"jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <jmuccigr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:


> @jgm, I would suggest this "just working" rather than having to include the 
> flag. Are there issues with just guessing from the extension as with .bib?

Yes. The extension is .json, and pandoc already has an
established default treatment of this extension: pandoc's
json-serialized AST.

> Regarding the span additions I noted, these are gone now, though there are 
> now some differences in the treatment of spaces and double hyphens, 
> straight quotation marks, etc. that weren't there before. The spaces aren't 
> a big deal for me  (and are mostly in places where a space has crept in 
> before punctuation - usually an issue with Italian titles in JSTOR in my 
> case), though I have to admit I don't quite understand all the choices that 
> are being made. The changes to punctuation marks are less desirable. For 
> example, I'd like curly quotes, not straight ones, and no double hyphens. 
> (Happy to make this a separate thread.) 

Yes, separate thread would be good.


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

* Re: how to generate the bibliography for a document?
       [not found]                                 ` <m2blfqfmtr.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
@ 2020-11-21 23:20                                   ` jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
  0 siblings, 0 replies; 15+ messages in thread
From: jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org @ 2020-11-21 23:20 UTC (permalink / raw)
  To: pandoc-discuss


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

On Saturday, 21 November 2020 at 15:59:47 UTC-5 John MacFarlane wrote:

> "jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: 
>
>
> > @jgm, I would suggest this "just working" rather than having to include 
> the 
> > flag. Are there issues with just guessing from the extension as with 
> .bib? 
>
> Yes. The extension is .json, and pandoc already has an 
> established default treatment of this extension: pandoc's 
> json-serialized AST. 
>

Gotcha. I'll use the flag then.
 

> > Regarding the span additions I noted, these are gone now, though there 
> are 
> > now some differences in the treatment of spaces and double hyphens, 
> > straight quotation marks, etc. that weren't there before. The spaces 
> aren't 
> > a big deal for me (and are mostly in places where a space has crept in 
> > before punctuation - usually an issue with Italian titles in JSTOR in my 
> > case), though I have to admit I don't quite understand all the choices 
> that 
> > are being made. The changes to punctuation marks are less desirable. For 
> > example, I'd like curly quotes, not straight ones, and no double 
> hyphens. 
> > (Happy to make this a separate thread.) 
>
> Yes, separate thread would be good. 
>

Done.

-- 
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/13e78c4a-b519-4e44-9049-9d67da486a68n%40googlegroups.com.

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

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

end of thread, other threads:[~2020-11-21 23:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18 12:07 how to generate the bibliography for a document? King John Unn
     [not found] ` <89f878c1-770d-4d21-b372-15961fb5e385n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-11-18 12:28   ` AW: " denis.maier-FfwAq0itz3ofv37vnLkPlQ
2020-11-18 13:12   ` Joseph Reagle
2020-11-18 13:18   ` Gabriel Nützi
2020-11-18 13:19   ` Pranesh Prakash
     [not found]     ` <538a99b8-3ed4-4145-a4b7-c42145b61fefn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-11-18 19:59       ` King John Unn
     [not found]         ` <d3fd4aa4-cfe2-4d7f-be3d-f844dfd676aan-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-11-18 20:57           ` hex
     [not found]             ` <3881d8c8-1c42-d10a-ec51-c209d989579a-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-11-19  0:02               ` John MacFarlane
2020-11-19  0:00           ` John MacFarlane
     [not found]             ` <m2a6ve5i7u.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2020-11-20 21:38               ` jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
     [not found]                 ` <ce80a7a2-bfb3-4ff8-ac1f-26f8a0a1fa9en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-11-21  0:22                   ` John MacFarlane
     [not found]                     ` <m2h7pjftjg.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2020-11-21 14:23                       ` Pranesh Prakash
     [not found]                         ` <22933182-2014-4210-a47f-02f754995774n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-11-21 15:38                           ` jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
     [not found]                             ` <87b8a4f1-8abc-4c7a-80bf-c62408dc1b60n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-11-21 20:59                               ` John MacFarlane
     [not found]                                 ` <m2blfqfmtr.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2020-11-21 23:20                                   ` jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

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