I am using MathJax to display formulae on my web sites. Out of the box, MathJax recognises many functions like sin, cos, ..., but many are missing, such as sech (hyperbolic secant) and csch(hyperbolic cosecant). I know I can still use these functions in formulae by means of \text, such as

\text{sech} u

However, I would rather make \sech work. To this end, I tried

<div style="display:none">
  $\DeclareMathOperator{\sech}{sech}
   \DeclareMathOperator{\csch}{csch}$
</div>

right after <body>. (I also tried to add an asterisk after DeclareMathOperator.)

This almost works. The problem is that now

\sech^2 u

places the square above sech, instead of after it (proof). Is there a way to fix this? What is the prefered way to define new functions ('operators') in MathJax? Surely there is a good way, for who can live without a full spectrum of hyperbolic functions?!

Edit
Report