Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] 模板没有参考文献这一节 #213

Closed
kingsouljz opened this issue Dec 6, 2017 · 39 comments
Closed

[question] 模板没有参考文献这一节 #213

kingsouljz opened this issue Dec 6, 2017 · 39 comments

Comments

@kingsouljz
Copy link

不好意思请问一下,我编译过SJTUThesis之后没有看到有参考文献这一节啊,还有怎样让参考文献在原文中显示数字标号啊?谢谢~~

@AlexaraWu
Copy link
Collaborator

AlexaraWu commented Dec 6, 2017

参考文献需要由单独的工具 biber 处理,必须先对 thesis.tex 源文件编译一次,再运行 biber 生成文献列表,然后再对 thesis.tex 源文件至少编译两次,才能得到插入文献列表并有正确引用的文档。完整的编译流程如下:

xelatex -no-pdf thesis
biber --debug thesis
xelatex thesis
xelatex thesis

你是不是用 xelatex 只编译了 thesis.tex 一次?

@kingsouljz
Copy link
Author

是的。。我是用WinEdt xelatex 直接编译的

@AlexaraWu
Copy link
Collaborator

Windows 用户可以使用模版提供的编译脚本 compile.bat,双击即可完成编译过程。

@kingsouljz
Copy link
Author

可以了,非常感谢!

@horstpbf
Copy link

想问一下,我的机器上装的是CTEX,双击complie.bat之后很长时间都没有反应,应该怎样设置?

@AlexaraWu
Copy link
Collaborator

@horstpbf 换 Tex Live 吧。引用 CTeX 套装的开发之一刘海洋的话:

CTeX 已经完成了它的历史使命。

@horstpbf
Copy link

@AlexaraWu 非常感谢您的答复,然而我换了Tex Live,双击complie.bat之后仍然没有反应。

@AlexaraWu
Copy link
Collaborator

@horstpbf 没有反应?弹出窗口总有吧?

@horstpbf
Copy link

弹窗有的,然后显示
Compile...
xelatex -no-pdf thesis...
然后就一直停在这里

@AlexaraWu
Copy link
Collaborator

AlexaraWu commented Dec 15, 2017

@horstpbf 应该是哪里出了问题,可以尝试手动逐次编译定位故障。

不过我猜大概率是字体问题,你是不是没有安装模版所需的字体?

@horstpbf
Copy link

我今天检查了一下字体,然后那个compile.dat双击后还是停在xelatex -no-pdf thesis
然后我按照其他说明安装了babun, 然后输入四条命令xelatex -no-pdf thesis biber --debug thesis xelatex thesis xelatex thesis,可以生成pdf文件,但是编译过程中出现大量错误(我还不知道babun中怎么复制粘贴。。。所以暂时不能贴出来)

@AlexaraWu
Copy link
Collaborator

@horstpbf 一般会有生成 .log 文件啊。你也可以使用重定向:xelatex -no-pdf thesis > log.txt,这样就能把屏幕输出存到 log.txt 文件里。

@horstpbf
Copy link

我按照你的说法,看了一下结果,里面一共有这么几类warning,我自己对latex了解得不是特别深入,想问你一下这几类warning是什么意思
###############################################################################
warning: ctex warning: "deprecated-option"
例如:

  • ctex warning: "deprecated-option"
  • Option `nofonts' is deprecated.
  • Option `fontset=none' is set. It is better to use fontset option.

为什么说这种设置不推荐?
###############################################################################
warning: Package biblatex Warning: 'iso8601' date format specifier is deprecated, use 'e
dtf' instead.
为什么说这种设置不推荐?
###############################################################################
Package biblatex Warning: Conflicting options.
(biblatex) 'date=edtf' requires 'seconds=true'.
(biblatex) Setting 'seconds=true' on input line 27.
这个冲突是指什么?
###############################################################################
LaTeX Font Warning: Font shape `U/rsfs/m/n' in size <16.06> not available
(Font) size <17.28> substituted on input line 32.

LaTeX Font Warning: Font shape `U/rsfs/m/n' in size <10.53937> not available
(Font) size <10.95> substituted on input line 32.

