Skip to content
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

gitbook mathjax가 새로고침하기 전까지 제대로 안 나오는 문제 #2

Closed
jwvg0425 opened this issue Nov 7, 2018 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@jwvg0425
Copy link
Owner

jwvg0425 commented Nov 7, 2018

GitbookIO/plugin-mathjax#34

해결하자

@jwvg0425 jwvg0425 added the bug Something isn't working label Nov 7, 2018
@jwvg0425 jwvg0425 self-assigned this Nov 7, 2018
@jwvg0425
Copy link
Owner Author

jwvg0425 commented Nov 7, 2018

katex로 바꾸니 쉽게 해결돼서 일단 katex를 쓰는 방향으로 결정.
한 가지 남은 문제점은 풀이를 위해 collapse 범위 안쪽에 math 식을 넣으면 거기서 그냥 내용이 전부 잘려 버린다. collapse 플러그인의 버그인 것 같은데 아무래도 직접 관련 플러그인을 만들거나 해야 할 듯..

@jwvg0425 jwvg0425 closed this as completed Nov 7, 2018
@joonas-yoon
Copy link
Contributor

GitbookIO/plugin-mathjax#34 (comment) 에서처럼 MathJax.Hub메소드들을 직접 다시 호출해서 수식을 다시 표시할 수 있지 않을까 싶습니다.

현재 collapse 플러그인이 <details><summary>...</details>인 코드를 생성하는 것 같던데,
아래의 스크립트가 페이지에서 로드될 수 있다면 해결 가능할거라 생각해요.

$("summary").on('click', function(evt){
  MathJax.Hub.Update(evt.target);
});

물론 위 코드는 (MathJax.Hub에 대해서는 테스트해보지 않은) 예시입니다.

@jwvg0425
Copy link
Owner Author

호 한 번 시도해보겠습니다. 근데 이전에 Mathjax를 썼을 때 새로고침해서 제대로 수식이 표시가 되어도 collapse 안쪽에 있으면 제대로 동작을 안 했고 이게 collapse 플러그인의 문제로 보여서 다른 방식으로 같은 기능을 하는 플러그인을 직접 제작할 예정입니다. MathJax 적용 자체는 별도로 시도해볼만 하네요.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants