> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/ko/questions-and-answers/07-creating-multiple-bibliographies-in-the-same-document.md).

# 같은 문서에서 여러 참고문헌 작성하기

## 소개

이 글에서는 적절한 패키지를 사용해 동일한 LaTeX 문서 안에서 여러 개의 참고문헌 목록을 만드는 방법을 설명합니다. 기본적으로 각 LaTeX 문서는 참고문헌 목록이나 인용 목록을 하나만 포함할 수 있으며, 다음 중 하나를 사용합니다. `\begin{thebibliography}\bibitem...\end{thebibliography}` 목록을 사용하거나 `\bibligraphystyle{...}\bibliography{...}`, 또는 `\printbibliography`. 하지만 다음과 같이 여러 개의 참고문헌 목록을 만들어야 하는 상황이 있습니다. *여러 개의 참고문헌 목록*. 문서 전체가 아니라 각 장마다 별도의 참고문헌 목록을 두고 싶을 수도 있습니다. 또는 서로 다른 범주와 주제별로 별도의 참고문헌 목록을 두고 싶을 수도 있습니다.

이런 상황을 처리하려고 LaTeX 문서의 서로 다른 위치에 여러 `\bibliography` 호출을 넣으면, 모두 같은 항목 목록을 포함하고 있으며, *모든* 인용을 문서 전체에서 포괄한다는 것을 알게 될 것입니다. 대신 적절한 LaTeX 패키지를 사용해 별도의 참고문헌 목록을 올바르게 생성해야 합니다.

