pub fn postprocess_math_xml(
document_xml: &str,
math: &[(String, String, bool)],
) -> StringExpand description
把 document.xml 中的 Math 占位标记替换为原生 <m:oMath> 元素。
§参数
document_xml: docx-rs 生成的 document.xml 内容。math:super::content_renderer::take_rendered_math返回的(标记, latex, display)列表。
§返回
替换完成后的 document.xml。每个占位段落(<w:p> 内含标记 run)被
替换为包含 <m:oMath>(行内)或 <m:oMathPara>(块级、居中)的段落;
根元素补充 xmlns:m 声明。无法转换的公式保留 LaTeX 文本
($$...$$ / $...$ 形式),保证内容不丢失。
§错误
无(转换失败时回退为 LaTeX 文本,由 latex_to_omml::convert 的
严格错误通道保证不静默丢内容)。