> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/ja/to-1/02-bibliography-management-with-natbib.md).

# natbib を使った文献管理

LaTeXで文献管理を行う場合、パッケージ **natbib** は、 [BibTeX](/latex/ja/to-1/01-bibliography-management-with-bibtex.md)を使用する際に引用をカスタマイズするためのパッケージです（特に著者-年方式の引用）。この記事では、 `natbib` を使って文献ソースを整形し、引用する方法を説明します。

**注**：最初から始めるなら、 [biblatex](/latex/ja/sononotopikku/05-bibliography-management-in-latex.md) を使うことをお勧めします。このパッケージは複数の言語にローカライズを提供し、活発に開発されており、文献管理をより簡単かつ柔軟にします。ただし、ほとんどのジャーナルでは今でも `bibtex` と `natbib`.

## はじめに

以下に最小限の動作例を示します：

```latex
\usepackage{natbib}
\bibliographystyle{unsrtnat}
\title{参考文献管理: \texttt{natbib} パッケージ}
\author{Overleaf}
\date {2021年4月}

\begin{document}

\maketitle

この文書は、参考文献管理で使用する \texttt{natbib} パッケージの例です
。3つの項目が引用されています: \textit{The \LaTeX\ Companion} の本
\cite{latexcompanion}、アインシュタインのジャーナル論文 \cite{einstein}、そして
ドナルド・クヌースのWebサイト \cite{knuthwebsite} です。\LaTeX\ 関連の項目は
\cite{latexcompanion,knuthwebsite}。

\medskip

\bibliography{sample}

\end{document}
```

![NatbibEx1Overleaf.png](/files/1c41bd5e72db321fa565d7db01a375928092b475)

この例では、文献管理を行うための基本的なコマンドが4つあります：

**\usepackage{natbib}**

natbibパッケージを読み込みます。

**\bibliographystyle{unsrtnat}**

文献スタイル unsrtnat を設定します。詳細は文献スタイルに関する記事を参照してください。

**\cite{labelcompanion}**

表示される内容は引用スタイルによって異なります。中括弧内の語は、文献ファイル内の特定のエントリに対応します。

**bibliography{sample}**

文献ソースを含む sample.bib ファイルを読み込みます。文献ファイルのセクションを参照してください。

