3

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

ただし、私が持ちたいのはこれです(基本的に、.bblbibtexによって生成されたファイルにあるもの):

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 テンプレートのプリアンブルで定義された個々のスタイルが適用されないように見えるためです。

4

1 に答える 1

2

1) できません。あなたのどちらか

  • pandoc に参考文献と参考文献を生成してもらう ( pandoc-citeproc、ポイント 2 を参照) または
  • --natbibnatbib ( ) または biblatex ( )用にフォーマットしますが、外部の bibtex ファイル (または別の互換性のあるフォーマット--biblatex)に依存する必要があります。次に、または引用をフォーマットする必要があります。bibtexbiber

2) pandoc-citeproccsl スタイルに依存します。ここここでいくつかを見つけることができ、ここで簡単にカスタマイズできます。YAML タイトル ブロック--csl=の行と一緒に、または行を使用して、pandoc コマンドに渡します。csl:Pandoc は でファイルを探し~/.cslます。そこにない場合、またはマークダウン ファイルと同じディレクトリにない場合は、フル パスを指定する必要があります。

于 2015-05-07T07:35:17.963 に答える