liteformats: Lightweight Output Formats for ‘litedown’

2026-07-27

Title Lightweight Output Formats for litedown
Version 0.1.0.9000
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.
Imports litedown (>= 0.10), xfun (>= 0.60)
Suggests testit
License MIT + file LICENSE
URL https://nanx.me/liteformats/, https://github.com/nanxstats/liteformats
BugReports https://github.com/nanxstats/liteformats/issues
VignetteBuilder litedown
Author Nan Xiao ORCID iD [aut, cre, cph], Yihui Xie [ctb, cph]

R-CMD-check

liteformats provides lightweight, carefully typeset document formats for litedown. The first formats are a professional resume and a two-column cover letter. They use HTML and CSS, paginate with a packaged copy of Yihui Xie’s pages.js, and require neither Pandoc nor LaTeX.

1 Installation

You can install the development version of liteformats from GitHub with:

# install.packages("pak")
pak::pak("nanxstats/liteformats")

2 Usage

Load liteformats once per R session:

library(liteformats)

2.1 Resume

Create the resume starter, then render it to self-contained HTML or PDF:

use_resume("resume.Rmd")
resume("resume.Rmd", "resume.html")
resume("resume.Rmd", "resume.pdf")

2.2 Cover letter

Use the matching cover_letter() renderer for the cover letter starter:

use_cover_letter("cover-letter.Rmd")
cover_letter("cover-letter.Rmd", "cover-letter.html")
cover_letter("cover-letter.Rmd", "cover-letter.pdf")

HTML output is self-contained. A .pdf output path prints the HTML through headless Chrome.

3 Automate builds with Make

Rendering from explicit R commands takes a little more setup than clicking a Knit button, but it also makes the process easy to customize and combine with other tools. Put repeatable commands in a Makefile to rebuild only documents whose sources have changed:

.PHONY: all clean

all: resume.html resume.pdf cover-letter.html cover-letter.pdf

resume.html resume.pdf: resume.Rmd
	Rscript -e 'liteformats::resume("$<", "$@")'

cover-letter.html cover-letter.pdf: cover-letter.Rmd
	Rscript -e 'liteformats::cover_letter("$<", "$@")'

clean:
	$(RM) resume.html resume.pdf cover-letter.html cover-letter.pdf

Run make for all outputs or, for example, make resume.pdf for one. Extend the recipes with any preprocessing, postprocessing, or project-specific options needed to shape the documents into a particular look.

Core typography and fitting controls can live in the document’s YAML:

liteformats:
  paper: letter
  margins: ["0.65in", "0.8in"]
  font-family: "Charter, Georgia, serif"
  font-size: 11pt
  font-scale: 0.94
  ligatures: false
  line-height: 1.15
  paragraph-spacing: 0.05em
  section-spacing: 1em
  link-color: "#385898"

They can also be supplied as renderer arguments. Local .otf, .ttf, .woff, and .woff2 files are embedded in the output:

resume(
  "resume.Rmd",
  "resume.pdf",
  font_files = c(
    regular = "fonts/MySerif-Regular.woff2",
    italic = "fonts/MySerif-Italic.woff2",
    bold = "fonts/MySerif-Bold.woff2"
  ),
  font_scale = 0.96,
  ligatures = FALSE
)

Set google_font = "Source Serif 4" to opt into a Google Fonts request at render time. Package installation, checks, examples, and vignettes never need network access.

Ligatures are disabled by default, but PDF text extraction can also depend on the selected font’s internal tables. When ATS parsing matters, inspect the result with a tool such as pdftotext resume.pdf - before submitting it.

Appendix

To cite the package liteformats in publications, please use:

Xiao N (2026). liteformats: Lightweight Output Formats for ‘litedown’. R package version 0.1.0.9000, https://nanx.me/liteformats/.

@Manual{,
  title = {liteformats: Lightweight Output Formats for 'litedown'},
  author = {Nan Xiao},
  year = {2026},
  note = {R package version 0.1.0.9000},
  url = {https://nanx.me/liteformats/},
}