I want to create math equations with Katex in my project. Any help you can provide would be appreciated.
KaTex with the CDN link->https://katex.org/docs/browser.html
I have read this forum post (and many others) ->https://www.construct.net/en/forum/construct-3/general-discussion-7/latex-text-editor-c3-145256
I have addons CSS and HTML Element both by Strani Anelli el3um4s
Here is main.js that is in Scripts folder.
// Import any other script files here, e.g.:
// import * as myModule from "./mymodule.js";
runOnStartup(async runtime =>
{
// Code to run on the loading screen.
// Note layouts, objects etc. are not yet available.
runtime.addEventListener("beforeprojectstart", () => OnBeforeProjectStart(runtime));
runtime.addEventListener("beforeprojectstart", () => LoadExternalScript(runtime));
});
async function LoadExternalScript(runtime)
{
await runtime.assets.loadScripts("https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.js");
}
async function OnBeforeProjectStart(runtime)
{
// Code to run just before 'On start of layout' on
// the first layout. Loading has finished and initial
// instances are created and available to use here.
runtime.addEventListener("tick", () => Tick(runtime));
}
function Tick(runtime)
{
// Code to run every tick
}