> 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/in-depth-articles/28-how-to-use-latexmkrc-with-overleaf.md).

# Overleaf에서 latexmkrc를 사용하는 방법

들어본 적이 있다면 손을 들어보세요. `latexmkrc` 파일인가요? 이제 그것이 무엇을 하는지 안다면 손을 계속 들어 주세요. 이제 직접 작성해 본 적이 있다면 손을 계속 들어 주세요. 아직도 손을 들고 있는 분들은 이 글의 나머지는 읽지 않으셔도 될 겁니다.

왜 `latexmkrc`? 최근에 여러 사용자가 Overleaf에서 특정 작업을 하는 방법을 묻기 위해 연락해 왔고, 이에 대한 저희의 답변은 이렇게 시작하기 시작했습니다: "먼저, 프로젝트에 사용자 지정 `latexmkrc` 파일을 만드세요...". 이것이 LaTeX에서 가장 직관적인 부분은 아니라는 점, 그리고 웹상의 문서(특히 예제)가 상당히 부족하다는 점을 고려하면, 여기서 조금 더 자세히 살펴보려 합니다.

### latexmkrc 파일이란 무엇인가요?

이것을 처음 보신다면, a `latexmkrc` 파일은 다음을 위한 구성/초기화(RC) 파일입니다. [`Latexmk` 패키지](https://www.ctan.org/pkg/latexmk). `Latexmk` 는 Overleaf가 소스 LaTeX 문서를 최종 조판된 PDF 파일로 컴파일하는 과정을 제어하는 데 사용됩니다. 다음과 같은 사용자 지정 구성 파일을 사용하면 *`Latexmk`* 기본 컴파일 명령을 재정의하여 Overleaf가 문서를 특별한 방식으로 컴파일하도록 할 수 있습니다.

### 왜 latexmkrc 파일을 사용하고 싶을까요?

예를 들어, Overleaf에서 컴파일한 PDF의 모든 날짜와 시간이 기본적으로 서버의 날짜와 시간이라는 사실을 알고 계셨나요? 대신 로컬 날짜/시간을 사용하고 싶다면 어떨까요?

시간대에 맞는 현지 날짜/시간을 표시하려면, 다음을 변경할 수 있습니다. `TZ` (시간대) 환경 변수를 사용자 지정 `latexmkrc` 파일에 추가하세요:

1. 프로젝트 편집기 창에서 파일 트리 패널 상단의 “업로드” 아이콘을 클릭하세요.
2. “New file”를 선택한 다음, 파일 이름을 `latexmkrc`.
3. 파일에 다음 줄을 추가하세요 `latexmkrc`:

   ```perl
   $ENV{'TZ'}='Canada/Central';
   ```

   또는 필요한 다른 시간대도 가능합니다. 다음은 [참고용 지원되는 시간대 목록입니다](http://php.net/manual/en/timezones.php).

날짜와 시간(예: `\today` 및 `\currenttime` 에서 `datetime` PDF의 패키지는 그러면 지정된 시간대에 맞는 현지 값을 제공해야 합니다.

하나의 `latexmkrc` 파일은 치명적인 오류가 있는 프로젝트를 디버깅하는 데 매우 유용합니다. 이에 대한 자세한 내용은 [컴파일 시간 초과 도움말 페이지](/latex/ko/knowledge-base/038-fixing-and-preventing-compile-timeouts.md#fatal-compile-errors-blocking-the-compilation).

### latexmkrc 명령의 더 많은 예시는 어디에서 찾을 수 있나요?

우선, 도움말 페이지의 다음 예시들을 살펴보세요:

* [Overleaf는 제 프로젝트를 어떻게 컴파일하나요?](/latex/ko/knowledge-base/064-how-does-overleaf-compile-my-project.md)
* [Overleaf에서 plain TeX를 실행할 수 있나요?](/latex/ko/questions-and-answers/05-can-i-run-plain-tex-on-overleaf.md)
* [Overleaf는 pTeX를 지원하나요?](/latex/ko/questions-and-answers/09-does-overleaf-support-ptex.md)
* [컴파일을 막는 치명적인 컴파일 오류 찾기](/latex/ko/knowledge-base/038-fixing-and-preventing-compile-timeouts.md#fatal-compile-errors-blocking-the-compilation)
* [저는 .cls, .sty, .bst 파일이 많아서 프로젝트를 깔끔하게 유지하려고 폴더에 넣고 싶습니다. 그런데 프로젝트가 이를 찾아 올바르게 컴파일하지 못하고 있습니다.](/latex/ko/questions-and-answers/59-i-have-a-lot-of-.cls-.sty-.bst-files-and-i-want-to-put-them-in-a-folder-to-keep-my-project-unclut.md)
* [Overleaf에서 xr 패키지가 작동하게 하려면 어떻게 해야 하나요?](/latex/ko/knowledge-base/033-cross-referencing-with-the-xr-package-in-overleaf.md)
* [\today가 내 시간대에 맞는 날짜를 표시하게 하려면 어떻게 해야 하나요?](/latex/ko/questions-and-answers/32-how-do-i-make-today-display-the-date-according-to-my-time-zone.md) (해당 예시는 위에서 다시 사용되었습니다)

그것들이 도움이 되지 않는다면, 부담 없이 [문의하기 페이지](https://www.overleaf.com/contact) 또는 널리 사용되는 [TeX Stack Exchange](http://tex.stackexchange.com) 및 [LaTeX Community](http://latex-community.org/) 포럼을 이용해 보세요.


---

# 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/in-depth-articles/28-how-to-use-latexmkrc-with-overleaf.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.
