http://trac-hacks.org/ticket/8758
which is the ticket for this issue in the plugin. I suspect that
there is something that the plugin can do differently to allow the
parameters for the script call.
Otherwise, if you can add a script call like
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
config: ["TeX-AMS_HTML.js"],
jax: ["input/TeX"]
});
</script>
then you could load the configuration file that way.
Davide
I suspect that this isn't exactly true. For example, since you can
load an external script, you could create a small script that inserts
the desired SCRIPT tags into the header and load that. This would
"bootstrap" MathJax into the page. It's not pretty, but would
certainly work, if you have access to a place where you serve static
content on a server.
I would guess that there are other ways, too, but I don't know Trac
and can't tell you what they are. The routine that is used to add the
script might have optional parameters to handle the things like ?
config=, though I don't know for sure. Also, it might be possible to
modify the output WITHOUT going through the API directly (by modifying
the structures that you are passed). I have not looked into this at
all, but if Trac can add to the page, you probably can by hand as
well. Not that I'm recommending it.
In any case, this seems to be a Trac issue, not a MathJax one. I
would file a bug report with the Trac developers asking for more
control over the script tags.
> I have
> to put the code into an extra file und load this like mathjax.js with
>
> <script type="text/javascript" source="config.js"> </script>
if you do this INSTEAD of loading MathJax.js, you could have config.js
insert the script that loads MathJax and set the src attribute WITHOUT
it being encoded. That would solve your problem.
> I'm not an javascript-freak and the code of mathjax.js is not really
> readable and so I cannot write
> a fix for that. But I think, the parse-arguments-function has only a
> little bit to modified.
No, this will not work because MathJax does not actually run in this
case. If the URL is encodes to be
http://cdn.mathjax.org/mathjax/latest/MathJax.js%3Fconfig%3DTeX-AMS_HTML
then the file that the server is being asked to look for and serve is
"MathJax.js?config=TeX-AMS_HTML" not "MathJax.js" with a config
parameter. (That is, the "?config=..." is part of the file name).
Since a file with this name doesn't exist, you will not get MathJax.js
but a "file not found" error, and MathJax doesn't run. So MathJax
can't be used to fix this problem. It has to be fixed at the Trac end.
Davide