#이맥스: #수식입력 #스니펫 $기호 $심볼
2024-03-15 Note cdlatex latex notes snippetTODO 수식 입력 너무 중요하다 어쩔꺼야
프리뷰 방법
- org-latex-preview : 빌트인
- org-fragtog
- math-preview 패키지
DONE 가이드
- Inline equations are wrapped between
\(
and\)
.$
wrapping also works, but it is not preferred as it comes with restrictions like “there should be no whitespace between the equation and the$
delimiters”.So
$ a=b $
will not work (it will look like: $ a=b $), but$a=b$
will work (it will look like: \(a=b\)).On the other hand, both
\(a=b\)
(it will look like: \(a=b\)) and\( a=b \)
(it will look like: \( a=b \)) will work.
- One-per-line equations are wrapped between
\[
and\]
or$$
delimiters.
For example, below in Org:
LaTeX formatted equation: \( E = -J \sum_{i=1}^N s_i s_{i+1} \)
will look like this in Hugo rendered HTML (using MathJax):
LaTeX formatted equation: \( E = -J \sum_{i=1}^N s_i s_{i+1 }\)
이걸 어떻게 쉽게 입력할 수 있을까?
Here’s another example, taken from Org Info: LaTeX fragments:
If $a^2=b$ and \( b=2 \), then the solution must be either
$$ a=+\sqrt{2} $$ or \[ a=-\sqrt{2} \]
Above renders to below using Mathjax:
If \(a^2=b\) and \( b=2 \), then the solution must be either \[ a=+\sqrt{2} \] or \[ a=-\sqrt{2} \]
Note that the last two equations show up on their own lines because those equations are wrapped in \[ .. \]
.
분수 표기
\[ \frac{\pi}{4}\ = \ 1\ - \ \frac{1}{3}\ + \ \frac{1}{5}\ - \ \frac{1}{7}\ + \ \frac{1}{9}\ - \ \frac{1}{11}\ + \ \cdots \]
\[ \frac{\pi}{4}\ = \ 1\ - \ \frac{1}{3}\ + \ \frac{1}{5}\ - \ \frac{1}{7}\ + \ \frac{1}{9}\ - \ \frac{1}{11}\ + \ \cdots \]
\[ \frac{1}{13} \]
시그마
$$
cd α Φ $$
Inline 인라인
This $\sigma(z) = \frac{1}{1 + e^{-z}}$ is inline.
This \(\sigma(z) = \frac{1}{1 + e^{-z}}\) is inline.
Separate Paragraph 단락
$$F(\omega) = \int_{-\infty}^{\infty} f(t) e^{-j\omega t} \, dt$$
will be rendered as:
\[F(\omega) = \int_{-\infty}^{\infty} f(t) e^{-j\omega t} \, dt\]
Chemistry 화학 기호
Chemistry expressions are supported via
mhchem extension.
Inline: \(\ce{H2O}\) is water.
Separate paragraph:
$$\ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-}$$
\[\ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-}\]
#관련링크
- GitHub - tecosaur/LaTeX-auto-activating-snippets: Mirror of https://g-
- GitHub - ymarco/auto-activating-snippets: Snippets for Emacs that exp-