groff_available: Can groff typeset a document here?

View source: R/knitroff.R

groff_availableR Documentation

Can groff typeset a document here?

Description

Runs groff on an empty ms document, with the arguments render_roff uses and without output, and reports whether it succeeded. Finding the groff program is not enough: Debian's ⁠groff-base⁠, installed for man pages, has no ms macros and no PDF driver.

Usage

groff_available(format = c("pdf", "ps", "utf8"), groff = "groff")

Arguments

format

"pdf", "ps" or "utf8", as in render_roff.

groff

The groff program.

Value

TRUE or FALSE.

See Also

render_roff, which stops with an explanation when this is FALSE.

Examples

groff_available("utf8")

knitroff documentation built on Oct. 16, 2026, 5:09 p.m.