| Title: | Lightweight Output Formats for 'litedown' |
| Version: | 0.1.0 |
| Description: | A collection of lightweight, minimalist output formats and templates for 'litedown' by Xie (2026) <doi:10.32614/CRAN.package.litedown>, including resumes, cover letters, and other common document types. Documents are rendered with HTML and CSS and can be printed to PDF with a 'Chromium'-based browser, without requiring 'Pandoc' or a 'LaTeX' installation. |
| License: | MIT + file LICENSE |
| URL: | https://nanx.me/liteformats/, https://github.com/nanxstats/liteformats |
| BugReports: | https://github.com/nanxstats/liteformats/issues |
| Encoding: | UTF-8 |
| Imports: | litedown (≥ 0.10), xfun (≥ 0.60) |
| Suggests: | testit |
| VignetteBuilder: | litedown |
| SystemRequirements: | Chromium, Google Chrome, or Microsoft Edge (for PDF output) |
| RoxygenNote: | 8.0.0 |
| NeedsCompilation: | no |
| Packaged: | 2026-07-26 07:48:52 UTC; nanx |
| Author: | Nan Xiao |
| Maintainer: | Nan Xiao <me@nanx.me> |
| Repository: | CRAN |
| Date/Publication: | 2026-08-05 07:10:08 UTC |
Lightweight output formats for litedown
Description
Provides HTML-first resume and cover-letter formats with self-contained styling, local pages.js pagination, and optional PDF output through a headless Chromium-based browser.
Details
Start with use_resume() or use_cover_letter(), then render with
resume() or cover_letter().
Author(s)
Maintainer: Nan Xiao me@nanx.me (ORCID) [copyright holder]
Authors:
Nan Xiao me@nanx.me (ORCID) [copyright holder]
Other contributors:
Yihui Xie (pages.js and pages.css libraries) [contributor, copyright holder]
See Also
Useful links:
Report bugs at https://github.com/nanxstats/liteformats/issues
Render a cover letter
Description
Render a two-column cover letter to self-contained HTML or PDF. The narrow left column holds the sender's details, while the letter remains the visual foreground in the wider right column.
Usage
cover_letter(
input,
output = NULL,
author = NULL,
address = NULL,
phone = NULL,
email = NULL,
website = NULL,
date = NULL,
greeting = NULL,
font_family = NULL,
google_font = NULL,
font_files = NULL,
font_size = NULL,
font_scale = NULL,
ligatures = NULL,
line_height = NULL,
paragraph_spacing = NULL,
section_spacing = NULL,
margins = NULL,
paper = NULL,
link_color = NULL,
paged = NULL,
keep_html = FALSE,
browser = NULL,
envir = parent.frame()
)
Arguments
input |
Path to a |
output |
Output path ending in |
author, address, phone, email, website |
Contact metadata. |
date, greeting |
Letter date and salutation. |
font_family |
A CSS |
google_font |
A Google Fonts family name or a full Google Fonts CSS URL.
This is an explicit online resource and is never used by default. A family
name loads its default face; pass a full URL plus the matching
|
font_files |
A named character vector or list of local font files. Names
may be |
font_size |
A CSS length such as |
font_scale |
A positive number used to scale |
ligatures |
Whether to enable common and discretionary ligatures.
Defaults to |
line_height |
A positive unitless CSS line height or CSS length. |
paragraph_spacing, section_spacing |
CSS lengths controlling vertical rhythm. |
margins |
Page margins. Supply one to four CSS lengths using standard CSS shorthand order, or numeric values interpreted as inches. |
paper |
A paper name ( |
link_color |
Any valid CSS color. |
paged |
Whether the HTML preview should open in a paginated layout. Printing always invokes the packaged pages.js pagination. |
keep_html |
For PDF output, whether to retain the intermediate HTML beside the PDF. |
browser |
Path to Chromium, Google Chrome, or Microsoft Edge. |
envir |
Environment in which R code in |
Value
The normalized output path, invisibly.
Examples
source <- use_cover_letter(tempfile(fileext = ".Rmd"))
cover_letter(source, tempfile(fileext = ".html"))
## Not run:
# PDF output requires a local Chromium-based browser
cover_letter(source, "cover-letter.pdf")
## End(Not run)
Render a resume
Description
Render a Markdown or R Markdown resume to a self-contained HTML document or
to PDF through a headless Chromium-based browser. The output format is
inferred from the extension of output.
Usage
resume(
input,
output = NULL,
author = NULL,
job_title = NULL,
address = NULL,
phone = NULL,
email = NULL,
website = NULL,
linkedin = NULL,
font_family = NULL,
google_font = NULL,
font_files = NULL,
font_size = NULL,
font_scale = NULL,
ligatures = NULL,
line_height = NULL,
paragraph_spacing = NULL,
section_spacing = NULL,
margins = NULL,
paper = NULL,
link_color = NULL,
paged = NULL,
keep_html = FALSE,
browser = NULL,
envir = parent.frame()
)
Arguments
input |
Path to a |
output |
Output path ending in |
author, address, phone, email, website |
Contact metadata. |
job_title, linkedin |
Resume-specific professional and contact metadata. |
font_family |
A CSS |
google_font |
A Google Fonts family name or a full Google Fonts CSS URL.
This is an explicit online resource and is never used by default. A family
name loads its default face; pass a full URL plus the matching
|
font_files |
A named character vector or list of local font files. Names
may be |
font_size |
A CSS length such as |
font_scale |
A positive number used to scale |
ligatures |
Whether to enable common and discretionary ligatures.
Defaults to |
line_height |
A positive unitless CSS line height or CSS length. |
paragraph_spacing, section_spacing |
CSS lengths controlling vertical rhythm. |
margins |
Page margins. Supply one to four CSS lengths using standard CSS shorthand order, or numeric values interpreted as inches. |
paper |
A paper name ( |
link_color |
Any valid CSS color. |
paged |
Whether the HTML preview should open in a paginated layout. Printing always invokes the packaged pages.js pagination. |
keep_html |
For PDF output, whether to retain the intermediate HTML beside the PDF. |
browser |
Path to Chromium, Google Chrome, or Microsoft Edge. |
envir |
Environment in which R code in |
Details
Document metadata and typographic settings may be supplied in the YAML
header. Renderer arguments take precedence over YAML. See
use_resume() for a complete starter document.
Value
The normalized output path, invisibly.
Examples
source <- use_resume(tempfile(fileext = ".Rmd"))
resume(source, tempfile(fileext = ".html"))
## Not run:
# PDF output requires a local Chromium-based browser
resume(source, "resume.pdf")
# Embed local font files
resume(
source,
font_files = c(
regular = "fonts/MySerif-Regular.woff2",
italic = "fonts/MySerif-Italic.woff2",
bold = "fonts/MySerif-Bold.woff2"
),
font_scale = 0.96,
ligatures = FALSE
)
## End(Not run)
Create a resume or cover letter from a starter
Description
Copy an editable R Markdown starter document to path. Static assets used by
the rendered formats remain inside the installed package; the copied source
contains only Markdown content and YAML settings.
Usage
use_resume(path = "resume.Rmd", overwrite = FALSE)
use_cover_letter(path = "cover-letter.Rmd", overwrite = FALSE)
Arguments
path |
Destination path. |
overwrite |
Whether to replace an existing file. |
Value
The normalized destination path, invisibly.
Examples
use_resume(tempfile(fileext = ".Rmd"))
use_cover_letter(tempfile(fileext = ".Rmd"))