Open rgaiacs opened 1 year ago
This doesn't look like a bug to me. +custom_styles
tells the docx reader to put style information into the custom-style attribute instead of doing what it would normally do with it -- see the manual.
Thanks for the reply.
If +custom_styles
tells the docx reader to put style information into the custom-style attribute, why does it not create
::: {custom-style="Heading 1"}
# Simple Math with Python
:::
but instead
# Simple Math with Python
There's obviously some inconsistency here in how different elements are treated.
For example, (according to the manual anyway) *emphasis*
gets parsed with a span with a custom style.
I'm not sure whether there are other exceptions, aside from headings.
DOCX Minimal Working Example
Given the above minimal working example, reading the DOCX file as
docx
anddocx+styles
produces different outputs.Output of
pandoc --from docx --to markdown --standalone pandoc-code-test.docx
(when reading asdocx
):Note that "Heading 1" style was converted to native heading level 1 and "Source Code" style was converted to native code block.
Output of
pandoc --from docx+styles --to markdown --standalone pandoc-code-test.docx
(when reading asdocx+styles
):Note that "Heading 1" style was converted to native heading level 1 but "Source Code" style was converted into two div blocks
custom-style
equal to "Source Code" instead of the expected native code block.Environment
pandoc --version
returnsand