我如何重复我的 BibLaTex 书目?

我如何重复我的 BibLaTex 书目?

我想要一份结构如下的文档:

目录:简介 第 1 章 第 2 章 结尾 参考书目(至此为止引用的所有内容) 附录

然后我想要简介...所有章节,参考书目。

然而我想要另一个目录,它是附录,看起来像这样:

附录目录附录列表 A 第 2 章:标题与正文相同 A.1 此节包含一些引文
A.2 包含的论文第 3 章:与第一部分相同的另一章 B.1 一些包含新参考资料的节
附录参考资料

关键是:附录有两个参考书目:一个应该只包括到此处的参考文献(此处为 A.1),另一个包括附录中的所有参考文献,但不包括当前文件中的所有参考文献。

然而,到目前为止,我有一个错误:不知何故,所有的引用都是以下第一个附录参考书目也进入附录参考书目。

也许这与使用有关背面?

换句话说:我的问题是如何将第一个附录围兜也包含在第二个附录围兜中?

我对这个问题进行了深入的编辑,因为我意识到使用更短的 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} 

参考文献.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}
}

显而易见的解决方案是“引用”第一个附录参考书目中的所有内容。是的,我目前就是这么做的,但我不太喜欢这种“解决方法”。

编辑:我尝试了以下方法,以获得 3 个参考书目(一个是第 1 节,一个是第 2 节,还有一个结合了第 2 节和第 3 节但不包括第 1 节)。我现在无法继续合并后两个参考书目

\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} 

答案1

refsection您可以通过使用允许嵌套的和的混合来解决问题refsegment。 因此,基本结构如下:

\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]

这里我将第 2 章和第 3 章单独放在了 中refsection,但第 2 章也包含自己的内容,refsegment因此可以有单独的参考书目。然后,我们可以使用 打印第 2 章和第 3 章的综合参考资料refsection

这是您的完整文档:

\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} 

相关内容