Skip to content

AI turns documents or topics into real, native PowerPoint decks—with native shapes, transitions and animations, data-backed charts and tables on demand, audio narration from speaker notes, and support for your own .pptx templates. · by Hugo He

feat(native-formula): route inline math through authoring workflows

hugohe384e033b62adf
diff --git a/README.md b/README.md
index ec657ed9..c843ec2a 100644
--- a/README.md
+++ b/README.md
@@ -326,9 +326,9 @@ The AI handles everything — content analysis, visual design, SVG generation, a
You: Quickly generate a 5-page deck from projects/q3-report/sources/report.pdf — no need to confirm with me
```
-Whatever you state explicitly is followed; whatever you leave unspecified the agent decides on its own instead of asking. It still converts sources, fills factual gaps, applies the shared visual baseline, and uses images/icons/native shapes/charts/tables/PowerPoint-native block formulas as needed — it drops interaction and durable planning, not presentation capability. It is one-pass and non-resumable, and there is no `svg_final/` preview. Full guide → [Quick mode](./docs/getting-started.md#quick-mode).
+Whatever you state explicitly is followed; whatever you leave unspecified the agent decides on its own instead of asking. It still converts sources, fills factual gaps, applies the shared visual baseline, and uses images/icons/native shapes/charts/tables/PowerPoint-native inline or block formulas as needed — it drops interaction and durable planning, not presentation capability. It is one-pass and non-resumable, and there is no `svg_final/` preview. Full guide → [Quick mode](./docs/getting-started.md#quick-mode).
-> **Output:** The SVG pipeline has one PPTX converter: it reads `svg_output/` and writes a directly editable native DrawingML deck to `exports/<name>_<timestamp>.pptx`. The default Generate flow runs `finalize_svg.py` and produces self-contained previews in `svg_final/`; PowerPoint's manual **Convert to Shape** command is outside the supported contract. Explicit [quick generation](./skills/ppt-master/workflows/profiles/quick-generate.md) skips Strategist, confirmation, `design_spec.md`, `spec_lock.md`, and `finalize_svg.py`: whatever you state explicitly is followed, and whatever you leave unspecified the agent decides directly in one active context. It still converts sources, researches factual gaps, applies shared mode/style/aesthetic guidance, prepares required images/icons, authors formulas as native block-equation markers, considers native shapes and data visualizations, hand-authors SVG, passes the lockless Quick final quality check, and exports the final PPTX. It writes no substitute plan and cannot resume after context loss. Formula markers compile their LaTeX payload to editable OMML for PowerPoint 2010+; their ordinary SVG children are preview-only and are discarded during export. Formula rendering and editability in Keynote, WPS, LibreOffice, and other non-PowerPoint clients are not part of this contract. Ordinary export capabilities remain available as needed, including native chart/table replacement, notes, motion, narration, and diagnostics; notes, custom object animation, and narration start off, and the agent may enable them when the request or deck needs them. A default-path Quick export writes the normal postflight report and snapshots `svg_output/` to `backup/<timestamp>/svg_output/`; an explicit output path keeps the ordinary no-backup behavior. By default charts and tables export as individually editable SVG-derived DrawingML shapes, which prioritize cross-app visual consistency. Pass `--native-charts-and-tables` to replace eligible groups with PowerPoint-native Chart/Table objects backed by data, which provide **Edit Data** and object-specific controls but may render differently across apps; this variant is saved as `exports/<name>_<timestamp>_native_charts_tables.pptx`. Both chart/table export variants are editable—the distinction is the PowerPoint object model, not editability itself.
+> **Output:** The SVG pipeline has one PPTX converter: it reads `svg_output/` and writes a directly editable native DrawingML deck to `exports/<name>_<timestamp>.pptx`. The default Generate flow runs `finalize_svg.py` and produces self-contained previews in `svg_final/`; PowerPoint's manual **Convert to Shape** command is outside the supported contract. Explicit [quick generation](./skills/ppt-master/workflows/profiles/quick-generate.md) skips Strategist, confirmation, `design_spec.md`, `spec_lock.md`, and `finalize_svg.py`: whatever you state explicitly is followed, and whatever you leave unspecified the agent decides directly in one active context. It still converts sources, researches factual gaps, applies shared mode/style/aesthetic guidance, prepares required images/icons, authors formulas as native inline or block markers, considers native shapes and data visualizations, hand-authors SVG, passes the lockless Quick final quality check, and exports the final PPTX. It writes no substitute plan and cannot resume after context loss. Formula markers compile their LaTeX payload to editable OMML for PowerPoint 2010+; block groups and inline `<tspan>` runs keep ordinary SVG previews that are replaced during export. Formula rendering and editability in Keynote, WPS, LibreOffice, and other non-PowerPoint clients are not part of this contract. Ordinary export capabilities remain available as needed, including native chart/table replacement, notes, motion, narration, and diagnostics; notes, custom object animation, and narration start off, and the agent may enable them when the request or deck needs them. A default-path Quick export writes the normal postflight report and snapshots `svg_output/` to `backup/<timestamp>/svg_output/`; an explicit output path keeps the ordinary no-backup behavior. By default charts and tables export as individually editable SVG-derived DrawingML shapes, which prioritize cross-app visual consistency. Pass `--native-charts-and-tables` to replace eligible groups with PowerPoint-native Chart/Table objects backed by data, which provide **Edit Data** and object-specific controls but may render differently across apps; this variant is saved as `exports/<name>_<timestamp>_native_charts_tables.pptx`. Both chart/table export variants are editable—the distinction is the PowerPoint object model, not editability itself.
> **Already have a `.pptx` you want to reuse?** Hand the AI that deck plus your material and ask it to "fill this deck with the new content" — it fills text, table, and chart data into your existing design and exports only the pages you pick, staying natively editable. See the [FAQ](./docs/faq.md) and [template-fill workflow](./skills/ppt-master/workflows/template-fill-pptx.md).
diff --git a/README_CN.md b/README_CN.md
index ba74f74c..9935d461 100644
--- a/README_CN.md
+++ b/README_CN.md
@@ -335,9 +335,9 @@ AI 全程处理——内容分析、视觉设计、SVG 生成、PPTX 导出。
你:用 projects/q3-report/sources/report.pdf 快速生成一份 5 页 PPT,不用跟我确认
```
-你明确提的照做,你没提的由 AI 直接定,不再回来问你。它仍会转换来源、补齐事实、应用共享视觉基线,并按需使用图片 / 图标 / 原生形状 / 图表 / 表格 / PowerPoint 原生块级公式——省掉的是交互与持久规划,不是 PPT 能力。它是不可续接的一次性生成,也不会产生 `svg_final/` 预览。完整说明 → [快速模式](./docs/zh/getting-started.md#快速模式)。
+你明确提的照做,你没提的由 AI 直接定,不再回来问你。它仍会转换来源、补齐事实、应用共享视觉基线,并按需使用图片 / 图标 / 原生形状 / 图表 / 表格 / PowerPoint 原生行内或块级公式——省掉的是交互与持久规划,不是 PPT 能力。它是不可续接的一次性生成,也不会产生 `svg_final/` 预览。完整说明 → [快速模式](./docs/zh/getting-started.md#快速模式)。
-> **输出说明:** SVG 管线统一由项目转换器读取 `svg_output/`,生成可直接编辑的原生 DrawingML `.pptx`,保存至 `exports/<name>_<timestamp>.pptx`。默认 Generate 流程会运行 `finalize_svg.py` 并生成自包含预览 `svg_final/`;PowerPoint 手工“转换为形状”不在支持范围。用户可显式启用[快速生成](./skills/ppt-master/workflows/profiles/quick-generate.md):它跳过 Strategist、确认、`design_spec.md`、`spec_lock.md` 与 `finalize_svg.py`——你明确提出的要求照做,你没提的由 Agent 在一次有效上下文中直接决定;仍按需转换来源、研究事实缺口、应用共享 mode / visual style / 美学规范、准备图片 / 图标,并把公式直接创作为原生块级公式 marker,同时考虑原生形状与数据可视化,随后按规范手写 SVG,通过无锁的 Quick 最终质量检查,再导出最终 PPTX。它不写替代计划,上下文丢失后不能续接。公式 marker 会把 LaTeX payload 编译为 PowerPoint 2010+ 可编辑 OMML;组内普通 SVG 子元素仅供预览,导出时会被丢弃。Keynote、WPS、LibreOffice 等非 PowerPoint 客户端的公式显示与编辑能力不在支持合同内。原生图表 / 表格替换、讲稿、动效、旁白和诊断等普通导出能力仍可按需使用;讲稿、自定义对象动画和旁白默认关闭,Agent 可在用户要求或 deck 确有需要时启用。Quick 使用默认输出路径时仍会生成普通 postflight 报告,并把 `svg_output/` 镜像到 `backup/<timestamp>/svg_output/`;显式指定输出路径时沿用普通流程不创建备份的行为。图表和表格默认导出为 SVG 派生、可逐形状编辑的 DrawingML 对象,优先保证 PowerPoint / Keynote / WPS 间的视觉一致性;可加 `--native-charts-and-tables`,把符合合同的组替换为带数据源和对象专属编辑能力的 PowerPoint 原生 Chart/Table 对象,跨软件渲染可能略有差异,保存为 `exports/<name>_<timestamp>_native_charts_tables.pptx`。这两种图表/表格导出变体都可编辑,区别在于 PowerPoint 对象模型,而不是“能否编辑”。
+> **输出说明:** SVG 管线统一由项目转换器读取 `svg_output/`,生成可直接编辑的原生 DrawingML `.pptx`,保存至 `exports/<name>_<timestamp>.pptx`。默认 Generate 流程会运行 `finalize_svg.py` 并生成自包含预览 `svg_final/`;PowerPoint 手工“转换为形状”不在支持范围。用户可显式启用[快速生成](./skills/ppt-master/workflows/profiles/quick-generate.md):它跳过 Strategist、确认、`design_spec.md`、`spec_lock.md` 与 `finalize_svg.py`——你明确提出的要求照做,你没提的由 Agent 在一次有效上下文中直接决定;仍按需转换来源、研究事实缺口、应用共享 mode / visual style / 美学规范、准备图片 / 图标,并把公式直接创作为原生行内或块级 marker,同时考虑原生形状与数据可视化,随后按规范手写 SVG,通过无锁的 Quick 最终质量检查,再导出最终 PPTX。它不写替代计划,上下文丢失后不能续接。公式 marker 会把 LaTeX payload 编译为 PowerPoint 2010+ 可编辑 OMML;块级 group 与行内 `<tspan>` run 都保留普通 SVG 预览,导出时将其替换。Keynote、WPS、LibreOffice 等非 PowerPoint 客户端的公式显示与编辑能力不在支持合同内。原生图表 / 表格替换、讲稿、动效、旁白和诊断等普通导出能力仍可按需使用;讲稿、自定义对象动画和旁白默认关闭,Agent 可在用户要求或 deck 确有需要时启用。Quick 使用默认输出路径时仍会生成普通 postflight 报告,并把 `svg_output/` 镜像到 `backup/<timestamp>/svg_output/`;显式指定输出路径时沿用普通流程不创建备份的行为。图表和表格默认导出为 SVG 派生、可逐形状编辑的 DrawingML 对象,优先保证 PowerPoint / Keynote / WPS 间的视觉一致性;可加 `--native-charts-and-tables`,把符合合同的组替换为带数据源和对象专属编辑能力的 PowerPoint 原生 Chart/Table 对象,跨软件渲染可能略有差异,保存为 `exports/<name>_<timestamp>_native_charts_tables.pptx`。这两种图表/表格导出变体都可编辑,区别在于 PowerPoint 对象模型,而不是“能否编辑”。
> **已有一份想复用的 `.pptx`?** 把那份 deck 连同素材给 AI,说「套模板」即可——它会把新内容(文字、表格、图表数据)填进你现有的设计,只导出你挑选的页面,且保持原生可编辑。详见 [常见问题](./docs/zh/faq.md) 与 [套模板工作流](./skills/ppt-master/workflows/template-fill-pptx.md)。
diff --git a/docs/faq.md b/docs/faq.md
index e0c96fd7..27f18a42 100644
--- a/docs/faq.md
+++ b/docs/faq.md
@@ -148,11 +148,14 @@ If your workflow specifically requires Excel-driven data editing or PowerPoint's
## Q: Are formulas editable?
-Yes, in PowerPoint. Formula-bearing SVG groups carry source LaTeX and export as
-editable PowerPoint OMML block equations; they are not formula screenshots or
-picture assets. Raw LaTeX does not render by itself in SVG, so the group also
-contains ordinary SVG text/shapes for browser and live preview. Export discards
-those preview children when it replaces the group with the native equation.
+Yes, in PowerPoint. PPT Master exports both standalone block equations and
+same-paragraph inline formulas as editable OMML, not screenshots or picture
+assets. A block uses a formula group; inline math uses a leaf
+`<tspan data-pptx-inline-formula="...">preview</tspan>` among ordinary text
+runs. Matrices, multiline derivations, and other high-structure expressions
+remain blocks. Raw LaTeX does not render in SVG, so each marker carries an
+ordinary visible preview that native export replaces without adding an image
+fallback.
The native target is PowerPoint 2010+. Formula display and editability in
Keynote, WPS, LibreOffice, and other non-PowerPoint clients are not supported;
diff --git a/docs/powerpoint-svg-mapping.md b/docs/powerpoint-svg-mapping.md
index 87ff0d98..b84b744b 100644
--- a/docs/powerpoint-svg-mapping.md
+++ b/docs/powerpoint-svg-mapping.md
@@ -209,15 +209,17 @@ The exhaustive chart/table schemas and supported family list intentionally remai
| PowerPoint feature | Project representation | PPTX result | Compatibility | Validation boundary |
|---|---|---|---|---|
-| Editable block equation | One `<g data-pptx-replace-with="formula">` with explicit bounds, source LaTeX in `<metadata type="application/json">`, and visible SVG preview children | PowerPoint text shape containing `a14:m` plus editable OMML | PowerPoint 2010+ | Independent block formulas and the registered LaTeX subset only; unsupported input fails closed |
-| Browser / live preview | Ordinary SVG text and shapes inside the marker group | Discarded when the complete group is replaced by the native equation | Raw LaTeX does not render in SVG | Preview children must express the same equation; they are not a PPTX fallback |
-| Non-PowerPoint formula playback | The same native marker; no picture branch | No compatibility fallback is added | Keynote, WPS, LibreOffice, and other clients are outside the formula contract | Do not claim cross-client rendering or editability |
+| Editable block equation | One `<g data-pptx-replace-with="formula">` with explicit bounds, source LaTeX in `<metadata type="application/json">`, and visible SVG preview children | PowerPoint text shape containing `a14:m > m:oMathPara > m:oMath` | PowerPoint 2010+ | Matrices, multiline derivations, and other standalone high-structure formulas use the registered block contract; unsupported input fails closed |
+| Editable inline formula | A leaf `<tspan data-pptx-inline-formula="delimiter-free LaTeX">preview text</tspan>` among ordinary text runs | The same DrawingML `a:p` retains surrounding runs and inserts `a14:m > m:oMath` | PowerPoint 2010+ | Direct non-empty preview text only; no child element, positional `x/y/dx/dy`, structured placeholder/Master/Layout ownership, preserved imported `txBody`, or native-replacement ancestor |
+| Browser / live preview | Ordinary SVG children inside a block marker, or the inline marker's direct text | Only the registered preview is discarded when native math is written | Raw LaTeX does not render in SVG | Preview content must express the same formula; it is not a PPTX fallback |
+| Formula typography | Block payload style, or computed inline text-run style | Inline math inherits size and visible solid fill, then uses the project text language and Cambria Math | PowerPoint 2010+ | High-structure or multiline math remains block-level |
+| Non-PowerPoint formula playback | The same native markers; no picture branch | No compatibility fallback is added | Keynote, WPS, LibreOffice, and other clients are outside the formula contract | Do not claim cross-client rendering or editability |
Formula replacement is always active and does not use
`--native-charts-and-tables`. It creates no `formula_manifest.json`, formula
-PNG, media relationship, or `mc:Fallback` picture. The JSON LaTeX payload is the
-native formula source; SVG children exist only so the authored page remains
-visible in browsers before export.
+PNG, media relationship, or `mc:Fallback` picture. Block JSON and inline
+`data-pptx-inline-formula` values are the native formula sources; SVG preview
+content exists only so the authored page remains visible before export.
## 10. PowerPoint playback and package features
diff --git a/docs/roadmap.md b/docs/roadmap.md
index 2fbed684..2ddc9024 100644
--- a/docs/roadmap.md
+++ b/docs/roadmap.md
@@ -43,7 +43,7 @@ A presentation is four layers: what is on the slide, how it is arranged, how it
| Charts | Systematized | Dedicated authoring reference; SVG by default, native Chart replacement available as an explicit opt-in |
| Tables | Systematized | Dedicated authoring reference; six cell-grid grammars, native Table replacement on the same opt-in |
| Diagrams | Systematized | Six relationship atoms — `order`, `link`, `parent`, `membership`, `contrast`, `overlap` |
-| Formulas | Implemented | Independent block formulas compile from a strict LaTeX subset to editable PowerPoint OMML; SVG children are preview-only and no formula image fallback is emitted. PowerPoint 2010+ is supported; non-PowerPoint clients are outside the contract |
+| Formulas | Implemented | Standalone block formulas and same-paragraph inline formulas compile from a strict LaTeX subset to editable PowerPoint OMML; SVG previews are authoring-only and no formula image fallback is emitted. PowerPoint 2010+ is supported; non-PowerPoint clients are outside the contract |
| Audio & video | Covered / Signal-driven | Narration audio embeds per slide today; arbitrary video, background music, and media compression are planned modules in the Enhance route |
| SmartArt, 3D models, OLE objects | Signal-driven | No current authoring path |
diff --git a/docs/technical-design.md b/docs/technical-design.md
index be55bde1..8c757cd6 100644
--- a/docs/technical-design.md
+++ b/docs/technical-design.md
@@ -503,13 +503,17 @@ choice.
**Image analysis is metadata-first, with a narrow visual fallback.** When images exist, `analyze_images.py` supplies the regenerated measured facts in `analysis/image_analysis.csv`; the CSV is a view over the live `images/` folder, not a durable cache. In the default pipeline, Strategist first resolves supplied images from source placement and nearby prose, captions / alt text / titles, filenames, user notes, existing resource records, and that metadata. It may inspect one specific image only when a material ambiguity remains about selection, factual identity, page role, crop safety, or focal placement—never as a bulk inventory scan. The answer is written into Design Spec §VIII, after which Executor uses the plan and measured geometry without reopening source pixels for semantic discovery. In `quick-generate`, the current agent applies the same bounded analysis while preparing the selected resources from active-context decisions; no Design Spec projection or general resource roster is written. Image to PPTX's normalized page frames are the narrow exception: every frame is inspected once to build source evidence and identify ordinary text, identity or decorative graphics, charts/tables/data graphics, scene regions, and overlap. Later reads stay page/region-local while the current Codex agent prepares registered clean-base and subject/foreground assets through the existing reference-image path. Low-resolution logos, icons, and decorative graphics may be reconstructed only with identity, silhouette, proportions, colors, and wordmarks locked where applicable. Charts, tables, and data graphics cannot use generative reconstruction; they require native objects with verifiable values, exact source assets, or `manual_required`. Multiple non-overlapping objects with padded bounding boxes may share one generation plate before grid slicing or SVG bounding-box cropping creates independent objects. User images, extracted images, web images, AI outputs, and sliced elements still converge into the same measured fact table.
-**Native formulas are authored page objects, not image resources.** The SVG
-group stores source LaTeX in a `data-pptx-replace-with="formula"` marker and
-contains ordinary SVG text/shapes so browser preview remains visible; raw LaTeX
-itself does not render in SVG. Native export discards those children and writes
-editable OMML in a PowerPoint text shape. The current contract is independent
-block formulas for PowerPoint 2010+ only, with no formula PNG, media
-relationship, or image fallback for non-PowerPoint clients.
+**Native formulas are authored page objects, not image resources.** A standalone
+block stores source LaTeX in a `data-pptx-replace-with="formula"` group and
+exports `m:oMathPara`; a leaf
+`<tspan data-pptx-inline-formula="...">preview</tspan>` inside ordinary text
+exports `m:oMath` in that same DrawingML paragraph. Inline math inherits the
+text run's size and visible solid fill, then uses the project text language and
+Cambria Math; matrices,
+multiline derivations, and other high-structure expressions remain blocks. Both
+forms keep ordinary SVG preview content because raw LaTeX does not render in
+SVG. PowerPoint 2010+ is the target, with no formula PNG, media relationship,
+or image fallback for non-PowerPoint clients.
**Retained planning context** carries continuity; the on-demand page projector is only a diagnostic described below.
diff --git a/docs/why-ppt-master.md b/docs/why-ppt-master.md
index 3bdc228e..166993fc 100644
--- a/docs/why-ppt-master.md
+++ b/docs/why-ppt-master.md
@@ -23,14 +23,14 @@ Editable is already table stakes — exporting each slide as an editable `.pptx`
- **Slide masters & layouts** — real `p:sldMaster` / `p:sldLayout` structure with inheritance (on template / structured routes), not the same chrome pasted onto every page
- **Native shapes** — preset geometry with working adjustment handles (block arrows, chevrons, callouts, flowchart nodes…), connectors, and freeform paths, not just rectangles
- **Native charts & tables, on demand** — data-backed chart and table objects with an Edit-Data workbook when you want them (trade-off note below)
-- **Native block equations** — a strict LaTeX subset compiles to editable PowerPoint OMML instead of a formula picture
+- **Native equations, block or inline** — a strict LaTeX subset compiles to editable PowerPoint OMML instead of a formula picture
- **The full text, picture, fill, and effect model** — run/paragraph formatting, picture crop and shape-clip, gradients, patterns, outer shadow, glow
- **Transitions, entrance / emphasis / path / exit animation, and speaker notes → voice narration** — real OOXML timing and package parts, not baked-in video
- **Template distillation on top** — hand it reference material and it extracts a reusable brand / style / layout / deck template; a layer of reuse built *above* the native primitives
And this depth is a **direction of travel, not a fixed list.** The project's north star is to keep converging with PowerPoint itself — an ongoing effort to build and integrate more of its native capabilities, release after release, narrowing the gap between what an AI can generate for you and what you could build by hand in PowerPoint.
-So the boundary is honest, and it moves. Some things are out of scope today — **SmartArt** (a closed, brittle object model, deliberately left out and better rebuilt from ordinary native shapes), a few decorative effects (WordArt, reflection, soft edges), and embedded or legacy objects (OLE, video, macros). Native equations currently mean independent block formulas targeting PowerPoint 2010+; cross-client formula rendering and editability are not promised. What's in and what's out is never hand-waved: the exact, feature-by-feature boundary — native / approximate / bake-required / unsupported — is published in the [PowerPoint ↔ SVG Mapping Guide](./powerpoint-svg-mapping.md).
+So the boundary is honest, and it moves. Some things are out of scope today — **SmartArt** (a closed, brittle object model, deliberately left out and better rebuilt from ordinary native shapes), a few decorative effects (WordArt, reflection, soft edges), and embedded or legacy objects (OLE, video, macros). Native equations currently cover standalone blocks and same-paragraph inline math targeting PowerPoint 2010+; matrices and multiline derivations remain block-level, and cross-client rendering/editability is not promised. What's in and what's out is never hand-waved: the exact, feature-by-feature boundary — native / approximate / bake-required / unsupported — is published in the [PowerPoint ↔ SVG Mapping Guide](./powerpoint-svg-mapping.md).
And out of scope rarely means *can't* — more often it means *not yet* (the timing isn't right) or *not worth it* (for a niche effect, a quick manual tweak in PowerPoint beats the engineering cost). That call is easy to make precisely because PPT Master's output is a high-quality **draft you keep editing, not a sealed final deck** — the last mile is yours by design.
diff --git a/docs/zh/faq.md b/docs/zh/faq.md
index 2d4f7fdd..a047c255 100644
--- a/docs/zh/faq.md
+++ b/docs/zh/faq.md
@@ -150,10 +150,12 @@ PPT Master 本身免费开源,唯一的成本来自你自己的 AI 模型用
## Q: 公式可以编辑吗?
-可以,但支持目标是 PowerPoint。含公式的 SVG 组会携带源 LaTeX,并在导出时
-转换为可编辑的 PowerPoint OMML 块级公式,而不是公式截图或图片资源。原始
-LaTeX 不能直接在 SVG 中显示,因此该组还会包含普通 SVG 文字 / 形状,供浏览器
-和实时预览使用;导出器用原生公式替换整个组时会丢弃这些预览子元素。
+可以,但支持目标是 PowerPoint。PPT Master 会把独立块级公式和同段行内
+公式都导出为可编辑 OMML,而不是截图或图片资源。块级公式使用 formula
+group;行内公式使用夹在普通文本 run 中的叶子
+`<tspan data-pptx-inline-formula="...">preview</tspan>`。矩阵、多行推导等
+高结构表达仍使用块级形式。原始 LaTeX 不能直接在 SVG 中显示,因此每个
+marker 都携带普通可见预览;原生导出会替换该预览,不增加图片兜底。
原生目标为 PowerPoint 2010+。Keynote、WPS、LibreOffice 等非 PowerPoint
客户端中的公式显示与编辑能力不在支持范围内;PPT Master 不为这些客户端附加
diff --git a/docs/zh/powerpoint-svg-mapping.md b/docs/zh/powerpoint-svg-mapping.md
index d00075f8..189e19ae 100644
--- a/docs/zh/powerpoint-svg-mapping.md
+++ b/docs/zh/powerpoint-svg-mapping.md
@@ -203,14 +203,16 @@ PowerPoint 原生 Chart/Table 对象是可选功能。默认导出保留 SVG fal
| PowerPoint 功能 | 项目表达 | PPTX 结果 | 兼容性 | 校验边界 |
|---|---|---|---|---|
-| 可编辑块级公式 | 一个带显式边界、在 `<metadata type="application/json">` 中保存源 LaTeX、并含可见 SVG 预览子元素的 `<g data-pptx-replace-with="formula">` | 含 `a14:m` 与可编辑 OMML 的 PowerPoint 文本 shape | PowerPoint 2010+ | 仅支持独立块级公式和已登记 LaTeX 子集;不支持的输入直接失败 |
-| 浏览器 / 实时预览 | marker 组内的普通 SVG 文字与形状 | 整组被原生公式替换时丢弃 | 原始 LaTeX 不能直接在 SVG 中渲染 | 预览子元素必须表达同一公式;它们不是 PPTX 兜底 |
-| 非 PowerPoint 客户端播放 | 同一个原生 marker;没有图片分支 | 不附加兼容兜底 | Keynote、WPS、LibreOffice 等客户端不在公式合同内 | 不宣称跨客户端显示或编辑能力 |
+| 可编辑块级公式 | 一个带显式边界、在 `<metadata type="application/json">` 中保存源 LaTeX、并含可见 SVG 预览子元素的 `<g data-pptx-replace-with="formula">` | 含 `a14:m > m:oMathPara > m:oMath` 的 PowerPoint 文本 shape | PowerPoint 2010+ | 矩阵、多行推导等独立高结构公式使用块级合同;不支持的输入直接失败 |
+| 可编辑行内公式 | 普通文本 run 中的叶子 `<tspan data-pptx-inline-formula="无定界符 LaTeX">preview text</tspan>` | 同一 DrawingML `a:p` 保留前后 run,并插入 `a14:m > m:oMath` | PowerPoint 2010+ | 只允许非空直接预览文本;禁止子元素、`x/y/dx/dy`、结构化 placeholder / Master / Layout 归属、保留的导入 `txBody` 或原生替换祖先 |
+| 浏览器 / 实时预览 | 块级 marker 内的普通 SVG 子元素,或行内 marker 的直接文本 | 写入原生公式时只丢弃已登记预览 | 原始 LaTeX 不能直接在 SVG 中渲染 | 预览必须表达同一公式;它不是 PPTX 兜底 |
+| 公式字体 | 块级 payload 样式,或行内文本 run 的计算样式 | 行内公式继承字号与可见纯色填充,并使用项目文本语言和 Cambria Math | PowerPoint 2010+ | 高结构或多行数学内容仍使用块级形式 |
+| 非 PowerPoint 客户端播放 | 同一类原生 marker;没有图片分支 | 不附加兼容兜底 | Keynote、WPS、LibreOffice 等客户端不在公式合同内 | 不宣称跨客户端显示或编辑能力 |
公式替换始终启用,不使用 `--native-charts-and-tables`。该路径不会创建
`formula_manifest.json`、公式 PNG、media relationship 或作为图片的
-`mc:Fallback`。JSON 中的 LaTeX payload 是原生公式源;SVG 子元素只负责让
-导出前的作者页面可以在浏览器中看见。
+`mc:Fallback`。块级 JSON 和行内 `data-pptx-inline-formula` 的值是原生公式源;
+SVG 预览内容只负责让导出前的作者页面保持可见。
## 10. PowerPoint 播放与打包功能
diff --git a/docs/zh/roadmap.md b/docs/zh/roadmap.md
index 5609ce7c..cb5c47c9 100644
--- a/docs/zh/roadmap.md
+++ b/docs/zh/roadmap.md
@@ -43,7 +43,7 @@
| 图表 | 系统化 | 有专属创作 reference;默认 SVG,原生 Chart 替换为显式 opt-in |
| 表格 | 系统化 | 有专属创作 reference;六种单元格网格语法,原生 Table 替换走同一 opt-in |
| 关系图 | 系统化 | 六个关系原子——`order`、`link`、`parent`、`membership`、`contrast`、`overlap` |
-| 公式 | 已实现 | 独立块级公式可从严格 LaTeX 子集编译为可编辑 PowerPoint OMML;SVG 子元素仅供预览,不生成公式图片兜底。支持 PowerPoint 2010+,非 PowerPoint 客户端不在合同内 |
+| 公式 | 已实现 | 独立块级公式与同段行内公式都可从严格 LaTeX 子集编译为可编辑 PowerPoint OMML;SVG 预览仅供创作阶段使用,不生成公式图片兜底。支持 PowerPoint 2010+,非 PowerPoint 客户端不在合同内 |
| 音视频 | 已覆盖 / 信号驱动 | 旁白音频今天逐页嵌入;任意视频、背景音乐与媒体压缩是 Enhance 路线中的 planned 模块 |
| SmartArt、3D 模型、OLE 对象 | 信号驱动 | 目前没有创作路径 |
diff --git a/docs/zh/technical-design.md b/docs/zh/technical-design.md
index e7121e4e..4e253800 100644
--- a/docs/zh/technical-design.md
+++ b/docs/zh/technical-design.md
@@ -426,12 +426,15 @@ Stage-1 沟通推荐的编写不得读取这些候选或任何模板内容。UI
**图片分析以重算元数据为先,只保留小范围视觉兜底。** 当项目里存在图片时,`analyze_images.py` 把可度量事实重算到 `analysis/image_analysis.csv`;该 CSV 是实时 `images/` 目录的派生视图,不是持久缓存。默认流程中,Strategist 先根据图片在源文中的位置与前后文、图注 / alt / 标题、文件名、用户说明、已有资源记录和这些元数据判断。只有当某一张具体图片在选用、事实身份、页面角色、裁剪安全或焦点放置上仍有实质歧义时,才可单独查看它,绝不得扫描整个图片目录。结论写入 Design Spec §VIII 后,Executor 只消费该计划与几何数据,不会重新打开源图进行语义探索。`quick-generate` 则由当前 Agent 根据当前上下文决策准备实际选中的资源,并采用同样的有界分析;不写 Design Spec 投影或通用资源清单。图片还原为 PPTX 的规范页面画面是窄例外:每个画面会完整检查一次,以建立源证据并区分普通文字、身份 / 装饰图形、chart / table / data graphic、场景图片与遮挡关系。之后只重开当前页 / 当前区域,并由当前 Codex Agent 通过现有参考图路径准备注册的干净背景层与人物 / 前景层。低清 Logo、图标和装饰只能在锁定身份、轮廓、比例、颜色和字标的前提下参考重建。Chart、table 和 data graphic 禁止生成式重建,必须使用可核对数值的原生对象、精确源资产,或标记 `manual_required`。多个带 padding 包围盒且互不重叠的对象可共用一次生成 plate,再通过 grid slice 或 SVG bbox crop 拆成独立对象。用户图、抽取图、网络图、AI 图和切片图仍统一汇入同一张可度量事实表。
-**原生公式是页面创作对象,不是图片资源。** SVG group 在
-`data-pptx-replace-with="formula"` marker 中保存源 LaTeX,并包含普通 SVG
-文字 / 形状,让浏览器预览保持可见;原始 LaTeX 本身不能在 SVG 中显示。原生
-导出会丢弃这些子元素,并在 PowerPoint 文本 shape 中写入可编辑 OMML。当前
-合同仅支持面向 PowerPoint 2010+ 的独立块级公式,不生成公式 PNG、media
-relationship,也不为非 PowerPoint 客户端提供图片兜底。
+**原生公式是页面创作对象,不是图片资源。** 独立块级公式在
+`data-pptx-replace-with="formula"` group 中保存源 LaTeX,并导出
+`m:oMathPara`;普通文本中的叶子
+`<tspan data-pptx-inline-formula="...">preview</tspan>` 则在同一 DrawingML
+段落中导出 `m:oMath`。行内公式继承文本 run 的字号与可见纯色填充,并使用项目文本语言和
+Cambria Math;矩阵、多行推导等高结构表达仍使用块级形式。两种形式都保留
+普通 SVG 预览,因为原始 LaTeX 本身不能在 SVG 中显示。原生目标为 PowerPoint
+2010+,不生成公式 PNG、media relationship,也不为非 PowerPoint 客户端提供
+图片兜底。
**保留的规划上下文**负责跨页连续性;按需逐页投影只承担下文所述的诊断用途。
diff --git a/docs/zh/why-ppt-master.md b/docs/zh/why-ppt-master.md
index d1ca8a09..07c72b2f 100644
--- a/docs/zh/why-ppt-master.md
+++ b/docs/zh/why-ppt-master.md
@@ -23,14 +23,14 @@
- **母版与版式** —— 真正的 `p:sldMaster` / `p:sldLayout` 继承结构(走模板 / 结构化路线),而不是把同一套页面框架贴到每一页
- **原生形状** —— 带可用调节手柄的预设几何(箭头、V 形、标注、流程节点……)、连接线、自由路径,而不只是矩形
- **按需的原生图表与表格** —— 需要时就是带「编辑数据」工作簿的数据驱动图表 / 表格对象(取舍见下)
-- **原生块级公式** —— 将严格 LaTeX 子集编译为可编辑 PowerPoint OMML,而不是公式图片
+- **原生公式,块级或行内** —— 将严格 LaTeX 子集编译为可编辑 PowerPoint OMML,而不是公式图片
- **完整的文本 / 图片 / 填充 / 效果模型** —— 段落与文本级格式、图片裁剪与形状裁切、渐变、图案、外阴影、发光
- **转场、进入 / 强调 / 动作路径 / 退出动画、演讲者备注 → 语音旁白** —— 都是真正的 OOXML 计时与包内部件,不是烤进去的视频
- **在这之上的模板提炼** —— 把参考材料交给它,它能提炼出可复用的 brand / style / layout / deck 模板;这是建立在原生原语**之上**的一层复用能力
而这份深度是**一个前进方向,不是一张固定清单。** 项目的北极星是持续向 PowerPoint 本身靠拢——不断开发、集成更多它的原生能力,一个版本接一个版本,缩小「AI 能替你生成的」和「你在 PowerPoint 里手工能做出的」之间的差距。
-所以边界是诚实的,而且它在移动。有些能力今天还不在范围内——**SmartArt**(一个封闭、脆弱的对象模型,被刻意排除,其含义更适合用普通原生形状重建)、少数装饰性效果(艺术字、反射、柔化边缘)、以及嵌入 / 遗留对象(OLE、视频、宏)。当前原生公式专指面向 PowerPoint 2010+ 的独立块级公式,不承诺跨客户端公式显示与编辑。哪些在内、哪些在外从不含糊:逐条的功能对照边界——原生 / 近似 / 需烘焙 / 不支持——都公开在 [PowerPoint ↔ SVG 映射指南](./powerpoint-svg-mapping.md) 里。
+所以边界是诚实的,而且它在移动。有些能力今天还不在范围内——**SmartArt**(一个封闭、脆弱的对象模型,被刻意排除,其含义更适合用普通原生形状重建)、少数装饰性效果(艺术字、反射、柔化边缘)、以及嵌入 / 遗留对象(OLE、视频、宏)。当前原生公式已覆盖面向 PowerPoint 2010+ 的独立块级公式和同段行内公式;矩阵与多行推导仍使用块级形式,且不承诺跨客户端公式显示与编辑。哪些在内、哪些在外从不含糊:逐条的功能对照边界——原生 / 近似 / 需烘焙 / 不支持——都公开在 [PowerPoint ↔ SVG 映射指南](./powerpoint-svg-mapping.md) 里。
而且「不在范围内」很少等于「做不到」——更多时候是「时机未到」,或者「性价比不划算」(一个小众效果,去 PowerPoint 里手动改一下,比为它做工程更值)。这个取舍之所以好做,正因为 PPT Master 的产出是一份高质量的**草稿、供你继续修改,而不是封死的成品**——最后一公里本就交给你。
diff --git a/skills/ppt-master/references/executor-base.md b/skills/ppt-master/references/executor-base.md
index 1a40fc65..46a18194 100644
--- a/skills/ppt-master/references/executor-base.md
+++ b/skills/ppt-master/references/executor-base.md
@@ -13,7 +13,7 @@ Always-loaded Executor authority for flat SVG page authoring and behavior shared
| Any semantic cell grid, including a table-family reference | [`executor-table.md`](./executor-table.md) |
| A page will use a preset pattern fill or an independent object is explicitly selected as native-ready | [`native-data-interface.md`](./native-data-interface.md) before emitting the pattern or replacement metadata |
| Any image | [`executor-image.md`](./executor-image.md) + [`image-layout-spec.md`](./image-layout-spec.md) + [`image-layout-patterns.md`](./image-layout-patterns.md) + [`svg-image-embedding.md`](./svg-image-embedding.md) |
-| Any structural standalone mathematical expression | [`native-formula.md`](./native-formula.md) before authoring its marker |
+| Any nontrivial mathematical expression | [`native-formula.md`](./native-formula.md) |
| Any placed image is `Status: Sourced` or its filename has an `image_sources.json` record | [`executor-web-image.md`](./executor-web-image.md), after `executor-image.md` |
| Effective Speaker Notes outcome is enabled after all SVG pages pass | [`executor-notes.md`](./executor-notes.md) |
@@ -21,7 +21,7 @@ Evaluate branches from each object's actual information model, not only from a C
> Narrative skeleton and visual aesthetic come from the locked values routed through the [`modes/`](./modes/_index.md) and [`visual-styles/`](./visual-styles/_index.md) indexes. Executor reads one locked preset file or only the exact `*_references` of a custom synthesis; an unreferenced novel custom reads none. [`shared-standards-core.md`](./shared-standards-core.md) supplies the technical boundary plus the fallback visual-quality and leading defaults when those authorities are silent.
-**Hard rule — Shape-first page authority**: Every visible object intended for the exported slide MUST exist in the final page SVG or be explicitly referenced by it. Templates and `spec_lock.md` guide construction; they are not export-time overlays for missing visible content. Optional native Chart/Table metadata belongs to an independently selected object and never replaces this visible fallback during authoring; [`native-data-interface.md`](./native-data-interface.md) alone defines that metadata and its export activation. Native formulas still require an ordinary SVG preview inside the explicit marker; export replaces only that subtree under [`native-formula.md`](./native-formula.md).
+**Hard rule — Shape-first page authority**: Every visible object intended for the exported slide MUST exist in the final page SVG or be explicitly referenced by it. Templates and `spec_lock.md` guide construction; they are not export-time overlays for missing visible content. Optional native Chart/Table metadata belongs to an independently selected object and never replaces this visible fallback during authoring; [`native-data-interface.md`](./native-data-interface.md) alone defines that metadata and its export activation. Native formula markers require a matching SVG preview; export replaces only it under [`native-formula.md`](./native-formula.md).
**Hard rule — flat PowerPoint structure**: Free-design, brand-only, Style-only, and every `template_reuse_scope: style` project use `pptx_structure.mode: flat`: write no root Master/Layout identity, `data-pptx-layer`, or `data-pptx-placeholder`; every visible object remains Slide-local, and the root declares exactly one canonical `data-pptx-page-role` (`cover` / `toc` / `section` / `content` / `ending`). A Style workspace supplies reusable communication/design direction, composition rhythm, and information-expression defaults without page prototypes. Its identity-adjacent color, typography, icon, and image defaults yield to the final Brand/Deck identity and confirmed project lock. When a Style is installed alongside Layout/Deck, it changes only Direction / method and follows the resolved non-Style structure route. Export materializes one clean project-owned Master plus one Blank Layout from the current lock. Add `data-pptx-role` only to structural page-frame objects whose package, page-number, or animation behavior is not already expressed by specialized metadata; the marked element uses a stable unique `id`. See [`semantic-svg.md`](./semantic-svg.md).
@@ -116,7 +116,7 @@ Apply the content-vs-expression contract above within the selected reading mode.
- **Sparse display-size exception**: a short non-structural Hero/Display element may use one undeclared size outside all anchor bands at most twice across the deck without a lock row. The third occurrence makes that size recurring: stop and return to Strategist to name the role in the Design Spec and `spec_lock.md`, then read back and validate the affected fragments before reuse. This exception never applies to titles, body copy, subtitles, annotations, footnotes, captions, data labels, or card copy, and nearby sizes must not be introduced to imitate one recurring treatment.
- **Outside-band recovery**: for structural text, reflow geometry and use the declared role band locally. For a sparse display occurrence, keep the unitless value and verify that its deck-wide count remains at most two. Never flatten a justified distinction or add a role merely to silence the checker. Mirror pages preserve exact source typography as inherited input.
- Images MUST reference files listed under `images`; no invented filenames
-- Keep short inline notation as editable text. For structural block mathematics, load [`native-formula.md`](./native-formula.md), then author exact LaTeX metadata, the marker, and its SVG preview; this is not image acquisition.
+- For math, load [`native-formula.md`](./native-formula.md): simple notation stays text; one-line structural prose uses inline; matrices, multiline derivations, or standalone high structure use block. Keep exact LaTeX plus preview; never use an image.
Return upstream before any derived/accent identity becomes recurring or structural, or when an undeclared display size reaches its third occurrence, then update the retained context under §2.1. Local garnish, same-role `±2`px adjustments, and at most two sparse display-size occurrences need no lock row. Never expand the lock to silence a comparison. New icon acquisition, images, structural fonts, role anchors, and resources keep their preparation/role rules.
@@ -299,7 +299,7 @@ test -f "<project_path>/icons/<lib>/<name>.svg"
## 5. Font Usage
-Read typography from `spec_lock.md`: `<role>_family` → `title_family` / `body_family` → legacy `font_family`; sparse accents follow §2.1. A native formula's SVG preview follows the page treatment, while the exported Office Math object uses its marker style under [`native-formula.md`](./native-formula.md).
+Read typography from `spec_lock.md`: `<role>_family` → `title_family` / `body_family` → legacy `font_family`; sparse accents follow §2.1. Under [`native-formula.md`](./native-formula.md), blocks use marker style; inline math inherits size / visible solid fill and exports with the project text language in Cambria Math.
**Default — locked-stack realization (may vary treatment)**: Express the Design Spec Character Reference through scale, weight, spacing, color, and composition; keep the locked family. Put the common stack on root `<svg>`, omit matching descendants, and override at the nearest clear `<g>`, `<text>`, or `<tspan>`.
diff --git a/skills/ppt-master/references/native-formula.md b/skills/ppt-master/references/native-formula.md
index 30f77c3a..97f1853f 100644
--- a/skills/ppt-master/references/native-formula.md
+++ b/skills/ppt-master/references/native-formula.md
@@ -1,34 +1,60 @@
# Native Formula Specification
-Shared authoring contract for standalone editable PowerPoint formulas generated
-from exact LaTeX metadata.
+Shared authoring contract for editable PowerPoint math generated from exact
+LaTeX, either inline in Slide-local prose or as a standalone block.
## 1. Trigger and Ownership
**Trigger**: A page contains structural mathematical notation such as a
-fraction, radical, integral, n-ary expression, limit, matrix, multiline
-derivation, delimiter construction, accent, or complex script.
+fraction, radical, integral, n-ary expression, limit, matrix, delimiter
+construction, accent, or complex script.
| Layer | Ownership |
|---|---|
-| Default Strategist | Record exact mathematical content as a delimiter-free LaTeX expression body; do not classify or choose its implementation |
-| Default Executor | Decide ordinary inline text versus a structural block; for a block, transfer that exact expression into metadata and author the marker plus SVG preview |
+| Default Strategist | Record exact mathematical content as a delimiter-free LaTeX expression body; do not classify its implementation |
+| Default Executor | Decide ordinary text versus inline native math versus block native math, then author the selected marker and SVG preview |
| Active Quick context | Perform both content and authoring responsibilities directly |
-| SVG-to-PPTX exporter | Compile marker LaTeX to editable Office Math and replace the preview subtree |
+| SVG-to-PPTX exporter | Compile marker LaTeX to editable Office Math and replace only the registered preview |
-Executor normally keeps short variables, percentages, simple assignments, and
-notation such as `O(n log n)` as ordinary editable SVG text. The Strategist's
-`Mathematical content` field does not pre-decide that classification. Formula
-handling is not a user-confirmed policy, image resource, manifest, or
+| Content form | Authoring choice |
+|---|---|
+| Short variables, percentages, simple assignments, or notation such as `O(n log n)` | Ordinary editable SVG text |
+| One-line structural math embedded in prose | Inline native marker |
+| Matrix, `cases`, `aligned`, multiline derivation, or standalone high-structure expression | Block native marker |
+
+The Strategist's `Mathematical content` field does not pre-decide this choice.
+Formula handling is not a user-confirmed policy, image resource, manifest, or
`spec_lock.md images` entry.
---
-## 2. Canonical Marker
+## 2. Canonical Markers
+
+### 2.1 Inline formula
+
+```xml
+<text x="120" y="240" font-size="28" fill="#173B57">
+ The ratio <tspan data-pptx-inline-formula="\frac{a_i}{b_i}">aᵢ/bᵢ</tspan> remains stable.
+</text>
+```
+
+**Hard rule — one leaf run**: Put non-empty, delimiter-free LaTeX directly in
+`data-pptx-inline-formula` on a leaf `<tspan>`. Give that `<tspan>` one non-empty
+direct preview string with no leading/trailing whitespace, no child element,
+and no `x`, `y`, `dx`, `dy`, or paragraph-layout metadata; spacing belongs to
+the surrounding text. The marker inherits its computed size and visible solid
+fill; exported math uses the project text language and Cambria Math.
+
+**Hard rule — Slide-local ordinary text only**: Do not place an inline marker
+inside a structured Layout placeholder, a Master/Layout layer, imported
+preserved `txBody`, geometry transport subtree, another inline marker, or any
+`data-pptx-replace-with` subtree. Export keeps the surrounding text runs in the
+same `a:p` and replaces only the marker run with `a14:m > m:oMath`.
+
+### 2.2 Block formula
```xml
-<g id="quadratic-formula"
- data-pptx-replace-with="formula"
+<g id="quadratic-formula" data-pptx-replace-with="formula"
data-pptx-x="190" data-pptx-y="245"
data-pptx-width="900" data-pptx-height="180"
data-pptx-bounds="190 245 900 180">
@@ -41,43 +67,36 @@ handling is not a user-confirmed policy, image resource, manifest, or
</g>
```
-**Hard rule — metadata is truth**: Write one direct
-`<metadata type="application/json">` child with non-empty `latex`. Its value is
-the expression body only: omit `$...$`, `$$...$$`, `\(...\)`, and `\[...\]`
-source delimiters. Current authoring uses `display: block`; `font_size` is
-`> 0` and `<= 400` px, `color` is visible, and `align` is `left`, `center`, or
-`right`.
-Give the group finite `data-pptx-x/y`, positive `data-pptx-width/height`, and
-matching root-coordinate `data-pptx-bounds`. The exporter always activates
-formula replacement; `--native-charts-and-tables` does not control it.
+**Hard rule — block metadata is truth**: Write one direct
+`<metadata type="application/json">` child with non-empty delimiter-free
+`latex`, `display: block`, `font_size` in `(0, 400]`, a visible `color`, and
+`align: left|center|right`. Give the group finite `data-pptx-x/y`, positive
+`data-pptx-width/height`, and matching root-coordinate `data-pptx-bounds`.
+Export replaces the complete group with `a14:m > m:oMathPara > m:oMath`.
+
+**Hard rule — preview is SVG, never fallback**: Make every marker preview
+semantically equivalent with ordinary SVG text/shapes/lines/paths. Do not use
+`<image>`, `<foreignObject>`, visible raw LaTeX, or another runtime renderer.
+The exporter discards the registered preview and emits no picture branch.
+
+---
+
+## 3. Source, Failure, and Validation
**Supported subset**: basic text, numbers, operators, Greek/symbol commands,
fractions, radicals, scripts, `\sum` / `\prod` / `\int` with limits, `\left` /
`\right` delimiters, matrix variants, `cases`, `aligned`, text/math styles,
accents, and spacing. Unknown commands or environments fail closed.
-**Hard rule — SVG children are preview only**: Author a semantically equivalent
-preview with ordinary SVG text/shapes/lines/paths. Do not use `<image>`,
-`<foreignObject>`, raw LaTeX text, or another runtime renderer. PPTX export
-discards the marker's visible children and inserts one editable Office Math
-object; the preview is not packaged as a fallback.
-
-**Compatibility boundary**: Native formula output targets Microsoft PowerPoint
-2010+ Office Math. The ordinary child subtree keeps the SVG preview readable,
-but a PPTX opened in WPS, Keynote, LibreOffice, or another non-PowerPoint
-renderer has no embedded formula fallback and is not guaranteed to display it.
-
----
-
-## 3. Failure and Validation
-
-**Hard rule — repair LaTeX upstream**: An unsupported command, invalid marker,
-or compiler/checker failure blocks the page and returns it from validation to
-authoring. Executor rewrites the delimiter-free expression with the supported
-LaTeX subset without changing the planned mathematics; if that cannot preserve
-the content, return it to the content owner for correction. Never substitute a
-PNG, flatten structural math into ordinary text, hand-write OMML, or leave raw
+**Hard rule — repair LaTeX upstream**: Unsupported source or an invalid marker
+blocks the page. Rewrite within the supported subset without changing the
+planned mathematics; otherwise return it to the content owner. Never substitute
+a PNG, flatten structural math into ordinary text, hand-write OMML, or leave raw
LaTeX visible.
-**Validation**: The first-page/final SVG checker validates the marker and
+**Compatibility boundary**: Both forms target Microsoft PowerPoint 2010+ Office
+Math. WPS, Keynote, LibreOffice, and other clients receive no embedded formula
+fallback and are outside the rendering/editability contract.
+
+**Validation**: The first-page/final SVG checker validates every marker and
compiles its LaTeX before release; native export repeats validation.
diff --git a/skills/ppt-master/references/native-shape-authoring.md b/skills/ppt-master/references/native-shape-authoring.md
index ca5bba5a..0e95c69f 100644
--- a/skills/ppt-master/references/native-shape-authoring.md
+++ b/skills/ppt-master/references/native-shape-authoring.md
@@ -55,7 +55,7 @@ paths or contours, or upgrade ordinary SVG during export.
| Stock bent / curved relationship contour | `bentConnector*`, `curvedConnector*` | Prefer when the contour fits and endpoint attachment is not required. The authored object is an unconnected native Connector, so moving nodes does not reroute it. |
| Stock callout | `wedgeRectCallout`, `wedgeRoundRectCallout`, `wedgeEllipseCallout`, `cloudCallout` | For a brand-specific or custom tail, continue through the Boolean gate; use freeform only if the result still cannot be expressed faithfully. |
| Stock ribbon or scroll | `ribbon*`, `ellipseRibbon*`, `verticalScroll`, `horizontalScroll` | Select only when the stock contour is visually acceptable. |
-| Standalone math symbol | `mathPlus`, `mathMinus`, `mathMultiply`, `mathDivide`, `mathEqual`, `mathNotEqual` | Use only when the symbol itself is a diagram shape; inline notation remains text and structural mathematics follows [`native-formula.md`](./native-formula.md). |
+| Standalone math symbol | `mathPlus`, `mathMinus`, `mathMultiply`, `mathDivide`, `mathEqual`, `mathNotEqual` | Use only when the symbol itself is a diagram shape; simple notation remains text, while non-trivial inline or block mathematics follows [`native-formula.md`](./native-formula.md). |
| Literal Office symbol | `heart`, `sun`, `moon`, `lightningBolt`, `gear6`, `gear9` | Never replace an icon required by `spec_lock.icons`. |
Use registry search for a less common literal shape:
diff --git a/skills/ppt-master/scripts/docs/svg-pipeline.md b/skills/ppt-master/scripts/docs/svg-pipeline.md
index 234c47f7..aab7c049 100644
--- a/skills/ppt-master/scripts/docs/svg-pipeline.md
+++ b/skills/ppt-master/scripts/docs/svg-pipeline.md
@@ -524,12 +524,18 @@ It aggregates:
Convert project SVGs into PPTX.
-Native block formulas use an explicit replacement marker owned by
-[`native-formula.md`](../../references/native-formula.md). The marker stores
-source LaTeX in JSON metadata and keeps ordinary SVG text/shapes as its browser
-preview. Formula replacement is always active, independent of
-`--native-charts-and-tables`: export discards the preview children and writes an
-editable PowerPoint 2010+ Office Math object. It emits no formula PNG, media
+Native formulas use the two markers owned by
+[`native-formula.md`](../../references/native-formula.md). A standalone block
+stores delimiter-free LaTeX in the JSON metadata of
+`<g data-pptx-replace-with="formula">` and exports `m:oMathPara`. A leaf
+`<tspan data-pptx-inline-formula="...">preview</tspan>` inside ordinary text
+exports `m:oMath` in the same DrawingML paragraph as its surrounding runs; it
+inherits computed size and visible solid fill, then uses the project text
+language and Cambria Math.
+Matrices, multiline derivations, and other high-structure expressions remain
+blocks. Formula replacement is always active, independent of
+`--native-charts-and-tables`: export replaces only the registered SVG preview
+and writes editable PowerPoint 2010+ Office Math. It emits no formula PNG, media
relationship, or compatibility fallback, and makes no rendering/editability
promise for Keynote, WPS, LibreOffice, or another non-PowerPoint client.
@@ -594,7 +600,7 @@ when needed. The exporter refuses a missing, blocking, non-final, or stale
Quick final report before PPTX creation. Default-path output retains the normal
postflight report and `backup/` snapshot; explicit `-o` retains the ordinary
no-backup behavior. Existing source, analysis, image/icon, and resource-manifest
-artifacts remain untouched; formula source stays inside the authored SVG marker.
+artifacts remain untouched; formula source stays inside its authored SVG marker.
For generated-project narration, follow the
[`generate-audio`](../../workflows/stages/generate-audio.md) stage. It owns voice
diff --git a/skills/ppt-master/scripts/prompt_audit_manifest.json b/skills/ppt-master/scripts/prompt_audit_manifest.json
index da8f69c5..94bf94b9 100644
--- a/skills/ppt-master/scripts/prompt_audit_manifest.json
+++ b/skills/ppt-master/scripts/prompt_audit_manifest.json
@@ -1025,7 +1025,7 @@
"max_tokens": 6750
},
"stage.generate.executor.formula": {
- "description": "Conditional direct authoring contract for PowerPoint-native block formulas.",
+ "description": "Conditional direct authoring contract for PowerPoint-native inline and block formulas.",
"scope": "incremental",
"files": [
"skills/ppt-master/references/native-formula.md"
diff --git a/skills/ppt-master/templates/design_spec_reference.md b/skills/ppt-master/templates/design_spec_reference.md
index 95d38566..0d9f3aca 100644
--- a/skills/ppt-master/templates/design_spec_reference.md
+++ b/skills/ppt-master/templates/design_spec_reference.md
@@ -228,7 +228,7 @@ never write an empty or `none` placeholder:
- **Motion suggestion**: <communication job plus desired page-entry or reveal relationship/order>
```
-Add `Mathematical content` whenever a Slide needs a mathematical expression preserved exactly. Store the expression body as valid LaTeX without `$...$`, `$$...$$`, `\(...\)`, or `\[...\]` source delimiters; the field does not classify inline versus structural use. This is content authority for [`native-formula.md`](../references/native-formula.md), not a formula policy, marker, or implementation request; Executor chooses ordinary text versus a structural native formula. Add `Visualization` / `Images` when a Slide consumes §VII/§VIII or uses a page-local visual model. Name every value-driven geometry, qualitative relationship, cell grid, and child visual here; only independent Chart/Table entries use object keys. Describe qualitative order, linkage, hierarchy, grouping, contrast, overlap, and reading path freely—not as a model name or grammar enum. §IX may choose a custom Chart/Table fallback. Add `Native shape suggestion` only when a preset, stock Connector, or compound silhouette/cutout/intersection/fragment may help; name the semantic result plus candidate family or Boolean operands, never implementation geometry or keys. Executor chooses the primitive, preset, Boolean construction, or necessary freeform. Add `Motion suggestion` whenever transition/reveal advice strengthens communication, regardless of the Custom Animations outcome; state purpose and semantic order/relationship, not registry keys, options, timing, ids, or coverage. The suggestion never activates animation execution by itself, creates content, or binds implementation. Describe required visible image states in `Layout` / `Images` only for an explicit motion requirement or an enabled Custom Animations outcome. Add keyed `Native-ready` only for independent data charts or pure text-grid tables, `Fact IDs` for sourced claims, and `Data class: scenario` for invented demo values. Except on preservation paths, `Cover impact` carries a binding hook and adaptable composition; apply the same split to `Closing impact` only when the deck genuinely resolves. Roster/order/content stay authoritative. §VIII image layout is non-empty free prose with optional library ids; §VII Chart/Table rows are references. Executor owns geometry, hierarchy, treatment, and sparse local garnish.
+Add `Mathematical content` whenever a Slide needs a mathematical expression preserved exactly. Store the expression body as valid LaTeX without `$...$`, `$$...$$`, `\(...\)`, or `\[...\]` source delimiters; the field does not classify inline versus structural use. This is content authority for [`native-formula.md`](../references/native-formula.md), not a formula policy, marker, or implementation request; Executor chooses ordinary text, inline native math, or block native math. Add `Visualization` / `Images` when a Slide consumes §VII/§VIII or uses a page-local visual model. Name every value-driven geometry, qualitative relationship, cell grid, and child visual here; only independent Chart/Table entries use object keys. Describe qualitative order, linkage, hierarchy, grouping, contrast, overlap, and reading path freely—not as a model name or grammar enum. §IX may choose a custom Chart/Table fallback. Add `Native shape suggestion` only when a preset, stock Connector, or compound silhouette/cutout/intersection/fragment may help; name the semantic result plus candidate family or Boolean operands, never implementation geometry or keys. Executor chooses the primitive, preset, Boolean construction, or necessary freeform. Add `Motion suggestion` whenever transition/reveal advice strengthens communication, regardless of the Custom Animations outcome; state purpose and semantic order/relationship, not registry keys, options, timing, ids, or coverage. The suggestion never activates animation execution by itself, creates content, or binds implementation. Describe required visible image states in `Layout` / `Images` only for an explicit motion requirement or an enabled Custom Animations outcome. Add keyed `Native-ready` only for independent data charts or pure text-grid tables, `Fact IDs` for sourced claims, and `Data class: scenario` for invented demo values. Except on preservation paths, `Cover impact` carries a binding hook and adaptable composition; apply the same split to `Closing impact` only when the deck genuinely resolves. Roster/order/content stay authoritative. §VIII image layout is non-empty free prose with optional library ids; §VII Chart/Table rows are references. Executor owns geometry, hierarchy, treatment, and sparse local garnish.
For free-design pages, describe `Layout` through relationships, hierarchy, regions, and column spans; do not prescribe element-level `x`, `y`, `width`, or `height` or duplicate the global geometry in §II/§V. Exact coordinates belong to Executor SVG authoring. Preserve literal geometry only when the user explicitly requires it or a mirror/template preservation contract owns it.
diff --git a/skills/ppt-master/workflows/generate-pptx.md b/skills/ppt-master/workflows/generate-pptx.md
index cb0c897d..cdbbbf84 100644
--- a/skills/ppt-master/workflows/generate-pptx.md
+++ b/skills/ppt-master/workflows/generate-pptx.md
@@ -25,9 +25,9 @@ request does not explicitly select Quick.
| Scope | Contract |
|---|---|
-| Any route that authors or regenerates slide visuals through SVG | `svg_output/` is the complete page-design source: every visible text, image, shape, chart/table fallback, native-formula preview, and layout element that should appear on the exported slide is present in that page SVG or referenced by it. |
+| Any route that authors or regenerates slide visuals through SVG | `svg_output/` is the complete page-design source: every visible text, image, shape, chart/table fallback, block/inline native-formula preview, and layout element that should appear on the exported slide is present in that page SVG or referenced by it. |
| Templates, `design_spec.md`, and `spec_lock.md` | Authoring/control inputs. They guide SVG creation but MUST NOT supply visible slide content that is absent from the completed SVG during export. |
-| Semantic SVG markers | Minimal rendering-neutral compiler hints used only after existing Layout/Layer/Placeholder/Native metadata has been considered. Chart/table markers preserve their visible SVG fallback; a formula marker carries exact LaTeX and explicitly replaces only its own ordinary SVG preview subtree with editable Office Math during PPTX export. |
+| Semantic SVG markers | Minimal rendering-neutral compiler hints used only after existing Layout/Layer/Placeholder/Native metadata has been considered. Chart/table markers preserve their visible SVG fallback; block and inline formula markers carry exact LaTeX and replace only their registered ordinary SVG preview with editable Office Math during PPTX export. |
| `svg_final/` | Mandatory derived, self-contained SVG visual preview in the default pipeline. It may be opened directly or inserted into PowerPoint as an SVG picture, but it is not a supported PPTX source and carries no manual Convert-to-Shape compatibility contract. Quick-generate skips it. |
| SVG-to-PPTX export | The only supported generated-PPTX route reads `svg_output/` and maps its content through the project converter to DrawingML/native objects. It compiles only the selected route's explicit structure contract: `flat` keeps represented content Slide-local, while `structured` may place explicitly scoped content in Master/Layout/Slide parts. It MUST NOT infer structure, upgrade `flat`, or invent new visible page content. |
| Native PPTX routes and presentation-behavior stages | Remain outside SVG page-design closure. `template-fill-pptx`, `native-enhance-pptx`, animations, transitions, speaker notes, narration, and package relationships are not required to round-trip through SVG. |
@@ -418,9 +418,10 @@ For the normal/default `continuous` path, print no split-mode reminder and proce
**Native formula content**: Formula handling is not a confirmation field or an
image-acquisition path. Strategist records exact mathematical content as a
delimiter-free LaTeX expression body in the applicable §IX page block without
-classifying its implementation. Executor independently keeps simple inline
-notation as text and writes every structural block expression as a native
-formula marker under [`native-formula.md`](../references/native-formula.md).
+classifying its implementation. Executor independently chooses ordinary text,
+same-paragraph native inline math, or a standalone native block under
+[`native-formula.md`](../references/native-formula.md); matrices, multiline
+derivations, and other high-structure expressions remain blocks.
No formula manifest, §VIII resource row, or `spec_lock.md images` entry is
created.
@@ -583,7 +584,7 @@ Keep the core's shared visual-quality defaults and `svg-effects.md` §6.1 Visual
| Mandatory per-page Structure decision from §IX is `yes` | `executor-structure.md` before any geometry for the first applicable page |
| Actual row × column fact grid | `executor-table.md` |
| Used preset pattern fill, or independent Chart/Table with §IX `<object-key>=yes` | `native-data-interface.md` before that object |
-| §IX or current page content contains a structural standalone mathematical expression | `native-formula.md` before authoring its marker |
+| §IX or current page content contains mathematical notation that may require native math | `native-formula.md` before choosing ordinary text, inline native math, or block native math |
| `spec_lock.md images` / §VIII has an image row, or the template has bundled images | `executor-image.md` + `image-layout-spec.md` + `image-layout-patterns.md` + `svg-image-embedding.md` |
| At least one placed image is `Status: Sourced` or its filename has an `image_sources.json` record | `executor-web-image.md` after the image branch |
| §I records recorded/self-running/video delivery, or §X records a final/literal narration script | `video-design.md` before the first SVG; retain it through notes/motion handling |
diff --git a/skills/ppt-master/workflows/profiles/quick-generate.md b/skills/ppt-master/workflows/profiles/quick-generate.md
index 9a5267a9..d2d59ad6 100644
--- a/skills/ppt-master/workflows/profiles/quick-generate.md
+++ b/skills/ppt-master/workflows/profiles/quick-generate.md
@@ -327,7 +327,7 @@ because Quick is expected to be faster is not.
| Values, categories, time, weights, or duration determine mark geometry | Value-driven chart |
| Sequence, hierarchy, role, region, or relationship determines page-local topology | Qualitative structure |
| Rows, columns, cells, headers, merges, and alignment form the information model | Cell-grid table |
-| Mathematical notation is clearer as typeset math than ordinary text | PowerPoint-native block formula |
+| Mathematical notation is clearer as typeset math than ordinary text | PowerPoint-native inline or block math |
| Typography, spacing, and simple geometry already carry the message | Use no additional visual carrier |
This carrier menu does not satisfy or replace the per-page Structure decision in §3.
@@ -368,7 +368,7 @@ Prepare only the resource paths needed by the decided pages:
| Supplied/extracted image | Copy the selected file into `images/`; preserve its factual/provenance context and use the measured file rather than an invented substitute |
| Image-to-PPTX reconstruction asset | In Codex, preserve identity graphics through an exact vector, deterministic redraw, sufficient source asset, or reference-based high-resolution reconstruction; keep data graphics native-and-verified or exact. For scene imagery, build the minimum registered clean-base/midground/subject/foreground group; batch padded-bbox-disjoint objects into one shared plate, then split them with grid slicing or independent nested-SVG bbox crops |
| Bundled/custom icon | Follow the [icon library contract](../../templates/icons/README.md), choose one coherent primary library, sync a useful project pool covering recurring semantics and likely page-local needs without assigning icons to pages, and choose from that prepared pool during SVG authoring |
-| Formula | Create no resource file. Retain the exact source LaTeX and author one native formula marker under §3; ordinary SVG children provide the browser preview and are discarded by native export |
+| Formula | Create no resource file. Retain the exact source LaTeX, then choose ordinary text, an inline native marker, or a block native marker under §3; the registered SVG preview is discarded by native export |
| AI image | Follow `image-base.md` + `image-generator.md`; apply only the chosen rendering preset or exact custom bases, never blend unselected catalog identities, and keep `image_prompts.json` plus its human-readable sidecar |
| Web image | Follow `image-base.md` + `image-searcher.md`; keep query/status data and `image_sources.json`, including any required on-slide attribution |
| Illustration slice | Generate or obtain the parent sheet, run `slice_images.py`, and place only the resulting element files |
@@ -440,9 +440,10 @@ active context; create no artifact, spec, lock, manifest, or extra pass. A
deliberate plain or equal-grid result remains valid when it communicates the
relationship better.
-**Mandatory — native block formulas**: Quick creates no formula resource or
-manifest; retain exact LaTeX in active context and author the marker plus SVG
-preview directly under [`native-formula.md`](../../references/native-formula.md).
+**Mandatory — native formulas**: Quick creates no formula resource or manifest;
+retain exact LaTeX in active context, then choose ordinary text, same-paragraph
+native inline math, or a standalone native block and author its matching SVG
+preview under [`native-formula.md`](../../references/native-formula.md).
Image to PPTX replaces this open composition decision for its canonical page
frame: preserve the source geometry, restore text natively, preserve
@@ -469,7 +470,7 @@ capability menu, visualization recall, template geometry, or a later check.
| A selected primary Chart/Table `family/key` | [`executor-visualization.md`](../../references/executor-visualization.md), then the matching Chart/Table authority |
| Any actual value-driven geometry, including mini/inset charts and sparklines | [`executor-chart.md`](../../references/executor-chart.md) |
| Any actual row × column fact grid | [`executor-table.md`](../../references/executor-table.md) |
-| Any structural mathematical notation | [`native-formula.md`](../../references/native-formula.md) before authoring its marker |
+| Any mathematical notation that may require native math | [`native-formula.md`](../../references/native-formula.md) before choosing ordinary text, inline native math, or block native math |
| A used preset pattern fill, or one independent Chart/Table object selected as native-ready in active context | [`native-data-interface.md`](../../references/native-data-interface.md) before drawing that object |
| Any data-driven chart geometry | [`verify-charts.md`](../stages/verify-charts.md) after the complete roster and before the one final checker |
@@ -618,7 +619,7 @@ or lock.
- [x] One mode and visual style were resolved, and every catalog source actually used was read
- [x] Every page considered the complete visual-carrier menu without a coverage quota
- [x] Every image-bearing page made its one pre-geometry composition decision
-- [x] Every selected formula is one checker-valid native marker with a matching visible SVG preview and no formula image resource
+- [x] Every selected formula uses the checker-valid ordinary/inline/block form with a matching visible SVG preview and no formula image resource
- [x] Resolved SVG pages and their project-local references exist
- [x] Every role declared by an installed template spec is locatable in the finished pages, or its non-use is deliberate — checked per installed spec, not from memory
- [x] Every triggered capability-specific preparation and pre-checker verification completed