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

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
tullio
Posts: 13
Joined: Sun Sep 28, 2014 9:33 am

How to make two bibliographies with apacite package ?

Postby tullio » Wed Dec 30, 2015 11:30 pm

Hi! I'm trying to solve a big problem which is the following: I have to make a bibliography with apacite package and need to have two separate bibliographies : one is for the references cited in the text, the other one is for the whole list of the books I read. But I don't really know how to do it. This is a MWE :

  1. \documentclass[12pt,a4paper,twoside=semi,footinclude=true,headinclude=true]{scrbook}
  2. \usepackage[numberedbib,nosectionbib]{apacite}
  3. \begin{document}
  4. ...
  5. \bibnewpage
  6. {\raggedright
  7. \bibliographystyle{apacite}
  8. \bibliography{mabiblio}}
  9. \end{document}


Thanks for your help!

Tags:

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

Postby Johannes_B » Thu Dec 31, 2015 8:27 am

Crosspost

Using package multibib:
  1. \begin{filecontents}{domiMain.bib}
  2. @article{cc,
  3. author= {Crazy Capybara},
  4. year= {2015},
  5. }
  6. \end{filecontents}
  7. \begin{filecontents}{domiAnnex.bib}
  8. @article{bb,
  9. author= {Busy Bee},
  10. year= {2015},
  11. }
  12. \end{filecontents}
  13. \documentclass{article}
  14. \usepackage{apacite}
  15. \usepackage{multibib}
  16. \newcites{annex}{Annex Stuff}
  17. \bibliographystyle{apa}
  18. \begin{document}
  19. \section{usual stuff}
  20. \nocite{*}
  21. \bibliography{domiMain}
  22. \appendix
  23. \section{other stuff}
  24. \nociteannex{*}
  25. \bibliographystyleannex{apa}
  26. \bibliographyannex{domiAnnex}
  27. \end{document}
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 » Thu Dec 31, 2015 6:25 pm

I've just try to follow your indications, but I failed. My annex bib file isn't recognized as you can see it in this new MWE :

  1. \documentclass[12pt]{article}
  2. \usepackage{fontspec}
  3. \usepackage[frenchb]{babel}
  4. \usepackage[numberedbib,nosectionbib]{apacite}
  5. \usepackage{multibib}
  6. \newcites{annex}{Références complémentaires}
  7. \begin{document}
  8. \section{Partie argumentative}
  9.  
  10.  
  11. \cite{Abram2001}
  12.  
  13.  
  14.  
  15.  
  16. \section{Conclusion générale}
  17. \nocite{*}
  18. \bibliographystyle{apacite}
  19. \bibliography{domiMain}
  20.  
  21. \appendix
  22. \section{Références complémentaires}
  23.  
  24. \nociteannex{}
  25. \bibliographystyleannex{apacite}
  26. \bibliographyannex{domiAnnex}
  27. \end{document}

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

Postby Johannes_B » Thu Dec 31, 2015 6:38 pm

What you posted is not an MWE, becausse the databases are missing. If you are using the databases that were generated by my MWE, the cite keys obviously don't match. The case of the appendix does not have an asterisk in the argument of nocite, so will fail as well.

Please test the example as posted above and show us the log file.
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 » Thu Dec 31, 2015 7:38 pm

