LoginSignup
13
8

More than 3 years have passed since last update.

Beamerスライドに参考文献リストを載せる

Last updated at Posted at 2019-06-27

Beamerスライドでbibtexを使って参考文献リストを出力する方法を述べる.

bibtexファイルを作る

ref.bibというファイルに参考文献のbibtexリストを作ることを想定する.
Google Scholarで論文名や書籍名を検索して, 引用マーク「"」からbibtexを取得する.

Step1:
step1.png
Step2:
step2.png
Step3:
step3.png
このコードをref.bibに貼り付ける.

引用したい文献に関して以上のステップ繰り返して, ref.bibを完成させる.
(例)

ref.bib
@book{boyd2004convex,
  title={Convex optimization},
  author={Boyd, Stephen and Vandenberghe, Lieven},
  year={2004},
  publisher={Cambridge university press}
}
@inproceedings{yoshida2018safe,
 author = {Yoshida, Tomoki and Takeuchi, Ichiro and Karasuyama, Masayuki},
 title = {Safe Triplet Screening for Distance Metric Learning},
 booktitle = {Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining},
 year = {2018},
 pages = {2653--2662},
 numpages = {10},
} 

スライドに載せる

スライドのテンプレートはこちらを参照.

slide.tex
\begin{frame}[allowframebreaks]{Reference}
    \scriptsize
    \beamertemplatetextbibitems
    \bibliographystyle{junsrt}
    \bibliography{ref}
\end{frame}

これを文献リストを載せたい箇所に書いておくと, 先程の例では, 本文中で\cite{boyd2004convex}\cite{yoshida2018safe}で引用できる.

  • \beamertemplatetextbibitems: 参考文献リストで引用番号([1], [2]など)を表示するために必要. 書かないと書類マークになってしまう.
  • \bibliographystyle{}: 引用のスタイル. この例では本文の登場順に並ぶ. 詳細はこちらを参照.
  • \bibliography{}: .bibファイルの名前を書く
  • allowframebreaks: スライドからはみ出たら自動でページを作成してくれるオプション

(例)
ref.png

コンパイル

  • 日本語文献を含む場合
  1. platex slide.tex
  2. pbibtex slide
  3. dvipdfmx slide.dvi
  • 英語のみの場合
  1. platex slide.tex
  2. bibtex slide
  3. dvipdfmx slide.dvi

もしくは

  1. pdflatex slide.tex
  2. bibtex slide

コンパイルは最低でも3回程度必要になる. (やってみるとわかる)
コンパイル用Makefileはこちらで公開中.

pbibtexを使うかbibtexを使うかで, 使えるスタイルが変わってくる.
基本的にpbibtexのスタイルには先頭に j がつく(jplain, junsrtなど)
※使うコマンドがスタイルに対応していないとエラーが出るので注意!!

natbibを使う場合

texのプリアンブルに\usepackage{natbib}を書いておく.
本文で引用する際は, \citet{}\citep{}を使う.

  • \citet{}の出力例: Boyd and Vandenberghe (2004)
  • \citep{}の出力例: (Boyd and Vandenberghe, 2004)
slide.tex
\begin{frame}[allowframebreaks]{Reference}
    \scriptsize
    \bibliographystyle{apalike}
    \bibliography{ref}
\end{frame}

スタイルはnatbib用のスタイルを利用する必要がある.
たとえば, こちらを参照.

まとめ

bibtexを使って効率的な資料作成を目指そう.
論文では必須事項.

13
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
8