# Bibliography and \cite{} in different files; problem when compiling master file

I am writing my dissertation in LaTeX and as it's a long document I have split up the chapters into separate .tex files and am compiling them from a master .tex file:

\documentclass[]{report}
\usepackage{mystyle}
\begin{document}
%front matter
\input{./tex/title.tex}
\input{./tex/abstract.tex}
\tableofcontents
%main matter part 1
\input{./tex/pt_tru.tex}
\input{./tex/ch_itb.tex}
\input{./tex/ch_mech.tex}
\input{./tex/ch_lag.tex}
\input{./tex/ch_tbp.tex}
\input{./tex/ch_kepler.tex}
%main matter part 2
\input{./tex/pt_snc.tex}
\input{./tex/ch_nt.tex}
\input{./tex/ch_conslaws.tex}
%back matter
\input{./tex/ch_appa.tex}
\input{./tex/ch_litrev.tex}
\input{./tex/ch_ack.tex}
\end{document}


In the addlit.tex file I am calling the bibliography:

\renewcommand{\bibname}{Additional Literature}
\bibliography{dissbib.bib}
\bibliographystyle{unsrt}


And in various other chapters e.g. itb.tex I am citing things from that bibliography:

"...necessitating the use of the theory of general relativity \cite{Roseveare}."


My problem is that when I compile the master .tex file, the citation appears as [?] and the section with the heading "Additional Literature" is blank. How can I solve this problem so that the citations are correct and the bibliography appears?

I am using TexStudio and Bibtex, if that makes any difference.

Edit: my .sty file is

\ProvidesPackage{mystyle}
\usepackage{listings}
\usepackage{enumitem}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{parskip}
\usepackage{graphicx}
\graphicspath{ {images/} }
\usepackage{mathtools}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{cite}


My .bib file is like this:

@book{Roseveare,
author= {Roseveare, N. T.},
year=1982,
title= {Mercury's Perihelion from Le Verrier to Einstein},
publisher= {Oxford University Press},


}

and my .tex files are like this:

\chapter{title}
\section{title}
Some text here. Some text here. Some more text here \cite{Roseveare}.

• Welcome to TeX.SE. To fully resolve all cross-references -- and in LaTeX, citation call-outs are set up as cross-references to entries in the bibliography -- it is necessary to run LaTeX, then BibTeX, and then re-run LaTeX twice more; a single re-run of LaTeX is not enough. Did you do this four-step process? Does the file \jobname.blg contain warning and/or error messages? – Mico Dec 5 '15 at 17:59
• I think Mico's hint is the correct pointer, but if that should not solve the problem, how should we track this issue? Neither mystyle.sty isn't available nor the .bib nor the various .tex files. – user31729 Dec 5 '15 at 18:00
• I am not sure as I am very new to LaTex but I think when I compile through TexStudio it runs LaTex then BibTex etc. If not, could you explain how to run Bibtex separately? I get no warnings or error messages. For brevity, I excluded my .sty .bib and .tex files, but I will edit the question to add these. – astronat Dec 5 '15 at 18:04
• Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – Reinstate Monica - M. Schröder Dec 5 '15 at 18:06
• @NatalieHogg: TeXStudio is a Mac - Application, isn't it? Either it's not configured correctly or you have to switch to console compilation, which should be possible for MAC anyway. – user31729 Dec 5 '15 at 18:15

Don't mention the filename extension .bib in the argument of \bibliography. The instruction should be
\bibliography{dissbib}

rather than \bibliography{dissbib.bib}.
• A solution without lualatex, I am shocked (+1) ;-) – user31729 Dec 5 '15 at 18:46
• @ChristianHupfer - Hey, it's been almost an entire month since I posted a LuaLaTeX-based answer. (I toyed -- only very briefly! -- with a LuaLaTeX preprocessor-type approach, scanning all input lines and removing any .bib substrings in the argument of \bibliography. The solution I ended up posting seems a tad simpler, doesn't it?) – Mico Dec 5 '15 at 19:10