Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/src/packages/util/mathjax-config.js
Views: 687
/*1* This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45// mathjax configuration: this could be cleaned up further or even parameterized with some code during startup6// ATTN: do not use "xypic.js", frequently causes crash!78exports.MathJaxConfig = {9skipStartupTypeset: true,10extensions: ["tex2jax.js", "asciimath2jax.js", "Safe.js"], // "static/mathjax_extensions/xypic.js"11// NOTE: "output/CommonHTML" is the output default: http://docs.mathjax.org/en/latest/output.html12// However, **DO NOT** use "output/CommonHTML" for the output JAX; it completely breaks13// Sage worksheet output right now. Maybe when/if worksheets are rewritten14// using React, we can change, but not now. Using "output/SVG" works just fine.15// https://github.com/sagemathinc/cocalc/issues/196216jax: ["input/TeX", "input/AsciiMath", "output/SVG"],17// http://docs.mathjax.org/en/latest/options/tex2jax.html18tex2jax: {19inlineMath: [20["$", "$"],21["\\(", "\\)"],22],23displayMath: [24["$$", "$$"],25["\\[", "\\]"],26],27processEscapes: true,28ignoreClass: "tex2jax_ignore",29skipTags: ["script", "noscript", "style", "textarea", "pre", "code"],30},3132TeX: {33MAXBUFFER: 100000, // see https://github.com/mathjax/MathJax/issues/91034extensions: ["autoload-all.js", "noUndefined.js", "noErrors.js"],35Macros: {36// get these from sage/misc/latex.py37Bold: ["\\mathbb{#1}", 1],38ZZ: ["\\Bold{Z}", 0],39NN: ["\\Bold{N}", 0],40RR: ["\\Bold{R}", 0],41CC: ["\\Bold{C}", 0],42FF: ["\\Bold{F}", 0],43QQ: ["\\Bold{Q}", 0],44QQbar: ["\\overline{\\QQ}", 0],45CDF: ["\\Bold{C}", 0],46CIF: ["\\Bold{C}", 0],47CLF: ["\\Bold{C}", 0],48RDF: ["\\Bold{R}", 0],49RIF: ["\\Bold{I} \\Bold{R}", 0],50RLF: ["\\Bold{R}", 0],51CFF: ["\\Bold{CFF}", 0],52GF: ["\\Bold{F}_{#1}", 1],53Zp: ["\\ZZ_{#1}", 1],54Qp: ["\\QQ_{#1}", 1],55Zmod: ["\\ZZ/#1\\ZZ", 1],56},57noErrors: {58// http://docs.mathjax.org/en/latest/tex.html#noerrors59inlineDelimiters: ["$", "$"],60multiLine: true,61style: {62"font-size": "85%",63"text-align": "left",64color: "red",65padding: "1px 3px",66background: "#FFEEEE",67border: "none",68},69},70noUndefined: {71// http://docs.mathjax.org/en/latest/tex.html#noundefined72attributes: {73mathcolor: "red",74mathbackground: "#FFEEEE",75mathsize: "90%",76},77},78},7980// do not use "xypic.js", frequently causes crash!81"HTML-CSS": {82linebreaks: {83automatic: true,84},85},86SVG: {87linebreaks: {88automatic: true,89},90},91showProcessingMessages: false,92};939495