I am completely new to doing bibliography and watched a youtube video about it. Downloaded JabRef, filled out the list for an article, saved it to the tex.file location, went to TexStudio and wrote \citep(article) using \usepackage{natbib}, \bibliographystyle{plainnat}, \bibliography{file from JabRef}. There are several warning messages and I do see in the code that the natbib package is not found. The citation is not done; only [?], which is strange at all because the citep style would give (Author et al, year) and thus I expect (?). And Also there is nothing in the reference section. Where is the problem?
\documentclass[a4paper,oneside,abstracton]{scrartcl}
\usepackage[utf8]{inputenc}
%\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{natbib}
\usepackage[ngerman]{babel}
%\usepackage{caption}
\addto\captionsngerman{
\renewcommand{\contentsname}{\textrm{Table of Contents}}}
%wird verwendet damit im Inhaltsverzeichnis der englische Name kommt
\usepackage{amsmath,amssymb,amsthm,amsfonts,amsbsy,latexsym}
\usepackage{wasysym} %astronomical symbols
%\usepackage[version=3]{mhchem} %Chemie-Package
\providecommand{\e}[1]{\ensuremath{\times 10^{#1}}}
%\usepackage{dsfont}
%\usepackage{enumerate,url}
\usepackage{graphicx}
\usepackage{a4wide}
\usepackage{titling}
%\renewcommand{\contentsname}{Table of Contents} %funktioniert nur wenn babel nicht verwendet wird.
\usepackage{booktabs}
\usepackage{lscape}
\usepackage{multirow}
\usepackage{subfigure}
\addto\captionsngerman{
\renewcommand{\figurename}{Fig.}}
\usepackage{afterpage}
\usepackage{gensymb}
\usepackage{soul}
\usepackage{array}
%\usepackage{subcaption} %cannot be used with subfigure
%\setcounter{secnumdepth}{4}
%\setcounter{tocdepth}{4}
%% Control the fonts and formatting used in the table of contents.
%\usepackage[titles]{tocloft}
%% Aesthetic spacing redefined
%\setlength{\cftbeforechapskip}{}
%\setlength{\cftbeforesecskip}{0.5ex}
\begin{document}
\title{\LARGE Advanced Lab Course \\ [1em] \huge \textbf{xyz}}
\author{Hans Muster \hspace{1cm} Muster Hans}
\date{\\[1em] {September 2014} \\ [0.8cm] Supervisor Dr.
\\ [0.5cm] Institut \\ University behind the Moon}
\clearpage
\maketitle{}
\thispagestyle{empty} %Keine Seitenzahl auf erster (dieser) Seite %
\renewcommand\abstractname{\textrm{Abstract}}
\renewcommand\tablename{\textrm{Table}}
\addtokomafont{sectioning}{\rmfamily}
\newpage
\begin{abstract}
%\vspace{-0.25cm}
%\setlength{\parindent}{0pt}
blablabla
\end{abstract}
%\skip{}
\tableofcontents{}
\pagestyle{plain}
\newpage
\bibliographystyle{plainnat}
\bibliography{library}
\pagenumbering{arabic}
\section{Introduction}
\citep{Schamb2010}
\section{Theory}
\section{References}
\end{document}
Am I not allowed to make a section References because it is probably created automatically? When everything is working, I would like to configure everything that it is like in a paper such as this http://m.iopscience.iop.org/0004-637X/720/2/1691/pdf/0004-637X_720_2_1691.pdf where you are led to the reference at the paper end when clicking onto a cite and when clicking onto the reference at the end are led to the URL in the internet; also with colour coding.
TeXStudio code with corresponding .bib-entry code afterwards:
\documentclass[a4paper,oneside,abstracton]{scrartcl}
\usepackage[utf8]{inputenc}
%\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{natbib}
\usepackage[ngerman]{babel}
%\usepackage{caption}
\addto\captionsngerman{
\renewcommand{\contentsname}{\textrm{Table of Contents}}}
%wird verwendet damit im Inhaltsverzeichnis der englische Name kommt
\usepackage{amsmath,amssymb,amsthm,amsfonts,amsbsy,latexsym}
\usepackage{wasysym} %astronomical symbols
%\usepackage[version=3]{mhchem} %Chemie-Package
\providecommand{\e}[1]{\ensuremath{\times 10^{#1}}}
%\usepackage{dsfont}
%\usepackage{enumerate,url}
\usepackage{graphicx}
\usepackage{a4wide}
\usepackage{titling}
%\renewcommand{\contentsname}{Table of Contents} %funktioniert nur wenn babel nicht verwendet wird.
\usepackage{booktabs}
\usepackage{lscape}
\usepackage{multirow}
\usepackage{subfigure}
\addto\captionsngerman{
\renewcommand{\figurename}{Fig.}}
\usepackage{afterpage}
\usepackage{gensymb}
\usepackage{soul}
\usepackage{array}
%\usepackage{subcaption} %cannot be used with subfigure
%\setcounter{secnumdepth}{4}
%\setcounter{tocdepth}{4}
%% Control the fonts and formatting used in the table of contents.
%\usepackage[titles]{tocloft}
%% Aesthetic spacing redefined
%\setlength{\cftbeforechapskip}{}
%\setlength{\cftbeforesecskip}{0.5ex}
\begin{document}
\title{\LARGE Advanced Lab Course \\ [1em] \huge \textbf{Impact}}
\author{abc \hspace{1cm} ABC}
\date{\\[1em] {September 2014} \\ [0.8cm] Supervisor Dr.
\\ [0.5cm] Physikalisches Institut \\ University behind the Moon}
\clearpage
\maketitle{}
\thispagestyle{empty} %Keine Seitenzahl auf erster (dieser) Seite %
\renewcommand\abstractname{\textrm{Abstract}}
\renewcommand\tablename{\textrm{Table}}
\addtokomafont{sectioning}{\rmfamily}
\newpage
\pagenumbering{roman}
\vspace*{120pt}
\begin{center}
blablabla
\end{center}
\newpage
\begin{abstract}
%\vspace{-0.25cm}
%\setlength{\parindent}{0pt}
blablabla
\end{abstract}
%\skip{}
\tableofcontents{}
\pagestyle{plain}
\newpage
\bibliographystyle{plainnat}
\pagenumbering{arabic}
\section{Introduction}
The mean mass density of the primordial solar nebula is estimated to have been $\mathord\sim10^{3} \; M_{\astrosun} \,\textup{pc}^{-3} < \bar{M} < \mathord\sim10^{4} \; M_{\astrosun} \,\textup{pc}^{-3}$ \citep{Schamb2010}.\footnote{corresponding to a central nebula density of $\mathord\sim10^{4} \; M_{\astrosun} \,\textup{pc}^{-3} \stackrel{\sigma=60\%}{<} M_{central} \stackrel{\sigma=95\%}{<} \mathord\sim10^{5} \; M_{\astrosun}\,\textup{pc}^{-3}$, whereas the percentage values indicate the confidence level to which the associated relation is valid}
\section{Theory}
\section{Instrumentation}
\section{Measurements}
\section{Results}
\section{Discussion}
\section{Conclusion}
\section{Acknowledgement}
%\section{References}
\bibliography{library}
\end{document}
.bib-entry:
% This file was created with JabRef 2.10.
% Encoding: Cp1252
@Article{Schamb2010,
Title = {Properties of the Distant Kuiper Belt: Results from the Palomar Distant Solar System Survey},
Author = {(Megan E.) Schwamb and (Michael E.) Brown and (David L.) Rabinowitz and Darin Ragozzine},
Journal = {The Astrophysical Journal},
Year = {2010},
Month = {September},
Number = {2},
Pages = {17},
Volume = {720},
Abstract = {},
Doi = {10.1088/0004-637X/720/2/1691},
Owner = {},
Timestamp = {2014.09.21},
Url = {http://m.iopscience.iop.org/0004-637X/720/2/1691/pdf/0004-637X_720_2_1691.pdf}
}
bibtex? The normal cycle to resolve all references is(pdf)latex; bibtex, latex, latex. Btw you should give a try tobiblatex(which can emulate natbib, anyway) as it is relatively easy to customise, and compile the bibliography withbiber, which understands utf8 encoding and is the default bibliography compiler for biblatex (use optionbackend=bibtexif you prefer to stick to bibtex). – Bernard Sep 21 '14 at 22:54\bibliography{library}to the point where you have\section{References}and delete the section command because it will be automatically created. However, ifnatbibis not found, that is obviously going to be a problem. Is MiKTeX configured to install required packages on-the-fly? If not, perhaps you need to use its package manager to installnatbib? – cfr Sep 21 '14 at 23:01bibtexand then(pdf)latextwice more? [We can't reproduce right now without theSchamb2010fromlibrary.bib.] Do you get errors from bibtex? – cfr Sep 22 '14 at 12:11