1

I am writing my thesis. I have a main file code is given below. When I run this file it produces pdf document. but it does not open .bib file. The error says:

I didn't find database entry for "test1"

testbib is name of my .bib file containing references and test1 is name of citation. I am using MiKTeX and TeXnicCenter as LaTeX tools. I hope I made my question more clear. I have tried TeXstudio but same problem. May be I am missing some thing?

here is code for .bibfile

\usepackage{filecontents} \begin{filecontents}{testbib.bib}
 @Book{test1, author = {Goossens, Michel and Mittelbach, Frank and Samarin, Alexander}, title = {The LaTeX Companion}, publisher = {Addison-Wesley}, location = {Reading, Mass.}, year = {1994}, } \end{filecontents}

here is code for my main file.

\documentclass[???]{???}
%\input{preamble}
\begin{document}

%\input{Sections/Title}  % etc. deleted other \input's

\tableofcontents
\listoffigures
\listoftables

%\input{Sections/Introduction} % deleted other \input's
\cite{6691866}    

\bibliographystyle{ieeetr}
\bibliography{References_ZAIN}

%\input{Sections/Thesis}
\end{document}

sample file for introduction where I have to add citation.

\chapter{\textbf{INTRODUCTION}}
\section{Background}

Channel Modeling is a vast concept. It can be used in many communication systems\cite{test1}. 
moewe
  • 175,683
Haider
  • 169
  • 9
  • 1
    Do you look for a way how to handle references in your document by bibliograohy packages? Then biblatexand biberwould be a first answer. – HATEthePLOT Feb 13 '16 at 16:09
  • Thanks for the comment. Kindly would be nice if you bit explain it please.I just want to add references to my document.The simplest way. – Haider Feb 13 '16 at 16:18
  • 1
    Well the simplest way depends on what you plan to do and what you already have. First: organize your literature in a .bib file. The program jabrefis a nice simple software to do this. Or if you use something like citavi, use it to export a bibtex-file (.bib). After you have this, load a bibliography package into your preamble (like \usepackage{biblatex}). There are several other like natbib or jurabib -- you must decide yourself what you want to use and how to set it up. – HATEthePLOT Feb 13 '16 at 16:22
  • I am using texnic center. Please can you tell me what should I do to add references to my document. I do not have experience with Jabref. – Haider Feb 13 '16 at 16:51
  • @MarioS.E. I have changed my question now – Haider Feb 14 '16 at 10:22
  • 2
    I recommend to read Question mark instead of citation number and additionally change the bibkey from a mere number to something like miller1999coal, something where you can more easy spot typos. Make the change in your tex-file as well as your bib-database. – Johannes_B Feb 14 '16 at 10:30
  • 1
    I took the liberty to change your given code to be more a mwe. Please add the missing information, marked with ???. Please see that we do not have the files you \inputed ... So your given mwe was not helpful for us. Please follow the comment of Johannes_B. – Mensch Feb 14 '16 at 13:27
  • 1
    Can you provide a minimal .bib file that produces the error? Give your references easy to identify tags like @Johannes_B stated; this way we can exclude typos an the like. – HATEthePLOT Feb 14 '16 at 13:58
  • 1
    Can you also try with a file name without underscores _? – percusse Feb 16 '16 at 10:39
  • @percusse I tried but it does not work. Please do u know what could be the other reason – Haider Feb 16 '16 at 11:09
  • 1
    @Haider With this much of information I really can't help. Can you make a simple TeX test file and add these lines to your preamble then try to compile ? \usepackage{filecontents} \begin{filecontents}{testbib.bib} @Book{test1, author = {Goossens, Michel and Mittelbach, Frank and Samarin, Alexander}, title = {The LaTeX Companion}, publisher = {Addison-Wesley}, location = {Reading, Mass.}, year = {1994}, } \end{filecontents} Note that now the bib file name is testbib.bib and you need to cite \cite{test1} – percusse Feb 16 '16 at 12:02
  • @percusse Sill the error ,Now the error says : I didn't find database entry for "test1" . I only installed Miktex and texnic center. do I need to install jabref Its getting sticky :( – Haider Feb 16 '16 at 12:23
  • 1
    @haider please provide a full example and a bib file to work with (or the `\usepackage{filecontents} @percusse mentioned). Only this way we can help you. At this point I don't even know what your bibliography package is, which is cetral in helping you. – HATEthePLOT Feb 16 '16 at 13:58
  • @HATEthePLOT How I can add a file here? Please guide me. I know how to attach a image but how to attach a file? – Haider Feb 16 '16 at 14:53
  • 1
    @Haider please edit your original question and add the contents of your MWE and of the example bib there. So everyone can refer to it from when they see it. – HATEthePLOT Feb 16 '16 at 14:55
  • @HATEthePLOT done ..please have a look – Haider Feb 16 '16 at 14:59
  • no the tex-file is still incomplete. \documentclass{???} needs specification. You need to load ab bibliography package \usepackage[options]{natbib} for example. Further adapt the tex-file to the test-bib: \bibliography{References_ZAIN} to \bibliography{testbib} BTW: percusse annotion has to be inserted in your tex file not into your bib file – HATEthePLOT Feb 16 '16 at 15:34
  • I have removed some of the tags since they didn't seem appropriate to me, you don't use biblatex for example, and the issue doesn't seem to be related to MikTeX as such. Note that the bibfile you provide code for in the question is called testbib.bib, but with \bibliography{References_ZAIN} you later request References_ZAIN.bib ... – moewe Feb 16 '16 at 17:56
  • @moewe The name of the file References_ZAIN.bib was just typing mistake.I have checked with testbib also but not worked . – Haider Feb 17 '16 at 08:04
  • 1
    Please try to provide a complete MWE preferably consisting of a single file (or one .tex and a .bib file) so we can see what exactly you are trying. Currently your question contains only fragments of code with no indication what how exactly you are using them. Read I've just been asked to write a minimal example, what is that? and How to write a MWEB (Minimal working example with Bibliography)? for that. – moewe Feb 17 '16 at 08:52
  • 1
    Have a look at http://www.csse.monash.edu.au/documents/bibtex/, http://www.hep.man.ac.uk/u/jenny/jcwdocs/latex/bibtexbasics.html and Question about running bibtex in Texniccenter? – moewe Feb 17 '16 at 08:55

0 Answers0