From 318ca787e19a1aecc4526eae280a87292f38d654 Mon Sep 17 00:00:00 2001 From: Gil Moskowitz Date: Thu, 21 Oct 2021 03:17:15 -0400 Subject: [PATCH] eqn, grap, groff, pic, tbl, troff: add page (#6868) --- pages/common/eqn.md | 13 +++++++++++++ pages/common/grap.md | 13 +++++++++++++ pages/common/groff.md | 17 ++++++++--------- pages/common/pic.md | 13 +++++++++++++ pages/common/tbl.md | 23 ++++++----------------- pages/common/troff.md | 21 +++++++++++++++++++++ 6 files changed, 74 insertions(+), 26 deletions(-) create mode 100644 pages/common/eqn.md create mode 100644 pages/common/grap.md create mode 100644 pages/common/pic.md create mode 100644 pages/common/troff.md diff --git a/pages/common/eqn.md b/pages/common/eqn.md new file mode 100644 index 000000000..c90004b75 --- /dev/null +++ b/pages/common/eqn.md @@ -0,0 +1,13 @@ +# eqn + +> Equation preprocessor for the groff (GNU Troff) document formatting system. +> See also `troff` and `groff`. +> More information: . + +- Process input with equations, saving the output for future typesetting with groff to PostScript: + +`eqn {{path/to/input.eqn}} > {{path/to/output.roff}}` + +- Typeset an input file with equations to PDF using the [me] macro package: + +`eqn -T {{pdf}} {{path/to/input.eqn}} | groff -{{me}} -T {{pdf}} > {{path/to/output.pdf}}` diff --git a/pages/common/grap.md b/pages/common/grap.md new file mode 100644 index 000000000..cf1510bd8 --- /dev/null +++ b/pages/common/grap.md @@ -0,0 +1,13 @@ +# grap + +> A charting preprocessor for the groff (GNU Troff) document formatting system. +> See also `pic` and `groff`. +> More information: . + +- Process a `grap` file and save the output file for future processing with `pic` and `groff`: + +`grap {{path/to/input.grap}} > {{path/to/output.pic}}` + +- Typeset a `grap` file to PDF using the [me] macro package, saving the output to a file: + +`grap {{path/to/input.grap}} | pic -T {{pdf}} | groff -{{me}} -T {{pdf}} > {{path/to/output.pdf}}` diff --git a/pages/common/groff.md b/pages/common/groff.md index 62857301a..e94ac53c8 100644 --- a/pages/common/groff.md +++ b/pages/common/groff.md @@ -1,25 +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. +> GNU replacement for the `troff` and `nroff` typesetting utilities. > More information: . -- Render a man page as plain text, and display the result: +- Format output for a PostScript printer, saving the output to a file: -`groff -man -T utf8 {{manpage.1}}` +`groff {{path/to/input.roff}} > {{path/to/output.ps}}` - Render a man page using the ASCII output device, and display it using a pager: -`groff -man -T ascii {{manpage.1}} | less` +`groff -man -T ascii {{path/to/manpage.1}} | less` - Render a man page into an HTML file: -`groff -man -T html {{manpage.1}} > {{page.html}}` +`groff -man -T html {{path/to/manpage.1}} > {{path/to/manpage.html}}` -- Process a roff file using the `tbl` and `pic` preprocessors, and the `me` macro set: +- Typeset a roff file containing [t]ables and [p]ictures, using the [me] macro set, to PDF, saving the output: -`groff -t -p -me -T utf8 {{foo.me}}` +`groff {{-t}} {{-p}} -{{me}} -T {{pdf}} {{path/to/input.me}} > {{path/to/output.pdf}}` - Run a `groff` command with preprocessor and macro options guessed by the `grog` utility: -`eval "$(grog -T utf8 {{foo.me}})"` +`eval "$(grog -T utf8 {{path/to/input.me}})"` diff --git a/pages/common/pic.md b/pages/common/pic.md new file mode 100644 index 000000000..eb54e1cda --- /dev/null +++ b/pages/common/pic.md @@ -0,0 +1,13 @@ +# pic + +> Picture preprocessor for the groff (GNU Troff) document formatting system. +> See also `groff` and `troff`. +> More information: . + +- Process input with pictures, saving the output for future typesetting with groff to PostScript: + +`pic {{path/to/input.pic}} > {{path/to/output.roff}}` + +- Typeset input with pictures to PDF using the [me] macro package: + +`pic -T {{pdf}} {{path/to/input.pic}} | groff -{{me}} -T {{pdf}} > {{path/to/output.pdf}}` diff --git a/pages/common/tbl.md b/pages/common/tbl.md index fef188166..aa8790dc4 100644 --- a/pages/common/tbl.md +++ b/pages/common/tbl.md @@ -1,24 +1,13 @@ # tbl -> Format tables for `troff`. +> Table preprocessor for the groff (GNU Troff) document formatting system. +> See also `groff` and `troff`. > More information: . -- Format tables for `troff` and print it to stdout: +- Process input with tables, saving the output for future typesetting with groff to PostScript: -`cat {{path/to/file.troff}} | tbl` +`tbl {{path/to/input_file}} > {{path/to/output.roff}}` -- Format tables for `troff` in "compatibility mode": +- Typeset input with tables to PDF using the [me] macro package: -`cat {{path/to/file.troff}} | tbl -C` - -- Format tables for `troff` from a file: - -`tbl {{path/to/file.troff}}` - -- Mark the beginning of a table ("Table Start"): - -`.TS` - -- Mark the end of the table ("Table End"): - -`.TE` +`tbl -T {{pdf}} {{path/to/input.tbl}} | groff -{{me}} -T {{pdf}} > {{path/to/output.pdf}}` diff --git a/pages/common/troff.md b/pages/common/troff.md new file mode 100644 index 000000000..c8a38f6c2 --- /dev/null +++ b/pages/common/troff.md @@ -0,0 +1,21 @@ +# troff + +> Typesetting processor for the groff (GNU Troff) document fomatting system. +> See also `groff`. +> More information: . + +- Format output for a PostScript printer, saving the output to a file: + +`troff {{path/to/input.roff}} | grops > {{path/to/output.ps}}` + +- Format output for a PostScript printer using the [me] macro package, saving the output to a file: + +`troff -{{me}} {{path/to/input.roff}} | grops > {{path/to/output.ps}}` + +- Format output as [a]SCII text using the [man] macro package: + +`troff -T {{ascii}} -{{man}} {{path/to/input.roff}} | grotty` + +- Format output as a [pdf] file, saving the output to a file: + +`troff -T {{pdf}} {{path/to/input.roff}} | gropdf > {{path/to/output.pdf}}`