Thanks Fabian for giving me those snippets.
Before I do anything drastic I included an easy way to load your own javascript in the generated HTML.
You simply need to have in the target/specs2-reports directory a file: js/specs2-user.js.
function initUserScript(document) {
var js = document.createElement("script");
js.type = "text/javascript";
document.head.appendChild(js);
MathJax.Hub.Config({
tex2jax: {inlineMath: [['\\(','\\)']]}
});
}
Now there need to be some work on the delimiters, especially with interpolated strings. When I use an interpolated string I have to double the delimiters like that:
s2"""
When \\\(a \ne 0\\\), there are two solutions to \\\(ax^2 + bx + c = 0\\\) and they are
$$$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$$$
"""
At least now you have a way to play with it with the latest 2.1-SNAPSHOT.
Cheers,
Eric.