2

i am writing my master thesis as a report document in Latex using Miketex 2.9 and Texmaker (pdflatex and biblatex) but i was unable to get bibliography added to my report as well unable to get the numbers through \cite{...} in the report. I always get the label name or a question mark. I don't know whats going wrong can anyone please help me were i am doing it wrong. I have \cite{} label name in my Introduction chapter and also i have used the my configure texmaker format as PdfLatex + Bilatex + pdflatex(x2) + pdfView .

\documentclass[12pt,twoside]{report}
\usepackage[utf8]{inputenc}
\usepackage[german,english]{babel}
\usepackage[a4paper,width=150mm,top=35mm,bottom = 35mm]{geometry}
\usepackage{pdfpages}
\usepackage{amsmath}
\usepackage{biblatex}
%\usepackage[backend=bibtex]{biblatex}
\usepackage{natbib}
\usepackage{url}
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}
\usepackage{rotating, graphicx}
\usepackage{chngcntr}
\usepackage{ragged2e}
\usepackage[toc,page]{appendix}
\usepackage[nottoc]{tocbibind}
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
\renewcommand*\contentsname{Table of Contents}


\makeatletter
\def\BState{\State\hskip-\ALG@thistlm}
\makeatother

\begin{document}
\pagenumbering{gobble}
\input{Titlepage}
\newpage
\input{Acknowledgement}
\newpage
\input{Abstract}
\newpage
\tableofcontents
\newpage
\pagenumbering{arabic}
\newpage
\input{Introduction}

\input{AugmentedReality}


\addcontentsline{toc}{section}{References}
\bibliographystyle{plain}
\bibliography{References} %this is my .bib file created in the same folder 
                          % were my .tex exists               
\printbibliography


\end{document}

and this is my .bib file

@Article{cluster,
author = {Omar Alkhamisi and Muhammad Mostafa Monowar},
title = {Rise of augmented reality: current and future application areas},
journal = {Computer science and communications},
year = {2013},
OPTvolume = {Vol.1},
OPTnumber = {No.4},
OPTpages = {10},
OPTmonth = {November},
OPTnote = {Online, accessed 05-01-2016},
}
sravan
  • 23
  • 1
    You are loading biblatex and natbib, but you should only be loading one of the two bibliography packages. You also use code from both packages, (natbib's \bibliographystyle{plain} and biblatex's \printbibliography). – moewe Apr 01 '16 at 10:07

1 Answers1

3

As @Moewe said, either you use natbib or biblatex, but not both. More precisely, if you want to use natbib+bibtexyou need:

\documentclass12pt, twoside]{report}

………

%\usepackage{biblatex}
%\addbibresource{References.bib}
\usepackage{natbib}

\begin{document}

………

\addcontentsline{toc}{section}{References}
\nocite{*}
%\printbibliography
\bibliographystyle{plain}
\bibliography{References}

\end{document}

For biblatex+biber, you'll use:

\documentclass12pt, twoside]{report}

………

\usepackage{biblatex}
\addbibresource{References.bib}
%\usepackage{natbib}

\begin{document}

………

\addcontentsline{toc}{section}{References}
\nocite{*}
\printbibliography
%\bibliographystyle{plain}
%\bibliography{References}

\end{document}

instead. If you want to emulate the \citet and \citep commands from natbib, add the natbib option on loading biblatex. However, there are equivalent commands already defined by biblatex. The default bib compiler for biblatex is biber, but you may choose frontend=bibtex, but you'll loose some functionalities.

