본문 바로가기

티스토리에서 $\LaTeX$ 수식 입력

반응형

이 블로그는 MathJax로 $\LaTeX$ 수식을 입력할 수 있다. 어떤 스킨을 쓰더라도 스킨 편집에서 index.html 파일을 열고 아래를 복사하여 <head></head> 사이에 붙여 넣으면 된다. 수식을 입력할 수 있는 블로그로 만들 수 있다. 

수식을 보일 수 있는 문자를 불러들이는 스크립트

<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML">

</script>

한 줄 수식을 볼 수 있게 하는 스크립트

<script type="text/x-mathjax-config">
        MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX", "output/HTML-CSS"],
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      displayMath: [ ['$\$\$','\$\$$'], ["\\[","\\]"] ],
      processEscapes: true
    },
    "HTML-CSS": { fonts: ["TeX"] }
  });
</script>
<script type="text/javascript" src="path-to-MathJax/MathJax.js">
</script>


MathJax 사용법은 아래를 참고하자.

http://docs.mathjax.org/en/latest/misc/faq.html

 

MathJax Frequently Asked Questions — MathJax 3.2 documentation

Will MathJax make my page load slower even if there’s no math? It depends on how you have configured and loaded MathJax. The combined component files like tex-chtml.js contain a full copy of MathJax and all the components needed for it to process the giv

docs.mathjax.org

 

반응형