这个是缺什么字体?
###############################################################################
Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref) removing `\xl@everylogo' on input line 2.
为什么这个token不允许?
###############################################################################
LaTeX Font Warning: Size substitutions with differences
(Font) up to 1.22pt have occurred.

LaTeX Warning: There were undefined references.
这两个是最后的杂项,第一个我不太明白是什么意思,第二个我不太清楚哪些引用未定义,模板里面的参考文件不是自动生成的吗,为什么会出现未定义的情况?
###############################################################################

@horstpbf
Copy link

另外,在用biber --debug thesis命令时,出现了如下错误:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = "en_US.UTF-8",
LC_CTYPE = "en_US.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the system default locale ("Chinese (Simplified)_People's Republic of China.936").
Use of uninitialized value $end in substitution (s///) at C:\Users\bf.babun\cygwin\tmp\par-6266\cache-2aa0b74e6d5e75f8e71a4b8c9501a9c7c24ddbf0\inc\lib/Biber/Input/file/bibtex.pm line 1011.
Use of uninitialized value $end in substitution (s///) at C:\Users\bf.babun\cygwin\tmp\par-6266\cache-2aa0b74e6d5e75f8e71a4b8c9501a9c7c24ddbf0\inc\lib/Biber/Input/file/bibtex.pm line 1011.

这是要我安装perl吗

@retaw106
Copy link

其实不一定要用compile.bat的,我就是在texstudio编辑器里点的biber命令和xelatex命令,这样报错会比较明显

@gaocegege
Copy link
Member

@horstpbf 那是要你设置一下 locale, 如果有问题请新开一个 issue 吧, 你遇到的问题跟这个 issue 的标题没有关系 :-)

@qiaoxiaoyue
Copy link

mac怎么办呢?也是参考文献无法显示

@hushidong
Copy link
Contributor

hushidong commented Jul 4, 2018 via email

@zihufanzhou
Copy link

您好,我想请问一下,为什么按照四次运行的步骤之后,还是没有生成参考文献列表呢?
另外,为什么在文章中用\cite之后,没有出现可以应用的列表呢?

@gaocegege
Copy link
Member

@zihufanzhou 你是什么系统呢,用什么命令编译的

@zepinglee
Copy link

直接用 latexmk 编译就行了

@gaocegege gaocegege changed the title 模板没有参考文献这一节 [question] 模板没有参考文献这一节 Dec 11, 2018
@zihufanzhou
Copy link

@zihufanzhou 你是什么系统呢,用什么命令编译的

您好。谢谢回复哈。我用的是windows系统,win8,我是用的texstudio,直接用的tools→commands→Xelatex/Biber

@gaocegege
Copy link
Member

请试试 compile.bat

@zihufanzhou
Copy link

请试试 compile.bat

试过了还是不行,但是我刚刚在overleaf上测试过代码,一切都没有问题。\cite过后也能出现文献列表可供选择,而且也能有文献附录。不懂是为什么。

@gaocegege
Copy link
Member

是你那边编译命令的问题,大概率。compile.bat 编译完成了?有日志么

@zihufanzhou
Copy link

是你那边编译命令的问题,大概率。compile.bat 编译完成了?有日志么

没有找到生成的log文件呀?难道我运行的文件不对么?显示的是这样子。
image
另外,我还请教如果我在写代码过程中需要另外添加package,是不是直接在Latex Class文件编辑就行?

@gaocegege
Copy link
Member

另外,我还请教如果我在写代码过程中需要另外添加package,是不是直接在Latex Class文件编辑就行?

那你试试 latexmk -xelatex -halt-on-error thesis

@hushidong
Copy link
Contributor

texlive 安装了没?

@AlexaraWu
Copy link
Collaborator

AlexaraWu commented Dec 11, 2018

是你那边编译命令的问题,大概率。compile.bat 编译完成了?有日志么

没有找到生成的log文件呀?难道我运行的文件不对么?显示的是这样子。
image
另外,我还请教如果我在写代码过程中需要另外添加package,是不是直接在Latex Class文件编辑就行?

compile.bat 是我写的,这个提示是让你关闭所有打开 thesis.pdf 文件的程序。

@zihufanzhou
Copy link

嗯嗯,我也以为是没关pdf的缘故,所以我关了pdf试了也还是这样子的反应,然后我把我的texstudio关了也还是一样。就不懂是为什么。

@zihufanzhou
Copy link

texlive 安装了没?

texlive是什么呀?
我是用的texstudio,我已经不太记得我以前都装过什么了,但是我以前写论文用latex都是完全没有问题的。

@zihufanzhou
Copy link

您好,我还有个问题,在之前我写论文的时候,设置算法格式用的如图所示的package和设置,我怎么修改后放到Latex Class文件里呀?我刚试了一下把usepackage改成requirepackage不对呀。

@zihufanzhou
Copy link

图片竟然没传上来,如下:

\usepackage[utf8]{inputenc}
\DeclareUnicodeCharacter{FF0C}{-}
\DeclareUnicodeCharacter{2208}{-}
\usepackage[ruled, lined, longend, linesnumbered]{algorithm2e}
\SetAlCapFnt{\normalsize}
\SetAlCapNameFnt{\normalsize}

@AlexaraWu
Copy link
Collaborator

AlexaraWu commented Dec 12, 2018

嗯嗯,我也以为是没关pdf的缘故,所以我关了pdf试了也还是这样子的反应,然后我把我的texstudio关了也还是一样。就不懂是为什么。

手动删除 thesis.pdf 后再双击 compile.bat 试试?

@bubifengyun
Copy link
Contributor

是不是因为 label冲突导致的?我是用deepin linux, texlive 2018。也是经常出现参考文献在目录下消失,但是在最后正文中还是出现。试着把label异常的给解决了,参考文献就在目录下出现了。不知道你们的是目录下消失,还是正文中消失。

@hushidong
Copy link
Contributor

texlive 安装了没?

texlive是什么呀?
我是用的texstudio,我已经不太记得我以前都装过什么了,但是我以前写论文用latex都是完全没有问题的。

你用的什么tex发行版?先写个小文档编译一下试试,如果可以那么sjtuthesis也是能编译的。

@gaocegege
Copy link
Member

@zihufanzhou 你好,请问问题解决了么

@gaocegege
Copy link
Member

长时间不活跃的问题暂时先关闭了,如果有新的进展可以继续回复

@lltt-SJTU
Copy link

您好,怎么用biber呀?我用的是winedt/miktex,用模板编译的时候不显示参考文献,找到这个帖子用命令行写biber --debug thesis显示ERROR - Cannot find 'thesis.bcf'! 现在不知道怎么能搞出参考文献。以及在正文中引用\cite{XXX},显示的是右上角标XXX,怎么才能改成编号呢?调了一天没调出来。感谢感谢!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests