## LaTeX forum ⇒ General ⇒ Reference Lists by Chapter with Author-Year Style

LaTeX specific issues not fitting into one of the other forums of this category.
mraoua
Posts: 5
Joined: Thu Nov 29, 2012 10:34 pm

### Reference Lists by Chapter with Author-Year Style

I am trying to write my thesis in LaTeX. I use a reference list by chapter by chapterbib and a global bibliography at the end of memory.

Everything works fine when I quote references with `\cite`. Eventually I wanted to make a quote author, year and for this I used the package natbib to use `\citet` and `\citep`. Suddenly, I had a lot of problems I have not been able to solve.

My headers use the title of the current subsection. That remains the case for the entire document except for chapter bibliographies where the word "References" in the header is written in small capitals. Also, I can not find the author quotes year.

P.

Tags:

kaiserkarl13
Posts: 582
Joined: Tue Mar 25, 2008 5:02 pm
Location: Columbia, Missouri, USA
Would you mind creating a minimal working example for us? It might be something we can solve by fiddling with it, but at this point I have no idea what you've done. You may have to load chapterbib after natbib, but I don't know that for certain.

mraoua
Posts: 5
Joined: Thu Nov 29, 2012 10:34 pm
Hi kaiserkarl13,

Here my MWE. The main file is "mwe.tex".

M.
Attachments
mwe.rar

kaiserkarl13
Posts: 582
Joined: Tue Mar 25, 2008 5:02 pm
Location: Columbia, Missouri, USA
I changed the style to "plainnat" instead of "plainnat-fr," but other than that all I changed was adding a bibliography to the main document (as it seems you wanted...?) and a line to the preamble to use the [rootbib] option. I still can't tell what you expect the output to look like, so I'll post what I got here.

Procedure: with `\usepackage{chapterbib}` in place, run LaTeX on the main file. Now run BibTeX on each .aux file (NOT the main one!) that contains citation commands. Run LaTeX twice on the main file. Replace preamble line with `\usepackage[rootbib]{chapterbib}`. Run LaTeX on main file. Run BibTeX on main .aux file. Run LaTeX three more times (first to process references, second to update ToC, and third to update cross-refs that depend on number of pages in ToC).

Please let me know what is different in this output from what you expect.
Attachments
mwe.pdf
What your MWE looks like when I run it.

mraoua
Posts: 5
Joined: Thu Nov 29, 2012 10:34 pm
Unfortunately, it is similar to what I thought before.
In fact what I'm looking for is this: when I quote a citation using the command \ citep there is nothing happens!
The only command that works is \ cite but it has the disadvantage of not putting the references in brackets.

Thank you !
P.

kaiserkarl13
Posts: 582
Joined: Tue Mar 25, 2008 5:02 pm
Location: Columbia, Missouri, USA
Again, it works for me. If you want author-year style instead of numbers, try leaving the "numbers" option of natbib out. But it definitely does something.

All three cite commands work, as shown in the example I posted. Top one is cite, center is citet, bottom is citep (section 0.1.1).