> 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/46-testing-display-and-link-template.md).

# 표시 및 링크 템플릿 테스트

## 표시 및 링크 템플릿 테스트

참고: 테스트가 진행 중이므로 결과가 "변동"될 수 있습니다

## LaTeX 문서의 일부 또는 전체를 보여주는 MediaWiki 템플릿

제안된 템플릿 [Template:OpenLaTeXInOverleaf](https://github.com/ayaka-notes/overleaf-learn-wiki/tree/main/learn/Template:OpenLaTeXInOverleaf/README.md) 인라인 LaTeX 코드를 표시할 수 있습니다 *및*, Alf의 작업을 사용하여 자동으로 생성되는 `Overleaf에서 열기` 인라인 LaTeX 코드에서 링크를 생성합니다—코드는 단지 *한 번만*. 또한 다음만 표시할 수도 있습니다 `본문` LaTeX의 일부를, 전체 preamble과 \end{document}를 생략한 채 표시하거나, 전체 문서를 표시할 수도 있지만, 두 경우 모두 완성된 문서가 Overleaf에서 열립니다.

* 참고: MediaWiki 파싱 관련 이유로, **다음을 사용해야 합니다 `{{!}}` TeX 코드에서 | 문자를 생성하려면**.

### LaTeX 코드의 인라인 표시(및 문서 구성)를 제어하는 매개변수

* **`pre`**, 이는 `서문` 문서의 시작 부분을 설정합니다. 기본값은

```
\documentclass{article}
\begin{document}
```

* **`본문`** 이는 LaTeX 문서의 핵심 코드입니다
* **`post`**, 이는

```
\end{document}
```

* **`show`** LaTeX 코드의 표시를 제어합니다: 다음 중 하나 `본문` 섹션 또는 전체 문서
  * `show=ALL` 전체 LaTeX 문서를 표시합니다---사용자 지정 `본문`, `pre` 및 `post`, 또는 다음을 사용합니다 *기본값* 에는 `pre` 또는 `post`.
  * `show=BODY` LaTeX 코드의 본문만 표시합니다

모든 경우에 자동으로 "Overleaf에서 열기" 링크가 다음 설정을 사용해 생성됩니다 **`pre`**, **`본문`** 및 **`post`**

### Overleaf API 호출을 제어하는 매개변수(Alf의 작업을 통해 상속됨)

* **`engine`** 코드에 사용되는 컴파일러를 설정합니다. 다음 중 하나일 수 있습니다:
  * `pdflatex` (engine을 선택하지 않으면 기본값)
  * `xelatex`
  * `lualatex`
  * `latex_dvipdf`
* **`name`** Overleaf 문서의 제목을 설정합니다
* **`text`** 링크를 표시하는 데 사용할 텍스트를 설정합니다

## 예시

다음 섹션에는 템플릿의 예시 사용법이 나열되어 있습니다.

### pre, post를 정의하고 show=ALL을 설정

```
{{OpenLaTeXInOverleaf|show=ALL|pre=
\documentclass{book}
\begin{document}
|body=

안녕

친애하는

\LaTeX

|post=
\end{document}%여기서 문서를 끝냅니다
|engine=lualatex|name=LuaLaTeX를 사용한 테스트|text=Overleaf에서 LuaLaTeX 예시 열기
}}
```

위 코드는 다음 인라인 표시와 "Overleaf에서 열기" 링크를 생성합니다

```latex
\documentclass{book}
\begin{document}
안녕

친애하는

\LaTeX
\end{document}%여기서 문서를 끝냅니다
```

&#x20;[Overleaf에서 LuaLaTeX 예시 열기](https://www.overleaf.com/docs?engine=lualatex\&snip_name=Test+using+LuaLaTeX\&snip=%5Cdocumentclass%7Bbook%7D%0A%5Cbegin%7Bdocument%7D%0AHello+%0A%0Adear%0A%0A%5CLaTeX%0A%5Cend%7Bdocument%7D%25Here+we+end+the+document)

### pre, post를 정의하고 show=BODY를 설정

```
{{OpenLaTeXInOverleaf|show=BODY|pre=
\documentclass{book}
\begin{document}
|body=

안녕

친애하는

\LaTeX

|post=
\end{document}%여기서 문서를 끝냅니다
|engine=lualatex|name=LuaLaTeX를 사용한 테스트|text=Overleaf에서 LuaLaTeX 예시 열기
}}
```

위 코드는 다음 인라인 표시와 "Overleaf에서 열기" 링크를 생성합니다

```latex
안녕

친애하는

\LaTeX
```

&#x20;[Overleaf에서 LuaLaTeX 예시 열기](https://www.overleaf.com/docs?engine=lualatex\&snip_name=Test+using+LuaLaTeX\&snip=%5Cdocumentclass%7Bbook%7D%0A%5Cbegin%7Bdocument%7D%0AHello+%0A%0Adear%0A%0A%5CLaTeX%0A%5Cend%7Bdocument%7D%25Here+we+end+the+document)

### 빈 pre, 빈 post, 하지만 더 충실한 body를 정의

```
{{OpenLaTeXInOverleaf|show=ALL|pre=|post=|body=

\documentclass{book}

\begin{document}

안녕

친애하는

\LaTeX

\end{document}
|engine=lualatex|name=LuaLaTeX를 사용한 테스트|text=Overleaf에서 LuaLaTeX 예시 열기
}}
```

위 코드는 다음 인라인 표시와 "Overleaf에서 열기" 링크를 생성합니다

```latex
\documentclass{book}

\begin{document}

안녕

친애하는

\LaTeX

\end{document}
```

&#x20;[Overleaf에서 LuaLaTeX 예시 열기](https://www.overleaf.com/docs?engine=lualatex\&snip_name=Test+using+LuaLaTeX\&snip=%5Cdocumentclass%7Bbook%7D%0A%0A%0A%5Cbegin%7Bdocument%7D%0A%0A%0AHello+%0A%0Adear%0A%0A%5CLaTeX%0A%0A%0A%5Cend%7Bdocument%7D)

### pre와 post에는 기본값을 사용하지만 body에는 코드를 제공합니다

```
{{OpenLaTeXInOverleaf|show=ALL|body=
안녕

친애하는

\LaTeX
|engine=lualatex|name=LuaLaTeX를 사용한 테스트|text=Overleaf에서 LuaLaTeX 예시 열기
}}
```

위 코드는 다음 인라인 표시와 "Overleaf에서 열기" 링크를 생성합니다

```latex
\documentclass{article}
\begin{document}

안녕

친애하는

\LaTeX

\end{document}
```

&#x20;[Overleaf에서 LuaLaTeX 예시 열기](https://www.overleaf.com/docs?engine=lualatex\&snip_name=Test+using+LuaLaTeX\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0A%0AHello+%0A%0Adear%0A%0A%5CLaTeX%0A%0A%5Cend%7Bdocument%7D)

## 테스트용이므로 이 링크들은 무시하세요

```latex
\documentclass{article}
\begin{document}

\LaTeX

\end{document}
```

&#x20;[Overleaf에서 열기](https://www.overleaf.com/docs?engine=\&snip_name=\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0A%0A%5CLaTeX%0A%0A%5Cend%7Bdocument%7D)


---

# 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/46-testing-display-and-link-template.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.
