# \<details\> 안에 \<summary\> 뒤에 줄바꿈이 없으면 MathJax가 렌더링되지 않음

**URL:** https://meta.discourse.org/t/mathjax-not-rendering-inside-details-without-newline-after-summary/375414
**Category:** Support
**Tags:** math
**Created:** [7월 23, 2025, 11:11오전 UTC](https://meta.discourse.org/t/mathjax-not-rendering-inside-details-without-newline-after-summary/375414 "2025-07-23T11:11:05Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Ethsim2](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ethsim2/32/522255_2.png) [@Ethsim2](https://meta.discourse.org/u/Ethsim2)
#### Post date: [7월 23, 2025, 11:11오전 UTC](https://meta.discourse.org/t/mathjax-not-rendering-inside-details-without-newline-after-summary/375414/1 "2025-07-23T11:11:05Z")

</div>

안녕하세요 — 이전 게시글에 대한 후속 질문입니다:

> [@details 섹션 내에서 MathJax이 작동하지 않음](https://meta.discourse.org/t/mathjax-not-working-inside-details-sections/372218):
>
> it would be nice if we allow discourse math to work in hidden details panes aswell?

* * *

`<details>` 블록 내부의 MathJax 수식은 `<summary>` 태그 바로 뒤에 **줄바꿈이 삽입되지 않으면 렌더링되지 않는다는** 사실을 확인했습니다.

* * *

### 최소 재현 사례:

아래는 **렌더링되지 않습니다** :

```plaintext
<details><summary>예시</summary>
$$
x^2 + y^2 = z^2
$$
</details>

```

아래는 **렌더링됩니다** :

```plaintext
<details><summary>예시</summary>

$$
x^2 + y^2 = z^2
$$
</details>

```

* * *

### 참고 사항:

- 이 동작은 직관적이지 않으며 문서화되어 있지 않습니다.
- 인라인(MathJax) 및 블록(MathJax) 양쪽에 영향을 미칩니다.
- ChatGPT는 "기본 설정으로 Discourse 3.2.0beta3에서 테스트했습니다"라고 말합니다.

* * *

수식 포맷팅에 의존하는 사용자를 위해 이 문제를 더 견고하게 만들거나 어딘가에 문서화할 수 있을까요?

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [7월 23, 2025, 4:40오후 UTC](https://meta.discourse.org/t/mathjax-not-rendering-inside-details-without-newline-after-summary/375414/2 "2025-07-23T16:40:33Z")

</div>

권장 방식인 details 블록을 사용했다면 이런 문제가 발생하지 않았을 것입니다:

```plaintext
[details="예시"]
$$
x^2 + y^2 = z^2
$$
[/details]

```

---

<div class="post-metadata">

### Author: ![Ethsim2](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ethsim2/32/522255_2.png) [@Ethsim2](https://meta.discourse.org/u/Ethsim2)
#### Post date: [7월 23, 2025, 4:41오후 UTC](https://meta.discourse.org/t/mathjax-not-rendering-inside-details-without-newline-after-summary/375414/3 "2025-07-23T16:41:46Z")

</div>

아, 이 주제를 수정하지 않는 게 최선이겠군

* * *

수정이 필요했던 건 ChatGPT였지 🤣

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [7월 23, 2025, 11:38오후 UTC](https://meta.discourse.org/t/mathjax-not-rendering-inside-details-without-newline-after-summary/375414/4 "2025-07-23T23:38:37Z")

</div>

네, 이건 버그가 아니라 CommonMark의 제한 사항/디자인입니다.

HTML과 마크다운을 혼합할 때 매우 구체적이고 다소 의외인 규칙들이 있습니다.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [8월 23, 2025, 6:38오전 UTC](https://meta.discourse.org/t/mathjax-not-rendering-inside-details-without-newline-after-summary/375414/6 "2025-08-23T06:38:01Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
