Latex stepped on the pit! ! Lightning protection! !

Latex - found no \bibdata command series of pitfalls!

1. 首先:“I found no \bibdata command,while …aux waring …entry…”

It has been working fine before, but suddenly this bug appeared, and then I searched online and read countless blog experience posts

1) Change bibtex to biber in Select—>Configure texstudio—>Build—>Default Bibliography Tool Compile the .bib file and make other errors

2) Follow the correct compilation order: PDFlatex-bibtex-PDFlatex-PDFlatex does not work

3) Delete the generated aux, bbl and other files and try to recompile.

3) I learned that \bibliography{reference file name} should be missing or the location was wrong, so I adjusted it according to the correct location (positioning is very important!!!):

\bibliographystyle{
    
    elsarticle-num} %bibstyle 默认是plain

\begin{
    
    document}
%%\bibliography{
    
    ref}
...
%%\bibliographystyle{
    
    plain}
\bibliography{
    
    ref} %bibdata
\end{
    
    document}

I put it like this, in short \bibliography is placed after begin{document}! It will not report not found bibdata or put the above two sentences directly before end{document}, which can be flexibly adjusted according to your own situation.

2. A new error came: synctex (busy), unable to generate pdf

There is no problem in the latex reference database, but pdflatex still reports an error – “An error has occurred”, compared the following with the one that does not report an error, and found that synctex.gz and pdf in the folder were not successfully generated, and synctex (busy) appeared, so :

1) The task manager did not find pdflatex.exe and there is no way to kill the process

2) Delete the aux files and recompile and compile multiple times to no avail

3) I learned that it might be a grammatical error, so I looked back at the previously modified places and found that I added two figures before, but they were not quoted in the text, so just comment out the added ones, and it will be fine! ! !

Summary : Look at the error message! log! The warning in the log may also be the main cause of the problem, try not to let it report an error

Guess you like

Origin blog.csdn.net/qq_41968196/article/details/128074958