From b2b21bb4c54e5aae305a0166c044357023e38abd Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Mon, 6 Jun 2022 18:25:09 +0200 Subject: Lua: add function pandoc.mediabag.fill (#8104) The function allows to fill the mediabag with all images in a given document. Images that cannot be fetched are replaced with a Span containing the image description. --- doc/lua-filters.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'doc') diff --git a/doc/lua-filters.md b/doc/lua-filters.md index 251b9fa85..ebba6a3b3 100644 --- a/doc/lua-filters.md +++ b/doc/lua-filters.md @@ -3791,6 +3791,26 @@ Parameters: Clear-out the media bag, deleting all items. +### fill {#pandoc.mediabag.fill} + +`fill (doc)` + +Fills the mediabag with the images in the given document. An +image that cannot be retrieved will be replaced with a Span of +class "image" that contains the image description. + +Images for which the mediabag already contains an item will +not be processed again. + +Parameters: + +`doc` +: document from which to fill the mediabag ([Pandoc](#type-pandoc)) + +Returns: + +- modified document ([Pandoc](#type-pandoc)) + ### insert {#pandoc.mediabag.insert} `insert (filepath, mime_type, contents)` -- cgit v1.2.3