Hook that marks the presence of math elements in the context's attributes if at least one Math or MathSpan block is present in the document.
Attaches this hook to the given iterator.