2

I placed my bibliography just before the end of the file.

\bibliography{mybib}{}
\bibliographystyle{plain}

@article{damodaran2010comatose,
  title = {Comatose Markets: What if Liquidity is Not the Norm?},
  author = {Damodaran, Aswath},
  journal = {Available at SSRN 1729408},
  year = {2010},
}

At the top, I am using the package cite

\usepackage{cite}

However, when I place a citation in the text, it just displays [?]. Also, the article data is displayed in plain text at the end.

How can I make the citations work?

  • 1
    Welcome to TeX.SX! Did you run BibTeX? Note also that @article{...} should be in a separate file called mybib.bib (the name is the argument to \bibliography, not part of the main document. – egreg May 19 '15 at 17:16
2

In your code snippet there are some errors.

For example the second {} in \bibliography{mybib}{} can be removed.
Your bib entries for your bibliography should be in a separate file with extension .bib.

In the following MWE I used the package filecontents in order to include an example bib file into my MWE. You do not need it, just use your existing bib file (you will soon have it ;-)). In the MWE the resulting bib file has the name of your tex file, but extension .bib.

MWE:

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@Book{Goossens,
  author    = {Goossens, Michel and Mittelbach, Frank and 
               Samarin, Alexander},
  title     = {The LaTeX Companion},
  edition   = {1},
  publisher = {Addison-Wesley},
  location  = {Reading, Mass.},
  year      = {1994},
}
@Book{adams,
  title     = {The Restaurant at the End of the Universe},
  author    = {Douglas Adams},
  series    = {The Hitchhiker's Guide to the Galaxy},
  publisher = {Pan Macmillan},
  year      = {1980},
}
@book{test,
  editor    = {First Editor and Second Editor2 and Third Editor3},
  title     = {Test to show the effect},
  publisher = {Publisher},
  year      = {2015},
  ISBN      = {0-0000-000000-0},
}
@article{damodaran2010comatose,
  title   = {Comatose Markets: What if Liquidity is Not the Norm?},
  author  = {Damodaran, Aswath},
  journal = {Journal name},
  year    = {2010},
  note    = {Available at SSRN 1729408},
}
\end{filecontents*}


\documentclass[10pt,a4paper]{article}

\usepackage{hyperref}

\begin{document}

This is text with \cite{Goossens} and \cite{adams}.

\nocite{*} % to test all bib entrys
\bibliographystyle{plain}
\bibliography{\jobname} % <=== calls bib file created with filecontents!

\end{document}

and the result is:

bibliography

Calling the package cite is left for homework.

BTW: the command \nocite{*} shows all bib entries in your bibliography (nice to check the bib file for errors).

You have to run first pdflatex mwe.tex , then bibtex mwe, then twice pdflatex mwe.tex (assume my mwe is called mwe.tex).

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.