Determine LPP and CPP based on font and page type
Usage
page_lcpp(
page_type = page_types(),
landscape = FALSE,
font_family = "Courier",
font_size = 12,
lineheight = 1,
margins = c(top = 0.5, bottom = 0.5, left = 0.75, right = 0.75),
pg_width = NULL,
pg_height = NULL
)
Arguments
- page_type
character(1). Name of a page type. See
page_types
. Ignored whenpg_width
andpg_height
are set directly.- landscape
logical(1). Should the dimensions of
page_type
be inverted for landscape? Defaults toFALSE
, ignored whenpg_width
andpg_height
are set directly.- font_family
character(1). Name of a font family. An error will be thrown if the family named is not monospaced. Defaults to Courier.
- font_size
numeric(1). Font size, defaults to 12.
- lineheight
numeric(1). Line height, defaults to 1.
- margins
numeric(4). Named numeric vector containing
'top'
,'bottom'
,'left'
, and'right'
margins in inches. Defaults to.5
inches for both vertical margins and.75
for both horizontal margins.- pg_width
numeric(1). Page width in inches.
- pg_height
numeric(1). Page height in inches.
Examples
page_lcpp()
#> $cpp
#> [1] 70
#>
#> $lpp
#> [1] 60
#>
page_lcpp(font_size = 10)
#> $cpp
#> [1] 84
#>
#> $lpp
#> [1] 72
#>
page_lcpp("a4", font_size = 10)
#> $cpp
#> [1] 81
#>
#> $lpp
#> [1] 76
#>
page_lcpp(margins = c(top = 1, bottom = 1, left = 1, right = 1))
#> $cpp
#> [1] 65
#>
#> $lpp
#> [1] 54
#>
page_lcpp(pg_width = 10, pg_height = 15)
#> $cpp
#> [1] 85
#>
#> $lpp
#> [1] 84
#>