Rangsiman Ketkaew

Ph.D. Student in Computational Chemistry and Machine Learning at UZH

Posted by on

Category : LaTeX

Natbib

\documentclass[12pt,a4paper]{article}
\usepackage[english]{babel}
\addto{\captionsenglish}{
  \renewcommand{\bibname}{References}
}
\usepackage[utf8]{inputenc}

\usepackage[sort&compress,numbers]{natbib}

\begin{document}

...
\bibliographystyle{unsrtnat}
\bibliography{main}

\end{document}

You can embed reference sources into the main.tex file by compiling the pdf first. Then copy the whole content from *.bbl from and replace bibligraphy commend, like this:

\begin{document}

...
\begin{thebibliography}{9}
\bibitem{latexcompanion}
Michel Goossens, Frank Mittelbach, and Alexander Samarin.
\textit{The \LaTeX\ Companion}.
Addison-Wesley, Reading, Massachusetts, 1993.

\bibitem{einstein}
Albert Einstein.
\textit{Zur Elektrodynamik bewegter K{\"o}rper}. (German)
[\textit{On the electrodynamics of moving bodies}].
Annalen der Physik, 322(10):891–921, 1905.

\bibitem{knuthwebsite}
Knuth: Computers and Typesetting,
\\\texttt{http://www-cs-faculty.stanford.edu/\~{}uno/abcde.html}
\end{thebibliography}

\end{document}

Biblatex

\usepackage[
backend=biber,
style=numeric-comp,
citestyle=nature
]{biblatex}
\addbibresource{main.bib}

\begin{document}

...

\printbibliography

\end{document}

You can also rename the reference section from “References” to, e.g., “Sources”:

\begin{document}

...

\printbibliography[title={Sources},prenote=note]

\end{document}