BibTeX, biblatex and biberMultiple Bibliography

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
HellRico
Posts: 1
Joined: Tue Nov 16, 2010 9:44 am

Multiple Bibliography

Post by HellRico »

Hi everyone,

I am pretty mucha newbie with latex, but I really love it. It makes my life so easy....
I am writing my thesis, and I would like to have multiple bibliography. To be more clear, I have one bibliography at the end for all chapters, but I also have several (about 4-5) appendices (my papers) and I want to put a single bibliography in each appendix, that is the bibliography of the paper.

I hope someone can help me.

Cheers,
Enrico

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Multiple Bibliography

Post by frabjous »

Perhaps one of the following package would have the functionality you need:
Hélie
Posts: 8
Joined: Fri Dec 10, 2010 5:57 pm

Multiple Bibliography

Post by Hélie »

Hi everyone,

I am also almost newbie with latex and I am a huge fan.
I am using Windows, Lyx 1.6.2, and MiKTeX 2.7
I am writing my thesis and I would like to put a bibliography at the end of each of my chapters. I tried the solution proposed on the extended help (§3.1.3) of lyx consisting in using the bibtopic package.

Code: Select all

\documentclass[french]{book}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage[a4paper]{geometry}
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\setlength{\parskip}{\medskipamount}
\setlength{\parindent}{0pt}
\usepackage{float}
\usepackage[dot]{bibtopic}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\date{}

\usepackage{babel}
\addto\extrasfrench{\providecommand{\og}{\leavevmode\flqq~}\providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}}

\begin{document}

\title{Title}

\maketitle

\chapter{chapter 1}

\begin{btUnit}

\cite{ref1,ref2,ref3}

\bibliographystyle{BibStyle}
\begin{btSect}{Bib}
\btPrintCited
\end{btSect}
\end{btUnit}

\chapter{chapter 2}

\begin{btUnit}

\cite{ref4,ref5,ref6}

\bibliographystyle{BibStyle}
\begin{btSect}{Bib}
\btPrintCited
\end{btSect}


\end{btUnit}


\chapter{chapter 3}

\begin{btUnit}

\cite{ref7,ref8,ref9}

\bibliographystyle{BibStyle}
\begin{btSect}{Bib}
\btPrintCited
\end{btSect}


\end{btUnit}


\chapter{chapter 4}

\begin{btUnit}

\cite{ref10,ref11,ref12}

\bibliographystyle{BibStyle}
\begin{btSect}{Bib}
\btPrintCited
\end{btSect}


\end{btUnit}
\end{document}
But this does not work. I can't even compile. So I tried with the chapterbib package. But it does not work too:

The master file

Code: Select all

\documentclass[oneside,french]{book}
\usepackage[latin9]{inputenc}
\usepackage[a4paper]{geometry}
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\setlength{\parskip}{\medskipamount}
\setlength{\parindent}{0pt}
\usepackage{float}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\date{}
\usepackage{chapterbib}

\usepackage{babel}
\addto\extrasfrench{\providecommand{\og}{\leavevmode\flqq~}\providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}}

\begin{document}

\title{Title}

\maketitle
\include{Chap1}

\include{Chap2}
\end{document}
Chap1:

Code: Select all

\documentclass[oneside,french]{book}
\usepackage[latin9]{inputenc}
\usepackage[a4paper]{geometry}
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\setlength{\parskip}{\medskipamount}
\setlength{\parindent}{0pt}
\usepackage{float}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\date{}
\usepackage[sectionbib]{chapterbib}

\usepackage{babel}
\addto\extrasfrench{\providecommand{\og}{\leavevmode\flqq~}\providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}}

\begin{document}

\chapter*{Chapitre 1}

\cite{ref1,ref2,ref3}

\bibliographystyle{Art}
\bibliography{Art}

\end{document}
In this case, the citations on the text appear like this [?,?,?,?] and the bibliography does not appear at all.

