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

update KaTeX version and introduce KATEX_AUTO_RENDER label #2497

Merged
merged 5 commits into from Sep 11, 2016

Conversation

@fehiepsi
Copy link
Contributor

@fehiepsi fehiepsi commented Sep 11, 2016

The new KaTeX version 0.6.0 supports aligned math display, which is useful. In addition, this pull request introduces the new KATEX_AUTO_RENDER label, which is useful for people who wants to create posts by using Jupyter Notebook. In particular, it will support the inline math $.$, which is the default math delimiter in Jupyter Notebook. More on KaTeX auto render can be seen from this link.

This pull request will add the following code to the html source file of the post.

<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.6.0/contrib/auto-render.min.js"></script><script>
                renderMathInElement(document.body,
                {
                    delimiters: [
                        {left: "$$", right: "$$", display: true},
                        {left: "\\[", right: "\\]", display: true},
                        {left: "$", right: "$", display: false},
                        {left: "\\(", right: "\\)", display: false}
                    ]
                }
                );
</script>
@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented Sep 11, 2016

Add an entry to CHANGES.txt and AUTHORS.txt.

Also, please reword the conf.py part about this setting. It’s not necessary for Jupyter Notebooks, they can deal with \(…\) too.

@fehiepsi
Copy link
Contributor Author

@fehiepsi fehiepsi commented Sep 11, 2016

As far as I see, Jupyter Notebook just supports auto render markdown shell for delimiters $.$ and $$.$$. My test agrees with the notebook document. If by some way, we can use other delimiters \(.\) in Jupyter Notebook, then this pull request is not necessary (because it just introduced the buggy delimiter $.$, which is not supported by Nikola team as I understand).

@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented Sep 11, 2016

In Markdown, you need to use \\(…\\) and it works fine.

@fehiepsi
Copy link
Contributor Author

@fehiepsi fehiepsi commented Sep 11, 2016

I see. Thank you very much! I will change the conf files in case you still see that this new label is useful.

@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented Sep 11, 2016

Please do, and please add this to CHANGES.txt and yourself to AUTHORS.txt.

@fehiepsi
Copy link
Contributor Author

@fehiepsi fehiepsi commented Sep 11, 2016

I have made some changes according to your suggestion. Thanks!

@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented Sep 11, 2016

Merging, thanks for your contribution!

PS. it’s called a setting. I’ll fix this in the changelog.

@Kwpolska Kwpolska merged commit f858f1c into getnikola:master Sep 11, 2016
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Kwpolska added a commit that referenced this pull request Sep 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants