![如何防止回忆录类的目录中出现子书目?](https://linux22.com/image/301377/%E5%A6%82%E4%BD%95%E9%98%B2%E6%AD%A2%E5%9B%9E%E5%BF%86%E5%BD%95%E7%B1%BB%E7%9A%84%E7%9B%AE%E5%BD%95%E4%B8%AD%E5%87%BA%E7%8E%B0%E5%AD%90%E4%B9%A6%E7%9B%AE%EF%BC%9F.png)
我使用关键字方法创建了子书目,以区分主要来源和次要来源。这种方法效果很好,但唯一的问题是,在目录中,它将所有子书目列为单独的条目。例如;
参考书目......45
子书目1......45
子书目1......49
我希望目录中只有参考书目而不是子目录,所以我假设(可能错误地)“\nobibintoc”不是解决方案,因为它会删除所有内容。
我在这里查看了一些问题,但似乎找不到解决方案。
这是一个 MWE。
\documentclass[12pt,a4paper]{memoir}
\usepackage[utf8]{inputenc}
\usepackage{lipsum} % just for dummy text
\usepackage[notes, backend=biber, bookpages=false]{biblatex-chicago}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{book1,
address = {Anytown},
booktitle = {Example book},
pages = {5},
title = {{Any book you want}},
year = {2000}
}
@article{EPaper12/12/2000,
address = {anytown},
journal = {Example Newpaper},
date = {2000-12-12},
month = {12.12.},
pages = {5},
keywords = {primary},
title = {{Another Title you want}},
year = {1915}
}
\end{filecontents*}
\addbibresource{\jobname} % if you’re using biblatex
\begin{document}
\tableofcontents
\lipsum[1]\footcite{book1}
\lipsum[1]\footcite{EPaper12/12/2000}
\printbibheading
\printbibliography[keyword=primary,heading=subbibliography,%
title={Primary Sources}]
\printbibliography[notkeyword=primary,heading=subbibliography,%
title={Secondary Sources}]
\end{document}
答案1
\nobibintoc
只需在命令之后\printbibheading
但在命令之前使用\printbibliography
:
\documentclass[12pt,a4paper]{memoir}
\usepackage[utf8]{inputenc}
\usepackage{lipsum} % just for dummy text
\usepackage[notes, backend=biber, bookpages=false]{biblatex-chicago}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{book1,
address = {Anytown},
booktitle = {Example book},
pages = {5},
title = {{Any book you want}},
year = {2000}
}
@article{EPaper12/12/2000,
address = {anytown},
journal = {Example Newpaper},
date = {2000-12-12},
month = {12.12.},
pages = {5},
keywords = {primary},
title = {{Another Title you want}},
year = {1915}
}
\end{filecontents*}
\addbibresource{\jobname} % if you’re using biblatex
\begin{document}
\tableofcontents
\lipsum[1]\footcite{book1}
\lipsum[1]\footcite{EPaper12/12/2000}
\printbibheading
\nobibintoc
\printbibliography[keyword=primary,heading=subbibliography,%
title={Primary Sources}]
\printbibliography[notkeyword=primary,heading=subbibliography,%
title={Secondary Sources}]
\end{document}
输出的第一页显示所需的目录: