(no title)
b3lm0nt | 2 years ago
I've found it be perfect for my purposes. LaTeX felt like too much overhead for generating a few nice-looking README files and blog posts. I also have a soft spot for older UNIX / GNU tools.
The best sources of documentation (which did take some time to track down) are:
- gtroff reference: https://www.gnu.org/software/groff/manual/groff.html#gtroff-...
- man 7 groff: https://man7.org/linux/man-pages/man7/groff.7.html
I keep a small, annotated .groff file in a gist. It serves as a reference for the formatting functions I use most frequently: https://gist.github.com/benjamindblock/0926f7346b79b93e739ab...
noisy_boy|2 years ago
Did I miss any command-line option?
b3lm0nt|2 years ago
Second point: to resolve the issue you're running into, remove these lines from the groff file to allow the default margins for PDF rendering to occur.
There can occasionally be some strange behavior with the macros when different output devices are used (some options are ignored, some may have unexpected consequences). I took a look at the PDF output using my file directly, and it looks like the em sizing for gropdf is different from the grotty implementation, causing some overflow. (Maybe the font needs to be set explicitly before setting the line-length? Not sure).Using a different unit of measurement (like inches or points) may be a better option for PDF files: https://www.gnu.org/software/groff/manual/html_node/Measurem...
Bonus note: you can confirm the final output device that will be used by a groff command by adding the -V option. Example:
Outputs: Using -Tascii instead will produce: Ref on output devices: https://www.gnu.org/software/groff/manual/html_node/Output-D...* Edit: See 2b3a51's response for a better explanation.
2b3a51|2 years ago
The previous poster's command generated nicely justified text in the terminal (or redirected to a file).