0

I am trying to add reference from .bibtex files which I have download from APS journal website but TexStudio says:

Process started: bibtex.exe "texstudio_r10916"

This is BibTeX, Version 0.99d (MiKTeX 2.9.6630 64-bit) The top-level auxiliary file: texstudio_r10916.aux I couldn't open database file PhysRevB.93.115124.bib ---line 3 of file texstudio_r10916.aux : \bibdata{texstudio_r10916Notes,PhysRevB.93.115124 :
} I'm skipping whatever remains of this command The style file: plain.bst Database file #1: texstudio_r10916Notes.bib Warning--I didn't find a database entry for "PhysRevB.93.115124" (There was 1 error message)

Process exited with error(s)

The Latex code that I have written is:

\documentclass[
reprint,
amsmath,
amssymb,
aps,
]{revtex4-1}

\usepackage{graphicx}
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{subcaption}

\begin{document}

\title{Model and equilibrium properties}

\date{\today}

\maketitle

Something.....
asdfasf \cite{PhysRevB.93.115124}
Something.....

\bibliographystyle{plain}
\bibliography{PhysRevB.93.115124}
\end{document}

Content of PhysRevB.93.115124.bibtex file is following:

@article{PhysRevB.93.115124,
  title = {Quantum quench in two dimensions using the variational Baeriswyl wave function},
  author = {D\'ora, Bal\'azs and Haque, Masudul and Pollmann, Frank and Het\'enyi, Bal\'azs},
  journal = {Phys. Rev. B},
  volume = {93},
  issue = {11},
  pages = {115124},
  numpages = {6},
  year = {2016},
  month = {Mar},
  publisher = {American Physical Society},
  doi = {10.1103/PhysRevB.93.115124},
  url = {https://link.aps.org/doi/10.1103/PhysRevB.93.115124}
}

EDIT

After valuable comment by Troy I saved my document by name document1.tex and changed bib file extension from .bibtex to .bib and it worked but when I tried to add another citation into the same document it gives me following error now:

Process started: bibtex.exe "document1"

This is BibTeX, Version 0.99d (MiKTeX 2.9.6630 64-bit) The top-level auxiliary file: document1.aux Illegal, another \bibdata command---line 6 of file document1.aux : \bibdata :
{document1Notes,PhysRevB.68.045112} I'm skipping whatever remains of this command The style file: plain.bst Database file #1: document1Notes.bib Database file #2: PhysRevB.93.115124.bib Warning--I didn't find a database entry for "PhysRevB.68.045112" (There was 1 error message)

Process exited with error(s)

Now the latex code I am running is:

\documentclass[
reprint,
amsmath,
amssymb,
aps,
]{revtex4-1}

\usepackage{graphicx}
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{subcaption}

\begin{document}

\title{Model and equilibrium properties}

\date{\today}

\maketitle

Something.....
asdfasf \cite{PhysRevB.93.115124} \cite{PhysRevB.68.045112}
Something.....

\bibliographystyle{plain}
\bibliography{PhysRevB.93.115124}
\bibliography{PhysRevB.68.045112}

\end{document}
  • 1
    It doesn't seem you saved the .tex file (TeXstudio is using a randomly generated file name, and is located in a temp dir). Make sure the .tex file and .bib file are in the same folder. – Troy May 4 '18 at 16:08
  • Does it have to be .bib or .bibtex? The files that I have downloaded are .bibtex. – Luqman Saleem May 4 '18 at 16:09
  • Just change the file extension to .bib – Troy May 4 '18 at 16:15
  • It worked only for one citation when I added another citation it says : This is BibTeX, Version 0.99d (MiKTeX 2.9.6630 64-bit) The top-level auxiliary file: aaaa.aux Illegal, another \bibdata command---line 6 of file aaaa.aux : \bibdata : {aaaaNotes,PhysRevB.68.045112} I'm skipping whatever remains of this command The style file: plain.bst Database file #1: aaaaNotes.bib Database file #2: PhysRevB.93.115124.bib Warning--I didn't find a database entry for "PhysRevB.68.045112" (There was 1 error message) aaaa is name of my file. – Luqman Saleem May 4 '18 at 16:23
  • edit your new example into your question. it's not entirely clear to me what you're doing. Why do you need two bib files though? You can have more than one bib entry in one .bib file. – Troy May 4 '18 at 16:24
1

Your example works if you place your .bib file in the same folder as your .tex file. In the original example, the .tex file hadn't been saved, and so is using a randomized name allocated by TeXstudio, and was in a temporary folder (thus, away from your .bib file).

Also, you can have more than one bib entry in one .bib file.

By the way, I would recommend you picking a more suitable name for your .bib file, as well as more meaningful citation keys. For example:

main.tex

\documentclass{article}
\begin{document}
Hello world \cite{dora2016}.% Citation key here matching the one in the bib file, but declared with a more meaningful label.
\bibliographystyle{plain}
\bibliography{biblio}% Name of your .bib file
\end{document}

biblio.bib

@article{dora2016,
  title = {Quantum quench in two dimensions using the variational Baeriswyl wave function},
  author = {D\'ora, Bal\'azs and Haque, Masudul and Pollmann, Frank and Het\'enyi, Bal\'azs},
  journal = {Phys. Rev. B},
  volume = {93},
  issue = {11},
  pages = {115124},
  numpages = {6},
  year = {2016},
  month = {Mar},
  publisher = {American Physical Society},
  doi = {10.1103/PhysRevB.93.115124},
  url = {https://link.aps.org/doi/10.1103/PhysRevB.93.115124}
}
  • Thank you. I want to up vote this but I don't have enough reputation yet. – Luqman Saleem May 4 '18 at 17:08
  • @LuqmanSaleem No worries, thanks for accepting! – Troy May 4 '18 at 17:21

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.