tuna / thuthesis

LaTeX Thesis Template for Tsinghua University
https://www.ctan.org/pkg/thuthesis
LaTeX Project Public License v1.3c
4.56k stars 1.08k forks source link

7.4.0版本,有两篇附录时无法分别加载参考文献 #956

Closed Hazelbrookl closed 4 months ago

Hazelbrookl commented 5 months ago

提交前检查

系统

Overleaf

TeX 发行版

TeX Live 2023

TeX 编译器

XeLaTeX

版本

7.4.0

学位类型

bachelor

问题描述

本科生论文有两篇外文资料翻译,分在两个附录中。只能加载出第二篇附录的参考文献,看了cls之后发现应该是所有附录共用一个bibliography导致前面一篇被覆盖了,有没有办法显示两个附录的参考文献? ![Uploading eaf85551f65684f7fc3ebbb266ce5d0.png…]()

复现代码

% thuthesis-example.tex

\appendix
\input{data/appendix-translation_1}  % 本科生:外文资料的书面翻译
\input{data/appendix-translation_2}  % 本科生:外文资料的书面翻译

% appendix-translation_1.tex

% 书面翻译的参考文献
\bibliographystyle{ieeetr}
\bibliography{ref/appendix1}

% 书面翻译对应的原文索引
\begin{translation-index}
  \nocite{kang2023large}
  \bibliographystyle{ieeetr}
  \bibliography{ref/appendix1}
\end{translation-index}

% appendix-translation_2.tex

% 书面翻译的参考文献
\bibliographystyle{ieeetr}
\bibliography{ref/appendix2}

% 书面翻译对应的原文索引
\begin{translation-index}
  \nocite{liu2023chatgpt}
  \bibliographystyle{ieeetr}
  \bibliography{ref/appendix2}
\end{translation-index}

编译日志

You have cited something which is not included in your bibliography. Make sure that the citation (\cite{...}) has a corresponding key in your bibliography, and that both are spelled the same way.

其他信息

No response

Harry-Chen commented 5 months ago

可参考 #953

Hazelbrookl commented 5 months ago

可参考 #953

改用biblatex并增加keyword后,\printbibliography[keyword={},title={}]不能显示出文献,直接\printbibliography则输出原文和附录一二的所有文献,同时报错biblatex和bibunit冲突,这是因为没有用最新版本吗

Harry-Chen commented 5 months ago

可参考 #953

改用biblatex并增加keyword后,\printbibliography[keyword={},title={}]不能显示出文献,直接\printbibliography则输出原文和附录一二的所有文献,同时报错biblatex和bibunit冲突,这是因为没有用最新版本吗

抱歉,我没有注意到是文献翻译这部分。确实 biblatex 和 bibunit 是不能共存的,此需求可能还需要进一步研究一下

Hazelbrookl commented 5 months ago

可参考 #953

改用biblatex并增加keyword后,\printbibliography[keyword={},title={}]不能显示出文献,直接\printbibliography则输出原文和附录一二的所有文献,同时报错biblatex和bibunit冲突,这是因为没有用最新版本吗

抱歉,我没有注意到是文献翻译这部分。确实 biblatex 和 bibunit 是不能共存的,此需求可能还需要进一步研究一下

好的,谢谢回复。因为本科生文献翻译要求1-2篇外文资料,对于一些翻译了两篇的同学想把参考文献分开的话可能确实有这个需求。

zepinglee commented 5 months ago

目前的 translation-index 确实没考虑多篇外文资料翻译的情况。我在 fd35bde 已经修复了这个问题。

@Harry-Chen 指的是使用 biblatex 方案,并非使用 keyword 等参数,修改方法见 https://github.com/tuna/thuthesis/commit/d14b8a69ca9e4d4c1c5f28ed58f026741add4ff8。另外使用 biblatex 方案按理是不会调用 bibunits 的,可能需要清理辅助文件再编译。

顺便提醒下,使用 biblatex 方案的附录中,参考文献只能使用同正文一致的样式(gb7714-2015),不能切换其他的样式(如 APA 或 IEEE 等)。我不确定这样是否符合要求。因为本科生的《写作指南》没有明确要求,但是给出了 APA 和 Chicago 的参考文献体例。

Hazelbrookl commented 4 months ago

目前的 translation-index 确实没考虑多篇外文资料翻译的情况。我在 fd35bde 已经修复了这个问题。

@Harry-Chen 指的是使用 biblatex 方案,并非使用 keyword 等参数,修改方法见 d14b8a6。另外使用 biblatex 方案按理是不会调用 bibunits 的,可能需要清理辅助文件再编译。

顺便提醒下,使用 biblatex 方案的附录中,参考文献只能使用同正文一致的样式(gb7714-2015),不能切换其他的样式(如 APA 或 IEEE 等)。我不确定这样是否符合要求。因为本科生的《写作指南》没有明确要求,但是给出了 APA 和 Chicago 的参考文献体例。

好的,感谢解答