我想创建一个自定义文章,在每个部分的末尾列出各种参考文献。虽然一些引用的文章可能以不同的顺序出现在每个列表中,但这个参考文献列表必须彼此独立。这是我打算撰写的文档的 MWE
\begin{filecontents}{refslist.bib}
@article{key,
author = {author1},
title = {title1}
}
@article{key2,
author = {author2},
title ={title2}
}
@article{key3,
author = {author3},
title ={title3}
}
@article{key4,
author ={author4},
title ={title4}
}
\end{filecontents}
\documentclass{article}
\usepackage{filecontents}
\usepackage[defernumbers=true,style=numeric,backend=bibtex,url=true,isbn=false,sorting=none,citereset=subsection]{biblatex}
\addbibresource{refslist.bib}
\begin{document}
\section{Show}
This section will show a list of cited articles \cite{key,key2,key3,key4}
\subsection{References in order 1}
\printbibliography[heading=none,section=\therefsection, title={References}]
\section{Not Show}
This section will not show a list of cited articles \cite{key2,key3,key3,key} \therefsection
\newrefsection
%\printbibliography[heading=subbibliography]
\section{Show Again}
\newrefsegment
This section will show a list of cited articles in different order \therefsection \cite{key4,key3,key2}
\subsection{References in order 2}
\printbibliography[heading=none,section=1, title={References}]
\end{document}
编译后的文件的输出不是所需的输出。
如果我将后端更改为 biber (如类似问题中所建议的),则不起作用,情况会变得更糟,无法识别任何引用标签。
所需的输出应该是这样的(我手工创建的)
根据我的日志文件,在第 39 行(我声明了新的 refsegment)之后,该行之后的所有引用键都变为未定义。因此,第 40 行 \printbibliograph 生成了一个空的书目。
有解决方法吗?我正在使用 Win TeXstudio 2.10.4 和 Mac TeXshop 3.61(没有任何区别)
答案1
并非所有高级功能都受支持backend=bibtex,
。要完全支持所有biblatex
功能,您需要使用backend=biber,
。请注意,您需要使用 Biber 而不是 BibTeX 来编译您的文档(或者您需要告诉您的编辑器:Biblatex 与 Biber:配置我的编辑器以避免未定义的引用)。
然后
\documentclass{article}
\usepackage[
backend=biber,
style=numeric,
sorting=none,
defernumbers=true,
citereset=subsection,
url=true,isbn=false,
]{biblatex}
\begin{filecontents}{\jobname.bib}
@article{key,
author = {author1},
title = {title1}
}
@article{key2,
author = {author2},
title = {title2}
}
@article{key3,
author = {author3},
title = {title3}
}
@article{key4,
author = {author4},
title = {title4}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\section{Show}
This section will show a list of cited articles \cite{key,key2,key3,key4}
\subsection{References in order 1}
\printbibliography[heading=none,section=\therefsection, title={References}]
\section{Not Show}
This section will not show a list of cited articles
\cite{key2,key3,key3,key} \therefsection
\newrefsection
\section{Show Again}
This section will show a list of cited articles in different order
\therefsection \cite{key4,key3,key2}
\subsection{References in order 2}
\printbibliography[heading=none,section=1, title={References}]
\end{document}
生产
对我来说,这看起来与您想要的非常相似。
(我删除了\newrefsegment
。它在这里没有做任何有用的事情。)