这个问题类似于这个问题虽然我不知道如何修改代码以适合我的目的。我有以下内容:
\begin{filecontents*}{\jobname.bib}
@book{Doe2013,
title = {Title I},
author = {Doe, John},
publisher = {Void},
year = {2013}
}
@book{Doe2014,
title = {Title II},
author = {Doe, John},
publisher = {Void},
year = {2014}
}
@book{Doe2015,
title = {Title III},
author = {Doe, John},
publisher = {Void},
year = {2015}
}
\end{filecontents*}
\documentclass{article}
\usepackage{multibib}
\newcites{ll}{Subsection of A}
\usepackage{xcolor}
\usepackage{hyperref}
\hypersetup{
colorlinks = true,
linkbordercolor = {white},
allcolors=cyan
}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\thebibliography}{%
\chapter*{\bibname}\@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}}{%
\section{References}}{}{}
\makeatother
\usepackage[authoryear,sort,round]{natbib}
\renewcommand\refname{Bibliography}
\renewcommand{\bibsection}{\section{\bibname}}
\begin{document}
\section{PART A}
A reference to \citell{Doe2013} and \citepll{Doe2014}, and another to \citep{Doe2015}.
\bibliographystylell{plainnat}
\bibliographyll{BibProb}
\section{PART B}
Same reference to \citell{Doe2013}, but also to \cite{Doe2015}.
\renewcommand{\refname}{Bibliography}
\bibliographystyle{plainnat}
\bibliography{BibProb}
\end{document}
我想将第一个参考书目“2 A 的子部分”编号为 1.1,即作为“1 PART A”的子部分。
答案1
当前代码将参考书目定义为一个部分(\renewcommand{\bibsection}{\section{\bibname}}
)。您需要做的是更改定义以创建一个子部分,即在第 1 部分之前(即
\renewcommand{\bibsection}{\subsection{\bibname}}
),然后将定义更改为在 A 部分之后但在 B 部分之前的节。因此,您需要的是类似以下内容:
\begin{document}
\section{PART A}
A reference to \citell{Doe2013} and \citepll{Doe2014}, and another to \citep{Doe2015}.
\renewcommand{\bibsection}{\subsection{\bibname}}
\bibliographystylell{plainnat}
\bibliographyll{BibProb}
\section{PART B}
Same reference to \citell{Doe2013}, but also to \cite{Doe2015}.
\renewcommand{\bibsection}{\section{\bibname}}
\renewcommand{\refname}{Bibliography}
\bibliographystyle{plainnat}
\bibliography{BibProb}
\end{document}