I'm not sure I understand what you are asking, because the definition
below IS using javascript.
Can you be more precise about what you want to do?
Indeed, I've tried the following code without success.
I just posted one in response to another message in this thread. See
if that helps.
Davide
OK, great. Let us know if you do.
> PS: I'm ashamed for the stupid mistakes in my HTML-JS example. I'm not
> a beginner...
No problem. We all have to start somewhere. Glad we were able to
straighten it out.
Davide
... $ x \href{equality.html}{=} y $ ...
would cause the equal sign to be a link to the file equality.html
(relative to the directory containing the page you are viewing),
presumably an explanation of why the equality is true. On the other
hand,
... $ x \href{http://www.mathjax.org}{=} y $ ...
would link it to the MathJax home page.
Davide
Davide
I'm not sure quite what you mean. Do you mean how to define your own
macros through JavaScript? Unfortunately, there is not documentation
on that at this point, so you would have to go with the examples I
gave, and looking at the source code for unpacked/jax/input/TeX/jax.js
or the extensions in unpacked/extensions/TeX.
> Is there some kind of documentation out there that I am missing?
If you mean the javascript macros, then no. If you mean the
configuration details, then there is a lot of documentation for that.
See
http://www.mathjax.org/docs/1.1/options/index.html
> I was experimenting with the code that can go inside <script
> type="text/x-mathjax-config"></script>. I noticed that you can
> insert actual javascript code unrelated to MathJax. Just wanted to
> know how MathJax handles the unrelated javascript code inside this
> config section.
Yes, the configuration block is normal JavaScript, and can include any
JavaScript that you want. The reason it is marked as text/x-mathjax-
config is so that MathJax can execute it at the correct time in its
startup process. But it runs as plain old JavaScript at that point.
Davide
This is no longer a MathJax question but an HTML one. Internal links
within a page are done via URLs that contain "#name" where "name" is
the name of an anchor within the page. For example
<p> This is the equation $\href{#x-def}{x} + \href{#y-def}{y} =
\href{rho-def}{\rho}$.</p>
<p> And these are the definitions:</p>
<p><a name="x-def">$x$: Special constant.</a></p>
<p><a name="y-def">$y$: More special constant.</a></p>
<p><a name="rho-def">$\rho$: The meaning of life.</a></p>
But with such short definitions, a tooltip would probably be better.
Davide
This is because dollar signs are common enough in plain text that
using them for math delimiters could cause problems for people who are
not writing mathematics. So the default settings for the characters
to use for math-mode delimiters just include \(...\) and not $...$. See
http://www.mathjax.org/docs/1.1/upgrade.html#change-in-default-tex-delimiters
and
http://www.mathjax.org/docs/1.1/options/tex2jax.html
for details, and for examples of how to enable the single dollar sign
as a math delimiter.
Davide