How can I tell Maxima to typeset `sin(x)^2` as `$$\sin(x)^2$$` (or `$$\sin\left(x\right)^2$$`) rather than `$$\sin^2 x$$`?

(The accepted answer to [this question](https://stackoverflow.com/questions/22355618/maxima-tex-output-to-show-brackets-for-sin-and-cos) suggests using

```
:lisp (setf (get '%sin 'tex) nil) 

```

to remove the special TeX handler for the `sin` function. Having done that, we get `$$\sin^2\left(x\right)$$`, but the position of the superscript is unchanged.)