编译 LaTex 围兜源码

发布于 2024-08-25 15:27:50 字数 325 浏览 4 评论 0原文

我正在用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

清君侧 2024-09-01 15:27:50

您需要编译 bibtex 文件。

假设您有 article.texarticle.bib。您需要运行:

  • latexarticle.tex(这将生成一个带有问号的文档,以代替未知的引用)
  • bibtexarticle(这将解析所有.bib文件包含在文章中并生成有关参考文献的元信息)
  • latexarticle.tex(这将生成在正确位置包含所有参考文献的文档)
  • latexarticle.tex(就在如果添加引用破坏了某处的页码编号)

You need to compile the bibtex file.

Suppose you have article.tex and article.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)
谁许谁一生繁华 2024-09-01 15:27:50

你必须运行“bibtex”:

latex paper.tex
bibtex paper
latex paper.tex
latex paper.tex
dvipdf paper.dvi

You have to run 'bibtex':

latex paper.tex
bibtex paper
latex paper.tex
latex paper.tex
dvipdf paper.dvi
与之呼应 2024-09-01 15:27:50

我使用 texmaker 作为编辑器。
你必须在终端中编译它,如下所示:

  1. pdflatex 文件名 (带或不带扩展名)
  2. bibtex 文件名 (不带扩展名)
  3. pdflatex 文件名 (带或不带扩展名)< /em>
  4. pdflatex 文件名 (带或不带扩展名)

但有时,当您使用 \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:

  1. pdflatex filename (with or without extensions)
  2. bibtex filename (without extensions)
  3. pdflatex filename (with or without extensions)
  4. pdflatex filename (with or without extensions)

but sometimes, when you use \citep{}, the names of the references don't show up. In this case, I had to open the references.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.

橘味果▽酱 2024-09-01 15:27:50

以防万一它对某人有帮助,因为这些问题(和答案)对我帮助很大;我决定创建一个连续运行这 4 个命令的别名:

只需将以下行添加到您的 ~/.bashrc 文件中(根据名称修改 main 关键字) .tex.bib 文件)

alias texbib = 'pdflatex main.tex && bibtex main && pdflatex main.tex && pdflatex main.tex'

现在,只需执行 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 the main keyword accordingly to the name of your .tex and .bib files)

alias texbib = 'pdflatex main.tex && bibtex main && pdflatex main.tex && pdflatex main.tex'

And now, by just executing the texbib command (alias), all these commands will be executed sequentially.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文