I know I am probably a dummy, that the solution is obvious but I can not find it...
Can somebody help me? :oops:

Thank you in advance for your help...

Hélie
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Re: Multiple Bibliography

Post by meho_r »

LyX's "User Guide", section 6.5 and "Additional Features", section 3.1. An example in the attachment.
Attachments
example.pdf
(64.93 KiB) Downloaded 1012 times
example.zip
(1.07 KiB) Downloaded 697 times
Hélie
Posts: 8
Joined: Fri Dec 10, 2010 5:57 pm

Re: Multiple Bibliography

Post by Hélie »

Thank you a lot for your help!!
It's exactely what I have try first.
when I compile your example, it work but I can not replace your bibligraphy by mine and when a I copie your code in a new page it does not work.

One more time thank you a lot. Now I know what work so I will compare the code to see where can be the problem...
I believe my bibliography is also different of yours, because if it was not the case I guess I could replace yours by mine without problems...
By curiosity, which software are you using to prepare you bib file? I am using Jabref.
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Multiple Bibliography

Post by meho_r »

JabRef here too. You can post problematic part(s) of the bibliography here if you want, so we can test it. Or you can start with breaking it in two parts and test them both separately using .lyx file I posted earlier. This way you can hunt down the problem pretty quickly.

BTW, take care about encoding. If you're using different encodings for .lyx and .bib files, it's very likely that there will be problems. Also, don't forget that BibTeX doesn't support unicode, so make sure you write accented letters the "LaTeX-way", e.g. "è" as "\'{e}" etc.
Hélie
Posts: 8
Joined: Fri Dec 10, 2010 5:57 pm

Re: Multiple Bibliography

Post by Hélie »

Thank you meho_r
You were right, the problem came from my bibliography : I used accented letter.
Now it's working.

There is just 2 details to solve:
* The order of the references is alphabetical and I want it chronological. I believed that the references order was commanded by the bibliography style, but I use the same style than the one I used to write my articles (in were the references were ordered by chronological order) I also try the "unsrt" style. But it does'not change the references order... Examples with my bst file are in the attachment.

* Is-it possible to show the number of the chapter on the reference? For example:
Chapter 1:
Kirk et al. [I-1] as well as Solo et al. [I-2] show that...

references :
[I-1] : J.T. Kirk, M. Spock, L.B. MacCoy, About life on mars, Journal of physics, 2200
[I-2] : H. Solo, L. Skywalker, About the destruction of mars, Mickey's Journal, 3000


Chapter 2:
The properties of ... have been study [II-1,II-2]

references :
[II-1] : J.T. Kirk, M. Spock, L.B. MacCoy, about life on mars, journal of physics, 2200
[II-2] : H. Solo, L. Skywalker, About the destruction of mars, Journal of Mickey, 3000
Attachments
example.zip
(50.76 KiB) Downloaded 280 times
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Multiple Bibliography

Post by meho_r »

We recently had a discussion about chronological order here.
Hélie
Posts: 8
Joined: Fri Dec 10, 2010 5:57 pm

Re: Multiple Bibliography

Post by Hélie »

Yes I saw. And I tried with the bibliography style "unsrt" (cf example in attachement) but it does not change the references order. That why I believed that it was linked to the fact that I used multibibliography...
Attachments
UNSRT.zip
(27.23 KiB) Downloaded 266 times
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Re: Multiple Bibliography

Post by meho_r »

I'm afraid LyX is not very suited for anything but basic document processing. The solution about sorting is trivial with biblatex, but for sectioned bibliographies, for every section an .aux file is created (if you're using BibTeX) and LyX cannot recognize that, so you have to find the place where LyX stores temporary files (usually a Temp folder on Windows, or /tmp on Linux) and run bibtex on .aux files there. Of course, you can create a script for that purpose, but the problem is that LyX keeps changing the name of the temporary folder every time it's run.
Post Reply