3

I have this simple TeX file in TeXmaker.

\documentclass[11pt]{article}
\usepackage{cite}

\begin{document}

\title{My Article}
\author{Nobody Jr.}
\date{Today}
\maketitle

Blablabla said \cite{bertrand} and whatever.

\bibliography{endnotelibrary}{}
\bibliographystyle{plain}
\end{document}

My file in .bib format is in the same folder as the TeX file.

   @article{bertrand
       author = {Bertrand, M. and Duflo, E. and Mullainathan, S.},
       title = {How Much Should We Trust Difference-In-Differences Estimates?},
       journal = {Quarterly Journal of Economics},
       volume = {119},
       pages = {249-275},
       year = {2004}
    }

I have set up my TeXMaker as the following:

Options/Configure TexMaker/Quick Build/for asy files/wizard

The quick build compiles running

LaTeX --> BibTeX --> LaTeX --> LaTeX

again as recommended here.

When I run the wizard and want to view the file in PDF format, in the citations I "[?]" instead.

The are warnings too in the Log:

Citation `bertrand' on page 1 undefined

`Empty `thebibliography' environment`   

Although it is clearly defined as endnotelibrary!

I am saving my TeX files in a Dropbox folder. (Not sure if this has any relevance.)

enter image description here

7
  • What does the blg-file say? Feb 11 '15 at 16:35
  • @UlrikeFischer I don't know what's the blg-file (Message/log window?). I have uploaded an screenshot to the question if that helps. Feb 11 '15 at 16:41
  • @Johannes_B I posted a question some days ago as I was building the bibtex library from endnote but other people helped me. Feb 11 '15 at 16:48
  • 1
    Yeah, show us the blg file. On windows, you might need to toggle file endings. It will be there (if you have run bibtex) and you can open it with your LaTeX-editor.
    – Johannes_B
    Feb 11 '15 at 16:51
  • 1
    @Johannes_B A comma after the last field is optional, but I recommend having it, so adding fields or moving them around will not cause harm.
    – egreg
    Feb 11 '15 at 16:55
2

Too long for a comment:

Please try the following complete, compilable MWE:

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{bertrand,
  author  = {Bertrand, M. and Duflo, E. and Mullainathan, S.},
  title   = {How Much Should We Trust Difference-In-Differences Estimates?},
  journal = {Quarterly Journal of Economics},
  volume  = {119},
  pages   = {249-275},
  year    = {2004},
}
\end{filecontents*}


\documentclass[11pt]{article}
\usepackage{cite}

\begin{document}

\title{My Article}
\author{Nobody Jr.}
\date{Today}
\maketitle

Blablabla said \cite{bertrand} and whatever.
\nocite{*} %                              To check all bib entrys at once ...

\bibliography{\jobname}
\bibliographystyle{plain}
\end{document}

Package filecontents is only to put the bib file into the MWE to have only one file to compile.

The result then on my computer with current MiKTeX 2.9 is

enter image description here

If you got something else please add \listfiles as first line to the MWE, compile and add the new part in the log file to your question ...

3
  • I get the same result as you, your code works! I wonder why mine doesn't Feb 11 '15 at 16:58
  • @user3507584 Delete your .bbl file and recompile. Feb 16 '15 at 18:25
  • After reinstalling MikTeX and Texmaker several times, it is finally working. Not sure how it fixed it but it is something to consider if someone faces the same problem in the future. Feb 16 '15 at 23:12

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.