From d6330e21076e7047b7c3c43443e6f5a0c80d1cb7 Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Fri, 8 Sep 2017 17:06:21 +0100 Subject: [PATCH 1/2] groff: create page Sources: https://embswit.wordpress.com/2013/02/08/render-man-page-from-source/, and the EXAMPLES section of `man groff` :) --- pages/common/groff.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pages/common/groff.md diff --git a/pages/common/groff.md b/pages/common/groff.md new file mode 100644 index 000000000..528312295 --- /dev/null +++ b/pages/common/groff.md @@ -0,0 +1,24 @@ +# groff + +> Typesetting program that reads plain text mixed with formatting commands and produces formatted output. +> It is the GNU replacement for the troff and nroff Unix commands for text formatting. + +- 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: + +`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}})"` From dee78902314dd89c977e97d29c4a2b2421722745 Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Sat, 9 Sep 2017 12:52:54 +0100 Subject: [PATCH 2/2] Update groff.md --- pages/common/groff.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/common/groff.md b/pages/common/groff.md index 528312295..5abfae289 100644 --- a/pages/common/groff.md +++ b/pages/common/groff.md @@ -1,7 +1,7 @@ # groff > Typesetting program that reads plain text mixed with formatting commands and produces formatted output. -> It is the GNU replacement for the troff and nroff Unix commands for text formatting. +> It is the GNU replacement for the `troff` and `nroff` Unix commands for text formatting. - Render a man page as plain text, and display the result: @@ -13,7 +13,7 @@ - Render a man page into an HTML file: -`groff -man -T html {{manpage.1}} > page.html` +`groff -man -T html {{manpage.1}} > {{page.html}}` - Process a roff file using the `tbl` and `pic` preprocessors, and the `me` macro set: