LoginSignup
12
11

More than 5 years have passed since last update.

BibTeXインストールのための備忘録

Last updated at Posted at 2013-09-03

私はUbuntu 12.04を使っているのですが.bibファイルを用意して.texファイルにプリアセンブルなどを書くだけでは巧くいかなかったので、BibTeXのインストール手順を記します。

0. LaTeX環境のインストール

参考にさせて頂いたページ
Qiita Qiita / Ubuntu 12.04でLaTeX環境を構築する

1. 必要になったモノ

日本語で引用するのでjbibtexコマンドが必要

$ sudo apt-get install jbibtex-bin

2. 環境変数の設定

私の場合は

$ jbibtex report
This is JBibTeX, Version 0.99c-j0.33 (Web2C 7.5.4)
The top-level auxiliary file: report.aux
I couldn't open style file jplain.bst
---line 2 of file report.aux
: \bibstyle{jplain
: }
I'm skipping whatever remains of this command
I found no style file---while reading file report.aux
(There were 2 error messages)

というように.bstファイルが見つけてもらえないようだったので

.bashrc
export BSTINPUTS=$BSTINPUTS:/usr/share/texmf/jbibtex/bst

3. お作法(.bib)

ここでは書誌情報ファイルのフォーマットについて詳しく書きません。
Google Scholar,ACM,CiteSeerなどのページでBibTeXを表示してくれますので、それをコピペ

ref.bib
@book{knuth1986texbook,
  title={The texbook},
  author={Knuth, Donald Ervin and Bibby, Duane},
  volume={1993},
  year={1986},
  publisher={Addison-Wesley Reading, MA, USA}
}

4. お作法(.texファイル)

\bibliographystyle{jplain}とするとアルファベット順に、\bibliographystyle{junsrt}とすると引用した順番に参考文献をソートしてくれる。

report.tex
\documentclass[a4j,12pt]{jarticle}
\bibliographystyle{junsrt} %プリアセンブル的なナニカ
\begin{document}
hogehoge\cite{knuth1986texbook} %.bibファイルの文献参照名
\bibliography{ref.bib} %.bibファイル自体の名前
\end{document}

5. コンパイル手順

$ platex report

$ jbibtex repor

$ platex report

$ platex report

$ dvipdfmx report

6. 現在...

jbibtex ではなく pbibtex で良いみたい。

12
11
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
12
11