From 1ca39333ca73e820b875d7c844ac04f9087db2e8 Mon Sep 17 00:00:00 2001 From: AakashGC Date: Wed, 5 May 2021 10:15:19 +1000 Subject: [PATCH] mathjax settings --- quantecon_book_theme/layout.html | 31 +++++++++++++++++++ ...theme.4437c52682462236109142e624e7c099.js} | 3 +- ...heme.9428881bef30503ba3c98a8c152d748d.css} | 2 +- quantecon_book_theme/theme.conf | 2 +- src/js/quantecon-book-theme.js | 20 ------------ src/scss/quantecon-book-theme.scss | 1 - 6 files changed, 34 insertions(+), 25 deletions(-) rename quantecon_book_theme/static/{quantecon-book-theme.e15eeb84e703e8a6ad0ca02f57d51d0e.js => quantecon-book-theme.4437c52682462236109142e624e7c099.js} (95%) rename quantecon_book_theme/static/{quantecon-book-theme.885d9ef116b3d4de1ea03f6d505b5c33.css => quantecon-book-theme.9428881bef30503ba3c98a8c152d748d.css} (97%) diff --git a/quantecon_book_theme/layout.html b/quantecon_book_theme/layout.html index dc28d50..0f28cc9 100644 --- a/quantecon_book_theme/layout.html +++ b/quantecon_book_theme/layout.html @@ -199,6 +199,37 @@ touch: false, }); feather.replace(); + window.MathJax = { + startup: { + ready: () => { + console.log('MathJax is loaded, but not yet initialized'); + MathJax.startup.defaultReady(); + console.log('MathJax is initialized, and the initial typeset is queued'); + } + }, + tex: { + inlineMath: [ + ['$', '$'], + ['\\(', '\\)'], + ], + processEscapes: true + }, + chtml: { + scale: 0.92, + displayAlign: "center" + }, + svg: { + scale: 0.92, + displayAlign: "center", + }, + options: { + menuOptions: { + settings: { + renderer: 'SVG' + } + } + }, + }; {%- endblock %} diff --git a/quantecon_book_theme/static/quantecon-book-theme.e15eeb84e703e8a6ad0ca02f57d51d0e.js b/quantecon_book_theme/static/quantecon-book-theme.4437c52682462236109142e624e7c099.js similarity index 95% rename from quantecon_book_theme/static/quantecon-book-theme.e15eeb84e703e8a6ad0ca02f57d51d0e.js rename to quantecon_book_theme/static/quantecon-book-theme.4437c52682462236109142e624e7c099.js index fe28ea2..1f4bee1 100644 --- a/quantecon_book_theme/static/quantecon-book-theme.e15eeb84e703e8a6ad0ca02f57d51d0e.js +++ b/quantecon_book_theme/static/quantecon-book-theme.4437c52682462236109142e624e7c099.js @@ -7,5 +7,4 @@ setFontSize();$('.btn__plus').on('click',function(event){event.preventDefault(); localStorage.toolbarFont=toolbarFont;setFontSize();});$('.btn__minus').on('click',function(event){event.preventDefault();event.stopPropagation();var toolbarFont=parseInt(localStorage.getItem('toolbarFont'))-1;if(toolbarFont<0){toolbarFont=-1;} localStorage.toolbarFont=toolbarFont;setFontSize();});const collapsableCodeBlocks=document.querySelectorAll("div[class^='collapse'] .highlight");for(var i=0;i