> 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/03-bibliography-management-with-biblatex.md).

# biblatex を使った文献管理

文献管理パッケージに関しては、LaTeX には主に3つの選択肢があります。bibtex、natbib、biblatex です。Biblatex は文献情報を処理するための आधुनिकプログラムで、他の2つの選択肢よりも使いやすく柔軟なインターフェースと、より優れた言語ローカライズを提供します。この記事では、 **biblatex** を使って LaTeX 文書内の参考文献を管理し、整形する方法を説明します。

## はじめに

の最小動作例を **biblatex** 以下に示します。

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

\usepackage{biblatex}
\addbibresource{sample.bib}

\begin{document}
引用してみましょう！ アインシュタインの論文 \cite{einstein} とディラックの
本 \cite{dirac} は物理に関する項目です。

\printbibliography

\end{document}
```

![BiblatexEx1.png](/files/4b4aac8170ac42ecc1c16f41e3043c91287c45d7)

この例には、文献関連のコマンドが4つあります。

**\usepackage{biblatex}**

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

**\addbibresource{sample.bib}**

bibtex データファイル sample.bib を読み込みます。このファイルには、参照される各書籍、記事などの情報が含まれています。詳しくは文献ファイルのセクションを参照してください。

**\cite{einstein}**

このコマンドは文書内に参照を挿入します。この場合は \[1] で、文献一覧の要素に対応しています。"einstein" は sample.bib 内のエントリに対応するキーワードです。

**\printbibliography**

引用した参考文献の一覧を出力します。既定のタイトルは、article 文書クラスでは "References"、book と report では "Bibliography" です。

***Overleaf では、文献管理のためにあらかじめ定義されたスタイルを持つテンプレートがいくつか用意されています。*** [***これらの例をご覧ください。***](https://www.overleaf.com/latex/templates/tagged/bibliography)

[Overleaf で biblatex パッケージの例を開く](https://www.overleaf.com/project/new/template/19715?id=66713383\&templateName=Example+using+BiBLaTeX\&latexEngine=pdflatex\&texImage=texlive-full%3A2020.1\&mainFile=)

## 基本的な使い方

いくつかのパラメータをパッケージ読み込み文に渡すことができます。次を見てみましょう。

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

\usepackage{comment}

\usepackage[
backend=biber,
style=alphabetic,
sorting=ynt
]{biblatex}
\addbibresource{sample.bib}

\title{文献管理: \texttt{biblatex} パッケージ}
\author{Overleaf}
\date{ }

\begin{document}

\maketitle

\texttt{biblatex} を使うと、文献一覧を種類ごとにセクション分けして表示できます。
引用の種類に応じてです。
引用してみましょう！ アインシュタインの論文 \cite{einstein} とディラックの
本 \cite{dirac} は物理に関する項目です。
次に、\textit{The \LaTeX\ Companion} の本 \cite{latexcompanion}、Donald
Knuth のウェブサイト \cite{knuthwebsite}、\textit{The Comprehensive Tex Archive
Network} (CTAN) \cite{ctan} は \LaTeX\ 関連の項目です。しかし、他の Donald
Knuth の項目 \cite{knuth-fa,knuth-acp} はプログラミングに関するものです。

\medskip

\printbibliography

\end{document}
```

![BiblatexEx2.png](/files/8c6354843421a3ef2c99b62f8bf6ffa02609ddc2)

インポート時には、角括弧内にカンマ区切りでいくつかの追加オプションが指定されます。 **biblatex**:

**backend=biber**

文献一覧の並べ替えに使うバックエンドを設定します。biber は既定値で、いくつかのコマンドに対して完全なローカライズを提供するため推奨されます。また、biber 用のスタイルは標準の LaTeX マクロを使うため変更しやすいです。もう一つの対応バックエンドは bibtex で、より伝統的なプログラムです。backend に設定された場合は文献一覧の並べ替えにのみ使われるため、ここでは bibtex スタイルは使用できません。

**style=alphabetic**

文献スタイルと引用スタイルを定義します。この場合は alphabetic です。スタイルによっては、より多くの引用コマンドが利用できることがあります。詳しくは文献スタイルと引用スタイルを参照してください。

**sorting=ynt**

文献ソースを並べ替える基準を決定します。この場合は、年、名前、タイトルの順に並べ替えられます。並べ替えオプションの一覧はリファレンスガイドを参照してください。

