simp:false$ p:sqrt(x)^2$ tex(p);It is on my list, but since this is a very well constrained problem someone else might like to look at it.

STACK already modifies some of the TeX output, either via Maxima's "texput" command or by directly modifying the lisp code, here: https://github.com/maths/moodle-qtype_stack/blob/master/stack/maxima/stacktex.lisp

Chris