This is an automated email from the ASF dual-hosted git repository. polandll pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/cassandra-website.git
The following commit(s) were added to refs/heads/trunk by this push: new 0dabfe445 DOC - Added STEM equation support to site-ui footer-scripts.hbs in partials 0dabfe445 is described below commit 0dabfe4459fcca7cd4473d7e22c92d18afa73b37 Author: Lorina Poland <lorinapol...@gmail.com> AuthorDate: Tue Feb 14 11:15:50 2023 -0800 DOC - Added STEM equation support to site-ui footer-scripts.hbs in partials patch by Lorina Poland; reviewed by Erick Ramirez for CASSANDRA-16906 --- site-ui/src/partials/footer-scripts.hbs | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/site-ui/src/partials/footer-scripts.hbs b/site-ui/src/partials/footer-scripts.hbs index 9fdc97cfb..1f7a9c86e 100644 --- a/site-ui/src/partials/footer-scripts.hbs +++ b/site-ui/src/partials/footer-scripts.hbs @@ -13,6 +13,27 @@ <script async src="{{uiRootPath}}/../search-index.js"></script> {{/if}} {{/if}} +{{#with (resolvePage page.relativeSrcPath model=false)}} + {{#unless (eq asciidoc.attributes.stem undefined)}} +<script type="text/x-mathjax-config"> +MathJax.Hub.Config({ + messageStyle: "none", + tex2jax: { inlineMath: [["\\(", "\\)"]], displayMath: [["\\[", "\\]"]], ignoreClass: "nostem|nolatexmath" }, + asciimath2jax: { delimiters: [["\\$", "\\$"]], ignoreClass: "nostem|noasciimath" }, + TeX: { equationNumbers: { autoNumber: "none" } } +}) +MathJax.Hub.Register.StartupHook("AsciiMath Jax Ready", function () { + MathJax.InputJax.AsciiMath.postfilterHooks.Add(function (data, node) { + if ((node = data.script.parentNode) && (node = node.parentNode) && node.classList.contains("stemblock")) { + data.math.root.display = "block" + } + return data + }) +}) +</script> +<script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/MathJax.js?config=TeX-MML-AM_HTMLorMML"></script> + {{/unless}} +{{/with}} <script> jQuery(function(){ var windowW = $(window).width(); @@ -41,4 +62,4 @@ jQuery(function(){ footerCTA.setAttribute('href', '/_/blog.html'); } }); -</script> \ No newline at end of file +</script> --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org