doc : add automatic detection of mathjax

- works on Ubuntu, in particular.
- documentation to be written if it is ok...