LoginSignup
49
41

More than 5 years have passed since last update.

Texで書く論文の引用にはbibtexがオススメな4つの理由

Last updated at Posted at 2018-08-26

bibtexとは

$\LaTeX$で論文を執筆する際の引用に大変便利なツールです!

bibtexのいいところ

① 引用漏れ (参考文献に入っているのに本文中で引き忘れているというミス)がなくなる

② 論文中での番号付けを本文で引用した順番に自動でしてくれる(アルファベット順も可能)

③ 参考文献リストを提出直前にまとめる必要がない (引用しそうな論文はとりあえずリストに入れておけば良い)

④ 引用の体裁を整えてくれる (国際会議毎に指定されたbibtexの引用フォーマットをTexに入力すれば良い)

引用されていない論文が入っていたり, 番号付けも行ったり来たりしているミスがありますね↓
スクリーンショット 2018-08-26 17.51.32.png

bibtexを使うと↓
スクリーンショット 2018-08-26 17.29.06.png
このように綺麗になります⭐️

bibtexを使わない場合

私が知っている方法では, thebibliographyを用いて以下のように引用できます.

example.tex
¥documentclass[10pt,a4paper]{jsarticle}
%
¥usepackage{amsmath,amssymb}
¥usepackage{bm}
¥usepackage[dvipdfmx]{graphicx}
¥usepackage{ascmac}
¥usepackage{listings}
¥usepackage{txfonts}
¥usepackage{algorithm}
¥usepackage{algorithmic}
¥usepackage{cite}
¥usepackage{url}
%
¥setlength{¥textwidth}{¥fullwidth}
¥setlength{¥textheight}{45¥baselineskip}
¥addtolength{¥textheight}{¥topskip}
¥setlength{¥voffset}{-0.2in}
¥setlength{¥topmargin}{0pt}
¥setlength{¥headheight}{0pt}
¥setlength{¥headsep}{0pt}


¥title{Test}
¥author{cheerfularge}

¥begin{document}
¥maketitle
Nonnegative Matrix Factorization ¥cite{lee2001algorithms} aims to decompose a large scale matrix into low-rank latent factor matrices with nonnegative constraints. 
NMF has been used in image processing ¥cite{duong2018projective}, co-clustering ¥cite{lim2018codinmf}, sound analysis, and so on.

¥input{reference}

¥end{document}

reference.tex
¥begin{thebibliography}{99}
¥bibitem{lee2001algorithms}
D. D. Lee and H. S. Seung. Algorithms for Non-negative Matrix Factorization. NIPS. 2000.

¥bibitem{lim2018codinmf}
W. Lim, R. Du, and H. Park. CoDiNMF: Co-Clustering of Directed Graphs via NMF. AAAI. 2018.

¥bibitem{brunet2004metagenes}
J. Brunet, P. Tamayo, T. R. Golub, and J. P. Mesirov. Metagenes and molecular pattern discovery using matrix factorization. Proc Natl Acad Sci USA. 2004

¥bibitem{duong2018projective}
V. Duong, Y. Lee, J. Ding, B. Pham, M. Bui, P. Bao and J. Wang. Projective complex matrix factorization for facial expression recognition. EURASIP Journal on Advances in Signal Processing. 2018.

¥end{thebibliography}

texの豆知識ですが、

\input{xxx}
と記入することで、別のtexファイルを読み込むことができます.
(xxxには読み込むtexファイルの相対パスから.texを抜いたもの)
読み込む方のtexファイルにはdocumentclassなど定義する必要はありません.
論文を書く時に1つのTexファイルで管理すると大変なので、章ごとに分けて管理すると便利です.

この結果以下のようなpdfが出来上がります.
スクリーンショット 2018-08-26 17.51.32.png

引用されてはいますが、順番に読むと番号が飛び飛びだったり、[3]の文献が本文中で引かれてないのに参考文献に入ってしまっていますねorz
bibtexに解決してもらいましょう!

bibtexの使い方

準備

  1. 論文のデータベースファイルtest.bibを作成します.(bibファイルの作り方は後ほど)
  2. 元のTexファイルの参考文献を出力したい部分に以下のように書き込みます.
\bibliography{test} %bibファイルの.bibの前の部分
\bibliographystyle{unsrt} %引用された順番に出力

BiBTeXとはによると,アルファベット順での出力もできるようです.
3. Texの本文中で引用する.
bibtex中のある引用文献をこのように書き込んでいたとすると

@inproceedings{lee2001algorithms,
  title={Algorithms for non-negative matrix factorization},
  author={Lee, Daniel D and Seung, H Sebastian},
  booktitle={Advances in neural information processing systems},
  pages={556--562},
  year={2001}
}

bibtexのこの論文の引用させたい位置で \cite{lee2001algorithms}と記入すればいいです.
この@inproceedings{の後のlee2001algorithmsがこの論文を本文中で引用するためのおまじないになります.

@inproceedingsなどの種類については文献データベースの作成を参照してください.

bibファイルの作り方

  1. 作りたいディレクトリでtouch xxx.bibとターミナル上でコマンドを打ってbibファイルを作り、開きます. (この作り方に限りませんが)
  2. 引用したい文献をgoogle scholorで探します.
  3. 一番下の引用元の左側の"をクリックすると スクリーンショット 2018-08-26 17.42.48.png
  4. 引用情報が出てきて、左下のbibtexをクリックすると
    スクリーンショット 2018-08-26 17.42.55.png

  5. bibtexに打ち込むべき情報が出てきます!
    スクリーンショット 2018-08-26 17.00.46.png

コピペしましょう.

google scholarになくても論文名を検索して引っかかった学会やジャーナルのサイトの引用という箇所にbibtexの引用のフォーマットがあります.

ex) IEEE
スクリーンショット 2018-08-26 17.43.11.png

ex) ACM
右側のExport formatsのBibtexをクリックすると
スクリーンショット 2018-08-26 17.43.03.png
スクリーンショット 2018-08-26 17.36.08.png

コンパイル

Texshopを利用している方はタイプセットの右側のプルダウンメニューからBibtexを選択してコンパイルをしてください.(.bibに書き込まれたデータベースが読み込まれます)
その後プルダウンメニューをlatexに戻して数回コンパイルしてください.(うまく読み込まれるまでに引用箇所は[?]になっています.)

文献を追加した時も再度上記操作を行ってください.

このようにして作成されたpdfはこのようになります.
スクリーンショット 2018-08-26 17.29.06.png

引用漏れもないですし、本文の順番通りのインデックスがついていますね!
引用しそうな論文はとりあえず.bibファイルに追加しておきましょう.

最後にbibtexを用いて作成したTex, bibファイルを載せておきます

bibtex_example.tex
¥documentclass[10pt,a4paper]{jsarticle}
%
¥usepackage{amsmath,amssymb}
¥usepackage{bm}
¥usepackage[dvipdfmx]{graphicx}
¥usepackage{ascmac}
¥usepackage{listings}
¥usepackage{txfonts}
¥usepackage{algorithm}
¥usepackage{algorithmic}
%
¥setlength{¥textwidth}{¥fullwidth}
¥setlength{¥textheight}{45¥baselineskip}
¥addtolength{¥textheight}{¥topskip}
¥setlength{¥voffset}{-0.2in}
¥setlength{¥topmargin}{0pt}
¥setlength{¥headheight}{0pt}
¥setlength{¥headsep}{0pt}


¥title{Test}
¥author{cheerfularge}

¥begin{document}
¥maketitle
Nonnegative Matrix Factorization ¥cite{lee2001algorithms} aims to decompose a large scale matrix into low-rank latent factor matrices with nonnegative constraints. NMF has been used in image processing ¥cite{duong2018projective}, co-clustering ¥cite{lim2018codinmf}, sound analysis, and so on.


¥bibliography{test} 
¥bibliographystyle{unsrt}

¥end{document}
test.bib
@inproceedings{lee2001algorithms,
  title={Algorithms for non-negative matrix factorization},
  author={Lee, Daniel D and Seung, H Sebastian},
  booktitle={Advances in neural information processing systems},
  pages={556--562},
  year={2001}
}

@inproceedings{lim2018codinmf,
  title={CoDiNMF: Co-Clustering of Directed Graphs via NMF},
  author={Woosang Lim and Rundong Du and Haesun Park},
  booktitle={AAAI},
  year={2018}
}

@article{brunet2004metagenes,
  title={Metagenes and molecular pattern discovery using matrix factorization},
  author={Brunet, Jean-Philippe and Tamayo, Pablo and Golub, Todd R and Mesirov, Jill P},
  journal={Proceedings of the national academy of sciences},
  volume={101},
  number={12},
  pages={4164--4169},
  year={2004},
  publisher={National Acad Sciences}
}

@article{duong2018projective,
  title={Projective complex matrix factorization for facial expression recognition},
  author={Duong, Viet-Hang and Lee, Yuan-Shan and Ding, Jian-Jiun and Pham, Bach-Tung and Bui, Manh-Quan and Wang, Jia-Ching and others},
  journal={EURASIP Journal on Advances in Signal Processing},
  volume={2018},
  number={1},
  pages={10},
  year={2018},
  publisher={Nature Publishing Group}
}

まとめ

興味を持っていただいた方は是非使って見てください!
質問があればコメント欄に遠慮なくお願いします^^

49
41
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
49
41