rfortherestofus / omni

RMarkdown template, ggplot2 theme, and table function for OMNI Institute
https://rfortherestofus.github.io/omni/
Other
21 stars 4 forks source link

Make creation of new report not create extra files etc #22

Closed dgkeyes closed 1 year ago

dgkeyes commented 1 year ago

From @OskaratOmni:

currently, if one uses a report template, additional materials are generated and stored in same directory as the file (e.g., skeleton.html). Can these either be routed to a folder (called ‘skeletons'?) or not generated at all if they are not needed.

likewise, when one makes a new document a new folder is made within the root folder. This can be inefficient because now the document is one level below the root folder and either other adjustments need to be made (to paths in the scripts, etc) or some cleanup and tidying has to happen. Ideally, use of a template would not change the folder hierarchy.

tvroylandt commented 1 year ago

This are two issues in fact.

For the first one :

Note that this will still generate an images/ folder if you use the use_image option on the tables (TRUE by default).

I have an uncertainty about this still working with lof since Pandoc/pagedown version has changed in three years. (see https://github.com/rstudio/pagedown/issues/280)

tvroylandt commented 1 year ago

This also solved the second issue by the same way. This was an odd behaviour of RStudio due to having many files in the template : https://github.com/rstudio/rstudio/issues/3331

OskaratOmni commented 1 year ago

Thank you Thomas and thank you David, I look forward to learning from both of you as we revamp this package.

Thomas, what are your thoughts on using bookdown formats for cases where we are knitting to html or Word? I’m not sure of the advantages of bookdown compared to pagedown but for random reasons have used bookdown much more than pagedown. I like that it makes Latex-like functionality in figure numbering very easy. It seems that pagedown is better for pdfs, especially if the formatting is complex, but I don’t have a strong view either way of course.

I need to get you both the updated OMNI data-viz guidelines (these include fonts and color templates). I am meeting with someone later today about this.

More soon – Best Oskar

Oskar Burger (he/him) Senior Research Manager, OMNI Institute (720) 712-7229 www.omni.orghttp://www.omni.org/

From: Thomas Vroylandt @.> Sent: Friday, April 7, 2023 3:32 AM To: rfortherestofus/omni @.> Cc: Oskar Burger @.>; Mention @.> Subject: Re: [rfortherestofus/omni] Make creation of new report not create extra files etc (Issue #22)

This also solved the second issue by the same way. This was an odd behaviour of RStudio due to having many files in the template : rstudio/rstudio#3331https://github.com/rstudio/rstudio/issues/3331

— Reply to this email directly, view it on GitHubhttps://github.com/rfortherestofus/omni/issues/22#issuecomment-1500117720, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AZLXJBR3ON36FT43UFYAEMDW77NIJANCNFSM6AAAAAAWV6DJHM. You are receiving this because you were mentioned.Message ID: @.***>

tvroylandt commented 1 year ago

Hi Oskar,

In fact, pagedown::html_paged()is built on top ofbookdown::html_document2()`. We then print it to pdf using the Chrome PDF printer.

I would definitely recommend bookdown when knitting to html or Word.

dgkeyes commented 1 year ago

@tvroylandt can you please share instructions with @OskaratOmni on how he can install the dev branch of the package and test it out?

tvroylandt commented 1 year ago

Sure @OskaratOmni. You can use remotes::install_github("rfortherestofus/omni", branch = "dev", force = TRUE). Skip the updates since you should have them already in the right versions.

Then try to create a new report either through Rmd template or through the function. And tell me it it's works on your side (since packages versions and so may be different, it could not be the case) and fullfill your needs. In this case, just close the issue. Otherwise, tell me what's wrong here (by copying the error message) and I will investigate.

How does this sound ?

OskaratOmni commented 1 year ago

This sounds great Thomas, thanks! I am suddenly slammed with project work but I will make sure I keep some time to move the package forward soon.

We are compiling the data-viz standards shortly. They are dispersed across many documents and need to be consolidated.

Thanks!

Oskar Burger (he/him) Senior Research Manager, OMNI Institute (720) 712-7229 www.omni.orghttp://www.omni.org/

From: Thomas Vroylandt @.> Sent: Monday, April 10, 2023 11:27 PM To: rfortherestofus/omni @.> Cc: Oskar Burger @.>; Mention @.> Subject: Re: [rfortherestofus/omni] Make creation of new report not create extra files etc (Issue #22)

Sure @OskaratOmnihttps://github.com/OskaratOmni. You can use remotes::install_github("rfortherestofus/omni", branch = "dev", force = TRUE). Skip the updates since you should have them already in the right versions.

Then try to create a new report either through Rmd template or through the function. And tell me it it's works on your side (since packages versions and so may be different, it could not be the case) and fullfill your needs. In this case, just close the issue. Otherwise, tell me what's wrong here (by copying the error message) and I will investigate.

How does this sound ?

— Reply to this email directly, view it on GitHubhttps://github.com/rfortherestofus/omni/issues/22#issuecomment-1502707452, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AZLXJBRJZQGNR23DK76W3SDXATTT5ANCNFSM6AAAAAAWV6DJHM. You are receiving this because you were mentioned.Message ID: @.***>