/usr/share/javascript/mathjax/test/sample-autoload.html is in libjs-mathjax 2.4-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | <!DOCTYPE html>
<html>
<head>
<title>Example of defining a macro that autoloads an extension</title>
<!-- Copyright (c) 2012-2014 The MathJax Consortium -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!--
|
| 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>
|