1.3 The Game of the Name
(전략)
One of the hardest things about using $\LaTeX$ is deciding how to pronounce it. This is also one of the few things I'm not going to tell you about $\LaTeX$, since pronunciation is best determined by usage, not flat. $\TeX$ is usually pronounced teck, making lah-teck, and lay-teck the logical choices; but language is not always logical, so lay-tecks is also possible.
(후략)
― LaTeX: A Document Preparation System (1994), Leslie Lamport.
1.
config.php $extra_header에 다음을 추가한다.
KaTeX에서는 기본적으로 다음 두 가지 구문을 지원한다.
| 구문 |
의미 |
모드 |
$ ... $ |
inline math |
inline |
$$ ... $$ |
display math |
block |
일반적으로 다음 함수에서 본문의
LaTeX 구문이 자동 처리된다.
renderMathInElement(document.body, {
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "$", right: "$", display: false}
]
});
따라서 모니위키 본문에
LaTeX의 inline math
$ ... $ 또는 display math
$$ ... $$를 출력해야 한다.
그런데 모니위키에서는
$가
ASCIIMathML 프로세서의 예약어로 잡혀 있다. (processor_repl('asciimathml', ...) ->
ASCIIMathML.js // 클라이언트 측 변환)
그래서 다음과 같이 인라인 HTML 매크로 등을 이용해서 모니위키 본문에 $을 출력하면
KaTeX을 사용할 수 있다:
[[html($$\sum_{n=1}^\infty a_n = \int_0^1 f$$)]]
예시 #
$$\sum_{n=1}^\infty a_n = \int_0^1 f$$
$$SSIM(x, y) = \frac{(2\mu_x\mu_y + C_1)(2\sigma_{xy} + C_2)}{(\mu_x^2 + \mu_y^2 + C_1)(\sigma_x^2 + \sigma_y^2 + C_2)}$$
$$\Delta E = \sqrt{(\Delta L^*)^2 + (\Delta a^*)^2 + (\Delta b^*)^2}$$