LaTeX forum ⇒ BibTeX, biblatex and biberHow to make two bibliographies with apacite package ?

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
User avatar
Johannes_B
Site Moderator
Posts: 4078
Joined: Thu Nov 01, 2012 4:08 pm

Re: How to make two bibliographies with apacite package ?

Postby Johannes_B » Fri Jan 01, 2016 4:40 pm

an you show a minimal working example that lets me reproduce the issue?
A surgeon cannot fix a broken leg without looking at it and a mechanic can't fix a broken car without looking at it.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Tags:

tullio
Posts: 13
Joined: Sun Sep 28, 2014 9:33 am

Postby tullio » Fri Jan 01, 2016 4:55 pm

I'm sorry. This a MWE :

  1. \begin{filecontents}{domiMain.bib}
  2. @book{Abram2001,
  3. author = {Abram, Jan},
  4. title = {Le langage de Winnicott. {D}ictionnaire explicatif des termes winnicottiens},
  5. Translator = {Athanassiou-Popesco, Cléopâtre},
  6. publisher = {Éditions Popesco},
  7. address = {Paris, France},
  8. year = {2001},
  9. originalyear = {1996},
  10. }
  11.  
  12. @book{Alain1996,
  13. author = {Alain},
  14. title = {Souvenirs concernant {J}ules {L}agneau},
  15. publisher = {Éditions Gallimard},
  16. address = {Paris, France},
  17. pages = {153-265},
  18. year = {1996},
  19. originalyear = {1925},
  20. }
  21.  
  22. @book{Althusser2014,
  23. author = {Althusser, Louis},
  24. title = {Initiation à la philosophie pour les non-philosophes},
  25. publisher = {Presses Universitaires de France},
  26. address = {Paris, France},
  27. year = {2014},
  28.  
  29. }
  30. \end{filecontents}
  31. \begin{filecontents}{domiAnnex.bib}
  32. @article{bb,
  33. author= {Busy Bee},
  34. year= {2015},
  35. }
  36. \end{filecontents}
  37.  
  38. \documentclass{book}
  39. \usepackage{apacite}
  40. \usepackage{multibib}
  41. \newcites{annex}{Annex Stuff}
  42. \bibliographystyle{apa}
  43. \begin{document}
  44. \tableofcontents
  45. \chapter{Argumentaire}
  46.  
  47. blabla \cite{Abram2001}
  48.  
  49. \nocite{*}
  50. \bibliography{domiMain}
  51. \appendix
  52. \nociteannex{*}
  53. \bibliographystyleannex{apa}
  54. \bibliographyannex{domiAnnex}
  55. \end{document}

User avatar
Johannes_B
Site Moderator
Posts: 4078
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Fri Jan 01, 2016 5:49 pm

Package natbib is missing.
  1. \RequirePackage{filecontents}
  2. \begin{filecontents}{domiMain.bib}
  3. @book{Abram2001,
  4. author = {Abram, Jan},
  5. title = {Le langage de Winnicott. {D}ictionnaire explicatif des termes winnicottiens},
  6. Translator = {Athanassiou-Popesco, Cléopâtre},
  7. publisher = {Éditions Popesco},
  8. address = {Paris, France},
  9. year = {2001},
  10. originalyear = {1996},
  11. }
  12.  
  13. @book{Alain1996,
  14. author = {Alain},
  15. title = {Souvenirs concernant {J}ules {L}agneau},
  16. publisher = {Éditions Gallimard},
  17. address = {Paris, France},
  18. pages = {153-265},
  19. year = {1996},
  20. originalyear = {1925},
  21. }
  22.  
  23. @book{Althusser2014,
  24. author = {Althusser, Louis},
  25. title = {Initiation à la philosophie pour les non-philosophes},
  26. publisher = {Presses Universitaires de France},
  27. address = {Paris, France},
  28. year = {2014},
  29.  
  30. }
  31. \end{filecontents}
  32. \begin{filecontents}{domiAnnex.bib}
  33. @article{bb,
  34. author= {Busy Bee},
  35. year= {2015},
  36. }
  37. \end{filecontents}
  38.  
  39. \documentclass{book}
  40. \usepackage{apacite}
  41. \usepackage{natbib}
  42. \usepackage{multibib}
  43.  
  44. \newcites{annex}{Annex Stuff}
  45. \bibliographystyle{apa}
  46. \begin{document}
  47. \tableofcontents
  48. \chapter{Argumentaire}
  49.  
  50. blabla \cite{Abram2001}
  51.  
  52. \nocite{*}
  53. \bibliography{domiMain}
  54. \appendix
  55. \nociteannex{*}
  56. \bibliographystyleannex{apa}
  57. \bibliographyannex{domiAnnex}
  58. \end{document}
  59.  


