A text box holding an equation is wrapped in `mc:AlternateContent`, with an `mc:Choice` requiring the `a14` namespace; pandoc's pptx writer does this too. The reader skipped every shape inside such a block, so it lost the whole text box, and a Markdown -> pptx -> Markdown round trip lost the slide's body. Each `mc:AlternateContent` in a slide is now replaced by its first `mc:Choice` whose required namespaces the reader understands (for now `a14`), or else by its `mc:Fallback`. Equations in a paragraph (`a14:m`) are read with texmath's readOMML, as the docx reader does: `m:oMathPara` becomes display math and `m:oMath` inline math. If texmath can't read one, its text is kept. Equations in slide titles, table cells and SmartArt are still ignored. The test fixture was written by pandoc's pptx writer from Markdown. A block was then added by hand: a choice requiring a namespace the reader doesn't understand, next to a fallback. Closes #12025.
27 lines
590 B
Plaintext
27 lines
590 B
Plaintext
Pandoc
|
|
Meta { unMeta = fromList [] }
|
|
[ Header 2 ( "slide-1" , [] , [] ) [ Str "Equations" ]
|
|
, Para
|
|
[ Str "The"
|
|
, Space
|
|
, Str "mean"
|
|
, Space
|
|
, Str "is"
|
|
, Space
|
|
, Math InlineMath "\\bar{x} = \\frac{1}{n}\\sum x_{i}"
|
|
, Space
|
|
, Str "here."
|
|
]
|
|
, Para [ Math DisplayMath "E = mc^{2}" ]
|
|
, Para
|
|
[ Str "After"
|
|
, Space
|
|
, Str "the"
|
|
, Space
|
|
, Str "equations."
|
|
]
|
|
, Header 2 ( "slide-2" , [] , [] ) [ Str "Fallback" ]
|
|
, Para
|
|
[ Str "From" , Space , Str "the" , Space , Str "fallback" ]
|
|
]
|