I added a line "\cite{test}" as a test to my working Latex document. When I compiled the bibtex "!bibtex name_of_my_file, I got the expected error:
Warning–I didn't find a database entry for "test"
Then, I removed the line and compiled the bibtex again, hoping to have a working Latex file again. However, the same error occurs, even with a fresh shell. I cannot understand the behaviour. What is the logic? How can I get my Latex document working again?
[Updated Info]
The problem dissapeared as unexpectedly as it emerged. I have no idea why but it works now. Do you know the reason for the odd behaviour?
Best Answer
I think you are tripping over the multi-pass nature of LaTex plus Bibtex. If you look at Step 3 in this discussion, you'll see the following:
So, what I think is happening is that your
name_of_my_file.aux
file still contains your placeholder\cite{test}
. If you remove the auxiliary file, you should be able to start over with:[Update based on additional info]: The problem was that you had a
.aux
file with your\cite{}
still embedded. The second time that you ranlatex
, you overrode the old file with the new. That's why the complete set of steps includes an initiallatex
call, abibtex
call and two follow-uplatex
calls. Think of it as a multi-pass compiler and it might be more intuitive.