编译 LaTex 围兜源码
我正在用 Latex 写论文,我在自己的论文中引用了参考文献。 文件如下所示
@Article{xxx,
author = "D.A. Reinhard",
title = "Case Study",
year = "1985",
}
,我在主文档中将它们引用为 ~\cite{xxx}
当我编译主文档时: pdflatex main.tex 比 它向我显示问号,而不是对参考书目的正确引用。 我还需要自己编译围脖源吗?如果是的话,有人可以吗 告诉我 Linux 的命令
非常感谢!
I am writing my thesis in Latex, and I have the references in an own thesis.bib
file which look as follows
@Article{xxx,
author = "D.A. Reinhard",
title = "Case Study",
year = "1985",
}
and I reference them in my main document as ~\cite{xxx}
When I compile then the main document with: pdflatex main.tex than
it shows me question marks instead of the proper references to the bibliography.
Do I also need to compile the bib source on its own? If yes, can somebody please
tell me the command for Linux
Many thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您需要编译 bibtex 文件。
假设您有
article.tex
和article.bib
。您需要运行:latexarticle.tex
(这将生成一个带有问号的文档,以代替未知的引用)bibtexarticle
(这将解析所有.bib文件包含在文章中并生成有关参考文献的元信息)latexarticle.tex
(这将生成在正确位置包含所有参考文献的文档)latexarticle.tex
(就在如果添加引用破坏了某处的页码编号)You need to compile the bibtex file.
Suppose you have
article.tex
andarticle.bib
. You need to run:latex article.tex
(this will generate a document with question marks in place of unknown references)bibtex article
(this will parse all the .bib files that were included in the article and generate metainformation regarding references)latex article.tex
(this will generate document with all the references in the correct places)latex article.tex
(just in case if adding references broke page numbering somewhere)你必须运行“bibtex”:
You have to run 'bibtex':
我使用 texmaker 作为编辑器。
你必须在终端中编译它,如下所示:
但有时,当您使用
\citep{}
时,引用的名称不会显示。在本例中,我必须打开references.bib
文件,以便 texmaker 可以从references.bib 文件中捕获引用。在围脖文件的每个版本之后,我都必须关闭并重新打开它!这样 texmaker 每次都可以捕获新的 .bbl 文件的内容。但请记住,您还必须在 texmaker 中运行代码。I am using texmaker as the editor.
you have to compile it in terminal as following:
but sometimes, when you use
\citep{}
, the names of the references don't show up. In this case, I had to open thereferences.bib
file , so that texmaker could capture the references from the references.bib file. After every edition of the bib file, I had to close and reopen it!! So that texmaker could capture the content of new .bbl file each time. But remember, you have to also run your code in texmaker too.以防万一它对某人有帮助,因为这些问题(和答案)对我帮助很大;我决定创建一个连续运行这 4 个命令的别名:
只需将以下行添加到您的
~/.bashrc
文件中(根据名称修改main
关键字).tex
和.bib
文件)现在,只需执行
texbib
命令(别名),所有这些命令都将按顺序执行。Just in case it helps someone, since these questions (and answers) helped me really much; I decided to create an alias that runs these 4 commands in a row:
Just add the following line to your
~/.bashrc
file (modify themain
keyword accordingly to the name of your.tex
and.bib
files)And now, by just executing the
texbib
command (alias), all these commands will be executed sequentially.