benmarwick / rrtools

rrtools: Tools for Writing Reproducible Research in R
Other
668 stars 84 forks source link

"University of Wollongong" in template.docx properties #125

Closed ntrlshrp closed 4 years ago

ntrlshrp commented 4 years ago

Describe the bug This is very minor. The current default output is

output: 
    bookdown::word_document2:
      fig_caption: yes
      reference_docx: "../templates/template.docx" # Insert path for the DOCX file
      pandoc_args:
      - --lua-filter=../templates/scholarly-metadata.lua
      - --lua-filter=../templates/author-info-blocks.lua
      - --lua-filter=../templates/pagebreak.lua

This uses ../templates/template.docx, which has custom properties that do not come from the .Rmd/user that are added to the output document, paper.docx.

These are: AppVersion: 14.0000 Company: University of Wollongong etc.

To Reproduce Describe the steps to reproduce the behavior:

  1. Do rrtools::create_compendium("DELETEme01")
  2. Click on Knit
  3. Review File > Properties > Custom Properties of the output paper.docx

*NOTE: One can also reproduce the issue using Dockerfile, e.g., R -e "rmarkdown::render('/DELETEme01/analysis/paper/paper.Rmd')".

Expected behavior The output document should not include any custom (or non-generic) properties that do not come from the .Rmd/user.

benmarwick commented 4 years ago

Thanks, I think I've solved this, let me know if you find it's still there.

ntrlshrp commented 4 years ago

Although there are still some custom properties remaining, I think this is satisfactory. Thanks!

"Wollongong" is gone (which is the one an editor noticed in my "blinded manuscript" and the property that appears most likely deidentifying), but I still have:

This is in "../templates/template.docx" and the output paper.docx.

To Reproduce Describe the steps to reproduce the behavior:

  1. remotes::install_github("benmarwick/rrtools")
  2. Do rrtools::create_compendium("DELETEme01")
  3. Open paper.Rmd and click on Knit
  4. Review File > Properties > Custom Properties of the output paper.docx

Admittedly, I don't have Microsoft Word and see these custom properties with LibreOffice Writer. The latter also allowed me to erase all custom properties from the rrtools package's template.docx, which then propagates to new compendiums, e.g., DELETEme02, where I had no custom properties in the output paper.docx. If this is valuable to send your way as a PR to test that you can still open everything on Microsoft Word and incorporate in the package, please let me know. Zero pressure, of course, I just had one editor notice "Wollongong" and ask me to remove custom fields.