Bernard
  • 271,350
  • #Moewe...thank u for your time i tried both the ways which is using only biblatex or natbib but still i couldn't find the right solution. I still couldnot get my references numbers at the place were i have \cite{} them. I can only see the name of the labels instead of numbers and no separate section or as a separate field for bibliography(References).... – sravan Apr 01 '16 at 11:27
  • @sravan - Are you maybe not running BibTeX between LaTeX runs? – Mico Apr 01 '16 at 12:05
  • @Mico..no i have configured my build pdfLatex + Bib(la)tex + pdfLatex(x2)+viewpdf.. like this inorder not to forget the order but now i have disgusted with the problem, i tried everything what i can its almost 2 days i have wasted on it still i couldn't figure out whats going wrong....fu...g Texmaker... – sravan Apr 01 '16 at 12:23
  • Try this: 1) delete all auxiliary files 2) do the compilations (latex, bibtex/biber, latex, latex) individually and what happens. Is there a .bbl file created? What does the .blg file say? – Bernard Apr 01 '16 at 14:06
  • #Bernard...I have done what u have said yes a .bbl file is been created but it is empty and .blg file is not generated at all...may i know why it couldn't able to generate .blg file....? – sravan Apr 02 '16 at 09:52
  • @sravan: Nothing appears in the TeXmaker console when you launch biber after you've executed (pdf)latex once? – Bernard Apr 02 '16 at 10:04
  • #Bernard.. I would say i was not clear with your question but do you mean this. I have opened my texmaker and had a build and checked the command prompt in the tools there is only the path i mean the drive\folder name... – sravan Apr 02 '16 at 10:48
  • This is BibTeX, Version 0.99d (MiKTeX 2.9 64-bit) The top-level auxiliary file: Thesis_structured.aux I found no \citation commands---while reading file Thesis_structured.aux I found no \bibdata command---while reading file Thesis_structured.aux I found no \bibstyle command---while reading file Thesis_structured.aux (There were 3 error messages) i am getting this errors when i launch my main class with Bibtex.... – sravan Apr 02 '16 at 11:26
  • @sravan: if I understansd well what you did, it's not exactly that: launch pdflatex from theTools menu (F6 key), then BibTeX/biber (F11). Each time you'll see in the console (what you call the command prompt) the log file (.log for pdflatex`` ,blgforbibtex/biber). In theblg, you'll see if a.bblfile was created. If it was, call pdflatex again twice. Furthermore, in order to launchbiber, not bibtexwith the F11 key, you have to configure TeXmaker for that (menu Options > Configure TeXmaker > Commands, write the relevant path in the Bib(la)tex line). – Bernard Apr 02 '16 at 11:29
  • For your last post: biblatex, by default, uses biber, not bibtex. You have to configure TeXmaker for it (see previous comment). – Bernard Apr 02 '16 at 11:31
  • #Bernard...No in my case it was options>Configure texmaker>Commands>Bib(la)tex>bibtex %...i have checked my configuration or do you want me to change it to biber % instead...? – sravan Apr 02 '16 at 11:53
  • #Bernard when i changed it to biber this is my scenario
    INFO - This is Biber 2.3 INFO - Logfile is 'Thesis_structured.blg' INFO - Reading 'Thesis_structured.bcf' WARN - Warning: Found biblatex control file version 3.0, expected version 2.9 WARN - No data sources defined!
    – sravan Apr 02 '16 at 12:08
  • Do you have a References.bib file? B.t.w. you should update: biber has version no 2.4 and bilatex version 3.4. Here is the beginning of my .blg: [0] Config.pm:340> INFO - This is Biber 2.4 [1] Config.pm:343> INFO - Logfile is 'pbbiblatex.blg' [51] biber-MSWIN64:287> INFO - === [75] Biber.pm:347> INFO - Reading 'pbbiblatex.bcf' [210] Biber.pm:738> INFO - Using all citekeys in bib section 0 [271] Biber.pm:3150> INFO - Processing section 0 [477] Biber.pm:3307> INFO - Looking for bibtex format file 'References.bib' for section 0 – Bernard Apr 02 '16 at 16:38
  • The middle : [733] bibtex.pm:1124> INFO - Decoding LaTeX character macros into UTF-8 [735] bibtex.pm:985> INFO - Found BibTeX data source 'E:/Tests/Biblatex/References.bib' [788] UCollate.pm:65> INFO - Overriding locale 'en-US' defaults 'variable = shifted' with 'variable = non-ignorable' [788] UCollate.pm:65> INFO - Overriding locale 'en-US' defaults 'normalization = NFD' with 'normalization = prenormalized' [788] Biber.pm:3027> INFO - Sorting list 'nty/global' of type 'entry' with scheme 'nty' and locale 'en-US' [788] Biber.pm:3031> INFO - No sort tailoring available for locale 'en-US' – Bernard Apr 02 '16 at 16:41
  • And the end: [790] bbl.pm:519> INFO - Writing 'pbbiblatex.bbl' with encoding 'UTF-8' [791] bbl.pm:615> INFO - Output to pbbiblatex.bbl – Bernard Apr 02 '16 at 16:41
  • You need to upgrade biber to version 2.4. That warning means that your biblatex is too new for your biber version. With biber version 2.5 (currently in development), this warning will be fatal and easier to understand. – PLK Apr 03 '16 at 09:32
  • #Bernard....finally i got it but thank you a lot for your suggestions for through out my questioning. I need to thank even moewe and PLK. The problem is with upgrading the manually added packages in my case biblatex. This source have helped me to find out the solution (How should one maintain and update a MiKTeX installation?) – sravan Apr 04 '16 at 09:40