id = "groff" name = "GNU roff" homepage = "https://www.gnu.org/software/groff/" description = "GNU troff — the GNU implementation of troff." executables = ["groff", "groffer"] [dotfiles] # groffer(1), shipped with groff, documents the user-specific configuration # file at $HOME/.groff/groffer.conf: # https://man7.org/linux/man-pages/man1/groffer.1.html#Configuration_Files paths = ["~/.groff/groffer.conf"] exclude = [] secret = [] [commands] format = 1 label = "Format roff documents" description = "Format man pages, mom or ms documents with groff for a chosen output device. The result goes to standard output, so redirect it to a file in the shell. Less common options are left out." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = true } [[commands.source]] id = "man" kind = "manual" url = "https://git.savannah.gnu.org/cgit/groff.git/tree/src/roff/groff/groff.1.man" revision = "master 2026-10-27 (escapes rendered)" evidence = ''' groff [-abcCeEgGijklNpRsStUVXzZ] [-d cs] [-m name] [-M dir] [-T dev] [-w name] [-W name] [file ...] -e Run eqn preprocessor. -k Run preconv preprocessor. -p Run pic preprocessor. -t Run tbl preprocessor. -T dev Direct troff to format the input for the output device dev. -m name Process name.tmac before input files. -Z Disable postprocessing. troff output will appear on the standard output stream echo "Hello, world!" | groff -Tpdf > hello.pdf echo "Hello, world!" | groff -Thtml > hello.html echo "Hello, world!" | groff -Tutf8 groff -Tps -dpaper=a4l -P-pa4 -P-l -ms foo.ms > foo.ps groff -p -t -me -T utf8 foo.me ''' [[commands.field]] id = "files" label = "Input files" description = "Leave empty to read standard input." type = "path" position = 0 multiple = true path = { kind = "file", role = "input", must_exist = true } sources = ["man"] [[commands.field]] id = "device" label = "Output device" type = "string" option = ["-T"] suggestions = [{ value = "utf8", label = "UTF-8 text" }, { value = "ascii", label = "ASCII text" }, { value = "pdf", label = "PDF" }, { value = "html", label = "HTML" }, { value = "ps", label = "PostScript" }, { value = "dvi", label = "DVI" }] sources = ["man"] [[commands.field]] id = "macros" label = "Macro package" description = "Name of the macro package, for example man, mdoc, ms, me or mom (loaded as -m)." type = "string" option = ["-m"] suggestions = [{ value = "man", label = "man" }, { value = "mdoc", label = "mdoc" }, { value = "ms", label = "ms" }, { value = "me", label = "me" }, { value = "mom", label = "mom" }] sources = ["man"] [[commands.field]] id = "eqn" label = "Run eqn (equations)" type = "boolean" option = ["-e"] sources = ["man"] [[commands.field]] id = "pic" label = "Run pic (pictures)" type = "boolean" option = ["-p"] sources = ["man"] [[commands.field]] id = "tbl" label = "Run tbl (tables)" type = "boolean" option = ["-t"] sources = ["man"] [[commands.field]] id = "preconv" label = "Run preconv (input encoding)" type = "boolean" option = ["-k"] sources = ["man"] [[commands.field]] id = "no_postprocess" label = "Skip postprocessing (raw troff output)" type = "boolean" option = ["-Z"] sources = ["man"] [[commands.task]] id = "man-page" label = "Render a man page to text" set = { device = ["utf8"], macros = ["man"] } fields = ["files", "device", "macros", "tbl"] required = ["files"] [[commands.task]] id = "pdf" label = "Typeset to PDF" set = { device = ["pdf"] } lock = ["device"] fields = ["files", "macros", "eqn", "pic", "tbl"] required = ["files"] [[commands.group]] id = "basic" label = "Basic" fields = ["files", "device", "macros"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["eqn", "pic", "tbl", "preconv", "no_postprocess"]