Doing mathmode layout