0

This question is similar to this question though I can't figure out how to modify the code to suit my purpose. I have the following:

\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}

Which produces: example

I would like to have the first bibliography "2 Subsection of A" numbered as 1.1, that is, as a subsection of "1 PART A."

0

The current code defines the bibliography to be a section (\renewcommand{\bibsection}{\section{\bibname}}). What you have to do is to change the definition to create a subsection i.e. before part 1 (i.e., \renewcommand{\bibsection}{\subsection{\bibname}}) and then change the definition to section after part A, but before part B. So, what you need is something like:

\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}

enter image description here

  • That makes sense and works nicely, thanks for the explanation. As a follow up, how could I make the entries in the first bibliography (1.1 Subsection of A) appear as an enumerated list? I mean something like 1. John Doe. Title I. . . . etc., – mdf Jan 29 at 5:15
  • I guess something like \makeatletter\renewcommand{\@biblabel}[1]{#1.}\makeatother, though the enumeration is pushed into the margin and does not shift the entire entry to the right. – mdf Jan 29 at 5:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.