[の例を開く `natbib` パッケージを Overleaf で](https://www.overleaf.com/project/new/template/19402?id=65470147\&templateName=Basic+natbib+example\&latexEngine=\&texImage=texlive-full%3A2020.1\&mainFile=)

## 基本的な使い方

導入部では簡単な動作例を示しましたが、文献関連のコマンドは他にもあります。

```latex
\documentclass{article}
\usepackage[english]{babel}
\usepackage[square,numbers]{natbib}
\bibliographystyle{abbrvnat}

\title{参考文献管理: \texttt{natbib} パッケージ}
\author{Overleaf}
\date {2021年4月}

\begin{document}

\maketitle

この文書は、参考文献管理で使用する \texttt{natbib} パッケージの例です
管理を行います。3つの項目が引用されています: \textit{The \LaTeX\ Companion} の本 \cite{latexcompanion}、アインシュタインのジャーナル論文 \citet{einstein}、そして
ドナルド・クヌースのWebサイト \cite{knuthwebsite} です。\LaTeX\ 関連の項目は
\cite{latexcompanion,knuthwebsite}。

\medskip

\bibliography{sample}

\end{document}
```

![NatbibEx2Overleaf.png](/files/50d7af656a52c851ff0d5efe69317f0250c52e53)

この例ではいくつか変更があります：

* オプション `square` と `numbers` は `\usepackage[square,numbers]{natbib}` は、それぞれ角括弧と数値引用を有効にします。 [リファレンスガイド](#reference-guide) パッケージオプションの一覧については
* スタイル *abbrvnat* がここで使用されています。 [文献スタイル](/latex/ja/to-1/05-natbib-bibliography-styles.md)
* コマンド `\citet` は、引用スタイルに関係なく、引用記号に著者名を追加します。 [引用スタイル](/latex/ja/to-1/06-natbib-citation-styles.md).

[別の例を Overleaf で開く `natbib` パッケージを Overleaf で](https://www.overleaf.com/project/new/template/19404?id=65473143\&templateName=Natbib+second+example\&latexEngine=\&texImage=texlive-full%3A2020.1\&mainFile=)

## で説明しました。

文献ファイルは標準の BibTeX 構文と .bib 拡張子を持っていなければなりません。これらには、文献ソースの一覧と、各エントリに関する情報を含むいくつかのフィールドが入っています。

```latex
@article{einstein,
    author =       "Albert Einstein",
    title =        "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})
        [{On} the electrodynamics of moving bodies]",
    journal =      "Annalen der Physik",
    volume =       "322",
    number =       "10",
    pages =        "891--921",
    year =         "1905",
    DOI =          "http://dx.doi.org/10.1002/andp.19053221004"
}

@book{latexcompanion,
    author    = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
    title     = "The \LaTeX\ Companion",
    year      = "1993",
    publisher = "Addison-Wesley",
    address   = "レディング, マサチューセッツ州"
}

@misc{knuthwebsite,
    author    = "Donald Knuth",
    title     = "Knuth: Computers and Typesetting",
    url       = "http://www-cs-faculty.stanford.edu/\~{}uno/abcde.html"
}
```

このファイルには特別な形式のレコードが含まれています。たとえば、最初の文献参照は次のように定義されます。

**@article{...}**

これはレコードエントリの最初の行です。@article は、ここに保存されている情報が記事に関するものであることを BibTeX に伝えます。このエントリの情報は中括弧で囲まれています。例で示したエントリ型（article、book、misc）のほかにも多数あります。参考ガイドを参照してください。

**einstein**

ラベル einstein はこのエントリに割り当てられた、この文書内でこの記事を参照するために使える一意の識別子です。

**author = "Albert Einstein",**

これは文献エントリの最初のフィールドで、この論文の著者が Albert Einstein であることを示します。タイトル、ページ、年、URL など、同じ構文 key = value を使ってカンマ区切りのフィールドを複数追加できます。使用可能なフィールドの一覧はリファレンスガイドを参照してください。

このファイル内の情報は、前のセクションで示したように、後で LaTeX 文書内に出力したり参照したりできます。コマンド `\bibliography{sample}`で。.bib ファイル内のすべての情報が表示されるわけではなく、文書で設定した文献スタイルによって異なります。

## 目次への文献一覧の追加

文献を目次に含めたい場合は、パッケージ **tocbibind** をプリアンブルで読み込めばOKです：

```latex
\documentclass{article}
\usepackage[english]{babel}

%目次に「References」を含めます
\usepackage[nottoc]{tocbibind}

%natbibパッケージを読み込み、文献スタイルを設定します
\usepackage[square,numbers]{natbib}
\bibliographystyle{abbrvnat}

%タイトルと著者
\title{参考文献管理: \texttt{natbib} パッケージ}
\author{Overleaf}
\date {2021年4月}

\begin{document}

\maketitle

\tableofcontents

\section{第1節}
この文書は例です...

%文献ファイル「sample.bib」を読み込みます
\bibliography{sample}

\end{document}
```

![BibliographyEx4Overleaf.png](/files/fe9710edd651a0329c7204f2ae2810b0c41d18a9)

[の例を開く `natbib` と目次の例を Overleaf で](https://www.overleaf.com/project/new/template/19416?id=65468889\&templateName=Natbib+and+contents\&latexEngine=\&texImage=texlive-full%3A2020.1\&mainFile=)

次の行を追加すると

```latex
\usepackage[nottoc]{tocbibind}
```

をプリアンブルに追加すると、文書の種類に応じて目次に「References」または「Bibliography」が出力されます。ただし、Index、Glossary、Listings の一覧など他の要素も目次に追加されるので注意してください。詳細は [その `tocbibind` パッケージドキュメントに記載されているオプションがあります](http://mirrors.ctan.org/macros/latex/contrib/tocbibind/tocbibind.pdf).

## リファレンスガイド

**natbib パッケージオプション**

* `round` 丸括弧用
* `square` は角括弧を使用します
* `curly` 波括弧
* `angle` 山括弧またはシェブロン
* `semicolon` 複数の引用をセミコロンで区切ります
* `colon` は `semicolon`
* `comma` 複数の引用をコンマで区切ります
* `authoryear` 著者-年引用用
* `numbers` 数値引用用
* `super` のように、数値引用を上付き文字にします *Nature*
* `sort` 複数の引用を参考文献一覧の順に並べます
* `sort&compress` は `sort` ただし、複数の数値引用は可能なら圧縮されます
* `compress` 並べ替えずに圧縮
* `longnamefirst` 各参考文献の最初の引用では著者のフルネームが表示されます
* `sectionbib` パッケージ **chapterbib** と組み合わせて使用します。参考文献を番号なし章ではなく番号なし節として目次に追加するためです。
* `nonamebreak` 著者名のハイフネーションを防ぎます
* `elide` 結合された参考文献に共通する要素を省略するため

**標準的なエントリ型**

**article**

雑誌またはジャーナルの記事

**book**

刊行された本

**booklet**

印刷物だが、出版社や支援機関を持たない著作

**conference**

会議録中の記事

**inbook**

本の一部分（節、章など）

**incollection**

独自のタイトルを持つ本の一部分

**inproceedings**

会議録中の記事

**manual**

技術文書

**mastersthesis**

修士論文

**misc**

他のどの種類にも当てはまらないもの

**phdthesis**

博士論文

**proceedings**

conference と同じ

**techreport**

機関によって出版された報告書

**unpublished**

正式には出版されていない、著者とタイトルを持つ文書

**BibTeXで最もよく使われるフィールド**

|           |           |              |
| --------- | --------- | ------------ |
| address   | annote    | author       |
| booktitle | chaper    | crossref     |
| edition   | editor    | institution  |
| journal   | キー        | month        |
| note      | number    | organization |
| pages     | publisher | school       |
| series    | title     | type         |
| volume    | year      | URL          |
| ISBN      | ISSN      | LCCN         |
| abstract  | キーワード     | price        |
| copyright | language  | contents     |

## 参考文献

詳しくは次を参照してください。

* [Natbib の文献スタイル](/latex/ja/to-1/05-natbib-bibliography-styles.md)
* [Natbib の引用スタイル](/latex/ja/to-1/06-natbib-citation-styles.md)
* [biblatex を使った文献管理](/latex/ja/to-1/03-bibliography-management-with-biblatex.md)
* [bibtexによる参考文献管理](/latex/ja/to-1/01-bibliography-management-with-bibtex.md)
* [CTAN Web サイトの natbib ドキュメント](http://www.ctan.org/pkg/natbib)
* [tocbind パッケージのドキュメント](ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/tocbibind/tocbibind.pdf)
* [国際言語サポート](/latex/ja/yan-yu/03-international-language-support.md)
* [目次](/latex/ja/wen-shu-gou-zao/02-table-of-contents.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/ja/to-1/02-bibliography-management-with-natbib.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