Here is the log file :

  1. This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=pdflatex 2015.12.24) 31 DEC 2015 18:31
  2. entering extended mode
  3. restricted \write18 enabled.
  4. file:line:error style messages enabled.
  5. %&-line parsing enabled.
  6. **Essai.tex
  7. (./Essai.tex
  8. LaTeX2e <2015/01/01>
  9. Babel <3.9l> and hyphenation patterns for 79 languages loaded.
  10. (/usr/local/texlive/2015/texmf-dist/tex/latex/base/article.cls
  11. Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
  12. (/usr/local/texlive/2015/texmf-dist/tex/latex/base/size10.clo
  13. File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
  14. )
  15. \c@part=\count79
  16. \c@section=\count80
  17. \c@subsection=\count81
  18. \c@subsubsection=\count82
  19. \c@paragraph=\count83
  20. \c@subparagraph=\count84
  21. \c@figure=\count85
  22. \c@table=\count86
  23. \abovecaptionskip=\skip41
  24. \belowcaptionskip=\skip42
  25. \bibindent=\dimen102
  26. )
  27. (/usr/local/texlive/2015/texmf-dist/tex/latex/apacite/apacite.sty
  28. Package: apacite 2013/07/21 v6.03 APA citation
  29. \c@BibCnt=\count87
  30. \bibleftmargin=\skip43
  31. \bibindent=\skip44
  32. \bibparsep=\skip45
  33. \bibitemsep=\skip46
  34. \biblabelsep=\skip47
  35. )
  36. (/usr/local/texlive/2015/texmf-dist/tex/latex/multibib/multibib.sty
  37. Package: multibib 2008/12/10 v1.4 Multiple bibliographies for one document.
  38. \mb@biblabelwidth=\count88
  39. )
  40. \@auxoutannex=\write3
  41.  
  42. (./annex.aux)
  43. \openout3 = `annex.aux'.
  44.  
  45. (./Essai.aux)
  46. \openout1 = `Essai.aux'.
  47.  
  48. LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 6.
  49. LaTeX Font Info: ... okay on input line 6.
  50. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 6.
  51. LaTeX Font Info: ... okay on input line 6.
  52. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 6.
  53. LaTeX Font Info: ... okay on input line 6.
  54. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 6.
  55. LaTeX Font Info: ... okay on input line 6.
  56. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 6.
  57. LaTeX Font Info: ... okay on input line 6.
  58. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 6.
  59. LaTeX Font Info: ... okay on input line 6.
  60. \c@maskedRefs=\count89
  61.  
  62. (/usr/local/texlive/2015/texmf-dist/tex/latex/apacite/english.apc
  63. File: english.apc 2013/07/21 v6.03 apacite language file
  64. LaTeX Info: Redefining \BPBI on input line 129.
  65. LaTeX Info: Redefining \BHBI on input line 130.
  66. ) (./Essai.bbl
  67. Missing character: There is no à in font cmr10!
  68. Missing character: There is no ‰ in font cmr10!
  69. )
  70. No file annex.bbl.
  71. [1
  72.  
  73. {/usr/local/texlive/2015/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
  74. (./Essai.aux) )
  75. Here is how much of TeX's memory you used:
  76. 755 strings out of 493089
  77. 9440 string characters out of 6134841
  78. 66809 words of memory out of 5000000
  79. 4304 multiletter control sequences out of 15000+600000
  80. 4591 words of font info for 17 fonts, out of 8000000 for 9000
  81. 1141 hyphenation exceptions out of 8191
  82. 23i,4n,20p,139b,148s stack positions out of 5000i,500n,10000p,200000b,80000s
  83. </usr/local/texlive/2015/texmf-dist/fonts/type1/public/amsfonts/
  84. cm/cmbx12.pfb></usr/local/texlive/2015/texmf-dist/fonts/type1/public/amsfonts/c
  85. m/cmr10.pfb></usr/local/texlive/2015/texmf-dist/fonts/type1/public/amsfonts/cm/
  86. cmti10.pfb>
  87. Output written on Essai.pdf (1 page, 37386 bytes).
  88. PDF statistics:
  89. 20 PDF objects out of 1000 (max. 8388607)
  90. 13 compressed objects within 1 object stream
  91. 0 named destinations out of 1000 (max. 500000)
  92. 1 words of extra memory for PDF output out of 10000 (max. 10000000)
  93.  
  94.  

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

Postby Johannes_B » Fri Jan 01, 2016 3:31 am

Sorry, i missed an s. We also need to see the log file (blg) of the BibTeX runs.
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:51 am

Good morning and happy new year!
Please, what do you mean by "missed an s" ?
This is the blg file :

  1. This is BibTeX, Version 0.99d (TeX Live 2015)
  2. Capacity: max_strings=35307, hash_size=35307, hash_prime=30011
  3. The top-level auxiliary file: Essai.aux
  4. The style file: apa.bst
  5. Database file #1: domiMain.bib
  6. You've used 1 entry,
  7. 1940 wiz_defined-function locations,
  8. 480 strings with 3825 characters,
  9. and the built_in function-call counts, 299 in all, are:
  10. = -- 26
  11. > -- 7
  12. < -- 1
  13. + -- 2
  14. - -- 2
  15. * -- 20
  16. := -- 59
  17. add.period$ -- 3
  18. call.type$ -- 1
  19. change.case$ -- 5
  20. chr.to.int$ -- 1
  21. cite$ -- 1
  22. duplicate$ -- 14
  23. empty$ -- 24
  24. format.name$ -- 3
  25. if$ -- 56
  26. int.to.chr$ -- 1
  27. int.to.str$ -- 0
  28. missing$ -- 2
  29. newline$ -- 8
  30. num.names$ -- 3
  31. pop$ -- 7
  32. preamble$ -- 1
  33. purify$ -- 6
  34. quote$ -- 0
  35. skip$ -- 11
  36. stack$ -- 0
  37. substring$ -- 12
  38. swap$ -- 2
  39. text.length$ -- 0
  40. text.prefix$ -- 0
  41. top$ -- 0
  42. type$ -- 4
  43. warning$ -- 0
  44. while$ -- 2
  45. width$ -- 0
  46. write$ -- 15

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

Postby Johannes_B » Fri Jan 01, 2016 12:17 pm

You also have to run BibTeX over annex.aux, which is generated by mulitbib. This is explicitely explained in the manual.
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 12:35 pm

OK. It works! Thanks so much for your help! Do you think it can work with Xelatex too since I use this latter to compile my classic thesis ? I'm going to try it and tell.

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

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

I took time to understand what did not work finally and it seems that I have got two problems.
First, I cannot use the \cite{} command when it's about to mention an author and a book in the body of the text. For instance, if I write something like : "comme l'a écrit \cite{Abram2001}...", I obtain the following result : "comme l'a écrit (Abram2001, Abram2001)...".
Second, my main bibliography does not contain only the references cited in the text: it contains also the entire file of my references. Thanks for your help.


Return to “BibTeX, biblatex and biber”

Who is online

Users browsing this forum: No registered users and 5 guests