4

I want a document structured as follows:

TOC: Intro Chapter 1 Chapter 2 Outro Bibliography (everything cited until this point) Appendix

Then I want Intro.... all the chapters, the bibliography.

However than I want ANOTHER TOC which is for the Appendix and looks like this:

Appendix TOC List of Appendices A Chapter 2: Same Title as in the main part A.1 Here is a section with some citations
A.2 Included Papers Chapter 3:Another chapter that is the same as in the first part B.1 Some section with new references
Appendix References

The crux is: The appendix has two bibliographies: one that is supposed to only include references until this point (here A.1) and another one that includes all references in the appendix, but not from the current file.

However, so far I have an error: somehow all citations that are below the first appendix bibliography also go into the appendix bibliography.

Maybe it has to do with using Overleaf?

Put differently: My question is how can I have the first appendix bib to be included into the second one, too?

I deep edited the question cause I realised I can do better with a shorter MWE!

\usepackage{appendix}
\usepackage[citestyle=authoryear,natbib=true]{biblatex}
\addbibresource{references.bib}
 
\DeclareFieldFormat{labelnumberwidth}{}

\begin{document}

\tableofcontents

\chapter{Introduction}

\section{A Section }
\begin{refsection}

\bigskip
Blahblahblah \citep{Rogers2003} and \citep{Ewing2017}. 


\phantomsection
\addcontentsline{toc}{chapter}{References}
\renewcommand\bibname{References}

\printbibliography
\end{refsection}

\begin{appendices}

\pagenumbering{roman}
\setcounter{page}{1}

\counterwithin{table}{section}
\counterwithin{figure}{section}
\setcounter{section}{1}

\chapter{Chapter 2: Same Title as in the main part}
 \begin{refsection}
 \section{Here is a section with some citations} 
\cite{Liberman2007} and also \citep{Rogers2003}.
\section{Included Papers} \label{as:p1_ap4_papers}
 \printbibliography[heading=none]
 \end{refsection}

\chapter{Chapter 3: Another chapter that is the same as in the first part}
\section{Some section with new references}
Assume I cite lot of people here, for the example \citep{Ajzen1991} should do it.

\phantomsection
\addcontentsline{toc}{chapter}{Appendix References}
\renewcommand\bibname{Appendix References}
\printbibliography
\end{appendices}
\end{document} 

references.bib

    title = {{Diffusion of innovations}},
    year = {2003},
    author = {Rogers, Everett M.},
    pages = {551},
    publisher = {Free Press},
    isbn = {9780743222099}
} 

@article{Ajzen1991,
    title = {{The theory of planned behavior}},
    year = {1991},
    journal = {Orgnizational Behavior and Human Decision Processes},
    author = {Ajzen, Icek},
    number = {2},
    pages = {179--211},
    volume = {50},
    isbn = {0749597891},
    doi = {10.1016/0749-5978(91)90020-T},
    issn = {07495978},
    pmid = {21388605},
    arxivId = {arXiv:gr-qc/9809069v1},
    archivePrefix = {arXiv},
    eprint = {9809069v1},
    primaryClass = {gr-qc},
    keywords = {anizational}
}

@incollection{Liberman2007,
    title = {{Psychological Distance}},
    year = {2007},
    booktitle = {Social Psychology: Handbook of Basic Principles},
    author = {Liberman, Nira and Trope, Yaacov and Stephan, Elena},
    chapter = {15},
    number = {5},
    pages = {353--381},
    volume = {29},
    publisher = {Guilford Press},
    address = {New York},
    isbn = {1572309180},
    issn = {0162895X}
}


