본문 바로가기
  • 경제적 자유를 얻는 그날까지
소소한 팁

티스토리에서 수식입력하기(MathJax)

by 베니스상인 2024. 7. 21.

 

MathJax는 Latex 기반으로 티스토리에서 수식을 입력할 수 있는 인터페이스이다. 사용방법은 간단한 스크립트만 HTML 헤더에 적용해주면 사용이 가능하다.

 

다른 수식입력기를 HTML 편집모드에서만 가능하지만 아래 수식입력기는 일반 글쓰기 모드에서도 직접 입력이 가능하다.

 

 

1. 티스토리 설정 방법

  • 블로그 관리 → 꾸미기 →  스킨편집  → 오른쪽 상단의 HTML 편집으로 들어간다.
  • 아래와 같이 <head> 다음부분에 코드를 삽입해준다.
  • HTML 편집을 저장한다.

 

 

삽입코드

<script type="text/x-mathjax-config">
 MathJax.Hub.Config({ tex2jax: {inlineMath: [['$','$'], ['\(','\)']]} }); 
</script>
 
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-MML-AM_CHTML">
</script>

 

 

 

2. 수식 사용하기

  • 일반 텍스트모드에서 수식 블럭을 입력한다.
$$ \frac{n!}{k!(n-k)!} = \binom{n}{k} $$
  • 미리보기를 통해 보면 아래와 같이 변환된 수식을 확인할 수 있다.

$$ \frac{n!}{k!(n-k)!} = \binom{n}{k} $$

 

 

 

3. Latex 수식 사용방법

  • 아래 참고자료 활용

https://en.wikibooks.org/wiki/LaTeX/Mathematics

 

LaTeX/Mathematics - Wikibooks, open books for an open world

One of the greatest motivating forces for Donald Knuth when he began developing the original TeX system was to create something that allowed simple construction of mathematical formulae, while looking professional when printed. The fact that he succeeded w

en.wikibooks.org

 

 

 

4. Latex 수식입력기

https://editor.codecogs.com/#google_vignette

 

Equation Editor for online mathematics - create, integrate and download

Download svg gif png pdf emf 5 pt 9 pt 10 pt 12 pt 18 pt 20 pt 50 80 100 110 120 150 200 300 Transparent White Black Red Green Blue Inline Block WordPress phpBB Tiny Wiki url url encoded xml pre doxygen html latex Formatted string containing your Equation

editor.codecogs.com

 

728x90

댓글