Fixes #1333: Fix formula automatic numbering is invalid (#1398)

* Fix formula automatic numbering is invalid

* resetting automatic equation numbering in preview
This commit is contained in:
hlyang1992 2020-05-30 07:09:11 +08:00 committed by GitHub
parent fa1d63b5a2
commit 8f62f9902d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -32,7 +32,8 @@
<script> <script>
MathJax = { MathJax = {
tex: { tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']] inlineMath: [['$', '$'], ['\\(', '\\)']],
tags: 'ams'
} }
}; };
</script> </script>

View File

@ -71,6 +71,7 @@ var previewMathJax = function(identifier, id, timeStamp, text, isHtml) {
if (text.indexOf('$$') !== -1) { if (text.indexOf('$$') !== -1) {
isBlock = true; isBlock = true;
} }
MathJax.texReset();
MathJax MathJax
.typesetPromise([p]) .typesetPromise([p])
.then(function () { .then(function () {

View File

@ -13,7 +13,8 @@
<script> <script>
MathJax = { MathJax = {
tex: { tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']] inlineMath: [['$', '$'], ['\\(', '\\)']],
tags: 'ams'
}, },
chtml: { chtml: {
// http://docs.mathjax.org/en/latest/options/output/index.html#options-common-to-all-output-processors // http://docs.mathjax.org/en/latest/options/output/index.html#options-common-to-all-output-processors