From 9af906b7dcf5573ea61eaebb3031c94370733ee8 Mon Sep 17 00:00:00 2001 From: Alasdair Smith Date: Mon, 23 Jul 2018 16:03:49 +0100 Subject: [PATCH] Copy across some mathjax config from v1, seems to fix artefacts in rendering --- services/web/public/coffee/base.coffee | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/services/web/public/coffee/base.coffee b/services/web/public/coffee/base.coffee index e5e0958a24..0a6f47f9fa 100644 --- a/services/web/public/coffee/base.coffee +++ b/services/web/public/coffee/base.coffee @@ -31,14 +31,21 @@ define [ extensions: ["Safe.js"] messageStyle: "none" imageFont:null - "HTML-CSS": { availableFonts: ["TeX"] }, + "HTML-CSS": + availableFonts: ["TeX"] + # MathJax's automatic font scaling does not work well when we render math + # that isn't yet on the page, so we disable it and set a global font + # scale factor + scale: 110 + matchFontHeight: false TeX: - equationNumbers: { autoNumber: "AMS" }, + equationNumbers: { autoNumber: "AMS" } useLabelIDs: false skipStartupTypeset: true tex2jax: - processEscapes: true, - inlineMath: [ ["\\(","\\)"] ], + processEscapes: true + # Dollar delimiters are added by the mathjax directive + inlineMath: [ ["\\(","\\)"] ] displayMath: [ ['$$','$$'], ["\\[","\\]"] ] )