tldr/pages/common/groff.md

26 lines
833 B
Markdown
Raw Normal View History

# groff
> Typesetting program that reads plain text mixed with formatting commands and produces formatted output.
2017-09-09 12:52:54 +01:00
> It is the GNU replacement for the `troff` and `nroff` Unix commands for text formatting.
2019-06-07 11:58:27 +01:00
> More information: <https://www.gnu.org/software/groff>.
- Render a man page as plain text, and display the result:
`groff -man -T utf8 {{manpage.1}}`
- Render a man page using the ASCII output device, and display it using a pager:
`groff -man -T ascii {{manpage.1}} | less`
- Render a man page into an HTML file:
2017-09-09 12:52:54 +01:00
`groff -man -T html {{manpage.1}} > {{page.html}}`
- Process a roff file using the `tbl` and `pic` preprocessors, and the `me` macro set:
`groff -t -p -me -T utf8 {{foo.me}}`
- Run a `groff` command with preprocessor and macro options guessed by the `grog` utility:
`eval "$(grog -T utf8 {{foo.me}})"`