.bib 파일에서 하위 디렉토리의 별도 장에 대한 참조를 가져옵니다.

.bib 파일에서 하위 디렉토리의 별도 장에 대한 참조를 가져옵니다.

사실 저는 LaTeX를 처음 접했습니다. 모든 장의 참고문헌을 인쇄하고 싶습니다. 시도했지만 실패했습니다. 내 파일 구조는 다음과 같습니다.

폴더에는 하나의 하위 폴더가 있고 두 개의 파일이 texfiles있습니다. 하나는 기본 파일 이고 다른 파일은 file입니다. chapters.texmain.tex.bibbibliography.bib

하위 폴더 chapters에는 .texchapter01.tex.chapter02.tex

디렉토리에는 다음 texfiles이 포함됩니다.

1.

main.tex:

 \documentclass[a4paper,12pt]{book}
 \usepackage[utf8]{inputenc}
 \usepackage{graphicx}
%\usepackage[sectionbib]{chapterbib}
 \usepackage{biblatex}
 \usepackage[numbers]{natbib}
 \bibliography{bibliography}
 \bibliographystyle{ieeetr}
  \begin{document}
  \author{Author's Name}
  \title{Simple Book Example}
  \date{January 2017}

  \frontmatter
   \maketitle
  \tableofcontents

  \mainmatter
   \include{./chapters/chapter01}
   \include{./chapters/chapter02}

   \backmatter

   \end{document}

2.

bibliography.bib:

 @book{id1,
    author = {author},
    title = {title},
    date = {date},
    publisher={aaaaaaa},
    year={2017}
}

@book{id2,
    author = {author},
    title = {title},
    date = {date},
    publisher={sdddddddds},
    year={2017}
}

하위 디렉터리에는 chapters다음이 포함됩니다.

1.

chapter01.tex:

\chapter{Title of chapter 1}
some text of chapter 1

\section{Title of section}
some text of section of chapter 1

\cite{id1,id2}
\printbibliography

2.

chapter02.tex:

\chapter{Title of chapter 2}
some text of chapter 2

\section{Title of section}
some text of section of chapter 2

\cite{id1,id2}
\printbibliography

Linuxmint OS에서 'Texstudio' 컴파일러를 사용하고 있습니다. 이 일을 할 수 있도록 도와주세요. 미리 감사드립니다.

답변1

옵션을 사용하면 refsegment=chapter원하는 biblatex것을 얻을 수 있습니다.

그럼 당신은 쓸 수 있습니다

\printbibliography[segment=\therefsegment,title=first bib]

옵션은 segment=\therefsegment현재 세그먼트에서 인용된 턱받이 항목에 대해서만 참고 문헌을 제공합니다.

다음 MWE를 참조하십시오.

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{id1,
    author = {author},
    title = {title},
    date = {date},
    publisher={aaaaaaa},
    year={2017}
}

@book{id2,
    author = {author},
    title = {title},
    date = {date},
    publisher={sdddddddds},
    year={2017}
}
\end{filecontents}


\documentclass[a4paper,12pt]{book}

\usepackage[utf8]{inputenc}

\usepackage[%
  refsegment=chapter, % <===============================================
  natbib
]{biblatex}
\addbibresource{\jobname.bib}


\begin{document}

\author{Author's Name}
\title{Simple Book Example}
\date{January 2017}

\frontmatter
\maketitle
\tableofcontents

\mainmatter


\chapter{Title of chapter 1}
some text of chapter 1

\section{Title of section}
some text of section of chapter 1

\cite{id1,id2}
\printbibliography[segment=\therefsegment,title=first bib] % <==========


\chapter{Title of chapter 2}
some text of chapter 2

\cite{id1}
\printbibliography[segment=\therefsegment,title=second bib] % <=========

\backmatter

\end{document}

그리고 두 개의 결과 참고문헌:

최초의 참고문헌

그리고

두 번째 참고문헌

관련 정보