run_tab function

Tab for 'Word'

Tab for 'Word'

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().

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"))

See Also

Other run functions for reporting: external_img(), ftext(), hyperlink_ftext(), run_autonum(), run_bookmark(), run_columnbreak(), run_comment(), run_footnote(), run_footnoteref(), run_linebreak(), run_pagebreak(), run_reference(), run_word_field(), run_wordtext()