1

So I know such questions have been asked before, but none of them seem to help me. I am compiling a thesis with a bunch of input documents, here is what the document looks like:

\documentclass[12pt,letterpaper,twoside,titlepage,final]{report}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{times}
\usepackage[margin=1.0in]{geometry}
\usepackage{setspace}
\usepackage{graphicx}
\graphicspath{{C:/LatexStuff/MScThesis/ThesisFinalBuild/}}
\usepackage{xcolor}
\usepackage{hyperref}
\usepackage[backend=bibtex, style=alphabetic]{biblatex}
\usepackage[notref,color]{showkeys}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{caption}
\usepackage{mathtools}
\usepackage{physics}
\usepackage{amssymb}
\usepackage{bm}
\usepackage{abstract}
\usepackage{indentfirst}
\allowdisplaybreaks
\numberwithin{equation}{section}
\raggedbottom
\doublespacing

\renewcommand{\contentsname}{Table of Contents}

\definecolor{refkey}{gray}{.2}
\definecolor{labelkey}{gray}{.2}
\usepackage{cite}
\usepackage{setspace}
\usepackage{filecontents}

\begin{document}

\pagenumbering{roman}

%\input{Stuff}

\setcounter{page}{4}

\tableofcontents

\listoffigures

\newpage
\pagenumbering{arabic}

\allowdisplaybreaks
\interfootnotelinepenalty=10000

\chapter{1}
in the paper \cite{Dirac}....
\chapter{2}

\appendix

\renewcommand\bibname{References} % uses h-physrev style
\bibliographystyle{h-physrev}
\bibliography{References}
\printbibliography[heading=bibintoc]

\end{document}

My References document is a .bib file. I am using TexMaker with the PDFLatex, BibLatex, PDFLatex*2, View pdf, quick build configuration. The document compiles, but does not include the bibliography in either the TOC or in the actual document. This document was a template from someone else, which worked for them, but apparently not for me.

A reference I used was

