Просмотр исходного кода

Copy across some mathjax config from v1, seems to fix artefacts in rendering

Alasdair Smith 8 лет назад
Родитель
Сommit
9af906b7dc
1 измененных файлов с 11 добавлено и 4 удалено
  1. 11 4
      services/web/public/coffee/base.coffee

+ 11 - 4
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: [ ['$$','$$'], ["\\[","\\]"] ]
 		)