728x90
반응형
"문자열의 이스케이프 시퀀스가 잘못됨" + Latex Escape Letter 오류
$z = \mu + \epsilon\sigma$
바로 Backslash가 JavaScript의 escape 문자로 Google Search Console 크롤러가 \mu를 함수로 인식해 생기는 오류이다.
처음에 JavaScript를 잘 몰라 latex로 쓰고 캡쳐해서 포스팅하다. Escape 문자 해결 방법을 찾았다.
https://docs.mathjax.org/en/v2.1-latest/tex.html
MathJax TeX and LaTeX Support — MathJax 2.1 documentation
The support for TeX and LaTeX in MathJax consists of two parts: the tex2jax preprocessor, and the TeX input processor. The first of these looks for mathematics within your web page (indicated by math delimiters like $$...$$) and marks the mathematics for l
docs.mathjax.org
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]},
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
processEscapes: true
});
</script>
기존의 JavaScript Latex 코드에 processEscapes를 추가하면 된다.
반응형
'Routine' 카테고리의 다른 글
나라별 대통령 신년사 (0) | 2024.01.01 |
---|---|
[Running] Cadence 케이던스 공식 (0) | 2023.11.15 |
TDD (Test Driven Development)란? (0) | 2023.08.17 |
Pioneer : 폴 오닐(Paul H. O'Neill) (0) | 2023.08.03 |
Browser templates for Browser In The Browser (BITB) attack (0) | 2023.07.08 |