먼저 사용 중인 것이 [BibTeX](/latex/ko/references-and-citations/01-bibliography-management-with-bibtex.md) 또는 [biblatex](/latex/ko/references-and-citations/03-bibliography-management-with-biblatex.md):인지 확인해야 합니다. 이 둘은 섞을 수 없는 서로 다른 패키지를 필요로 합니다. 출판사나 대학에서 제공한 템플릿을 사용 중이라면, 샘플 템플릿 `.tex` 파일에 `\printbibliography` 또는 `\addbibresource`가 포함되어 있는지 확인하세요. 그렇다면 `biblatex`을 사용 중이므로, 다음 섹션 [여기](#with-biblatex)로 이동하세요. 그렇지 않다면, 대부분 BibTeX를 사용 중인 것이므로 계속 읽어보세요. [여기](#packages-for-bibtex).

## BibTeX용 패키지

### chapterbib 패키지

책/논문의 각 장 끝에 참고문헌 목록을 두기만 하면 된다면, `chapterbib` 패키지만으로 충분할 수 있습니다.

1. *각 장은 각자 `.tex` 파일에 있어야 합니다.* 다음을 작성하세요

   ```latex
   \bibliographystyle{...}
   \bibliography{...}
   ```

   를 각 `.tex` 파일의 각 장 끝에 넣으세요. 장마다 서로 다른 `.bib` 파일을 지정할 수 있습니다. `\bibliography`.
2. "메인 문서" `.tex` 파일에서는 `chapterbib` 패키지를 불러오세요.  `sectionbib` 패키지 옵션은 실제 장 다음에 각 장의 참고문헌을 번호 없는 장이 아니라 번호 없는 섹션으로 표시하고 싶을 때 유용합니다.

   ```latex
   \usepackage[sectionbib]{chapterbib}
   ```
3. 사용 `\include` 를 메인 문서 파일에서 사용해 각 장 `.tex` 파일을 불러오세요. *`\input` 는 **작동하지** 않습니다. `chapterbib` 를 사용해 장별 참고문헌을 생성할 수 없습니다!*
4. 로컬 컴퓨터에서 컴파일하는 경우: 메인 문서를 컴파일하면 `.tex` 개의 `.aux` 파일이 생성되며, 포함한 각 장마다 하나씩 만들어집니다. `.tex` 이제 `bibtex` 를 이 모든 `.aux` 파일에 대해 실행한 다음, 메인 문서 `.tex` 파일을 다시 컴파일해야 합니다. [Overleaf의 빌드 도구인 `latexmk`,](/latex/ko/knowledge-base/064-how-does-overleaf-compile-my-project.md) 가 이 모든 처리 단계를 자동으로 처리하므로, 해야 할 일은 **"Recompile"** 버튼을 한 번 클릭하는 것뿐입니다.

다음 사항에 유의하세요. *절대* 다음과 같이 작성하면 안 됩니다 `\bibliobraphy{...}` 메인 문서 `.tex` 파일에서 `chapterbib`를 사용할 때입니다. 그렇지 않으면 *"Illegal; another \bibdata command"*&#xC640; 관련된 BibTeX 오류 메시지가 많이 나올 수 있습니다. 또한 문서 전체의 모든 인용을 모은 "전역" 참고문헌도 필요하다면, `bibunits` 패키지가 더 나은 선택일 수 있습니다.

[Overleaf에서 예제 열기](https://www.overleaf.com/project/new/template/5694?id=8827885\&mainFile=main.tex\&templateName=Per-chapter+bibliographies+with+chapterbib)

### bibunits 패키지

다음 `bibunits` 패키지도 장별 참고문헌을 만드는 데 사용할 수 있으며, 각 장을 별도의 `.tex` 파일을 불러오세요.

1. 다음과 같이 작성하는 것으로 시작하세요 `\usepackage[sectionbib]{bibunits}` 메인 문서 `.tex`의 프리앰블에.
2. 문서 전체의 모든 인용에 같은 `.bib` 파일과 참고문헌 스타일을 사용하려면 `\defaultbibliographystyle{...}` 및 `\defaultbibliography{...}` 명령을 불러온 뒤 사용하세요. `bibunits`예를 들면:

   ```latex
   \defaultbibliographystyle{unsrt}
   \defaultbibliography{references} % 확장자를 제외한 .bib 파일 이름
   ```
3. 다음을 추가하세요 `\bibliographyunit[\chapter]` 뒤에 `\begin{document}`.
4. 각 장의 끝에 `\putbib`를 추가하세요. 그러면 마지막 `\cite` 이후에 발생한 모든 `\chapter`의 인용에 대한 참고문헌이 출력됩니다. (나중에 문서의 어느 지점에서든 인자를 주지 않은 `\bibliographyunit` 를 작성해 장의 자동 `bibunit`처리를 끌 수 있습니다.)
5. 로컬 컴퓨터에서 컴파일하는 경우: 메인 문서를 컴파일하면 `.tex` 개의 `.aux` 파일이 생성되며, 포함한 각 장마다 하나씩 만들어집니다. `.tex` 이제 `bibtex` 를 이 모든 `.aux` 파일에 대해 실행한 다음, 메인 문서 `.tex` 파일을 다시 컴파일해야 합니다. [Overleaf의 빌드 도구인 `latexmk`,](/latex/ko/knowledge-base/064-how-does-overleaf-compile-my-project.md) 가 이 모든 처리 단계를 자동으로 처리하므로, 해야 할 일은 **"Recompile"** 버튼을 한 번 클릭하는 것뿐입니다.

[Overleaf에서 예제 열기](https://www.overleaf.com/project/new/template/5695?id=8828133\&mainFile=main.tex\&templateName=Per-chapter+bibliographies+with+bibunits)

몇 가지 추가 팁:

* 다른 `.bib` 파일을 각 장/단위마다 사용 중이라면, 이를 `\putbib`의 선택적 인자로 지정할 수 있습니다. 예: `\putbib[chap1refs]`—참고,  `.bib` 확장자는 없습니다.
* 문서를 임의의 "참고문헌 단위"로 나누어야 한다면(즉,  `\chapter` 또는 다른 섹션 제목 명령에 제한되지 않은) 자체 포함형 인용과 참고문헌을 사용하려면, `bibunit` 환경을 사용할 수 있으며, 그 안에 `\putbib` 를 넣습니다:

  ```latex
  \begin{bibunit}
  ...\cite{smith2012} and \cite{wilkins2008}...
  \putbib
  \end{bibunit}
  ```

  특정 `bibunit` 즉, `\defaultbibliographystyle{...}` 와는 다른 스타일이 필요하다면, 이를 `bibunit`: `\begin{bibunit}**[plain]**`
* 또한 모든 장 또는 bibunit의 모든 인용을 포함하는 "전역" 참고문헌도 필요하다면, `globalcitecopy` 옵션을 `bibunits` 패키지를 불러올 때 추가하세요: `\usepackage[sectionbib,**globalcitecopy**]{bibunits}`

### multibib 패키지

때때로 서로 다른 범주별로 별도의 참고문헌 목록이 필요할 수 있습니다. 이를 달성하는 한 가지 방법은 `multibib` 패키지를 사용하는 것입니다. 예를 들어 화학 관련 참고문헌 목록 하나와 물리학 관련 참고문헌 목록 하나를 만들려면 다음과 같은 단계가 필요합니다:

1. 패키지를 불러오고 `multibib` 를 사용해 `\newcites` "`수학`" 및 "`물리`" 참고문헌 유형을 만드세요. 이들은 참고문헌 제목으로 "수학 읽을거리"와 "물리학 읽을거리"를 갖게 됩니다.

   ```latex
   \usepackage[resetlabels,labeled]{multibib}

   \newcites{Math}{수학 읽을거리}
   \newcites{Phys}{물리학 읽을거리}
   ```

   같은 `\newcites{}` 명령에서 쉼표로 구분한 값을 사용해 여러 참고문헌 유형을 만들 수 있습니다. 다만 참고문헌 제목 수도 올바른 개수만큼 지정했는지 확인하세요:

   ```latex
   \newcites{Math,Phys}{수학 읽을거리,물리학 읽을거리}
   ```
2. 각 새 참고문헌 `X`에 대해 이제 새 명령 `\citeX`, `\bibliographystyleX`, `\bibliographyX`를 사용할 수 있습니다. 따라서 이제 기본

   * `\citeMath`, `\bibliographystyleMath`, `\bibliographyMath`
   * `\citePhys`, `\bibliographystylePhys`, `\bibliographyPhys`

   외에도 `\cite`, `\bibliographystyle`, `\bibliography`

   이제 `\bibliographystyle`, `\bibliographystyleMath`, `\bibliographystylePhys` 를 사용해 각 참고문헌의 스타일을 지정할 수 있으며, 각 `.bib` 에 대한 파일을 지정하세요. (참고문헌 스타일은 보통 모든 참고문헌에서 일관되지만, 서로 다른 `\bibliography`, `\bibliographyMath`, `\bibliographyPhys`파일을 사용할 수도 있습니다.) `.bib` 파일)

   ```latex
   \cite{paper1}과 \cite{paper2}는
   \citeMath{paper3}보다 늦게 출판되었습니다. 또한 \citePhys{paper4}도 보세요.

   \bibliographystyle{unsrt}
   \bibliography{references}

   \bibliographystyleMath{unsrt}
   \bibliographyMath{refs-etc}

   \bibliographystylePhys{unsrt}
   \bibliographyPhys{refs-etc}
   ```

   이 예제에서는 `paper1` 및 `paper2` 는 `references.bib` 에 정의되어 있으며 기본 참고문헌 목록에 나열됩니다. `paper3` "수학 읽을거리" 참고문헌에 나열됩니다. `paper4` "물리학 읽을거리" 참고문헌에 나열되며, 둘 다 `paper3` 및 `paper4` 는 `refs-etc.bib` 파일에 있습니다.
3. 로컬 컴퓨터에서 컴파일하는 경우: 메인 문서를 컴파일하면 `.tex` 개의 `.aux` 파일입니다. 이제 `bibtex` 를 이 모든 `.aux` 파일에 대해 실행한 다음, 메인 문서 `.tex` 파일을 다시 실행해야 합니다. Overleaf에서는 **다시 컴파일** 버튼만 클릭하면 이러한 단계들을 모두 자동으로 처리합니다.

[Overleaf에서 예제 열기](https://www.overleaf.com/project/new/template/18645?id=3104751\&latexEngine=pdflatex\&mainFile=main.tex\&templateName=Multiple+Bibliographies+with+multibib)

## biblatex 사용 시

biblatex 패키지를 사용 중이라면 **불러오면 안 됩니다** 이전 섹션에서 언급한 패키지들을 포함합니다. 여기에는 `natbib`, `chapterbib`, `bibunits`, `multibib`.

### 장별 참고문헌

다음 `biblatex` 패키지에는 `refsection` "`bibunit`".

1. 를 시작하도록 자동화할 수 있습니다 `biblatex` 새 `refsection` 을 만날 때 `\chapter`하도록, 다음 옵션을 추가해 **`refsection=chapter`** 를 불러올 때 `biblatex`:

   ```latex
   \usepackage[natbib,style=authoryear,refsection=chapter]{biblatex}
   \addbibresource{refs.bib}
   ```
2. 그런 다음 `\printbibliography` 를 각 `\chapter`뒤에 넣어, 마지막 `\chapter`. 아래 코드 예제에서는 또한 `heading=subbibintoc` 옵션을 `\printbibliography`에 사용하여, 참고문헌이 장 끝에서 번호 없는 섹션(`subbib`)으로 출력되도록 하고, 번호 없는 장이 되지 않게 하며; 또한 목차에 포함되도록 합니다(`intoc`).

   ```latex
   \chapter{First Chapter}

   \section{Section Heading}
   인용이 하나 있습니다! \citep{latex:companion}
   \printbibliography[heading=subbibintoc]


   \chapter{Second Chapter}

   \section{Section Heading}
   또 다른 인용이 있습니다! \citep{lshort}
   \printbibliography[heading=subbibintoc]
   ```
3. 또는 `\begin{refsection}...\end{refsection}` 를 각 장 주위나 임의의 텍스트 블록 주위에 둘 수 있습니다. 이 경우 `refsection=chapter` 옵션은 사용하지 마세요:

   ```latex
   \usepackage[natbib,style=authoryear]{biblatex}
   \addbibresource{refs.bib}
   ...
   \begin{refsection}
   \chapter{First Chapter}
   \section{Section Heading}
   인용이 하나 있습니다! \citep{latex:companion}
   \printbibliography[heading=subbibintoc]
   \end{refsection}

   \begin{refsection}
   \chapter{Second Chapter}
   \section{Section Heading}
   또 다른 인용이 있습니다! \citep{lshort}
   \printbibliography[heading=subbibintoc]
   \end{refsection}

   %% 이 접근법으로 출판물 목록을 만들 수 있습니다
   \begin{refsection}
   \nocite{paper1,paper2}
   %% 여기서는 번호 없는 장이 필요하지만 다른 제목을 사용합니다
   \printbibliography[title={출판물 목록}]
   \end{refsection}
   ```

[Overleaf에서 예제 열기.](https://www.overleaf.com/docs?snip_uri=https://assets.ctfassets.net/nrgyaltdicpt/3mfINcJWZRlegHyXND3SEQ/7843cab4a5d022161a43bea6662bc00b/biblatex-perchapter.zip) 이 예제에서는 `main.tex` 은 `[refsection=chapter]` 패키지 옵션을 사용하며, 반면 `alt.tex` 은 수동으로 삽입한 `refsection` 환경을 사용합니다.

### 서로 다른 범주의 참고문헌

키워드나 범주를 사용하여 서로 다른 주제를 바탕으로 별도의 참고문헌 목록을 만들 수 있습니다.

#### 키워드 사용

1. 이 방법에서는 **`keywords`** 필드를 `.bib` 의 참고 항목에 추가해야 합니다. 예:

   ```bibtex
   @article{paper4,
     title={High energy colliders as black hole factories...},
     ...
     keywords={phys}
   }
   ```
2. 참고문헌을 평소처럼 인용하세요.
3. 그런 다음 여러 `\printbibliography` 명령을 실행하면서 포함할 `키워드` 를 지정하세요. 각 `제목`에 대해 서로 다른 `\printbibliography` 명령:

   ```latex
   % 기본 "메인" 참고문헌
   \printbibliography[notkeyword={math},notkeyword={phys}]

   % 수학 참고문헌
   \printbibliography[keyword={math},title={수학 읽을거리}]

   % 물리학 참고문헌
   \printbibliography[keyword={phys},title={물리학 읽을거리}]
   ```

[Overleaf에서 예제 열기](https://www.overleaf.com/docs?snip_uri=https://assets.ctfassets.net/nrgyaltdicpt/3Bt5Tf9eSCtcXQrGshjQJT/7c64c3820a4adc4e20468aee752dc1e9/biblatex-keywords.zip)

#### 범주 사용

1. 이 방법에서는 `.bib` 파일에 추가 필드를 넣을 필요가 없습니다. 대신 범주 유형을 선언하고 각 범주에 참고문헌을 추가합니다. 이는 `.tex` 파일의 프리앰블에서 수행합니다:

   ```latex
   \addbibresource{refs-nokeywords.bib}
   \DeclareBibliographyCategory{math}
   \DeclareBibliographyCategory{phys}
   \addtocategory{math}{paper3}
   \addtocategory{phys}{paper4}
   ```
2. 참고문헌을 평소처럼 인용하세요.
3. 그런 다음 여러 `\printbibliography` 명령은 각각 출력할 `범주` 를 지정합니다.

   ```latex
   % 기본 "메인" 참고문헌
   \printbibliography[notcategory={math},notcategory={phys}]

   % 수학 참고문헌
   \printbibliography[category={math},title={수학 읽을거리}]

   % 물리학 참고문헌
   \printbibliography[category={phys},title={물리학 읽을거리}]
   ```

[Overleaf에서 예제 열기](https://www.overleaf.com/docs?snip_uri=https://assets.ctfassets.net/nrgyaltdicpt/6l5HYYfby0AscSXwLsWKPM/71b6fb3e848f473fc9d2735847af7ec1/biblatex-categories.zip)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/ko/questions-and-answers/07-creating-multiple-bibliographies-in-the-same-document.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
