FredHutch / VISCtemplates

Tools for writing reproducible reports at VISC
Other
6 stars 2 forks source link

Improve word document formatting, including table formatting #183

Closed kelliemac closed 1 month ago

kelliemac commented 2 months ago

Updating word-styles-reference.docx for improved formatting in Word versions of reports.

Cleaning up template.tex as well: deleting commented-out code, reordering lines so that related code is grouped together, adding comments on what particular latex packages are used for. All in hopes that future updates to the latex template will be faster/smoother.

kelliemac commented 2 months ago

Related to issues: https://github.com/FredHutch/VISCtemplates/issues/161 and https://github.com/FredHutch/VISCtemplates/issues/120

kelliemac commented 2 months ago

The tables were looking bad in the Word reports, so I'm converting this PR to draft and working on incorporating a fix for that (related to https://github.com/FredHutch/VISCtemplates/issues/120)

kelliemac commented 1 month ago

@slager can you help figure out how the statsrv runner needs to be updated to get that test passing, now that you've been able to install flextable on statsrv itself? you're welcome to commit directly to this branch.

I'm going to keep thinking about whether to switch from flextable to gt, so no rush on this. it sounded like you had an idea of what needed to be fixed, so I'm assuming you'll be way more efficient at fixing it than I will.

slager commented 1 month ago

Sure!

slager commented 1 month ago

The installation issue is now fixed! On the statsrv runner it is necessary to manually install the package dependencies that are not yet listed in the DESCRIPTION in the main branch of VISCtemplates, since those don't get found by remotes::install_github(). We can remove those manual installs from the statsrv CI on develop after we do another release/merge to main.

It's knitting on all platforms now but was failing due to some test warnings about a missing label. That is now fixed with the commit below.

There are still some R CMD check notes about the %>% pipes. It might be better to implement this without adding a direct dependency on magrittr/dplyr and without using the magrittr pipes. I have an idea that might obviate the need for those dplyr::mutate lines.

slager commented 1 month ago

When I started working on removing dplyr/magrittr here, I noticed that there are a couple of other problems probably worth fixing first.

(Removing my review request for now given the draft status of this PR)

kelliemac commented 1 month ago

just split off the latex template cleanup into a separate PR (https://github.com/FredHutch/VISCtemplates/pull/196). updating this PR's title accordingly

slager commented 1 month ago

Note before eventual merging to be sure to check the Word template header logos, which are not currently up to date with the Word template in develop. See notes in #195.

kelliemac commented 1 month ago

closing this PR so I can open a new, simplified one from a new branch