GeneralReference Lists by Chapter with Author-Year Style

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

Reference Lists by Chapter with Author-Year Style

Post by mraoua »

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.

Thank you in advance for your feedback and suggestions.
P.

Recommended reading 2024:

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

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

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Reference Lists by Chapter with Author-Year Style

Post by kaiserkarl13 »

Would you mind creating a Infominimal 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

Re: Reference Lists by Chapter with Author-Year Style

Post by mraoua »

Hi kaiserkarl13,

Thank your for your answer.
Here my MWE. The main file is "mwe.tex".

Thanks in advance,
M.
Attachments
mwe.rar
(6.12 KiB) Downloaded 1005 times
kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Reference Lists by Chapter with Author-Year Style

Post by kaiserkarl13 »

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.
(164.11 KiB) Downloaded 2402 times
mraoua
Posts: 5
Joined: Thu Nov 29, 2012 10:34 pm

Re: Reference Lists by Chapter with Author-Year Style

Post by mraoua »

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: 707
Joined: Tue Mar 25, 2008 5:02 pm

Re: Reference Lists by Chapter with Author-Year Style

Post by kaiserkarl13 »

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).
Post Reply