mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
a739348146
MathJax parsing now on learn pages, and soon to be on the blog, so move out of the `ide/chat` directive.
25 lines
No EOL
576 B
CoffeeScript
25 lines
No EOL
576 B
CoffeeScript
define [
|
|
"base"
|
|
], (App) ->
|
|
mathjaxConfig =
|
|
messageStyle: "none"
|
|
imageFont:null
|
|
"HTML-CSS": { availableFonts: ["TeX"] },
|
|
TeX:
|
|
equationNumbers: { autoNumber: "AMS" },
|
|
useLabelIDs: false
|
|
tex2jax:
|
|
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
|
|
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
|
|
processEscapes: true
|
|
skipStartupTypeset: true
|
|
|
|
MathJax?.Hub?.Config(mathjaxConfig);
|
|
|
|
App.directive "mathjax", () ->
|
|
return {
|
|
link: (scope, element, attrs) ->
|
|
setTimeout () ->
|
|
MathJax?.Hub?.Queue(["Typeset", MathJax?.Hub, element.get(0)])
|
|
, 0
|
|
} |