My use case is as follows (improved new version of this post):


Problem


Files:


  # Input

  content/foo.md

  content/img/diagram.svg


  # Output (out/ is a build directory that is gitignored and often cleared)

  out/foo.html

  out/img/diagram.svg


Command:


  pandoc --standalone -o out/foo.html --extract-media=out content/foo.md


Input:


  Image: ![](img/diagram.svg)


Actual output:


  Image: <img src="out/img/diagram.svg" />


Desired output:


  Image: <img src="img/diagram.svg" />


Possible solutions


Possible solution 1 –  introduce a completely new and independent reader option extract-media-into where media paths (into the extraction directory out/) are always relative to the path specified via --output:


  pandoc --standalone -o out/foo.html --extract-media-into=out content/foo.md


Possible solution 2 – introduce a flag that changes how extract-media operates:


  pandoc --standalone -o out/foo.html --extract-media-relative-to-output --extract-media=out content/foo.md


Am I making sense? Or am I thinking about this wrong?

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/96033760-2da8-45b6-b0b5-62e15969807a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.