我想知道是否可以使用 splitbib 包对每个类别中的参考文献重新编号。这是我的 mwe,取自splitbib 文档:
\documentclass{article}
\usepackage{splitbib}
\begin{category}[A]{First category}
\SBentries{entry1,entry4}
\end{category}
\begin{category}[B]{Second category}
\begin{category}{First sub-category}
\SBentries{entry2,entry6}
\end{category}
\begin{category}{Second sub-category}
\SBentries{entry5,entry3}
\end{category}
\end{category}
\begin{document}
We cite~\cite{entry1,entry3,entry4,entry5}. Note that we cite neither \verb+entry2+ nor \verb+entry6+,even though they have been assigned a category.
defined in the last category. The first sub-category will then not appear in the bibliography.
% \def\SBlongestlabel{A1}
\SBtitlestyle{bar}
\SBsubtitlestyle{none}
\begin{thebibliography}{1}
\bibitem{entry1} This is the first entry.
\bibitem{entry3} This is the third entry.
\bibitem{entry4} This is the fourth one.
\bibitem{entry5} This is the last one.
\end{thebibliography}
\end{document}
这个 mwe 给出:
我找不到从 1 开始对第二个类别进行编号的方法,以便它是 [B1]、[B2] 而不是 [B3]、[B4]。有办法吗?
答案1
您的示例无法在我的系统中编译。我不得不在 后添加空行\bibitem
。
我认为 splitbib 没有内置选项(与 biblatex 不同)。但您可以尝试\@listctr
在类别标题中重置。至少在您的示例中,它是有效的。
\documentclass{article}
\usepackage{splitbib}
\makeatletter
\begin{category}[A]{First category}
\SBentries{entry1,entry4}
\end{category}
\begin{category}[B]{Second category\setcounter\@listctr{0}}
\begin{category}{First sub-category}
\SBentries{entry2,entry6}
\end{category}
\begin{category}{Second sub-category}
\SBentries{entry5,entry3}
\end{category}
\end{category}
\makeatother
\begin{document}
We cite~\cite{entry1,entry3,entry4,entry5}. Note that we cite neither \verb+entry2+ nor \verb+entry6+,even though they have been assigned a category.
defined in the last category. The first sub-category will then not appear in the bibliography.
% \def\SBlongestlabel{A1}
\SBtitlestyle{bar}
\SBsubtitlestyle{none}
\begin{thebibliography}{1}
\bibitem{entry1} This is the first entry.
\bibitem{entry3} This is the third entry.
\bibitem{entry4} This is the fourth one.
\bibitem{entry5} This is the last one.
\end{thebibliography}
\end{document}