public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Converting Markdown to (Multi)Markdown but citations are getting expanded twice?
@ 2020-05-05 11:40 Balaji
       [not found] ` <5041cd75-7c55-41ec-a8c6-ac28580a39ef-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Balaji @ 2020-05-05 11:40 UTC (permalink / raw)
  To: pandoc-discuss


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

Hello,

I'm very new to using tools such as pandoc so it's very possible that this 
is a case of mis-reading TFM, but hours of searching thru Stackoverflow and 
other community posts have left me at a dead-end so I hope someone can help 
me out.

I'm trying to convert Markdown files that have BiBTeX style citations into 
Markdown again but expand the citation as a footnote. I've come close using 
the Chicago Manual of Style 17th edition CSL but am finding that the 
citation gets expanded twice. A minimal example below:

Original Markdown file - cite.md:
Here is one reference citing the Reactome Project. [^1]

[^1]: @deustachio_2003


BiB file - cite.bib:
@article{deustachio_2003, title={Pentose phosphate pathway}, volume={5}, DOI
={10.3180/react_1859.1}, journal={Reactome - a curated knowledgebase of 
biological pathways}, author={Deustachio, P}, year={2003}, month={Mar}}

Pandoc command:
pandoc cite.md --filter pandoc-citeproc -t markdown_mmd -o cite-new.md --
bibliography=cite.bib --csl=chicago-full.csl

Output file - cite-new.md:
Here is one reference citing the Reactome Project.[^1]

<div id="refs" class="references hanging-indent" markdown="1">

<div id="ref-deustachio_2003" markdown="1">

Deustachio, P. “Pentose Phosphate Pathway.” *Reactome - a Curated
Knowledgebase of Biological Pathways* 5 (March 2003).
<https://doi.org/10.3180/react_1859.1>.

</div>

</div>

[^1]: P Deustachio, “Pentose Phosphate Pathway,” *Reactome - a Curated
    Knowledgebase of Biological Pathways* 5 (March 2003),
    <https://doi.org/10.3180/react_1859.1>

I have not been able to figure out how to prevent the additional citation 
in the <div></div> from appearing in the output Markdown file and would 
appreciate any help in this regard!

FWIW, this is using pandoc 2.9.2.1 on Windows.

-- 
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/5041cd75-7c55-41ec-a8c6-ac28580a39ef%40googlegroups.com.

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

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

* Re: Converting Markdown to (Multi)Markdown but citations are getting expanded twice?
       [not found] ` <5041cd75-7c55-41ec-a8c6-ac28580a39ef-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-05-05 14:09   ` Gu Lu
       [not found]     ` <261c27ed-275a-4b07-9eab-d6b584bec482-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Gu Lu @ 2020-05-05 14:09 UTC (permalink / raw)
  To: pandoc-discuss


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

This is because you are mixing footnotes and citations. *@deustachio_2003* 
is a text citation: it will be expanded into e.g. "(Deustachio 2003)" or 
"[1]" depending on your citation style. It is equivalent to the latex 
*\cite{deustachio_2003}* command. This is not to be confused with items in 
the bibliography. The bibliography will automatically be created at the end 
of the document, so no need to make it yourself using footnotes.

Le mardi 5 mai 2020 13:40:31 UTC+2, Balaji a écrit :
>
> Hello,
>
> I'm very new to using tools such as pandoc so it's very possible that this 
> is a case of mis-reading TFM, but hours of searching thru Stackoverflow and 
> other community posts have left me at a dead-end so I hope someone can help 
> me out.
>
> I'm trying to convert Markdown files that have BiBTeX style citations into 
> Markdown again but expand the citation as a footnote. I've come close using 
> the Chicago Manual of Style 17th edition CSL but am finding that the 
> citation gets expanded twice. A minimal example below:
>
> Original Markdown file - cite.md:
> Here is one reference citing the Reactome Project. [^1]
>
> [^1]: @deustachio_2003
>
>
> BiB file - cite.bib:
> @article{deustachio_2003, title={Pentose phosphate pathway}, volume={5}, 
> DOI={10.3180/react_1859.1}, journal={Reactome - a curated knowledgebase 
> of biological pathways}, author={Deustachio, P}, year={2003}, month={Mar}}
>
> Pandoc command:
> pandoc cite.md --filter pandoc-citeproc -t markdown_mmd -o cite-new.md --
> bibliography=cite.bib --csl=chicago-full.csl
>
> Output file - cite-new.md:
> Here is one reference citing the Reactome Project.[^1]
>
> <div id="refs" class="references hanging-indent" markdown="1">
>
> <div id="ref-deustachio_2003" markdown="1">
>
> Deustachio, P. “Pentose Phosphate Pathway.” *Reactome - a Curated
> Knowledgebase of Biological Pathways* 5 (March 2003).
> <https://doi.org/10.3180/react_1859.1>.
>
> </div>
>
> </div>
>
> [^1]: P Deustachio, “Pentose Phosphate Pathway,” *Reactome - a Curated
>     Knowledgebase of Biological Pathways* 5 (March 2003),
>     <https://doi.org/10.3180/react_1859.1>
>
> I have not been able to figure out how to prevent the additional citation 
> in the <div></div> from appearing in the output Markdown file and would 
> appreciate any help in this regard!
>
> FWIW, this is using pandoc 2.9.2.1 on Windows.
>

-- 
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/261c27ed-275a-4b07-9eab-d6b584bec482%40googlegroups.com.

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

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

* Re: Converting Markdown to (Multi)Markdown but citations are getting expanded twice?
       [not found]     ` <261c27ed-275a-4b07-9eab-d6b584bec482-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-05-06  1:11       ` Balaji Dutt
  0 siblings, 0 replies; 3+ messages in thread
From: Balaji Dutt @ 2020-05-06  1:11 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

On Tue, May 5, 2020 at 10:09 PM Gu Lu <guill.louvel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> This is because you are mixing footnotes and citations. *@deustachio_2003*
> is a text citation: it will be expanded into e.g. "(Deustachio 2003)" or
> "[1]" depending on your citation style. It is equivalent to the latex
> *\cite{deustachio_2003}* command. This is not to be confused with items
> in the bibliography. The bibliography will automatically be created at the
> end of the document, so no need to make it yourself using footnotes.
>


Thanks for the hint Gu. Some further searching turned up the
suppress-bibliography option in pandoc so running the same command as
before but with an additional parameter of --metadata=suppress-bibliography
got me the output I was looking for:

Here is one reference citing the Reactome Project.[^1]

[^1]: P Deustachio, “Pentose Phosphate Pathway,” *Reactome - a Curated
    Knowledgebase of Biological Pathways* 5 (March 2003),
    <https://doi.org/10.3180/react_1859.1>

--
Balaji

-- 
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/CAF3DyWmMRKDw5MncGpekcXbtozwTT7f0QGacmW_M4aygB1%3DYvA%40mail.gmail.com.

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

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

end of thread, other threads:[~2020-05-06  1:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-05 11:40 Converting Markdown to (Multi)Markdown but citations are getting expanded twice? Balaji
     [not found] ` <5041cd75-7c55-41ec-a8c6-ac28580a39ef-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-05-05 14:09   ` Gu Lu
     [not found]     ` <261c27ed-275a-4b07-9eab-d6b584bec482-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-05-06  1:11       ` Balaji Dutt

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