document: Some fixes in MATH extension