@article{Ewing2017,
    title = {{{\&}quot;Does Compact Development Make People Drive Less?{\&}quot; The Answer Is Yes}},
    year = {2017},
    journal = {Journal of the American Planning Association},
    author = {Ewing, Reid and Cervero, Robert},
    number = {1},
    pages = {19--25},
    volume = {83},
    url = {https://www.tandfonline.com/action/journalInformation?journalCode=rjpa20},
    doi = {10.1080/01944363.2016.1245112}
}

The obvious solution is to '''nocite''' everything that is in the first appendix bibliography. Yes, I do that currently, but I do not really like that "workaround".

Edit: I new tried the following in order to get 3 bibliographies (one of sec 1, one of sec 2, and one combining sec 2 and 3 but not sec 1). I am here and I cannot go on to combine the latter 2 bibliographies

\documentclass{article}

\usepackage[style=authoryear-comp]{biblatex}
\addbibresource{references.bib}

\begin{document} 
\tableofcontents
\section{Sec 1}
\begin{refsegment}
  \cite{Ajzen1991}
  \printbibliography[segment=1, title={First bib}, heading=subbibintoc]
\end{refsegment}

\section{Sec 2}
\begin{refsegment}
  \cite{Rogers2003}
\end{refsegment}

  \printbibliography[segment=2, title={First bib}, heading=subbibintoc]


\section{Sec 3}
\begin{refsegment}
  \cite{Liberman2007}
\end{refsegment}
  \printbibliography[segment=3, title={First bib}, heading=subbibintoc]
%HERE I Actually would love to have section 2 and 3 (not all sections)


\end{document} 
5
  • I included one reference that I do not use because I wanted to use it in the MWE to show that there are main references that are not in the appendix! Apr 13, 2021 at 10:17
  • Use {refsegment} instead of {refsection} + \printbibliography[segment=...] for the subparts. Then the main bibliography will contain everything.
    – Alan Munn
    Apr 13, 2021 at 18:51
  • I am completely unable to do it this way, how can I print bibliography for 2 sections at once? I somewhat fail to be able to name the sections. Apr 15, 2021 at 10:45
  • Since your question has been closed, you need to edit it to show what you have tried and we can reopen it if necessary. But here's what will make your document work: \begin{refsegment} ... \end{refsegment} around chapter 1 then \printbibliography[segment=1,title=References]; same thing around chapter 2 and then \printbibliography[segment=2,title=References] etc. Then at the end just use \printbibliography and all references will be printed.
    – Alan Munn
    Apr 15, 2021 at 14:13
  • Dear @AlanMunn I edited it accordingly to detail my problem. I do not wanna print all references, but 2/3 together . Apr 16, 2021 at 7:52

1 Answer 1

4

You can solve your problem by using a mixture of refsection and refsegment which are allowed to be nested. So the basic structure is the following:

\begin{refsegment}
Chapter 1
\end{refsegment}
\printbibliography[segment=1]
\begin{refsection}
\begin{refsegment}
Chapter 2
\end{refsegment}
\printbibliography[segment=2]
Chapter 3
\end{refsection}
\printbibliography[section=1]

Here I've enclosed Chapter 2 and 3 in their own refsection, but Chapter 2 also contains its own refsegment so that it can have an individual bibliography. We can then print the combined references of chapters 2 and 3 using the refsection.

Here's your full document:

\documentclass{book}
\begin{filecontents}[overwrite]{\jobname.bib}
@book{Rogers2003,
    title = {{Diffusion of innovations}},
    year = {2003},
    author = {Rogers, Everett M.},
    pages = {551},
    publisher = {Free Press},
    isbn = {9780743222099}
} 

@article{Ajzen1991,
    title = {{The theory of planned behavior}},
    year = {1991},
    journal = {Orgnizational Behavior and Human Decision Processes},
    author = {Ajzen, Icek},
    number = {2},
    pages = {179--211},
    volume = {50},
    isbn = {0749597891},
    doi = {10.1016/0749-5978(91)90020-T},
    issn = {07495978},
    pmid = {21388605},
    arxivId = {arXiv:gr-qc/9809069v1},
    archivePrefix = {arXiv},
    eprint = {9809069v1},
    primaryClass = {gr-qc},
    keywords = {anizational}
}

@incollection{Liberman2007,
    title = {{Psychological Distance}},
    year = {2007},
    booktitle = {Social Psychology: Handbook of Basic Principles},
    author = {Liberman, Nira and Trope, Yaacov and Stephan, Elena},
    chapter = {15},
    number = {5},
    pages = {353--381},
    volume = {29},
    publisher = {Guilford Press},
    address = {New York},
    isbn = {1572309180},
    issn = {0162895X}
}


@article{Ewing2017,
    title = {{{\&}quot;Does Compact Development Make People Drive Less?{\&}quot; The Answer Is Yes}},
    year = {2017},
    journal = {Journal of the American Planning Association},
    author = {Ewing, Reid and Cervero, Robert},
    number = {1},
    pages = {19--25},
    volume = {83},
    url = {https://www.tandfonline.com/action/journalInformation?journalCode=rjpa20},
    doi = {10.1080/01944363.2016.1245112}
}

\end{filecontents}
\usepackage{appendix}
\usepackage[citestyle=authoryear,natbib=true]{biblatex}
\addbibresource{\jobname.bib}
 
\DeclareFieldFormat{labelnumberwidth}{}

\begin{document}

\tableofcontents
\begin{refsegment}
\chapter{Introduction}

\section{A Section }


\bigskip
Blahblahblah \citep{Rogers2003} and \citep{Ewing2017}. 


\phantomsection
\addcontentsline{toc}{chapter}{References}
\end{refsegment}
\printbibliography[segment=1,title=References]


\begin{appendices}
\pagenumbering{roman}
\setcounter{page}{1}

\counterwithin{table}{section}
\counterwithin{figure}{section}
\setcounter{section}{1}
\begin{refsection}
\chapter{Chapter 2: Same Title as in the main part}
 \begin{refsegment}
 \section{Here is a section with some citations} 
\cite{Liberman2007} and also \citep{Rogers2003}.
\section{Included Papers} \label{as:p1_ap4_papers}
 \end{refsegment}
 \printbibliography[heading=none,segment=2]

\begin{refsegment}
\chapter{Chapter 3: Another chapter that is the same as in the first part}
\section{Some section with new references}
Assume I cite lot of people here, for the example \citep{Ajzen1991} should do it.
\end{refsegment}
\end{refsection}
\phantomsection
\addcontentsline{toc}{chapter}{Appendix References}
\printbibliography[section=1,title={Appendix References}]
\end{appendices}
\end{document} 
1
  • this is amazing and exactly what I needed. Thank you so much! Apr 16, 2021 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.