1

I read many posts in a different forum but I can not display my bibliography in Texmaker

\documentclass{l4proj}    
\usepackage{pdfpages} 
\begin{document}
\title{Level 4 Project Report Template} % change this to your title
\author{John H. Williamson}
\date{September 14, 2018}
\maketitle
\begin{abstract}
   ....
\end{abstract}
\educationalconsent


\bibliography{bib}
\bibliographystyle{agsm}
% Force the bibliography not to be numbered
\renewcommand{\thechapter}{0} 
\nocite{*}   % all not cited bib entries are shown in bibliography ...
\bibliography{l4proj} %l4proj.bib is in the same folder
\end{document}

And here is some of my bibliography:

@inproceedings{Pey17,
  author    = {Simon {Peyton Jones}},
  title     = {How to Write a Great Research Paper},
  booktitle = {2017 Imperial College Computing Student Workshop, {ICCSW} 2017, September
               26-27, 2017, London, {UK}},
  pages     = {1:1--1:1},
  year      = {2017},    

}
@book{Wil09,
  title={Style: the basics of clarity and grace},
  author={Williams, Joseph M and Bizup, Joseph},
  year={2009},
  publisher={Pearson Longman}
}

Here are the files that MixTex generate me : enter image description here

Thank you!

Dorian
  • 13

1 Answers1

1

I think there is a missunderstanding ...

Please see the following code snippet:

\bibliography{bib}
\bibliographystyle{agsm}
% Force the bibliography not to be numbered
\renewcommand{\thechapter}{0} 
\nocite{*}   % all not cited bib entries are shown in bibliography ...
\bibliography{l4proj} %l4proj.bib is in the same folder

Here you call \bibliography twice. One call is enouph to place the bibliography at that place command \bibliography is called. BTW you use BibTeX with \bibliography and not biblatex as you tagged your question ...

Then you call \bibliographystyle{agsm} resulting in several errors, for example "\harvarditem undefined". Try the following command instead:

\bibliographystyle{plain}

In the following mwe I used package filecontents to get bib file and tex code together in one compilable mwe. You can still use your file l4proj.bib!

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib} 
@inproceedings{Pey17,
  author    = {Simon {Peyton Jones}},
  title     = {How to Write a Great Research Paper},
  booktitle = {2017 Imperial College Computing Student Workshop, {ICCSW} 2017, September
               26-27, 2017, London, {UK}},
  pages     = {1:1--1:1},
  year      = {2017},    
}
@book{Wil09,
  title     = {Style: the basics of clarity and grace},
  author    = {Williams, Joseph M and Bizup, Joseph},
  year      = {2009},
  publisher = {Pearson Longman},
}
\end{filecontents}


\documentclass{l4proj}

\usepackage{pdfpages}


\begin{document}

\title{Level 4 Project Report Template} % change this to your title
\author{John H. Williamson}
\date{September 14, 2018}
\maketitle
\begin{abstract}
   ....
\end{abstract}
\educationalconsent


\bibliographystyle{plain}% agsm
% Force the bibliography not to be numbered
%\renewcommand{\thechapter}{0} 
\nocite{*}   % all not cited bib entries are shown in bibliography ...
\bibliography{\jobname} % <======= to use bib file created with filecontents
\end{document}

and its resulting bibliography (compiles with one error for missing image [okay] and one warning for usage of filecontents[okay]):

bibliography

Please see that style agsm needs another class or other packages loaded you did not use in your code, therefore the error messages. Do you realy need that style? Where do you have it from? Did you read the documentation of it?

Mensch
  • 65,388
  • Hi @Mensch, thank you for these explications. Unfortunately, I cannot display the bibliography even if I copy-paste your mwe. Do you think that I should reinstall TexMaker? PS: I used 'agsm' since it displays the date just after the names of the authors but It's not important I can use 'Plain'. – Dorian Jul 13 '19 at 22:54
  • @Jhon TeXMaker is only the editor, test if you get a correct result using your terminal/console. Please add your file *.blg to your question (its the log file for the bibtex run) ... – Mensch Jul 14 '19 at 00:47
  • I used my console (I'm using windows) but I had the same result. I am sorry but I did not find any file that ends with .blg in my folder. – Dorian Jul 14 '19 at 12:45
  • I upload a template from the internet and I have the same problem... – Dorian Jul 14 '19 at 13:47
  • @Jhon I do not know Editor TeXMaker, but have a look to question https://tex.stackexchange.com/questions/119805/bibliography-in-texmaker and if that doesnot help see https://tex.stackexchange.com/questions/63852/question-mark-or-bold-citation-key-instead-of-citation-number. From your shown windows explorer screenshot it seems to that you did not run bibtex. So best is to ignore the editor TeXmaker for testing, open your terminal/console, change to your directory with tex code mwe.tex and type: pdflatex mwe.tex then bibtex mwe (no extention! --> mwe.blg) then twice pdflatex mwe.tex – Mensch Jul 14 '19 at 22:34
  • 1
    Ah thank you so much, even I had a little error Package natbib Error: Bibliography not compatible with author-year citations. in my terminal, I used bibtex nameOfMyProject and it works. Have a nice day. – Dorian Jul 15 '19 at 19:01