1

I am using a multi-file document calling my content, including a bibliography.

The bibliography is created with a title page containing just the heading Bibliography, followed by the bibliography itself, with the same title at the start.

I do not want this. I want it to follow the same pattern as throughout the rest of the document, where each file is called with the heading at the start of the content, as seen on the MWE below in the section `Main'.

My MWE has four files:

mwe.tex (master), main.tex, bibliography-test.tex, test.bib (not included here).

mwe.tex:

\documentclass[12pt]{report}

\usepackage[english]{babel}
\usepackage{lipsum}

\usepackage{natbib,url}
\bibpunct{(}{)}{;}{a}{ }{,}
\DeclareUrlCommand\url{\def\UrlLeft{}\def\UrlRight{}\urlstyle{rm}}

\begin{document}

\include{main}
\include{bibliography-test}

\end{document}

main.tex:

\chapter*{Main}

This is a citation \citep{test01}.
\lipsum[5]

bibliography-test.tex:

\chapter*{Bibliography}

\bibliographystyle{myapalike-url}
\bibliography{\string~/my-location}
  • \string~/my-location looks weird. And is myapalike-url a generally known style? I can't compile the 'mwe' with \bibpunct etc. – user31729 Jan 1 '16 at 12:15
  • that string is false as the location is on my computer and therefore won't load on yours. I amended apalike-url slightly and renamed it. – Pwdr Jan 1 '16 at 12:16
2

The string Bibliography appears twice since \chapter*{Bibliography} and \bibliography{...} do this -- The \chapter*{Bibliography} isn't necessary (or wrong here) since \bibliography already provides the heading!

\documentclass[12pt]{report}

\begin{filecontents}{mymain.tex}

\chapter*{Main}
This is a citation \citep{Lam94}.
\lipsum[5]
\end{filecontents}

\begin{filecontents}{bibliography-test.tex}

\bibliographystyle{unsrt}
\bibliography{biblio}
\end{filecontents}


\usepackage[english]{babel}
\usepackage{lipsum}

\usepackage{natbib,url}
%\bibpunct{(}{)}{;}{a}{ }{,}
\DeclareUrlCommand\url{\def\UrlLeft{}\def\UrlRight{}\urlstyle{rm}}

\begin{document}
\cite{Lam94}

\include{mymain}
\include{bibliography-test}

\end{document}
  • I was thinking this just after I posted. I've tested in my real document and it works. Thanks! – Pwdr Jan 1 '16 at 12:15

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.