-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MDX와 KaTeX 충돌 #1
Comments
반드시 플러그인 버전이 각각 |
중괄호 $$
S_n = \frac{n}{2}
$$ 다음과 같이 입력했을 때 다음의 오류 발생. Error in function _createMdxContent in ./contents/posts/writing-guide/index.mdx:165
n is not defined
./contents/posts/writing-guide/index.mdx:165
Open in Editor
163 | __html: "<svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg>"
164 | }
> 165 | })), "블럭 모드"), "\n", React.createElement(_components.p, null, "$$\nS_n = \\frac", n, 2, "\n$$"), "\n", React.createElement(_components.h3, {
| ^
166 | id: "2-3-gfmgithub-flavored-markdown",
167 | style: {
168 | position: "relative" |
|
- "remark-math", "rehype-katex"가 동작하지 않음 - 따라서 직접 KaTex를 파싱하는 Katex 컴포넌트 제작 - MDX 파일에서 import하여 사용, "formula" prop으로 수식 넘겨서 사용
안녕하세요?
도움이 되면 좋겠습니다. |
마크다운 파일에 Katex 구문이 들어갔을 경우 다음과 같은 오류가 발생.
`Module build failed (from ./node_modules/gatsby/dist/utils/babel-loader.js):
SyntaxError:
/Users/raonsol/gatsby-starter-raonsol/contents/posts/writing-guide/index.md: Invalid
left-hand side in prefix operation. (1:2)
The text was updated successfully, but these errors were encountered: