Create a parProperties object that describes paragraph formatting properties.

parProperties(text.align = "left", padding.bottom = 1, padding.top = 1,
  padding.left = 1, padding.right = 1, padding, list.style = "none",
  level = 1, border.bottom = borderNone(), border.left = borderNone(),
  border.top = borderNone(), border.right = borderNone(), shading.color)

# S3 method for parProperties
chprop(object, text.align, padding.bottom, padding.top,
  padding.left, padding.right, padding, list.style, level, border.bottom,
  border.left, border.top, border.right, shading.color, ...)

# S3 method for parProperties
print(x, ...)

Arguments

text.align

text alignment - a single character value, expected value is one of 'left', 'right', 'center', 'justify'.

padding.bottom

paragraph bottom padding - 0 or positive integer value.

padding.top

paragraph top padding - 0 or positive integer value.

padding.left

paragraph left padding - 0 or positive integer value.

padding.right

paragraph right padding - 0 or positive integer value.

padding

paragraph padding - 0 or positive integer value. Argument padding overwrites arguments padding.bottom, padding.top, padding.left, padding.right.

list.style

list style - a single character value, expected value is one of 'none' (default), 'unordered', 'ordered', 'blockquote'. This will not have any effect if used in a FlexTable.

level

list level if argument list is not 'none'. This will not have any effect if used in a FlexTable.

border.bottom

borderProperties for bottom border. overwrite all border.bottom.* if specified.

border.left

borderProperties for left border. overwrite all border.left.* if specified.

border.top

borderProperties for top border. overwrite all border.top.* if specified.

border.right

borderProperties for right border. overwrite all border.right.* if specified.

shading.color

shading color - a single character value specifying a valid color (e.g. "#000000" or "black").

object

parProperties object to update

...

further arguments - not used

x

parProperties object to print

Value

a parProperties object

Details

parProperties is used to control paragraph properties. It is used when adding plots or when adding content in a FlexTable.

Default values are:

  • text.align "left"

  • padding.bottom 1

  • padding.top 1

  • padding.left 1

  • padding.right 1

  • list.style 'none'

  • level 1

Get a modified version of a parProperties with chprop.

See also

alterFlexTable, addParagraph, shortcut_properties

Examples

parProperties( text.align = "center", padding = 5)
#> {text-align: center ;padding-bottom: 5 ;padding-top: 5 ;padding-left: 5 ;padding-right: 5 ;list.style: none ;level: 1 ;} #> border.bottom: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;border.top: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;border.left: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;border.right: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;
parProperties( text.align = "center", padding.top = 5, padding.bottom = 0, padding.left = 2, padding.right = 0 )
#> {text-align: center ;padding-bottom: 0 ;padding-top: 5 ;padding-left: 2 ;padding-right: 0 ;list.style: none ;level: 1 ;} #> border.bottom: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;border.top: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;border.left: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;border.right: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;
parProperties( list.style = "ordered", level = 2)
#> {text-align: left ;padding-bottom: 1 ;padding-top: 1 ;padding-left: 1 ;padding-right: 1 ;list.style: ordered ;level: 2 ;} #> border.bottom: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;border.top: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;border.left: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;border.right: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;
parProperties( list.style = "unordered", level = 2)
#> {text-align: left ;padding-bottom: 1 ;padding-top: 1 ;padding-left: 1 ;padding-right: 1 ;list.style: unordered ;level: 2 ;} #> border.bottom: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;border.top: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;border.left: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;border.right: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;
parProp = parProperties() chprop( parProp, text.align = "center" )
#> {text-align: center ;padding-bottom: 1 ;padding-top: 1 ;padding-left: 1 ;padding-right: 1 ;list.style: none ;level: 1 ;} #> border.bottom: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;border.top: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;border.left: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;border.right: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;
chprop( parProp, padding.left = 2 )
#> {text-align: left ;padding-bottom: 1 ;padding-top: 1 ;padding-left: 2 ;padding-right: 1 ;list.style: none ;level: 1 ;} #> border.bottom: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;border.top: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;border.left: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;border.right: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;
chprop( parProp, padding = 2 )
#> {text-align: left ;padding-bottom: 2 ;padding-top: 2 ;padding-left: 2 ;padding-right: 2 ;list.style: none ;level: 1 ;} #> border.bottom: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;border.top: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;border.left: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;border.right: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;
chprop( parProp, padding = 2, text.align = "center" )
#> {text-align: center ;padding-bottom: 2 ;padding-top: 2 ;padding-left: 2 ;padding-right: 2 ;list.style: none ;level: 1 ;} #> border.bottom: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;border.top: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;border.left: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;border.right: borderProperties{color:rgba(0,0,0,1.00);style:none;width:1;} ;