But since your bibliography is obviously set up for use with biblatex, use it.

  1. \RequirePackage{filecontents}
  2. \begin{filecontents}{domiMain.bib}
  3. @book{Abram2001,
  4. author = {Abram, Jan},
  5. title = {Le langage de Winnicott. {D}ictionnaire explicatif des termes winnicottiens},
  6. Translator = {Athanassiou-Popesco, Cléopâtre},
  7. publisher = {Éditions Popesco},
  8. address = {Paris, France},
  9. year = {2001},
  10. originalyear = {1996},
  11. }
  12.  
  13. @book{Alain1996,
  14. author = {Alain},
  15. title = {Souvenirs concernant {J}ules {L}agneau},
  16. publisher = {Éditions Gallimard},
  17. address = {Paris, France},
  18. pages = {153-265},
  19. year = {1996},
  20. originalyear = {1925},
  21. }
  22.  
  23. @book{Althusser2014,
  24. author = {Althusser, Louis},
  25. title = {Initiation à la philosophie pour les non-philosophes},
  26. publisher = {Presses Universitaires de France},
  27. address = {Paris, France},
  28. year = {2014},
  29.  
  30. }
  31. @article{bb,
  32. author= {Busy Bee},
  33. year= {2015},
  34. keywords = {annex},
  35. }
  36. \end{filecontents}
  37.  
  38. \documentclass{book}
  39. \usepackage[utf8]{inputenc}
  40. \usepackage[style=apa]{biblatex}
  41. \DeclareLanguageMapping{english}{english-apa}
  42. \addbibresource{domiMain.bib}
  43.  
  44. \begin{document}
  45. \tableofcontents
  46. \chapter{Argumentaire}
  47.  
  48. blabla \cite{Abram2001}
  49.  
  50. \printbibliography[notkeyword=annex]
  51. \nocite{bb}
  52. \printbibliography[keyword=annex,title={Extra stuff}]
  53. \end{document}
  54.  
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

tullio
Posts: 13
Joined: Sun Sep 28, 2014 9:33 am

Postby tullio » Fri Jan 01, 2016 6:58 pm

Sorry, but even when I insert natbib package, the same error appears with \cite{Abram2001}: this latter is mentioned twice. How could I fix that ?
Finally, it works, but I had to modify the command in this way : \citep{Abram2001} (p is here in bold to emphasize it, mais not in the latex code).

User avatar
Johannes_B
Site Moderator
Posts: 4078
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Fri Jan 01, 2016 7:52 pm

I bet you forgot to trash all the auxiliary files first. If you click on Open in writelatex you will see, it works as expected :-)
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

tullio
Posts: 13
Joined: Sun Sep 28, 2014 9:33 am

Postby tullio » Fri Jan 01, 2016 11:37 pm

OK. It works... partially. The fact is there is two another issues:

1. according to APA norms, I have to indicate place published : publisher. For instance : Paris, France : Éditions Gallimard. But instead of this, I obtain : Éditions Gallimard, Paris, France. How to change that ?

2. Nor the entry called "References" nor the one called "Annex Stuff" appears in the table of contents.

What should I do ? (I mean: instead of stopping there and switch to a basic text editor...)

User avatar
Johannes_B
Site Moderator
Posts: 4078
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sat Jan 02, 2016 9:31 am

As said before, simply use package biblatex.
  1. %\RequirePackage{filecontents}
  2. \begin{filecontents}{domiMain.bib}
  3. @book{Abram2001,
  4. author = {Abram, Jan},
  5. title = {Le langage de Winnicott. {D}ictionnaire explicatif des termes winnicottiens},
  6. Translator = {Athanassiou-Popesco, Cléopâtre},
  7. publisher = {Éditions Popesco},
  8. address = {Paris, France},
  9. year = {2001},
  10. originalyear = {1996},
  11. }
  12.  
  13. @book{Alain1996,
  14. author = {Alain},
  15. title = {Souvenirs concernant {J}ules {L}agneau},
  16. publisher = {Éditions Gallimard},
  17. address = {Paris, France},
  18. pages = {153-265},
  19. year = {1996},
  20. originalyear = {1925},
  21. }
  22.  
  23. @book{Althusser2014,
  24. author = {Althusser, Louis},
  25. title = {Initiation à la philosophie pour les non-philosophes},
  26. publisher = {Presses Universitaires de France},
  27. address = {Paris, France},
  28. year = {2014},
  29.  
  30. }
  31. @article{bb,
  32. author= {Busy Bee},
  33. year= {2015},
  34. keywords = {annex},
  35. }
  36. \end{filecontents}
  37.  
  38. \documentclass{book}
  39. \usepackage[utf8]{inputenc}
  40. \usepackage[style=apa]{biblatex}
  41. \DeclareLanguageMapping{english}{english-apa}
  42. \addbibresource{domiMain.bib}
  43.  
  44. \begin{document}
  45. \tableofcontents
  46. \chapter{Argumentaire}
  47.  
  48. blabla \cite{Abram2001}
  49.  
  50. \printbibliography[notkeyword=annex,heading=bibintoc]
  51. \nocite{bb}
  52. \printbibliography[keyword=annex,title={Extra
  53. stuff},heading=bibintoc]
  54. \end{document}
  55.  
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

tullio
Posts: 13
Joined: Sun Sep 28, 2014 9:33 am

Postby tullio » Sat Jan 02, 2016 11:34 am

I'm not sure I'm not wrong, since my skill in latex is very low..., but, With Biblatex, first, the brackets don't appear in the text. For instance, I get Abram2001 in bold instead of (Abram, 2001). But above all, the titles of the sections References and Annex Stuff don't appear in my table of contents (whereas it's the case on Sharelatex ?!?!?) and aren't written according to APA. I was wondering if I wasn't about to copy/paste my Endnote basis into a section of my thesis... argh!!!
What can I do ?

User avatar
Johannes_B
Site Moderator
Posts: 4078
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sat Jan 02, 2016 11:47 am

Learn how to use biblatex!

biblatex for idiots (The second part in Joseph's answer) as well as Cofigure my editor to avoid undefined references.

When it works on WriteLaTeX and Overleaf, but not on your machine, you are doing something different.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

tullio
Posts: 13
Joined: Sun Sep 28, 2014 9:33 am

Postby tullio » Sat Jan 02, 2016 12:00 pm

Sure. Thanks for the link. I'm going to read and learn and will come back here once my file modified. Thanks for your help.


Return to “BibTeX, biblatex and biber”

Who is online

Users browsing this forum: No registered users and 1 guest