> 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/zh-cn/wen-da/69-in-the-ieee-for-journals-template-i-m-trying-to-use-bibtex-for-my-references.md).

# 在 IEEE 期刊模板中，我正在尝试使用 bibtex 来处理参考文献

许多使用 IEEE 期刊模板的作者都会寻求帮助，想知道如何使用 bibtex 添加参考文献。特别是，在将 IEEEexample.bib 和 IEEEabrv.bib 文件上传到 bibtex/bib 文件夹之后，要让文档成功编译可能并不容易。下面汇总了我们的回答，希望在你遇到类似情况时能有所帮助，并且最后还提供了一个可以直接作为起点模板使用的示例。

首先，如果你已经上传了 IEEEtran.cls 和 IEEEtran.bst 文件，建议将它们删除，因为它们实际上已经内置在 writeLaTeX 中——你不需要把它们包含到项目里，而且通常最好使用内置版本。

如果你需要创建 bibtex/bib 文件夹，可以通过编辑器中的 Project 菜单来完成——打开菜单后，创建文件夹和文件的图标就在右上角。

由 bibtex 生成的参考文献列表来自 \bibliography 和 \bibliographystyle 命令，并且假设你正在使用 bibtex/bib 文件夹中的 IEEEexample.bib 和 IEEEabrv.bib 文件，这些命令应改为：

```latex
\bibliography{bibtex/bib/IEEEabrv.bib,bibtex/bib/IEEEexample.bib}{}
\bibliographystyle{IEEEtran}
```

这会告诉 bibtex 加载这两个 .bib 文件，并使用 IEEEtran 参考文献样式来格式化参考文献。

注意：模板中的原始命令是：

```latex
\bibliography{mybib.bib}{}
\bibliographystyle{plain}
```

这表示你希望 bibtex 使用一个名为 mybib.bib 的文件作为参考文献来源，并采用 plain（内置）样式。

最后，完成以上设置后常见的一个错误是，文档中没有任何 \cite 命令引用 bib 文件中的任何条目。在下面的示例中，我们从 IEEEexample.bib 中添加了一个：

```latex
\cite{IEEEhowto:IEEEtranpage}
```

以便使其能够编译。在你开始添加自己的引用后，最好把它删掉。

[下面是在 Overleaf 上的示例，已经准备好并设置完毕，可以直接使用。](https://www.overleaf.com/latex/templates/ieee-for-journals-template-with-bibtex-example-files-included/hjbyjvncdmpx)

有关 bibtex 的更多信息，我们推荐 LaTeX wikibook \[[参考文献管理章节](http://en.wikibooks.org/wiki/LaTeX/Bibliography_Management)].


---

# 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/zh-cn/wen-da/69-in-the-ieee-for-journals-template-i-m-trying-to-use-bibtex-for-my-references.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.
