I'm learning to use latex, and so far, I have used the following in main.tex to create a bibliography:
\bibliography{main-bib}
\bibliographystyle{abbrv}
and in text I use \cite{referance}
Now, in one chapter (separate .tex file), I want to use for a different bibliography, so I wrote something like this in chapter.tex:
\renewcommand{\refname}{\normalsize{Reference}} %change referance size to match the paper
\bibliography{chapter-bib}
\bibliographystyle{abbrv}
My problem is that it no longer recognizes the rest of the references in the other chapters with the main bibliography main-bib.bib as they'll be marked with ? mark. So basically I want to treat the chapter.tex as a mini separate project (publication paper-like) with its own references.
I tried the following solutions with no success:
1- Add keywords to main-bib.bib to distinguish chapter references (only added to some references)
For example, in main-bib.bib I wrote the following:
@inproceedings{test123,
title={title title,
author={abce, abc},
booktitle={booktitle},
pages={31111},
year={2018},
organization={something},
keywords = {chapter}
}
And in the chapter.tex, I wrote the following:
\printbibliography[keyword={chapter},title={chapter ref}]
I got the following error: Undefined control sequence. Even with using \printbibliography on its own I guess it's not compatible somehow.
How to add keywords using \bibliography{main-bib} ?
2- using \usepackage[sectionbib]{chapterbib} following the first solution here:
https://www.overleaf.com/learn/latex/Questions/Creating_multiple_bibliographies_in_the_same_document
It worked for the chapter.tex but didn't works for the other chapters with separate .tex files as all in text citation would be marked with ? Instead if a number. Also, the title will change to bibliography instead of references, and I couldn't change it.
3- using multibib as in here: https://www.overleaf.com/learn/latex/Multibib
so I added
\usepackage[resetlabels,labeled]{multibib}
\newcites{paper}{Referances}
In main.tex, then in chapter.tex, I used \citepaper{test} and the following at the end:
\bibliographypaper{chapter-bib}
\bibliographystyle{abbrv}
This does absolutely nothing, no references can be shown for the paper.
I don't know what I did wrong following all of the above steps, I would kindly appreciate your suggestions.
\printbibliographyit seems that you are mixing things without a clear idea of what are you doing really. You must we aware of basic differences between use bitbex vs biber/biblatex (see here). Then, using only biblatex approach, you can use some like\newrefsegment \chapter{foo} ... \printbibliography[segment=\therefsegment,heading=subbibliography] \newrefsegmentto print only the cites of chapter "foo". – Fran Sep 03 '23 at 08:38