Search code examples
visual-studio-codelatexbibtex

LaTex not compiling on VS Code due to BibTex


I am having trouble compiling a book of editing using LaTex via VS Code and the following is the error message I get:

Latexmk: Summary of warnings from last run of (pdf)latex:
Latex failed to resolve 15 reference(s)
Latex failed to resolve 4 citation(s)
Collected error summary (may duplicate other messages):
bibtex waysofmentalprayer: Could not open bibtex log file for 'waysofmentalprayer'
Latexmk: Errors, so I did not complete making targets

It seems that the problem is bibtex. I was playing around and decided to rename the file extension from .bib to .tex and it worked. However, when I use Rstudio, it compiles perfectly with the file extension .bib. Why is this happening?

Update: The document compiles on Rstudio but the citation doesn't work. All that appears is ? instead of the citation.

Update 2: It seems that on my local machine, it is not recognizing bibtex. I downloaded TeXworks but the bibtex option was in gray i.e. I couldn't use it. Does this mean I can't use bibtex?? How do I install it?


Solution

  • I have found a solution. I have answered it here. Basically, I used biblatex instead of natbib.