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

insert section with page_margins, header and footer #113

Open
zq2323 opened this issue May 10, 2023 · 0 comments
Open

insert section with page_margins, header and footer #113

zq2323 opened this issue May 10, 2023 · 0 comments

Comments

@zq2323
Copy link

zq2323 commented May 10, 2023

Hi there, when I tested the example of the [insert-sections], I encountered two issues.

---
output: 
  officedown::rdocx_document:
    page_margins:
        top: 1.29
        bottom: 0.67
        left: 1.1
        right: 0.79
        header: 1.29
        footer: 0.67
        gutter: 0
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
library(officedown)
library(officer)
library(flextable)
\```

```{r}
qflextable(head(mtcars))
\```

```{r}
block_section(
  prop_section(
    page_size = page_size(orient = "landscape"),
    type = "continuous",
    page_margins = page_mar(top = 1.29, bottom = 0.67, left = 1.1, right = 0.79, header = 1.29, footer = 0.67, gutter = 0),
    header_default = block_list(fpar(ftext("mtcars header"))),
    footer_default = block_list(fpar(ftext("mtcars footer")))
  )
)
  • how can I align the page margins in the YAML, which one below is correct?:

I tried to set the page margins in the yaml, but the header in the last blank page is not expected.
image

the second page is what I want:
image

  • I also want to have your help about how can I remove the last blank page since I didn't write down any words after the section.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant