Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is my first crack at addresssing #26. Not sure it's ready to merge but it works. Still requires some more robust testing. I'm also unsure whether
dml()
is the best function name, but it is short!This requires development pandoc (>=2.4), as well as development rmarkdown, due to a PR I sent there making it possible to lookup the template pptx from within the Rmd file.
The method will look up placeholder locations and use these for the dimensions of the printed graph, but the user can override them to place the graph anywhere on the slide. Some internal functions are memoised so as to avoid creating/opening the reference pptx every time dimensions are needed.
Raster plots are not supported, and I don't think it's possible to do so without a
post_processor
approach. It would be useful to do this, in anofficer_pptx
rmarkdown type or maybe as a PR tormarkdown::powerpoint_document()
It would allow users to use the mechanism here to place static images anywhere on the slide they would like, as well. I think the best way to implement would be to put the post-processing requirements in theknit_print
metadata, as htmlwidgets do.