conflr icon indicating copy to clipboard operation
conflr copied to clipboard

add `df_print` argument

Open dpprdan opened this issue 2 years ago • 6 comments

This adds the df_print argument to confluence_document() (cf. rmarkdown::output_format()), first and foremost to facilitate easy kable()/markdown output tables. df_print is passed down to rmarkdown::md_document().

Before I push this any further, would you be interested in this in general, @yutannihilation? Or is there a reason, this is not yet available?

Details:

  • The "paged" method is not possible, because it is not a valid format for markdown documents.
  • Arbitrary functions for printing data frames are not allowed ATM. They would have to generate a format that is markdown compatible and offer formatting that extents what is already possible with kable(). I would keep this out for now, but it could be added in a future iteration of the feature, of course.
  • df_print should probably be added as an option to the addin as well.

dpprdan avatar May 09 '22 13:05 dpprdan

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar May 09 '22 13:05 CLAassistant

Thanks so much for catching! There's no reason other than I don't use df_print that much :)

Looks good in general.

yutannihilation avatar May 12 '22 15:05 yutannihilation

I am trying to add df_print to the addin as well. However, the md_document is already rendered when the addin window opens. So df_print is already set at that point and there is no way to change it, AFAIU (short of rendering the whole document again, which seems ... not ideal). Or am I missing something?

dpprdan avatar May 16 '22 18:05 dpprdan

Ah, you are right.

yutannihilation avatar May 17 '22 00:05 yutannihilation

I'll leave df_print out of the addin then, because this would involve a fairly profound change to the addin AFAIU (open the addin before rendering the preview, trigger the preview after setting options, publish after reviewing the preview).

dpprdan avatar May 17 '22 07:05 dpprdan

Sounds good to me. Most of the options of confluence_document() are used for controlling "how the document will be published," not customizing how the document is rendered, but df_print is the latter one. Sorry I didn't notice it at first.

yutannihilation avatar May 17 '22 15:05 yutannihilation