TeX - LaTeX Asked on December 19, 2020
I am trying to convert a simple LaTeX file that uses biblatex-chicago for citation formatting to, say, .docx via Pandoc. Unfortunately, I don’t seem to be able to find the right invocation of Pandoc that results in a bibliography (or even the citations) included in the doc.
What I’m proposing doesn’t have any complicated formulas, tables, or figures–just the bibliography. This question’s author seems to have gotten the bibliography working with Pandoc, though it appears he’s maybe using straight up bibtex with maybe the natbib citation commands.
Sample LaTeX (foo.tex):
% !TeX TS-program = pdflatexmk
% !BIB TS-program = biber
documentclass[12pt,letterpaper]{article} % for a short document
% Bibliography
usepackage[authordate,strict,bibencoding=inputenc,doi=true,isbn=false,backend=biber]{biblatex-chicago}
addbibresource{./foo.bib}
title{On Banality}
author{Bob Dwyre}
date{}
%%% BEGIN DOCUMENT
begin{document}
raggedbottom
maketitle
People typically prefer to travel shorter distances than longer distances parencite{zipf1946p1}. textcite{dijkstra1959note} proposes one way of finding the shortest path.
printbibliography
end{document}
And a sample .bib (foo.bib):
@article{dijkstra1959note,
Author = {Dijkstra, Edsger W},
Date-Added = {2014-04-28 19:35:12 +0000},
Date-Modified = {2014-04-28 19:35:12 +0000},
Journal = {Numerische mathematik},
Number = {1},
Pages = {269--271},
Publisher = {Springer},
Title = {A note on two problems in connexion with graphs},
Volume = {1},
Year = {1959}}
@article{zipf1946p1,
Author = {Zipf, George Kingsley},
Date-Added = {2014-04-28 19:32:00 +0000},
Date-Modified = {2014-04-28 19:32:00 +0000},
Journal = {American sociological review},
Pages = {677--686},
Publisher = {JSTOR},
Title = {The P1 P2/D hypothesis: On the intercity movement of persons},
Year = {1946}}
My invocation of Pandoc is as follows, but I see nothing related to bibliography in the final output:
pandoc -o foo.docx foo.tex --biblatex --bibliography=foo.bib
The --biblatex
option only applies when the output document is LaTeX format. When I tried pandoc --bibliography=foo.bib -o foo.docx foo.tex
it worked for me. If you want Chicago you need to add an option for that e.g. --csl=chicago-author-date.csl
. You can get the CSL file from github.com/citation-style-language/styles.
Correct answer by twsh on December 19, 2020
The examples and answers given did not help me. I am using pandoc version 2.11.2. What did help was using the --citeproc
flag:
pandoc document.tex --biblio=documentRef.bib -o output/document.docx --citeproc
I've added this to my Makefile. You can find my template here: https://github.com/eirianop/ResBaz2020_LaTeX
Answered by Erin on December 19, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP