2

Using multibib (and apacite), if I define two bibliographies entitled "Primary literature" and "Secondary Literature" by using the following lines:

\newcites{prim}{Primary Literature}
\newcites{sec}{Secondary Literature}

and then I write into the document block:

\section{Bibliography}
\nociteprim{ref1,ref2}
\bibliographystyleprim{apacite}
\bibliographyprim{publications}   % 'publications' is the name of a BibTeX file

\section{Bibliography}
\nocitesec{ref3,ref4}
\bibliographystylesec{apacite}
\bibliographysec{publications}   % 'publications' is the name of a BibTeX file

then I obtain three sections, named "Bibliography", "Primary literature" and "Secondary Literature", respectively. However, I want to make "Primary literature" and "Secondary Literature" to appear with the style of subsection instead of section one.

Any idea?

  • Is the natbib package loaded as well? – Mico Apr 5 '14 at 16:25
  • No, should I load it? – JeanValjean Apr 5 '14 at 16:28
  • Not necessarily. I asked because some of the multibib internals behave differently depending on whether or not natbib is loaded. – Mico Apr 5 '14 at 16:30
4

I take it you're using the document class article or one that's built on article. If that's not the case, please advise which document class you employ.

The following instructions may do what you want; place them in the preamble, after multibib has been loaded.

\usepackage{etoolbox}
\BeforeBeginEnvironment{thebibliography}{%
  \let\origsection\section% save the original definition of \section
  \let\section\subsection%  make \section behave like \subsection
}
\AfterEndEnvironment{thebibliography}{%
  \let\section\origsection% restore the original definition of \section
}

Here's the output of a complete MWE (minimum working example):

enter image description here

\RequirePackage{filecontents}
\documentclass{article}
\begin{filecontents*}{publications.bib}
@article{ref1,
  author = "A. Athor",
  title  = "Deep thoughts",
  journal= "Circularity",
  year   = 3001,
  volume = 1,
  pages  = 1,
}
@article{ref2,
  author = "B. Bthor",
  title  = "Deep thoughts",
  journal= "Circularity",
  year   = 3002,
  volume = 2,
  pages  = 1,
}
@article{ref3,
  author = "C. Cthor",
  title  = "Deep thoughts",
  journal= "Circularity",
  year   = 3003,
  volume = 3,
  pages  = 1,
}
@article{ref4,
  author = "D. Dthor",
  title  = "Deep thoughts",
  journal= "Circularity",
  year   = 3004,
  volume = 4,
  pages  = 1,
}
\end{filecontents*}

\usepackage{apacite,multibib}
\newcites{prim}{Primary Literature}
\newcites{sec}{Secondary Literature}
\usepackage{etoolbox}
\BeforeBeginEnvironment{thebibliography}{%
  \let\origsection\section% save original definition of \section
  \let\section\subsection%  make \section behave like \subsection
}
\AfterEndEnvironment{thebibliography}{%
  \let\section\origsection% restore original definition of \section
}
\begin{document}
\nociteprim{ref1,ref2}
\nocitesec{ref3,ref4}

\section{Bibliography}
\bibliographystyleprim{apacite}
\bibliographyprim{publications} 

\bibliographystylesec{apacite}
\bibliographysec{publications}
\end{document}

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.