Pandoc: The docx reader does not parse figures made with a styled paragraph

Created on 20 Jul 2018  路  3Comments  路  Source: jgm/pandoc

There are different ways to encode figures in docx, one of them is to follow an image with a paragraph styled with Caption. Pandoc version 2.2.2 is unable to parse this sequence as a figure. Until now my team has been using this filter along with the docx+styles option as a workaround.

figure-styled-paragraph.docx contains an example.

Docx reader

Most helpful comment

the commit linked above contains an unit test for this issue

All 3 comments

the commit linked above contains an unit test for this issue

This requires to add some logic in Text.Pandoc.Writers.Docx or most likely to Text.Pandoc.Writers.Docx.Parse to go through every pair of elements (or runs) in order to verify that the condition is met. The filter does this on every pair of inlines

First, thank you for pandoc!! We love it and find it extremely useful. We are using pandoc on the Manifold Scholar project -- https://github.com/ManifoldScholar -- and our team wanted to note that the feature described here would be immensely useful to us and to the academic presses using Manifold to publish their work.

Was this page helpful?
0 / 5 - 0 ratings