IntegralEnvision / integral

Package for Integral functions
https://integralenvision.github.io/integral/
Other
0 stars 0 forks source link

ic_pptfig() Add ability to turn on/off italics and customize fig coordinates #83

Open bleonard314 opened 1 year ago

bleonard314 commented 1 year ago

@schroedermark165 and I made a custom work around based on a project specific figure template, but it would be nice to:

a) Turn on/off italics (and perhaps specific font size and/or bolding) for title block text (specifically doctitle1, but this could include all text).

https://github.com/IntegralEnvision/integral/blob/091b678d8bdadf5ffe59883fc0c74a0c013af809/R/pptfig.R#LL125C12-L125C12

b) Allow users to customize the figure coordinates (top/left/height/width) to accommodate custom PowerPoint templates (in our case, we had to shrink the figure height slightly).

bleonard314 commented 1 year ago

Overlaps with:

https://github.com/IntegralEnvision/integral/issues/74#issue-1560613369

kheal commented 1 year ago

I would like us to strike a balance between having flexibility and having too many parameters in the function. To this end, I could imagine making it easier to download the default template to make these changes for your specific project (I'd have to double check where the italics and figure size are determined, but I think it's the template or it could be). I would be happy to add examples that show this to the vignette to make it more accessible. I think adjusting figure margins and/or the size of the figure in the template is more straightforward for the spacing issues. What do you think @bleonard314 and @schroedermark165?

bleonard314 commented 1 year ago

@kheal The workaround was to download the default template, modify it, read in the modified pptx file using officer::read_pptx() and then pass this document as the my_pres argument to a customized version of integral::ic_pptfig() that had the italics removed and the height set to be shorter to accommodate the custom template. Since we were working with a slightly modified version of the standard template integral::ic_pptfig() worked well with the exception of those two formatting issues.

I was thinking it might be possible to:

Just thought I'd add these suggestions while I was thinking about it, but everything works well as-is so it is not urgent or necessary.