0

I have a bib file in txt format in the same directory of all the rest of Latex files. Here is an example of my file named: Bibliographyforpaper.txt content:

 @article{kargupta2004fourier,
      title={A fourier spectrum-based approach to represent decision trees for mining data streams in mobile environments},
      author={Kargupta, Hillol and Park, Byung-Hoon},
      journal={Knowledge and Data Engineering, IEEE Transactions on},
      volume={16},
      number={2},
      pages={216--229},
      year={2004},
      publisher={IEEE}
    }

@article{mukherjee2006privacy,
  title={A privacy-preserving technique for Euclidean distance-based mining algorithms using Fourier-related transforms},
  author={Mukherjee, Shibnath and Chen, Zhiyuan and Gangopadhyay, Aryya},
  journal={The VLDB Journal—The International Journal on Very Large Data Bases},
  volume={15},
  number={4},
  pages={293--315},
  year={2006},
  publisher={Springer-Verlag New York, Inc.}
} 

In the LATEX file I use:

  \usepackage{filecontents}

\begin{document}
\begin{abstract}
\end{abstract}
\section{Introduction}
\newpage
    \bibliography{Bibliographyforpaper}{}
    \bibliographystyle{plain}
\nocite*

\end{document}

And there is only headline of References and no list of the bibliography. If I add \printbibliography and I get an error.

  • You need to use \cite{mukherjee2006privacy} (or similar) to cite a paper, or \nocite* to list all papers, whether they are cited or not. – Ian Thompson Jan 19 '16 at 20:31
  • When I use the both commands \cite{mukherjee2006privacy} or \nocite* I get a question mark [?]. All I want is to create a full References list at the end of document. – Avi Jan 19 '16 at 20:35
  • \nocite* will list all references, but you need to run (pdf/lua/xe)latex then bibtex then (pdf/lua/xe)latex again to complete the process. – Ian Thompson Jan 19 '16 at 20:43
  • Thanks a lot. How can I run (pdf/lua/xe)latex? Just to write it in the file body? I see the same name of my file with an extension of BBL in the directory does it mean something? – Avi Jan 19 '16 at 20:47
  • On the command line, you would enter pdflatex myfile then bibtex myfile and then pdflatex myfile again, where myfile.tex is the name of your .tex file. Alternatively, you could use lualatex, xelatex or plain old latex rather than pdflatex. If you are using some sort of IDE (TeXShop, TeXWorks, etc.) there might be a button or menu item to do everything for you. – Ian Thompson Jan 19 '16 at 20:51
2

enter image description here

\documentclass{article}
\begin{document}
\nocite{*}
\begin{abstract}
zzz
\end{abstract}
\section{Introduction}
zzzz

    \bibliography{Bibliographyforpaper}
    \bibliographystyle{plain}
\end{document}
  • Thanks David, Can you please elaborate the process of compiling and producing the both files. Maybe there lies my error. – Avi Jan 19 '16 at 21:28
  • I still get only References headline with the code you used. – Avi Jan 19 '16 at 21:33
  • 1
    @Avi save the above as zzz.tex then run pdflatex zzz then bibtex zzz then pdflatex zzz and you will get the output shown – David Carlisle Jan 19 '16 at 23:35

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.