listing_column_widths {junco} | R Documentation |
Define Column Widths
Description
def_colwidths
uses heuristics to determine suitable column widths given a
table or listing, and a font.
Usage
listing_column_widths(
mpf,
incl_header = TRUE,
col_gap = 0.5,
pg_width_ins = 8.88,
fontspec = font_spec("Times", 8, 1.2),
verbose = FALSE
)
def_colwidths(
tt,
fontspec,
label_width_ins = 2,
col_gap = ifelse(type == "Listing", 0.5, 3),
type = tlg_type(tt)
)
Arguments
mpf |
( |
incl_header |
( |
col_gap |
Column gap in spaces. Defaults to |
pg_width_ins |
( |
fontspec |
Font specification |
verbose |
( |
tt |
input Tabletree |
label_width_ins |
Label Width in Inches. |
type |
Type of the table tree, used to determine column width calculation method. |
Details
Listings are assumed to be rendered landscape on standard A1 paper,
such that all columns are rendered on one page. Tables are allowed to
be horizontally paginated, and column widths are determined based only on
required word wrapping. See the Automatic Column Widths
vignette for
a detailed discussion of the algorithms used.
Value
A vector of column widths suitable to use in tt_to_tlgrtf
and
other exporters.
a vector of column widths (including the label row pseudo-column in the table
case) suitable for use rendering tt
in the specified font.