knitr::opts_chunk$set(echo = TRUE)
library(officedown)
library(officer)
fp <- fp_par(text.align = "center", padding.top = 120)
ft <- fp_text(font.size = 12, bold = TRUE, color = "#C32900", font.family = "Cambria")

Chunk outputs

The package r ftext("officedown", ft) is great.

This is a Word field, the file size is r run_word_field("FILESIZE \\k \\* MERGEFORMAT") Kb.

Paragraph settings

This text is centered r fp_par(text.align = "center").

Section definitions

This text is on column 1. This text is on column 1. This text is on column 1. This text is on column 1. This text is on column 1. This text is on column 1. This text is on column 1. This text is on column 1. This text is on column 1. This text is on column 1.r fp_par(text.align = "justify") r run_columnbreak()

This text is on column 2. This text is on column 2. This text is on column 2. This text is on column 2. This text is on column 2. This text is on column 2.r fp_par(text.align = "justify")

This is a landscape section.r fp

This is a custom section using block_section.r fp

ps <- prop_section(
  page_margins = page_mar(bottom = 1, top = 2, left = 1.5),
  type = "oddPage"
)
block_section(ps)

We are back on default section.r fp



Try the officedown package in your browser

Any scripts or data that you put into this service are public.

officedown documentation built on Sept. 3, 2023, 1:07 a.m.