public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Standalone Markdown with Bibliography
@ 2014-06-18 20:15 Andrew Dunning
       [not found] ` <e03854bd-f5d2-41d2-b308-f3e728537648-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Dunning @ 2014-06-18 20:15 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

When asking Pandoc to produce a standalone Markdown file (i.e. using the -s 
flag), it helpfully includes a link in the YAML metadata to the 
bibliography. Does anyone know of a way, however, to have it automatically 
output the actual data for the citations used into the YAML block? (I hoped 
that --bib2yaml might do it, but this can only be used with pandoc-citeproc 
on its own.)

This would be very useful for producing a portable or archival version of 
the file, especially when working from a bibliography file that has more 
information than is actually used in the document. Additionally, it would 
also provide a way when importing data from another reference manager (e.g. 
from Zotero via zotxt) to modify the results before moving on to another 
format, notably for features that are supported in CSL and pandoc but not 
the reference manager.

All best,

Andrew Dunning

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e03854bd-f5d2-41d2-b308-f3e728537648%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: Standalone Markdown with Bibliography
       [not found] ` <e03854bd-f5d2-41d2-b308-f3e728537648-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2014-06-18 22:15   ` John MacFarlane
       [not found]     ` <20140618221538.GA309-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: John MacFarlane @ 2014-06-18 22:15 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

You can use pandoc-citeproc --bib2yaml to produce a YAML block
that can be pasted directly into a pandoc markdown document.

So, if biblio.bib is your bibliography and input.txt is your
source file, just do:

pandoc-citeproc -y < biblio.bib >> input.txt



+++ Andrew Dunning [Jun 18 14 13:15 ]:
>   When asking Pandoc to produce a standalone Markdown file (i.e. using
>   the -s flag), it helpfully includes a link in the YAML metadata to the
>   bibliography. Does anyone know of a way, however, to have it
>   automatically output the actual data for the citations used into the
>   YAML block? (I hoped that --bib2yaml might do it, but this can only be
>   used with pandoc-citeproc on its own.)
>   This would be very useful for producing a portable or archival version
>   of the file, especially when working from a bibliography file that has
>   more information than is actually used in the document. Additionally,
>   it would also provide a way when importing data from another reference
>   manager (e.g. from Zotero via zotxt) to modify the results before
>   moving on to another format, notably for features that are supported in
>   CSL and pandoc but not the reference manager.
>   All best,
>   Andrew Dunning
>
>   --
>   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 [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [3]https://groups.google.com/d/msgid/pandoc-discuss/e03854bd-f5d2-41d2-
>   b308-f3e728537648%40googlegroups.com.
>   For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
>   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. https://groups.google.com/d/msgid/pandoc-discuss/e03854bd-f5d2-41d2-b308-f3e728537648%40googlegroups.com?utm_medium=email&utm_source=footer
>   4. https://groups.google.com/d/optout


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

* Re: Standalone Markdown with Bibliography
       [not found]     ` <20140618221538.GA309-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
@ 2014-06-20 15:35       ` Andrew Dunning
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Dunning @ 2014-06-20 15:35 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

Thanks for the reply; glad it wasn't me, in any case. The problem is that 
I'm not working from my own bibliography file, relying instead on the 
wonderful zotxt filter running inside pandoc. In order to get the JSON 
bibliography file, which zotxt creates somewhere under /var/folders/ each 
time it runs, one has to first generate a new standalone Markdown file, 
like so:

pandoc -F pandoc-zotxt -F pandoc-citeproc document.md -o newdocument.md -s

This provides the full path in the new file's YAML block, and the file can 
be adapted for one's own purposes without further need of zotxt or Zotero.

It would be very convenient if this this could be automated, but I do not 
have the skills to implement it myself, and I have no desire to exploit 
your munificence.

On Wednesday, June 18, 2014 6:15:54 PM UTC-4, John MacFarlane wrote:
>
> You can use pandoc-citeproc --bib2yaml to produce a YAML block 
> that can be pasted directly into a pandoc markdown document. 
>
> So, if biblio.bib is your bibliography and input.txt is your 
> source file, just do: 
>
> pandoc-citeproc -y < biblio.bib >> input.txt 
>
>
>
> +++ Andrew Dunning [Jun 18 14 13:15 ]: 
> >   When asking Pandoc to produce a standalone Markdown file (i.e. using 
> >   the -s flag), it helpfully includes a link in the YAML metadata to the 
> >   bibliography. Does anyone know of a way, however, to have it 
> >   automatically output the actual data for the citations used into the 
> >   YAML block? (I hoped that --bib2yaml might do it, but this can only be 
> >   used with pandoc-citeproc on its own.) 
> >   This would be very useful for producing a portable or archival version 
> >   of the file, especially when working from a bibliography file that has 
> >   more information than is actually used in the document. Additionally, 
> >   it would also provide a way when importing data from another reference 
> >   manager (e.g. from Zotero via zotxt) to modify the results before 
> >   moving on to another format, notably for features that are supported 
> in 
> >   CSL and pandoc but not the reference manager. 
> >   All best, 
> >   Andrew Dunning 
> > 
> >   -- 
> >   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 [1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> >   To post to this group, send email to 
> >   [2]pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> >   To view this discussion on the web visit 
> >   [3]
> https://groups.google.com/d/msgid/pandoc-discuss/e03854bd-f5d2-41d2- 
> >   b308-f3e728537648%40googlegroups.com. 
> >   For more options, visit [4]https://groups.google.com/d/optout. 
> > 
> >References 
> > 
> >   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:> 
> >   2. mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:> 
> >   3. 
> https://groups.google.com/d/msgid/pandoc-discuss/e03854bd-f5d2-41d2-b308-f3e728537648%40googlegroups.com?utm_medium=email&utm_source=footer 
> >   4. https://groups.google.com/d/optout 
>

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/8f9e351b-0826-4bf0-9613-336a712d9c5f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

end of thread, other threads:[~2014-06-20 15:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-18 20:15 Standalone Markdown with Bibliography Andrew Dunning
     [not found] ` <e03854bd-f5d2-41d2-b308-f3e728537648-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2014-06-18 22:15   ` John MacFarlane
     [not found]     ` <20140618221538.GA309-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
2014-06-20 15:35       ` Andrew Dunning

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