## LaTeX forum ⇒ LyX ⇒ Biblatex - all citations are included in sub bibliographies

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Bruno
Posts: 4
Joined: Sun Apr 12, 2015 8:54 am

### Biblatex - all citations are included in sub bibliographies

dear all,

I'm wtitting my PhD thesis in lyx and I figure out that using biblatex is the simplest way to have a bibliography per chapter. I follow all the intructions I found in the forum to have it working.
My lyx file works fine, however my bibliography in every chapter shows all the citations of all chapters.
The thesis is composed of a parent file "Thesis" and child files ( the chapters).

To enable biblatex, I added to the preamble in the main file "Thesis":

`\usepackage[style=numeric,backend=bibtex]{biblatex}\addbibresource{/Thesis_book/TUDELFT/lib1.bib}`

I create a biblatex.module file and place in the layout folder.

I also created a lyx note to add the bibliography.

at the end of every chapter (child files), I added an ERT `\printbibliography`.

Is still missing any step to conclude?

Kind regards,
Bruno
Last edited by Stefan Kottwitz on Tue Apr 14, 2015 2:30 pm, edited 1 time in total.
Reason: code marked

Tags:

Stefan Kottwitz
Posts: 9391
Joined: Mon Mar 10, 2008 9:44 pm
Hi Bruno,

welcome to the forum!

I think you need to add this option: `refsection=chapter`. That means:

`\usepackage[style=numeric,backend=bibtex, refsection=chapter]{biblatex}`

Stefan

Bruno
Posts: 4
Joined: Sun Apr 12, 2015 8:54 am
Hi Stefan_k,

Thank you for your help. I'm very grateful that you can suggest me some tips to fix it.
I Changed the preamble for what you suggested, however it resulted in a very strange situation.
My citations appears with the bibtexkey and no bibliography is plotted at the end of the chapter.

Kind regards,
Alvaro

Stefan Kottwitz
Posts: 9391
Joined: Mon Mar 10, 2008 9:44 pm
Hi Alvaro,

I guess we need more details to see how to fix it. Could you please post as attachment

• a copy of the LyX file (you can make a copy and remove your own text from that copy, keeping the technical problem)
• a pdfLaTeX export file of that document copy (can be done in the first main menu in LyX); so we got the LaTeX basis of the cause
• the .bib file for testing

Stefan

Bruno
Posts: 4
Joined: Sun Apr 12, 2015 8:54 am
Hi Stefen_K,

I'm sorry for the late reply but I had been very busy lately.

As suggested, attached you can find all the files required.

Kind regards,
Bruno
Attachments
Main_example.pdf
pdflatex
thesisTemplateLyx.rar
The files

Johannes_B
Site Moderator
Posts: 4032
Joined: Thu Nov 01, 2012 4:08 pm
Hi, it seems that my version of LyX is outdated, i cannot open the files. Can you export the project to pdfLaTeX?
Would be, at least for me, much easier to figure out the issue this way.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Bruno
Posts: 4
Joined: Sun Apr 12, 2015 8:54 am
Hi Johannes_B,

Thank you for your help. I was making a stupid mistake, instead of exporting the latex file, I was instead exporting a pdf (pdflatex).
Attachments
Main_example.tex
latex