残りのコマンドはすでに [はじめに](#introduction).

[Overleaf で biblatex パッケージの例を開く](https://www.overleaf.com/project/new/template/19715?id=66713383\&templateName=Example+using+BiBLaTeX\&latexEngine=pdflatex\&texImage=texlive-full%3A2020.1\&mainFile=)

## で説明しました。

文献ファイルは標準の bibtex 構文でなければなりません。

```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",
    keywords =     "physics"
}

@book{dirac,
    title={量子力学の原理},
    author={Paul Adrien Maurice Dirac},
    isbn={9780198520115},
    series={物理学の単行本シリーズ},
    year={1981},
    publisher={Clarendon Press},
    keywords = {physics}
}

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

@inbook{knuth-fa,
    author = "Donald E. Knuth",
    title = "Fundamental Algorithms",
    publisher = "Addison-Wesley",
    year = "1973",
    chapter = "1.2",
    keywords  = "knuth,programming"
}
...
```

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

**@article{...}**

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

**einstein**

このエントリには einstein というラベルが割り当てられています。これは、文書内でこの論文を参照するために使える識別子です。

**author = "Albert Einstein",**

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

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

[Overleaf で biblatex パッケージの例を開く](https://www.overleaf.com/project/new/template/19715?id=66713383\&templateName=Example+using+BiBLaTeX\&latexEngine=pdflatex\&texImage=texlive-full%3A2020.1\&mainFile=)

## 文献一覧のカスタマイズ

Biblatex を使うと、ほとんど手間をかけずに文献一覧セクションを高度にカスタマイズできます。いくつかの [引用スタイル](/latex/ja/to-1/08-biblatex-citation-styles.md) と [文献スタイル](/latex/ja/to-1/07-biblatex-bibliography-styles.md) が利用可能であり、新しいものを作成することもできます。別のカスタマイズ方法として、文献一覧セクションの既定タイトルを変更することがあります。

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

\usepackage{comment}

\usepackage[
backend=biber,
style=alphabetic,
sorting=ynt
]{biblatex}
\addbibresource{sample.bib}

\title{文献管理: \texttt{biblatex} パッケージ}
\author{Overleaf}
\date{ }

\begin{document}

\maketitle

\texttt{biblatex} を使うと、文献一覧を種類ごとにセクション分けして表示できます。
引用の種類に応じてです。
引用してみましょう！ アインシュタインの論文 \cite{einstein} とディラックの
本 \cite{dirac} は物理に関する項目です。
次に、\textit{The \LaTeX\ Companion} の本 \cite{latexcompanion}、Donald
Knuth のウェブサイト \cite{knuthwebsite}、\textit{The Comprehensive Tex Archive
Network} (CTAN) \cite{ctan} は \LaTeX\ 関連の項目です。しかし、他の Donald
Knuth の項目 \cite{knuth-fa,knuth-acp} はプログラミングに関するものです。

\medskip

\printbibliography[title={文献一覧全体}]

\end{document}
```

![BiblatexEx3.png](/files/7377a6918d5bd256907917198d3d05e5ca9dc217)

追加のパラメータ `title={文献一覧全体}` をコマンドに角括弧内で渡したものが `\printbibliography` タイトルを変更するものです。

文献一覧は、異なるフィルタに基づいてセクションに分割することもできます。たとえば、同じ著者、同じ雑誌、または似たタイトルの文献だけを出力できます。以下に例を示します。

```latex
\printbibliography[type=article,title={記事のみ}]
\printbibliography[type=book,title={書籍のみ}]

\printbibliography[keyword={physics},title={物理関連のみ}]
\printbibliography[keyword={latex},title={\LaTeX 関連のみ}]
```

![BiblatexEx4.png](/files/715f65f3c8750c00ac0bd5524041c9f28cbe4a1b)

ここでは、文献一覧は4つのセクションに分けられています。ここで使われているコマンドの構文は以下で説明します。

**\printbibliography\[type=article,title={記事のみ}]**

type が "article" のエントリだけを出力し、このセクションのタイトルを "Articles only" に設定します。同じ構文は他のどのエントリ型にも使えます。

**\printbibliography\[keyword={physics},title={物理関連のみ}]**

任意のフィールドに "physics" という単語を含む文献エントリをフィルタします。このセクションのタイトルを "Physics-related only" に設定します。

[Overleaf で biblatex パッケージの例を開く](https://www.overleaf.com/project/new/template/19715?id=66713383\&templateName=Example+using+BiBLaTeX\&latexEngine=pdflatex\&texImage=texlive-full%3A2020.1\&mainFile=)

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

目次に文献一覧を出力するには、追加オプションを `\printbibliography`

```latex
\printbibliography[
heading=bibintoc,
title={文献一覧全体}
]

\printbibliography[heading=subbibintoc,type=article,title={記事のみ}]
```

![BiblatexEx5.png](/files/97c02cf621a0cf682b73aa3e76dd55615257be7e)

目次にはセクションとサブセクションが追加されます。

* 最初の場合は、 `heading=bibintoc` を追加すると、可能なら無番号の章として、そうでなければ無番号の節として、タイトルが目次に追加されます。
* 2つ目の場合は `heading=subbibintoc` で、タイトルを目次の第2レベルの項目として追加します。この例では、"文献一覧全体" の下に入れ子になった小節として追加されます。

[Overleaf で biblatex パッケージの例を開く](https://www.overleaf.com/project/new/template/19715?id=66713383\&templateName=Example+using+BiBLaTeX\&latexEngine=pdflatex\&texImage=texlive-full%3A2020.1\&mainFile=)

## リファレンスガイド

**対応しているエントリ型**

|               |                |              |
| ------------- | -------------- | ------------ |
| article       | book           | mvbook       |
| inbook        | bookinbook     | suppbook     |
| booklet       | collection     | mvcollection |
| incollection  | suppcollection | manual       |
| misc          | online         | patent       |
| periodical    | suppperiodical | proceedings  |
| mvproceedings | inproceedings  | reference    |
| mvreference   | inreference    | report       |
| set           | thesis         | unpublished  |
| custom        | conference     | electronic   |
| mastersthesis | phdthesis      | techreport   |
| datatype      |                |              |

**対応しているエントリフィールド** （表示される情報は文献スタイルによって異なります）

|               |              |               |                 |
| ------------- | ------------ | ------------- | --------------- |
| abstract      | afterword    | annotation    | annotator       |
| author        | authortype   | bookauthor    | bookpagination  |
| booksubtitle  | booktitle    | chapter       | commentator     |
| date          | doi          | edition       | editor          |
| editortype    | eid          | entrysubtype  | eprint          |
| eprinttype    | eprintclass  | eventdate     | eventtitle      |
| file          | foreword     | holder        | howpublished    |
| indextitle    | institution  | はじめに          | isan            |
| isbn          | ismn         | isrn          | issue           |
| issuesubtitle | issuetitle   | iswc          | journalsubtitle |
| journaltitle  | label        | language      | library         |
| location      | mainsubtitle | maintitle     | month           |
| note          | number       | organization  | origdate        |
| origlanguage  | origlocation | origpublisher | origtitle       |
| pages         | pagetotal    | pagination    | part            |
| publisher     | pubstate     | reprinttitle  | series          |
| shortauthor   | shortedition | shorthand     | shorthandintro  |
| shortjournal  | shortseries  | shorttitle    | subtitle        |
| title         | translator   | type          | url             |
| venue         | version      | volume        | year            |

**文献一覧の並べ替えオプション**

| オプション   | 説明                              |
| ------- | ------------------------------- |
| `nty`   | 名前、タイトル、年の順に並べ替え                |
| `nyt`   | 名前、年、タイトルの順に並べ替え                |
| `nyvt`  | 名前、年、巻、タイトルの順に並べ替え              |
| `anyt`  | アルファベット順のラベル、名前、年、タイトルの順に並べ替え   |
| `anyvt` | アルファベット順のラベル、名前、年、巻、タイトルの順に並べ替え |
| `ydnt`  | 年の降順、名前、タイトルの順に並べ替え             |
| `なし`    | エントリは引用順に処理されます                 |

## さらに読む

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

* [文献スタイル](/latex/ja/to-1/04-bibtex-bibliography-styles.md)
* [Biblatex の引用スタイル](/latex/ja/to-1/08-biblatex-citation-styles.md)
* [基本的な文献管理](/latex/ja/sononotopikku/05-bibliography-management-in-latex.md)
* [natbib を使った文献管理](/latex/ja/to-1/02-bibliography-management-with-natbib.md)
* [biblatex のドキュメント](http://linorg.usp.br/CTAN/macros/latex/contrib/biblatex/doc/biblatex.pdf)


---

# 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/03-bibliography-management-with-biblatex.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.
