function substitute( tex ) {
	tex = replace( tex, /%/g, '\\%' );
	return replace( tex, /\\operatorname{([^}]*)}/g, '\\mathop{\\mathrm{$1}}' );
}
Substitutes LaTeX operators not supported by GitHub's MathJax configuration with supported operators.

@private
@param {string} tex - LaTeX equation
@returns {string} substituted equation