> 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/texlive/ko/skills/latex.md).

# LaTeX 의존성 추가하기

만약 가지고 있다면 `.cls`, `.sty`, `.bst` 프로젝트에 이러한 파일이 있다면, Overleaf의 컴파일 과정은 이 파일들이 최상위 수준에 배치되어 있지 않으면 이를 찾을 수 없습니다.

하지만 프로젝트를 정리하기 위해, 이러한 파일들을 폴더에 넣어 더 쉽게 찾을 수 있게 하고 프로젝트 최상위가 지저분해지지 않도록 하고 싶을 수 있습니다.

좋은 소식은 사용자 지정 `TEXINPUTS` 디렉터리를 다음을 사용하여 `latexmkrc` 파일을 사용하면 Overleaf가 해당 디렉터리에서 패키지 파일을 검색해야 한다는 것을 알 수 있습니다.

이를 위해, 패키지 파일을 다음이라고 하는 폴더에 넣었다고 가정해 봅시다. `tex/`; 그리고 각각 참고문헌 스타일 파일은 다음이라고 하는 폴더에 `bst/`:

1. 프로젝트 사이드바 상단에서 “파일 추가”를 클릭하세요.
2. “빈 파일”을 선택하고, 파일 이름을 다음으로 저장하세요 `latexmkrc` (이미 없는 경우).
3. 다음 줄을 `latexmkrc`:

   ```perl
   $ENV{'TEXINPUTS'}='./tex//:' . $ENV{'TEXINPUTS'}; 
   $ENV{'BSTINPUTS'}='./bst//:' . $ENV{'BSTINPUTS'};
   ```

   (또는 프로젝트의 관련 폴더 이름으로 변경하세요)

이제 Overleaf는 `tex/` 시스템을 검색하기 전에 먼저 폴더를 `TEXINPUTS` 패키지 파일을 찾기 위해 검색하고, `bst/` 시스템을 검색하기 전에 먼저 폴더를 `BSTINPUTS` 참고문헌 스타일 파일을 찾기 위해.

(출처: <https://tex.stackexchange.com/a/50847>)

{% hint style="info" %}
메인 문서 파일과 당신의 `latexmkrc` 파일은 폴더 안이 아니라 프로젝트의 최상위 수준에 있어야 합니다.
{% endhint %}


---

# 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/texlive/ko/skills/latex.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.
