> For the complete documentation index, see [llms.txt](https://ayakaleaf-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://ayakaleaf-pro.ayaka.space/latex/zh-cn/zhi-shi-ku/145-using-bibliographies-on-overleaf.md).

# 在 Overleaf 上使用参考文献列表

## 引言

可以使用 LaTeX 的所有主要文献管理程序在 Overleaf 中添加参考文献：biblatex、natbib 和 bibtex。本文将介绍如何：

* 手动创建一个新的 `.bib` 用于存储你的参考文献数据库的文件
* 上传现有的 `.bib` 文件到你的 Overleaf 项目中
* 创建一个 `.bib` 从 Overleaf 模板开始创建的文件。

**注意**：拥有付费账户的用户可以使用高级功能，将其关联到 [Mendeley](/latex/zh-cn/zhi-shi-ku/070-how-to-link-mendeley-to-your-overleaf-account.md), [Zotero](/latex/zh-cn/zhi-shi-ku/073-how-to-link-zotero-to-your-overleaf-account.md)，以及 [Papers](/latex/zh-cn/zhi-shi-ku/071-how-to-link-papers-to-your-overleaf-account.md) 他们的 Overleaf 账户。连接这些参考文献管理器后，你可以轻松创建 `.bib` 文件，方法是批量导入参考文献库或使用 [高级搜索](/latex/zh-cn/zhi-shi-ku/076-how-to-search-for-references-in-an-overleaf-project.md) 来查找并导入单条参考文献。

## 创建你的参考文献数据库

要在你的 Overleaf 项目中创建新的参考文献文件，请在编辑器中点击 **新文件** 图标：

![Biblio1OLV2.png](/files/007115cfd0b5752fdc27af3f46787cae4f636ac1)

会出现一个输入框供你设置新文件的名称。该文件应具有 `.bib` 扩展名，在此示例中它被命名为 `mybibliography.bib`。现在点击 **创建**.

![Biblio2OLV2.png](/files/011d2ea84615cc30a98d76b3e7c7a26f5b49c70f)

新文件会列在左侧面板中，点击它即可编辑其内容。在那里添加你的参考文献条目。 ![Biblio3OLV2.png](/files/3aaa2d3c24a4c05c58db99a864a356b4d999e321)

现在你可以导入这个 `.bib` 文件到主 `.tex` 文件中。请看下一个示例。

```latex
\documentclass{article}

\usepackage[
backend=biber,
style=alphabetic,
sorting=ynt
]{biblatex}

\addbibresource{mybibliography.bib}

\title{Bibliography management: \texttt{biblatex} package}
\author{Share\LaTeX}
\date{ }

\begin{document}

\maketitle

\section{First section}

使用 \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}
```

![Biblio4OLV2.png](/files/9d12139df1161ece2bb5d28dc3983e940cfd3e83)

![Biblio5OLV2.png](/files/c865386950a0e51a3f3f56c1f76b19d5a1c13074)

命令 `\addbibresource{mybibliography.bib}` 会将创建的参考文献文件添加到文档中，这样你就可以使用这些引用。参见 [LaTeX 中的参考文献管理](/latex/zh-cn/geng-duo-zhu-ti/05-bibliography-management-in-latex.md) 以了解有关参考文献管理的更多信息。

## 上传你的参考文献数据库

如果你已经有一个需要在 Overleaf 项目中使用的参考文献文件，你可以将其上传。点击 **上传** 位于左侧面板顶部的图标。

![Biblio6OLV2.png](/files/991fa4a073964f9aeba31b821de482a123330979)

会出现一个对话框，你可以拖放 `.bib` 文件，或者选择 **从你的计算机中选择** 从你的设备上传文件。

![Biblio7OLV2.png](/files/9b80a7d7d76b5606cb1441ad024c28425f614515)

上传完成后，你可以将 `.bib` 文件包含到你的主 `.tex` 文档中。

## 使用模板

该 [Overleaf Gallery](https://www.overleaf.com/gallery) 提供了大量模板，包括若干 [与参考文献相关的](https://www.overleaf.com/gallery?addsearch=Bibliographies) 模板：

![Biblio8OLV2.png](/files/a2f020668f731c7ddab43fef5ad4292bc04246ad)

例如，在 Gallery 中搜索会列出条目 [使用 bibunits 的多个参考文献列表](https://www.overleaf.com/latex/examples/multiple-bibliographies-with-bibunits/ktgbztpwjnpb) ，它展示了如何在同一文档中创建多个参考文献/参考列表：

![Biblio9OLV2.png](/files/02f2721a19f1b8c37d520c34d6e47aeb849654ec)

如果你选择“作为模板打开”，Overleaf 将创建一个新项目，你可以对其进行修改并将其作为工作的基础：

![Biblio10OLV2.png](/files/52ff5168eb0424c2add5974bfd0a558569a20341)

## 支持的参考文献包

有关 LaTeX 中参考文献管理的更多信息，请参见。

* [LaTeX 中的参考文献管理（使用 biblatex）](/latex/zh-cn/geng-duo-zhu-ti/05-bibliography-management-in-latex.md)
* [使用 natbib 管理参考文献](/latex/zh-cn/can-kao-wen-xian-he-yin-yong/02-bibliography-management-with-natbib.md)
* [使用 bibtex 管理参考文献](/latex/zh-cn/can-kao-wen-xian-he-yin-yong/01-bibliography-management-with-bibtex.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://ayakaleaf-pro.ayaka.space/latex/zh-cn/zhi-shi-ku/145-using-bibliographies-on-overleaf.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.
