Skip to contents

Object representing a tab in a Word document. The result must be used within a call to fpar. It will only have effects in Word output.

Tabulation marks settings can be defined with fp_tabs() in paragraph settings defined with fp_par().

Usage

run_tab()

usage

You can use this function in conjunction with fpar to create paragraphs consisting of differently formatted text parts. You can also use this function as an r chunk in an R Markdown document made with package officedown.

Examples

z <- fp_tabs(
  fp_tab(pos = 0.5, style = "decimal"),
  fp_tab(pos = 1.5, style = "decimal")
)
par1 <- fpar(
  run_tab(), ftext("88."),
  run_tab(), ftext("987.45"),
  fp_p = fp_par(
    tabs = z
  )
)
par2 <- fpar(
  run_tab(), ftext("8."),
  run_tab(), ftext("670987.45"),
  fp_p = fp_par(
    tabs = z
  )
)
x <- read_docx()
x <- body_add(x, par1)
x <- body_add(x, par2)
print(x, target = tempfile(fileext = ".docx"))