Learn R Programming

lazyWeave (version 2.2.0)

map.size: Convert text size specifications between LaTeX and HTML formats

Description

The default text size specifications in LaTeX are character strings, but in HTML, the font size is determined by an integer. In order to be able to switch formats in existing code, there needs to be some way to map HTML text size to LaTeX text size, and vice versa. This is managed by map.size in the lazyWeave functions so the user won't have to worry about it.

Usage

map.size(x, reportFormat=getOption("lazyReportFormat"))

Arguments

x
The text size specification to be mapped to the desired format.
reportFormat
The format to which x should be mapped.

Details

Text sizes are mapped according to the following: ll{ LaTeX HTML tiny 5 scriptsize 7 footnotesize 8 small 9 normalsize 10 large 12 Large 14 LARGE 18 huge 20 Huge 24 } HTML codes that don't appear in the table are mapped to the next smallest value. HTML values less than 5 are mapped to "tiny."

Examples

Run this code
map.size(10, "latex")
map.size(11, "latex")
map.size(3, "latex")

map.size("tiny", "html")
map.size("Huge", "html")

Run the code above in your browser using DataLab