Using BibTeX, biber, natbib, or biblatex is relatively straightforward, but sometimes, something breaks. Here are some general steps for troubleshooting problems with your bibliography.
You can also talk to a chatbot like ChatGPT, Bing, or Bard. Most chatbots are very skilled at understanding what code is supposed to look like. However, they are limited in that their suggestions are sometimes a bit off — they can make assumptions about what you want to do in your document based on the information in your prompt, and you'll need to use trial-and-error to help them understand what you are looking for. If the question is complex, you are better off contacting a person or posting to a forum.
Some tools for generating LaTeX .bst files (bibliographic styles), such as the docstrip utility, have known compatibility issues with the package csquotes. The csquotes package is a robust quotation management tool, with support for multiple languages and advanced quotation elements of interest to those writing formal academic documents. For those writing theses, dissertations, or other formal documents where a robust quotation management package is required, it is an excellent choice.
One problem with many .bst files available online is that they attempt to define something called \enquote within the style. When used without csquotes, this is fine, but csquotes has its own defined variable called \enquote. LaTeX does not appreciate having two variables with the same name, so it will call an error, and the document will refuse to compile.
The error will look like this:
This is BibTeX, Version 0.99d (TeX Live 2014) The top-level auxiliary file: mythesisd2.aux I couldn't open style file ajs.bst ---line 18 of file mythesisd2.aux : \bibstyle{ajs2.bst : } I'm skipping whatever remains of this command I found no style file---while reading file mythesisd2.aux (There were 2 error messages)
And it is resolved by redefining one of these variables. I recommend redefining the one in the .bst file to something like \enquotebst. This can be done very easily to your .bst file using find/replace. The risk of modifying csquotes is that you are tampering with a built-in package that might be updated and reset every time TeX updates are downloaded. For example, in the ajs.bst file commonly found online for sociologists, the \enquote variable appears in two places:
FUNCTION {format.title}
{ title empty$
{ "" }
{ title
"\enquote{" swap$ *
add.period$ "}" *
}
if$
}
and
FUNCTION {begin.bib}
{ preamble$ empty$
'skip$
{ preamble$ write$ newline$ }
if$
"\begin{thebibliography}{}" write$ newline$
"\newcommand{\enquote}[1]{``#1''}"
write$ newline$
}
Replace "enquote" with "enquoteFILENAME" or "enquotebst" wherever it appears in the .bst file. The error will stop if \enquote was your problem. If the error continues, ensure that your .bst file is in the correct directory and that you are only calling the bibliography once.