These property functions return or set the margin attribute of a rtf_doc
object. These are stored as a named vector. Names should be top
,
bottom
, left
, and right
. Margins are measured in inches.
margins(x, ...) margins(x) <- value set_margins(x, value)
x | A |
---|---|
... | Additonal arguments passed to method dispatch |
value | A named list or vector detailing the page margins |
For margin()
, a named vector of the margin attribute of the
supplied rtf_doc
. For `margin<-()`
and set_margin()
the modified object.
library(huxtable) ht <- huxtable( column1 = 1:5, column2 = letters[1:5] ) rtf <- rtf_doc(ht, list(hf_line("aTitle"))) margins(rtf)#> top bottom left right #> 1 1 1 1# Returns c(top = 1, bottom = 1, left = 1, right = 1) margins(rtf) <- c(top = 2) # Sets top margin to 2