LaTeX forum ⇒ Theses, Books, Title pagesReading bibliography entries from different bib files and merging them into one bibliography at the end. Topic is solved

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
byn
Posts: 56
Joined: Fri Jun 10, 2022 12:27 pm

Reading bibliography entries from different bib files and merging them into one bibliography at the end.

Postby byn » Fri Jul 08, 2022 11:00 pm

i have different bibliography entries in different bibliography files. I have tried to use the \usepackage{multibib} but I am getting an error. This is how I define the entries in the main file.

\usepackage{multibib}

\bibliographystyle{apalike}
\renewcommand\bibname{References}% Multiple bibliography entries from different bibliograph files
\bibliography{bibliography1}
\bibliography{bibliography2}
\bibliography{bibliography3}

For example in Chapter 1, I cite from bibliograpgy1 with this reference; \cite{K1
In chapter 2, I cite from from bibliograpgy2 with this reference; \cite{Gouvea,Apos}
In chapter 3, I cite from from bibliograpgy3 with this reference; ~\cite{CryptoBook,LiCai}

there is no repetition of these entries in either bibliography, however instead of appending the different citations into one bibliography, I end up with three references pages with the same repeated reference.

I have attached the log files, resultant pdf output and a simplified code for the template can be found here; https://drive.google.com/file/d/1oEuo36 ... sp=sharing

main.log
Logfile from compilation
(26.73 KiB) Downloaded 45 times

main.pdf
pdf output result
(390.15 KiB) Downloaded 43 times


Your suggestions and corrections are highly appreciated.

Recommended reading 2021:

LaTeXguide.org • LaTeX-Cookbook.net
LaTeX Beginner's Guide LaTeX Cookbook
byn
Posts: 56
Joined: Fri Jun 10, 2022 12:27 pm

Reading bibliography entries from different bib files and merging them into one bibliography at the end.

Postby byn » Fri Jul 08, 2022 11:49 pm

The link to the simplified working template is here; https://drive.google.com/file/d/1O5c5Vh ... sp=sharing

User avatar
Stefan Kottwitz
Site Admin
Posts: 9987
Joined: Mon Mar 10, 2008 9:44 pm

Reading bibliography entries from different bib files and merging them into one bibliography at the end.

Postby Stefan Kottwitz » Sat Jul 09, 2022 12:53 am

I don't see an error in the log file. You did not mention the text of the error message, what is it?

Stefan
LaTeX.org admin

byn
Posts: 56
Joined: Fri Jun 10, 2022 12:27 pm

Reading bibliography entries from different bib files and merging them into one bibliography at the end.

Postby byn » Sat Jul 09, 2022 12:59 am

This is the error from the compilation: "Process started

This is BibTeX, Version 0.99d (TeX Live 2022) The top-level auxiliary file: main.aux The style file: apalike.bst Illegal, another \bibdata command---line 53 of file main.aux : \bibdata : {bibliography2} I'm skipping whatever remains of this command Illegal, another \bibdata command---line 55 of file main.aux : \bibdata : {bibliography3} I'm skipping whatever remains of this command Database file #1: bibliography1.bib Warning--I didn't find a database entry for "Gouvea" Warning--I didn't find a database entry for "Apos" Warning--I didn't find a database entry for "CryptoBook" Warning--I didn't find a database entry for "LiCai" (There were 2 error messages)

Process exited with error(s)"

byn
Posts: 56
Joined: Fri Jun 10, 2022 12:27 pm

Reading bibliography entries from different bib files and merging them into one bibliography at the end.

Postby byn » Sat Jul 09, 2022 1:01 am

The auxilliary file is attached here
main.aux
Auxilliary file
(3.48 KiB) Downloaded 42 times
and everything else is as is in the template.

User avatar
Stefan Kottwitz
Site Admin
Posts: 9987
Joined: Mon Mar 10, 2008 9:44 pm

Reading bibliography entries from different bib files and merging them into one bibliography at the end.  Topic is solved

Postby Stefan Kottwitz » Sat Jul 09, 2022 1:26 am

multibib can be complicated. From Overleaf:

If compiling on a local machine: Compiling your main document .tex will generate multiple .aux files. You must now run bibtex on all these .aux files, before compiling the main document .tex file again.


You can do that, or if it's too complicated, use a single bibliography. That's relevant for a scientist. Splitting in multiple bibliographies are cosmetics.

Stefan
LaTeX.org admin

byn
Posts: 56
Joined: Fri Jun 10, 2022 12:27 pm

Reading bibliography entries from different bib files and merging them into one bibliography at the end.

Postby byn » Sat Jul 09, 2022 1:40 am

I am compiling on a local machine, how would i run separate Bibtex files.

byn
Posts: 56
Joined: Fri Jun 10, 2022 12:27 pm

Reading bibliography entries from different bib files and merging them into one bibliography at the end.

Postby byn » Sat Jul 09, 2022 4:32 pm

Gotcha! I combined and run bibtex and it worked. Thanks!


Return to “Theses, Books, Title pages”

Who is online

Users browsing this forum: No registered users and 3 guests