You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
incorrect path when --extract-media is used in conjunction with #53
Reproduced with pandoc 3.12 and pantable 0.15: with --extract-media=out/doc, an image in a table comes out as media/rId9.png in the CSV, while pandoc alone gives out/doc/media/rId9.png.
The cause is pandoc's order: a filter sees media/rId9.png, and pandoc rewrites image paths to the --extract-media directory only after the filters have run. By then pantable2csv has turned the table, image included, into CSV text, which pandoc does not touch. A JSON filter is not told the --extract-media directory, so pantable cannot fix the path itself.
Workaround: extract the media in a first pandoc run and filter in a second, so the paths are rewritten before pantable2csv sees them:
Tracked in #10: the root problem is how a filter can know what pandoc knows (here, the --extract-media directory). A CLI, or a filter interface that receives pandoc's options, is the longer-term fix; the two-step workaround above is the way until then.
Activity
ickc commentedon Oct 6, 2026
Reproduced with pandoc 3.12 and pantable 0.15: with
--extract-media=out/doc, an image in a table comes out asmedia/rId9.pngin the CSV, while pandoc alone givesout/doc/media/rId9.png.The cause is pandoc's order: a filter sees
media/rId9.png, and pandoc rewrites image paths to the--extract-mediadirectory only after the filters have run. By thenpantable2csvhas turned the table, image included, into CSV text, which pandoc does not touch. A JSON filter is not told the--extract-mediadirectory, so pantable cannot fix the path itself.Workaround: extract the media in a first pandoc run and filter in a second, so the paths are rewritten before pantable2csv sees them:
pandoc doc.docx --extract-media=out/doc -t json | pandoc -f json -s -F pantable2csv -o out/doc.mdickc commentedon Oct 6, 2026
Tracked in #10: the root problem is how a filter can know what pandoc knows (here, the
--extract-mediadirectory). A CLI, or a filter interface that receives pandoc's options, is the longer-term fix; the two-step workaround above is the way until then.