I am going through a process of converting all our code documentation from LaTeX to Markdown. I figured that my best bet was to use Pandoc. We have developed our own flavor of Markdown so I will need to go in and edit by hand some of the freshly converted markdown.
I am having trouble producing proper citations within my markdown. The current command I am using seems to be "hardcoding" the citations in without markdown short cuts (ie. (Hammond et. all 2015) vs [@cite:Hammond]). I have the .bib files. Is there a way to make this work?
Code I am currently running to convert from LaTeX to MD
pandoc --ascii -f latex -t gfm --filter=pandoc-citeproc -o test.md input.tex
Code I have tested but still doesn't work
pandoc -s -V biblio-files=../../../../../../doc/content/bib/*.bib --filter=pandoc-citeproc -f latex -t gfm -o test.md input.tex
How can I get it to produce a dynamic markdown citation instead of hardcoding it in?
Sample TeX File
\documentclass[11pt]{article}
\usepackage{cite}
\begin{document}
\title{My Article}
\author{Nobody Jr.}
\date{Today}
\maketitle
Blablabla said Nobody ~\cite{Nobody06}.
\bibliography{name}{}
\bibliographystyle{plain}
\end{document}
Sample Bib File
@misc{ Nobody06,
author = "Nobody Jr",
title = "My Article",
year = "2006" }
Sample Output Markdown File
Blablabla said Nobody (Jr 2006).
<div id="refs" class="references">
<div id="ref-Nobody06">
Jr, Nobody. 2006. “My Article.”
</div>
</div>
What I want
Blablabla said Nobody [@Nobody06].
.tex
document (an MWE: tex.meta.stackexchange.com/q/228/35864) and show the resulting.md
file?gfm
support citations? Playing around with pandoc.org/try/… suggests thatpandoc --from latex --to markdown
gives the desired output, butpandoc --from latex --to gfm
does not.gfm
has no official support for citations it is not at all unreasonable of pandoc to export the citation as hard-coded text. As long as pandoc does not allow you to cherry-pick bits of markdown syntax you seem to be caught between the devil and the deep blue sea.