0

I'm very new to LaTeX and I'm trying to use my own citation style which I already created. Now I was wondering how to use this style. I've found a solution using the package natbib. But it doesn't work.

I tried to replicate one tutorial which shows how natbib works, but I wasn't able to replicate it. The code is as follows:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

%Includes "References" in the table of contents
\usepackage[nottoc]{tocbibind}

%Import the natbib package and sets a bibliography style
\usepackage[square,numbers]{natbib}
\bibliographystyle{abbrvnat}

\begin{document}

\section{First Section}
This document is an example of \texttt{natbib} package using in bibliography management. Three items are cited: \textit{The \LaTeX\ Companion} book \cite{latexcompanion}, the Einstein journal paper \citet{einstein}, and the Donald Knuth's website \cite{knuthwebsite}. The \LaTeX\ related items are \cite{latexcompanion,knuthwebsite}. 

\medskip

%Imports the bibliography file "sample.bib"
\bibliography{Lit}

\end{document}

When I compile this document with PDFLaTeX the citations are undefindet. When I use PDFLaTeX -> BibTeX -> PDFLaTeX -> PDFLaTeX then it throws following error:

ERROR - Cannot find 'Test.bcf'! INFO - ERRORS: 1

What do I have to do?

  • 1
    Seems your editor is setup to be using biber, but your document is not configured to use biblatex so use bibtex instead of biber. – daleif Jan 31 at 12:50
  • Welcome to TeX-SX! As a new member, it is recommended to visit the Welcome and the Tour pages to be informed about our format and also to know about Minimal Example. – R. N Jan 31 at 12:57
  • There a look to a brief introduction to bibtex-biblatex approaches here (the 3rd example show how to use natbib). – Fran Jan 31 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.