Learn R Programming

ReporteRs (version 0.8.10)

parProperties: Paragraph formatting properties

Description

Create a parProperties object that describes paragraph formatting properties.

Usage

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

Run this code
# NOT RUN {
parProperties( text.align = "center", padding = 5)

parProperties( text.align = "center",
  padding.top = 5, padding.bottom = 0,
  padding.left = 2, padding.right = 0 )

parProperties( list.style = "ordered", level = 2)

parProperties( list.style = "unordered", level = 2)
parProp = parProperties()

chprop( parProp, text.align = "center" )
chprop( parProp, padding.left = 2 )
chprop( parProp, padding = 2 )

chprop( parProp, padding = 2, text.align = "center" )
# }

Run the code above in your browser using DataLab