0

I spent past couple of hours to get citation working on my latex. I am using TexMaker and I tried to compile the document in latex->bibtex -> latex -> latex -> PdfLatex order. However, I only see ? on my outcome pdf file. Could you help me? Thanks !

\documentclass{article} 
\usepackage{natbib} 

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{1,
 author = {Mustermann, A. and Mostermann, B. and Mistermann, C},
 year = {2011},
 title = {Using articles in {\LaTeX} documents},
 journal = {Journal}
}
\end{filecontents}


\begin{document} 
\cite{1}\qquad\citet{1}\qquad\citep{1}

\citeyear{1}\qquad\citeauthor{1}

\bibliographystyle{apalike}
\bibliography{\jobname}
\end{document}
  • 1
    I can't reproduce the problem. When I compile using your sequence I see all the references as well as their \cites in the text. – Werner Feb 24 '15 at 3:40
  • Are you maybe missing a \bibliographystyle directive in your real document? – Mico Feb 24 '15 at 3:57
  • Not sure, if the key may just ve a number or requires a/some characeters in front. This may be compiler dependent. – engineer Feb 24 '15 at 7:14
1

Does your MWE not work? I can compile it. I guess there is a problem in the settings for the compilers. I used following settings and it worked:

pdflatex -synctex=1 -interaction=nonstopmode %.tex
bibtex %

pdflatex -> bibtex -> pdflatex -> pdflatex

(also using TexMaker)

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.