We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
编译的系统:overleaf TeX 发行版:TeX Live 2023 模板版本:v7.4.0 模板类型:doctor(使用缺省值)
p.s. 在 macOS 13.5.2 上使用 latexmk 编译也存在此问题,并且下面的「其它尝试」对于 latexmk 也适用。
截图:
复现上述问题的代码:
\documentclass{thuthesis} \usepackage[utf8]{inputenc} \usepackage{filecontents} \usepackage{hyperref} \usepackage{glossaries} \usepackage[style=thuthesis-numeric]{biblatex} % \usepackage[style=thuthesis-author-year]{biblatex} \begin{filecontents}{ref.bib} @book{newton1687, author = {Isaac Newton}, title = {The Mathematical Principles of Natural Philosophy}, year = {1687}, } \end{filecontents} \addbibresource{ref.bib} \makeglossaries \newglossaryentry{牛顿运动定律} { name = {牛顿运动定律}, description = {Newton's laws of motion}, } \begin{document} \maketitle \mainmatter \chapter{引言} 牛顿~\cite{newton1687} 于 1687 发表了著名的\gls{牛顿运动定律}。 \printbibliography \appendix \printglossary \end{document}
首先使用 \usepackage[style=thuthesis-author-year]{biblatex} 编译一次,再使用 \usepackage[style=thuthesis-numeric]{biblatex} 编译一次,可以得到正确的参考文献编号。
\usepackage[style=thuthesis-author-year]{biblatex}
\usepackage[style=thuthesis-numeric]{biblatex}
The text was updated successfully, but these errors were encountered:
我能复现这个问题。
主要原因是在于 defernumbers 选项,这是为了实现 #837 的功能,但目前还没搞懂为何跟 glossaries 不兼容。感觉需要分析底层命令,比较复杂。
defernumbers
glossaries
thuthesis/thuthesis.dtx
Line 6121 in 8a354c7
如果你的附录中没有引用的话,可以先注释掉这一行。
p.s. 在 macOS 13.5.2 上使用 latexmk 编译也存在此问题
另外提一下,在本地使用 latexmk 编译需要修改配置文件。
thuthesis/latexmkrc
Line 13 in 8a354c7
这里是为了编译文档(.dtx)设置的,需要替换为示例 texmf-dist/doc/support/latexmk/example_rcfiles/glossaries_latexmkrc 的配置。
.dtx
texmf-dist/doc/support/latexmk/example_rcfiles/glossaries_latexmkrc
add_cus_dep( 'acn', 'acr', 0, 'makeglossaries' ); add_cus_dep( 'glo', 'gls', 0, 'makeglossaries' ); $clean_ext .= " acr acn alg glo gls glg"; sub makeglossaries { my ($base_name, $path) = fileparse( $_[0] ); my @args = ( "-q", "-d", $path, $base_name ); if ($silent) { unshift @args, "-q"; } return system "makeglossaries", "-d", $path, $base_name; }
Sorry, something went wrong.
No branches or pull requests
编译环境
编译的系统:overleaf
TeX 发行版:TeX Live 2023
模板版本:v7.4.0
模板类型:doctor(使用缺省值)
p.s. 在 macOS 13.5.2 上使用 latexmk 编译也存在此问题,并且下面的「其它尝试」对于 latexmk 也适用。
描述问题
截图:
复现上述问题的代码:
其它尝试
首先使用
\usepackage[style=thuthesis-author-year]{biblatex}
编译一次,再使用\usepackage[style=thuthesis-numeric]{biblatex}
编译一次,可以得到正确的参考文献编号。The text was updated successfully, but these errors were encountered: