Manage bibliography using .bib files in LaTeX
To use a dynamic bibliography instead of a manual list, create a .bib file containing BibTeX entries. Ensure the .bib file and the bibliography style file (.bst, e.g., IEEEtran.bst) are in the same directory as your .tex file to avoid compilation errors.
- Create a file (e.g.,
reference.bib) and add entries in BibTeX format. - Use the
\cite{citation_key}command in the text to reference a specific entry. - Replace the manual
thebibliographyenvironment with the bibliography style and file declarations.
% 1. Replace the \begin{thebibliography}...\end{thebibliography} block with:
\bibliographystyle{IEEEtran}
\bibliography{reference} % 'reference' refers to reference.bib
% 2. In-text citation example:
As shown in \cite{lu2023event}...