simplify tex/JME: keep brackets in `x-(y-z)`

fixes numbas/editor#208