我正在使用比布尼茨包来为一本书生成多个书目。我使用第一种方法,使用\bibliographyunit[\chapter]
两个不同的数据库基数1和base2这是一个 MWE:
\documentclass{book}
\usepackage{bibunits}
\begin{document}
\bibliographyunit[\chapter]
\defaultbibliographystyle{plain}
\chapter{The First Chapter}
Refer to \cite{Knuth-CT}, and \cite{Knuth-TB} for more info.
\putbib[base1]
\defaultbibliographystyle{abbrv}
\chapter{The Second Chapter}
Refer to \cite{MR-PQ}, and \cite{3DLM} for more info.
\putbib[base2]
\end{document}
两章的参考书目生成均没有问题
但文中的引用没有得到解决
我得到了错误第 XXX 页上的引文 XXX 在输入行 XXX 上未定义,知道\cite
命令中的键完全匹配.bib
文件中的键,并且所有辅助文件的编译顺序都是正确的。
以下是.bib
文件:
基础资料
@Book{Knuth-CT,
author = "Donald E. Knuth",
title = "The {\TeX}book",
publisher = "Ad{\-d}i{\-s}on-Wes{\-l}ey",
address = "Reading, MA, USA",
volume = "A",
series = "Computers and Typesetting",
pages = "ix + 483",
year = 1986,
isbn = "0-201-13447-0"
}
@Article{Knuth-TB,
author = "Donald E. Knuth",
title = "{Typesetting Concrete Mathematics}",
journal = "TUGboat",
volume = "10",
number = "1",
pages = "31--36",
year = 1989,
month = apr,
issn = "0896-3207"
}
基础资料
@InProceedings{MR-PQ,
author = "Frank Mittelbach and Chris Rowley",
title = "The Pursuit of Quality: How can Automated Typesetting achieve the Highest Standards of Craft Typography?",
pages = "261--273"
}
@misc{3DLM,
title={3D Line Mapping Revisited},
author={Shaohui Liu and Yifan Yu and Rémi Pautrat and Marc Pollefeys and Viktor Larsson},
year={2023},
eprint={2303.17504},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
我很想得到这个LaTeX 警告:第 1 页上的引用“Knuth-CT”在输入行 11 上未定义。对于所有引用条目。
我希望你对此有所了解。提前致谢。
答案1
它没有像我预期的那样工作,但是bibunit
环境确实产生了预期的输出。
\documentclass{book}
\usepackage{bibunits}
\begin{document}
\begin{bibunit}[plain]
\chapter{The First Chapter}
Refer to \cite{Knuth-CT}, and \cite{Knuth-TB} for more info.
\putbib[base1]
\end{bibunit}
\begin{bibunit}[abbrv]
\chapter{The Second Chapter}
Refer to \cite{MR-PQ}, and \cite{3DLM} for more info.
\putbib[base2]
\end{bibunit}
\end{document}
答案2
解决方案是在包的文档中添加一个包选项,即 sectionbib(用于章节级 bib)或 subsectionbib(用于节级 bib),3.2 Bibunits by chapters or sections
它说在使用方法时,\bibliographyunit[<unit>]
必须有其中一个选项才能使包正常运行。所以,对于这个问题,使用\usepackage[sectionbib]{bibunits}
为我解决了引用问题。