pandoc を使用して、と.tex
ファイルを組み合わせてファイルを作成しようとしています。結果のラテックス ファイルでは、Pandoc は既にインライン リファレンスと参考文献の完全なリファレンスをプレーン テキストとしてフォーマットしています。ただし、参照をそれぞれ inとformat にするのが好きです。.md
.bib
\cite
\bibitem
たとえば .md
---
title: Plain Text Workflow
author: Dennis Tenen, Grant Wythoff
date: January 20, 2014
bibliography: example.bib
---
# Section 1
Some sentence that needs citation [@fyfe_digital_2011 argues that too].
# Bibliography
たとえば .bib
@article{fyfe_digital_2011,
title = {Digital Pedagogy Unplugged},
volume = {5},
url = {http://digitalhumanities.org/dhq/vol/5/3/000106/000106.html},
number = {3},
urldate = {2013-09-28},
author = {Fyfe, Paul},
year = {2011},
file = {fyfe_digital_pedagogy_unplugged_2011.pdf}
}
Pandoc コマンド
pandoc example.md -t latex -s -S --filter pandoc-citeproc -o example.tex
example.tex (抜粋)
Some sentence that needs citation (Fyfe 2011 argues that too).
\section*{Bibliography}\label{bibliography}
\addcontentsline{toc}{section}{Bibliography}
Fyfe, Paul. 2011. ``Digital Pedagogy Unplugged'' 5 (3).
\url{http://digitalhumanities.org/dhq/vol/5/3/000106/000106.html}.
ただし、私が持ちたいのはこれです(基本的に、.bbl
bibtexによって生成されたファイルにあるもの):
Some sentence that needs citation \citep[ argues that too]{fyfe_digital_2011}.
\begin{thebibliography}{1}
\providecommand{\natexlab}[1]{#1}
\providecommand{\url}[1]{\texttt{#1}}
\expandafter\ifx\csname urlstyle\endcsname\relax
\providecommand{\doi}[1]{doi: #1}\else
\providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi
\bibitem[Fyfe(2011)]{fyfe_digital_2011}
Paul Fyfe.
\newblock Digital pedagogy unplugged.
\newblock 5\penalty0 (3), 2011.
\newblock URL
\url{http://digitalhumanities.org/dhq/vol/5/3/000106/000106.html}.
\end{thebibliography}
でpandocを実行し--natbib --bibliography=example.bib
、pdflatexとbibtexでコンパイルして、\input{example.bbl}
. しかし、間にbibtex(手動またはパイプ)を入れずにpandocで適切に行う方法はありますか?
ところで、pandoc で直接 pdf を生成する場合、内部ではどのように処理されているの--filter pandoc-citeproc
でしょうか? これらの書式設定済みのプレーンテキスト参照も使用するだけである場合、私は非常に失望します. この場合、latex テンプレートのプリアンブルで定義された個々のスタイルが適用されないように見えるためです。