mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 12:13:58 +00:00
mathjax: Improve handling of long equations
* Use automatic linebreak feature instead of CSS overflow scrolling * Disable mathjax notifications * Highlight any undefined macros within equations * Load output processors with `-full` option rather than on demand * Update MathJax version Fix #496 Fix #586
This commit is contained in:
1 parent
8d596ffed2
commit
a555dd792b
3 files changed
+10
-9
No files matched your search
+2
-2
@@ -17,8 +17,8 @@
|
||||
version = "9.12.0"
|
||||
sri = "sha256-/BfiIkHlHoVihZdc6TFuj7MmJ0TWcWsMXkeDFwhi0zw="
|
||||
[js.mathJax]
|
||||
version = "2.7.1"
|
||||
sri = "sha512-tOav5w1OjvsSJzePRtt2uQPFwBoHt1VZcUq8l8nm5284LEKE9FSJBQryzMBzHxY5P0zRdNqEcpLIRVYFNgu1jw=="
|
||||
version = "2.7.4"
|
||||
sri = "sha256-GhM+5JHb6QUzOQPXSJLEWP7R73CbkisjzK5Eyij4U9w="
|
||||
[js.isotope]
|
||||
version = "3.0.4"
|
||||
sri = "sha512-VDBOIlDbuC4VWxGJNmuFRQ0Li0SKkDpmGyuhAG5LTDLd/dJ/S0WMVxriR2Y+CyPL5gzjpN4f/6iqWVBJlht0tQ=="
|
||||
|
||||
@@ -183,10 +183,6 @@ pre code {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.mjx-chtml {
|
||||
overflow-x: auto; /* Horizontally scroll long equations. */
|
||||
}
|
||||
|
||||
hr {
|
||||
border: 0;
|
||||
height: 1px;
|
||||
|
||||
@@ -64,12 +64,17 @@
|
||||
<!-- LaTeX math rendering -->
|
||||
{{ if or .Params.math .Site.Params.math }}
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$'], ['\\(','\\)']] } });
|
||||
MathJax.Hub.Config({
|
||||
CommonHTML: { linebreaks: { automatic: true } },
|
||||
tex2jax: { inlineMath: [ ['$', '$'], ['\\(','\\)'] ], displayMath: [ ['$$','$$'], ['\\[', '\\]'] ], processEscapes: false },
|
||||
TeX: { noUndefined: { attributes: { mathcolor: 'red', mathbackground: '#FFEEEE', mathsize: '90%' } } },
|
||||
messageStyle: 'none'
|
||||
});
|
||||
</script>
|
||||
{{ if not .Site.Params.disable_sri }}
|
||||
{{ printf "<script src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/%s/MathJax.js?config=TeX-AMS_CHTML\" integrity=\"%s\" crossorigin=\"anonymous\"></script>" $js.mathJax.version $js.mathJax.sri | safeHTML }}
|
||||
{{ printf "<script src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/%s/MathJax.js?config=TeX-AMS_CHTML-full\" integrity=\"%s\" crossorigin=\"anonymous\"></script>" $js.mathJax.version $js.mathJax.sri | safeHTML }}
|
||||
{{ else }}
|
||||
<script async src="//cdnjs.cloudflare.com/ajax/libs/mathjax/{{- $js.mathJax.version -}}/MathJax.js?config=TeX-AMS_CHTML"></script>
|
||||
<script async src="//cdnjs.cloudflare.com/ajax/libs/mathjax/{{- $js.mathJax.version -}}/MathJax.js?config=TeX-AMS_CHTML-full"></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
Reference in new issue
Block a user