Questions tagged [officedown]

64 questions
1
vote
1 answer

Can R Officer Be Used to Output Regression Tables in a Specific Style?

My prior understanding was that the ability to utilize Microsoft Word Table styles is only available in the officedown package, but syntax like read_docx(path = "reports/template.docx") %>% body_add_flextable(my_ft) %>% print(target =…
1
vote
1 answer

Table captions underneath tables if using gtsummary + flextable in officedown

I feel like I am missing something easy. Fingers crossed thats it. Im trying to produce tables using gtsummary and flextable in officedown. I'm using the yaml options from the "Advanced word document" template in officedown. Below is my code. The…
1
vote
0 answers

How to add an image to all pages in an Rmarkdown file?

I would like to add an image to every page of my Rmarkdown file in docx format, which represents my header and footer. My yaml is: --- date: "`r Sys.Date()`" author: "Ecovery - Soluções Ambientais" title: "Plano Operacional Anual - 2022" output: …
Igor Cobelo
  • 419
  • 3
  • 12
1
vote
2 answers

Cross-referencing tables {SEQ Table \\* arabic} and figures {SEQ Figure \\* arabic} with officedown [i.e. block_caption() and run_autonum()]

I want to create a .docx report with {officedown}, but instead of using "bookmark" reference types for cross-referencing my tables and figures as suggested in ch.4.6 and ch.4.7 of the User Documentation, I would like my references to be actual…
Paul Schmidt
  • 1,072
  • 10
  • 23
1
vote
1 answer

officedown readonly output

I am creating an officedown docx file and the file created is in read only mode. Is there a way to have it be in compatibility mode? Here is the Rmd file. --- date: "`r Sys.Date()`" author: "Your Name" title: "officedown template" output: …
yonicd
  • 498
  • 1
  • 4
  • 15
1
vote
0 answers

Use PowerPoint template with officedown

Basic question here - how do I get to create a powerpoint document with {officedown} using a template. The document is pretty much empty at this stage. I can create a Power Point file without a template, but when adding the following YAML…
Carlos
  • 21
  • 4
1
vote
1 answer

Level 4 and 5 headers not included in the Table of Contents for officedown

I'm using officedown with Rmarkdown to knit word docs and currently it's not reading level 4 and 5 headers in the Table of Contents (though it's correctly adding headers levels 1-3). My YAML is: date: XX author: XX title: XX output: …
PsychBrief
  • 55
  • 7
0
votes
0 answers

Rmarkdown to Word - How to change Word's styling in references?

I'm trying to apply Word's 'Citation' style in a document generated by rmarkdown. I see in the output the References section is styled by default somehow. My rmarkdown code is like this: --- output: officedown::rdocx_document params: data_manager:…
Jakub Małecki
  • 483
  • 4
  • 14
0
votes
0 answers

Officedown Word footers not appearing as expected with landscape page

I have a template document (doc_temp6_git.docx) where the first|title page has a special footer, the option inside of the .docx does have the "different first page" option selected for footer 1 and is in portrait. The second page is the TOC which is…
0
votes
0 answers

Update an existing table in Word using officer/officedown

Is there a way using officer or officedown to update an existing table in Word? I tried to add a bookmark to an entire table in Word (say "tb1_bk"), but then I don't know how I could modify it. As I found no way to directly load it in shiny app as a…
Trichophyton
  • 625
  • 5
  • 21
0
votes
1 answer

r markdown add executive summary before TOC and knit to MS Word

I have an automated report which I am creating in R markdown and knitting to Microsoft Word. At the start of the report, there is an executive summary which includes some inline code referencing calculated figures. The executive summary is…
Amy M
  • 967
  • 1
  • 9
  • 19
0
votes
1 answer

Why is the flextable caption different from the data.frame caption in officedown::rdocx_document outputs?

When knitting the below code to an officedown::rdocx_document the output does not show the front part of the caption of Table 2: in bold face, while it does show the equivalent parts of the other table and figure captions in bold face. Also notice…
Patrick
  • 742
  • 7
  • 19
0
votes
0 answers

Reading the body text of an rdocx object with OfficeR

I am trying to read the body of a .docx file with the officer package and I am running into an error: library(officer) docx1 <- system.file(package = "officer", "template.docx") content <- docx_summary(docx1) Error in x$doc_obj : $ operator is…
0
votes
0 answers

Retain the headers and footers at the start of the document in officedown while using /?

I'm currently generating a Word document using Rmarkdown and the officedown package. I'm using a reference document to set the styles and assign headers and footers on the document. This also includes a different header and footer on the first…
0
votes
1 answer

Why the table of contents created with officedown::rdocx_document does not return the section numbers while using a reference_docx file?

Using Rmarkdown, on Rstudio, in order to create a word document ; I tried to create a table of content at the second page of my document. I success using officedown package created by @DavidGohel. However I use a style.docx file as basic template to…
VincentP
  • 89
  • 10