mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-12-21 12:07:41 +01:00
Include the color LaTeX package
This commit is contained in:
@@ -138,6 +138,9 @@ const loadMathJax = async () => {
|
|||||||
if (!mathJaxLoaded) {
|
if (!mathJaxLoaded) {
|
||||||
mathJaxLoading = true;
|
mathJaxLoading = true;
|
||||||
|
|
||||||
|
// Load the document creator last
|
||||||
|
const mathjax = (await import("mathjax-full/js/mathjax")).mathjax;
|
||||||
|
|
||||||
// MathJax components we use
|
// MathJax components we use
|
||||||
const AsciiMath = (await import("mathjax-full/js/input/asciimath"))
|
const AsciiMath = (await import("mathjax-full/js/input/asciimath"))
|
||||||
.AsciiMath;
|
.AsciiMath;
|
||||||
@@ -159,6 +162,8 @@ const loadMathJax = async () => {
|
|||||||
|
|
||||||
// Import some TeX packages
|
// Import some TeX packages
|
||||||
await import("mathjax-full/js/input/tex/ams/AmsConfiguration");
|
await import("mathjax-full/js/input/tex/ams/AmsConfiguration");
|
||||||
|
await import("mathjax-full/js/input/tex/bbox/BboxConfiguration");
|
||||||
|
await import("mathjax-full/js/input/tex/color/ColorConfiguration");
|
||||||
await import(
|
await import(
|
||||||
"mathjax-full/js/input/tex/boldsymbol/BoldsymbolConfiguration"
|
"mathjax-full/js/input/tex/boldsymbol/BoldsymbolConfiguration"
|
||||||
);
|
);
|
||||||
@@ -170,8 +175,8 @@ const loadMathJax = async () => {
|
|||||||
await import("mathjax-full/js/input/tex/physics/PhysicsConfiguration");
|
await import("mathjax-full/js/input/tex/physics/PhysicsConfiguration");
|
||||||
}
|
}
|
||||||
const texPackages = includeMhchemPhysics
|
const texPackages = includeMhchemPhysics
|
||||||
? ["base", "ams", "boldsymbol", "mhchem", "physics"]
|
? ["base", "color", "ams", "boldsymbol", "mhchem", "physics"]
|
||||||
: ["base", "ams", "boldsymbol"];
|
: ["base", "color", "ams", "boldsymbol"];
|
||||||
|
|
||||||
// Types needed to lazy-load MathJax
|
// Types needed to lazy-load MathJax
|
||||||
const LiteElement = (await import("mathjax-full/js/adaptors/lite/Element"))
|
const LiteElement = (await import("mathjax-full/js/adaptors/lite/Element"))
|
||||||
@@ -191,9 +196,6 @@ const loadMathJax = async () => {
|
|||||||
).MathJax;
|
).MathJax;
|
||||||
mathJax.amFixes = MathJax.InputJax.AsciiMath.AM.Augment;
|
mathJax.amFixes = MathJax.InputJax.AsciiMath.AM.Augment;
|
||||||
|
|
||||||
// Load the document creator last
|
|
||||||
const mathjax = (await import("mathjax-full/js/mathjax")).mathjax;
|
|
||||||
|
|
||||||
type E = typeof LiteElement;
|
type E = typeof LiteElement;
|
||||||
type T = typeof LiteText;
|
type T = typeof LiteText;
|
||||||
type D = typeof LiteDocument;
|
type D = typeof LiteDocument;
|
||||||
|
|||||||
Reference in New Issue
Block a user