| Server IP : 107.13.46.68 / Your IP : 216.73.216.232 Web Server : Apache/2.4.58 (Ubuntu) System : Linux mariOS 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec 5 13:09:44 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/javascript/mathjax/test/ |
Upload File : |
<!DOCTYPE html>
<html>
<head>
<title>Example of defining a macro that autoloads an extension</title>
<!-- Copyright (c) 2012-2020 The MathJax Consortium -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--
|
| This page shows how to define macros that autoloads an extension
| where those macros are implemented.
|
| The \cancel, \bcancel, \xcancel, and \cancelto macros are
| all defined within the cancel extension, so we tie these
| macros to the function that loads an extension, passing it
| the name of the extension to load.
|
|-->
<script type="text/x-mathjax-config">
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
MathJax.Hub.Insert(MathJax.InputJax.TeX.Definitions.macros,{
cancel: ["Extension","cancel"],
bcancel: ["Extension","cancel"],
xcancel: ["Extension","cancel"],
cancelto: ["Extension","cancel"]
});
});
</script>
<script type="text/javascript" src="../MathJax.js?config=TeX-AMS_HTML-full"></script>
</head>
<body>
<p>
This page makes <code>\cancel</code>, <code>\bcancel</code>,
<code>\xcancel</code>, and <code>\cancelto</code> all be defined so that
they will load the <code>cancel.js</code> extension when first used.
</p>
<p>
Here is the first usage: \(\cancel{x+1}\). It will cause the cancel
package to be loaded automatically.
</p>
</body>
</html>