@article {Dirac,
author = "Dirac, P. A. M."
title = {Classical theory of radiating electrons},
volume = {167},
number = {929},
pages = {148--169},
year = {1938},
doi = {10.1098/rspa.1938.0124},
publisher = {The Royal Society},
issn = {0080-4630},
URL = {http://rspa.royalsocietypublishing.org/content/167/929/148},
eprint = {http://rspa.royalsocietypublishing.org/content/167/929/148.full.pdf},
journal = {Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences}
}
0

1 Answer 1

1

There are several problems in your given code.

  1. In your given bib entry is an comma missing after field author: author = {Dirac, P. A. M.},
  2. You can not use package cite and biblatex
  3. You can not use style \bibliographystyle{h-physrev} with biblatex
  4. hyperref should be called last in your case (please read the documentation of hyperref: type texdoc hyperref in your terminal and press enter)

I decided to use biblatex for the following MWE, compiling without errors:

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{goossens,
  author    = {Goossens, Michel and Mittelbach, Frank and 
               Samarin, Alexander},
  title     = {The LaTeX Companion},
  edition   = {1},
  publisher = {Addison-Wesley},
  location  = {Reading, Mass.},
  year      = {1994},
}
@Book{adams,
  title     = {The Restaurant at the End of the Universe},
  author    = {Douglas Adams},
  series    = {The Hitchhiker's Guide to the Galaxy},
  publisher = {Pan Macmillan},
  year      = {1980},
}
@article{einstein,
  author  = {Albert Einstein},
  title   = {{Zur Elektrodynamik bewegter Körper}. ({German}) 
             [{On} the electrodynamics of moving bodies]},
  journal = {Annalen der Physik},
  volume  = {322},
  number  = {10},
  pages   = {891--921},
  year    = {1905},
  DOI     = {http://dx.doi.org/10.1002/andp.19053221004},
}
@article {Dirac,
  author = {Dirac, P. A. M.},
  title = {Classical theory of radiating electrons},
  volume = {167},
  number = {929},
  pages = {148--169},
  year = {1938},
  doi = {10.1098/rspa.1938.0124},
  publisher = {The Royal Society},
  issn = {0080-4630},
  URL = {http://rspa.royalsocietypublishing.org/content/167/929/148},
  eprint = {http://rspa.royalsocietypublishing.org/content/167/929/148.full.pdf},
  journal = {Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences}
}
\end{filecontents}


\documentclass[12pt,letterpaper,twoside,titlepage,final]{report}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{times}
\usepackage[margin=1.0in]{geometry}
\usepackage{setspace}
\usepackage{graphicx}
\graphicspath{{C:/LatexStuff/MScThesis/ThesisFinalBuild/}}
\usepackage{xcolor}

\usepackage[backend=bibtex, style=alphabetic]{biblatex}
%\bibliographystyle{h-physrev} % not with biblatex!
\addbibresource{\jobname} % <===========================================

\usepackage[notref,color]{showkeys}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{caption}
\usepackage{mathtools}
\usepackage{physics}
\usepackage{amssymb}
\usepackage{bm}
\usepackage{abstract}
\usepackage{indentfirst}
\allowdisplaybreaks
\numberwithin{equation}{section}
\raggedbottom
\doublespacing

\renewcommand{\contentsname}{Table of Contents}


\definecolor{refkey}{gray}{.2}
\definecolor{labelkey}{gray}{.2}
%\usepackage{cite} % <==================================================

\usepackage{blindtext}
\usepackage{hyperref} % <===============================================


\begin{document}

\pagenumbering{roman}

\setcounter{page}{4}

\tableofcontents

\listoffigures

\newpage
\pagenumbering{arabic}


\allowdisplaybreaks
\interfootnotelinepenalty=10000

\Blindtext %\Blinddocument

\appendix

\nocite{*}
\renewcommand\bibname{References}

\printbibliography[heading=bibintoc]

\end{document}

results in the following pdf:

enter image description here

If you have to use the bibliography style you can not use biblatex!

If you need to use style h-physrev try the following MWE:

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{goossens,
  author    = {Goossens, Michel and Mittelbach, Frank and 
               Samarin, Alexander},
  title     = {The LaTeX Companion},
  edition   = {1},
  publisher = {Addison-Wesley},
  location  = {Reading, Mass.},
  year      = {1994},
}
@Book{adams,
  title     = {The Restaurant at the End of the Universe},
  author    = {Douglas Adams},
  series    = {The Hitchhiker's Guide to the Galaxy},
  publisher = {Pan Macmillan},
  year      = {1980},
}
@article{einstein,
  author  = {Albert Einstein},
  title   = {{Zur Elektrodynamik bewegter Körper}. ({German}) 
             [{On} the electrodynamics of moving bodies]},
  journal = {Annalen der Physik},
  volume  = {322},
  number  = {10},
  pages   = {891--921},
  year    = {1905},
  DOI     = {http://dx.doi.org/10.1002/andp.19053221004},
}
@article {Dirac,
  author = {Dirac, P. A. M.},
  title = {Classical theory of radiating electrons},
  volume = {167},
  number = {929},
  pages = {148--169},
  year = {1938},
  doi = {10.1098/rspa.1938.0124},
  publisher = {The Royal Society},
  issn = {0080-4630},
  URL = {http://rspa.royalsocietypublishing.org/content/167/929/148},
  eprint = {http://rspa.royalsocietypublishing.org/content/167/929/148.full.pdf},
  journal = {Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences}
}
\end{filecontents}


\documentclass[12pt,letterpaper,twoside,titlepage,final]{report}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{times}
\usepackage[margin=1.0in]{geometry}
\usepackage{setspace}
\usepackage{graphicx}
\graphicspath{{C:/LatexStuff/MScThesis/ThesisFinalBuild/}}
\usepackage{xcolor}

\usepackage[notref,color]{showkeys}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{caption}
\usepackage{mathtools}
\usepackage{physics}
\usepackage{amssymb}
\usepackage{bm}
\usepackage{abstract}
\usepackage{indentfirst}
\allowdisplaybreaks
\numberwithin{equation}{section}
\raggedbottom
\doublespacing

\renewcommand{\contentsname}{Table of Contents}


\definecolor{refkey}{gray}{.2}
\definecolor{labelkey}{gray}{.2}
%\usepackage{cite} % <==================================================

\usepackage{blindtext}
\usepackage{hyperref} % <===============================================


\begin{document}

\pagenumbering{roman}

\setcounter{page}{4}

\tableofcontents

\listoffigures

\newpage
\pagenumbering{arabic}


\allowdisplaybreaks
\interfootnotelinepenalty=10000

\Blindtext %\Blinddocument

\appendix

\nocite{*}
\renewcommand\bibname{References}

\bibliographystyle{h-physrev} % <==========================
\bibliography{\jobname} % <================================

\end{document}
2
  • So what are your suggestions if I need a bibliography style? I then have to use BibTex, what would I have to change then? I've changed the quick build configuration to the default, and clicked bibtex in the dropdown box on the main page.
    – Karl
    Apr 7, 2018 at 19:16
  • Sadly I don't have the reputation to upvote your comment just yet. When I do, I'll do so. I can't personally accept the answer, because it didn't work in my case. I believe there was some internal problem with TexMaker that I couldn't figure out, because my code ended up being find with a different compiler.
    – Karl
    May 24, 2018 at 16:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .