Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images in page headers of reference docx #67

Closed
hmeleiro opened this issue Apr 26, 2021 · 7 comments
Closed

Images in page headers of reference docx #67

hmeleiro opened this issue Apr 26, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@hmeleiro
Copy link

hmeleiro commented Apr 26, 2021

I'm trying to knit a markdown with officedown::rdocx_document using a reference docx with an image in the page header. When knitting the markdown with regular word_document the header image is there, but when I use officedown::rdocx_document the header image is ignored. Is this normal? Does officedown::rdocx_document support images in the headers of reference docx's? Is there another way to add images in the page headers from the Rmd itself?

Here as example with the reference docx attached:

reference.docx

---
date: "`r Sys.Date()`"
author: "Your Name"
title: "officedown template"
output: 
  officedown::rdocx_document:
    reference_docx: reference.docx
---


```{r setup, include=FALSE}

knitr::opts_chunk$set(echo = TRUE, fig.cap = TRUE)
library(officedown)
library(officer)
library(flextable)

```

# Title
```{r}
flextable(head(iris))

```
@davidgohel
Copy link
Owner

davidgohel commented Apr 26, 2021

Yes, users did want to be able to define page width, height, margins etc. I added this feature but forgot to preserve header/footer. I will fix

@davidgohel davidgohel added the bug Something isn't working label Apr 26, 2021
@hmeleiro
Copy link
Author

Thanks. And thank you again for the officeverse. It's really useful.

@davidgohel
Copy link
Owner

davidgohel commented May 1, 2021

It's fixed now. Thank you for letting me know about this problem.

@hmeleiro
Copy link
Author

hmeleiro commented May 1, 2021

That's great, David. Thanks to you for your work. I0m assuming it's on the github version, not CRAN yet, right?

@davidgohel
Copy link
Owner

Yes, it's only on github for now

@PHEindrakusuma

This comment has been minimized.

@davidgohel

This comment has been minimized.

Repository owner locked as resolved and limited conversation to collaborators May 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants