Questions tagged [groff]

The GNU enhanced re-implementation of Joe Osanna's 1975 `roff` text formatting mark-up language, macros, and its related programs (also known as `troff` and `nroff`). Used at the command line to format manual pages (`man` pages) on Unix-like operating systems.

Filter by
Sorted by
Tagged with
2
votes
2answers
13 views

groff mom doesn't give a pdf output

I am currently trying to learn the mom macro package from groff. The problem is that whenever I compile the file to pdf: groff -mom -Tpdf file.mom > file.pdf The output, in Zathura, is an empty ...
0
votes
0answers
27 views

How can I change the color scheme/theme of groff-mom?

I know how to change individual macro's colors, but is there a way to globally change all the colors to a different color scheme/theme? I am using groff-mom. Example: It currently looks like this I ...
2
votes
1answer
60 views

Displaying orbital node characters in groff ms macros

I'm trying to display the characters for ascending and descending orbital nodes (☊ and ☋) in groff, however when I export the document to postscript they simply don't show.
0
votes
2answers
41 views

Groff - which fonts are loaded by default

Is there a standard set of fonts that is loaded by groff by default? And is that order always the same for all environments? Is it documented somewherr (I could not find it)? I can make an educated ...
3
votes
2answers
54 views

groff arithmetic

Is it possible to perform arithmetic using groff? Say I want to calculate what page is the current one, and I currently am on page 2. I can get the next page's number by using: .PP Next page is ...
1
vote
1answer
41 views

groff ms page break macro

I am new to groff (ms macros) and currently making a table of content parser that builds automatically a table of content by using a double pass through the groff command. However I would actually ...
1
vote
1answer
40 views

Letters using groff_ms

In the description of the manpage of groff_ms, it is written: The ms macros are suitable for reports, letters, books, and technical documentation. However, I don't see any command to right align ...
0
votes
1answer
23 views

Does Groff have an updated formatting algorithm (Knuth-Plass/other)?

In the groff mission statement it says that Groff will be moving to an improved formatting algorithm. Considering that the mission statement was written in 2014; I was wondering where this was at ...
0
votes
1answer
35 views

Theorems in groff

Is there a way in groff -ms to automatically number environments? As an example, here are two theorems I'd like to number 1.1 and 2.1. .TL Lorem ipsum .NH Introduction \# First thm .PP .B Theorem . ...
0
votes
0answers
27 views

How can I get rid of groff / nroff / troff markers?

I can't find useful info how to easily delete all groff (nroff) related formatting markers. unroff doesn't seem to do the job. On Mac OS I can't see it anyway.
2
votes
0answers
60 views

How to write romanian special characters with groff?

I've got myself into experimenting with groff and from the start I found out the romanian special characters I type in vim are all fine (I ran setxkbmap ro), but get messed up in the pdf export. ...
2
votes
1answer
117 views

groff “me” macro, but use sans serif font for headings etc

I'm learning troff for typesetting documents. I found the me macros nice and beautiful out of the box and want to avoid mom. me defaults everything to serif fonts which is ugly for larger text like ...
1
vote
1answer
119 views

Search within man pages of POSIX Programmer's Manual

I would like to search for POSIX functions matching the restrict keyword and my idea (open to other ideas) is to search the SYNOPSIS sections of the POSIX Programmer's Manual for \<restrict\> ...
2
votes
0answers
90 views

Groff long umlaut

I'm Hungarian and I want to use groff to write good-loking pdf files, the problem is even though I used: groff -k -ms test.ms -T pdf > test.pdf eventhough -k took care of the? é,á,ü,ö characters ...
7
votes
1answer
252 views

How to correctly display Polish diacritic symbols in groff?

I'm playing around with groff and I wanted to generate a pdf from the following test.ms .TL Tytuł .AU Imię Nazwisko .NH Wstęp .PP Pierwszy paragraf. Jakieś informacje, żeby były polskie znaki. .PP ...
0
votes
1answer
277 views

Embed ascii diagram in groff?

I have groff file to generate a pdf in the format: .TL Article title .AU Author name .AI Publication title .SH .LP First paragraph .PP More paragraphs I'm then running groff -ms a.ms -T pdf > a....
3
votes
3answers
88 views

How to access man pages as structured content

I'm building a resource that references man pages, and I'm wondering if anyone knows of a way to access man pages as structured data? My current approach is to do a lot if REGEXing, but this is ...
1
vote
1answer
153 views

exporting man pages to postscript

I found that I can save man page into ps format: man -t man > file.ps or to pdf: man -t man | ps2pdf - file.pdf Apart from the man page itself, the export includes man version, page numbers and ...
3
votes
1answer
585 views

What is the difference between the mdoc macro set for troff and the plain man macro set for making new manpages

I am trying to create man pages for a side project and I have never used troff before and I am trying to figure out what exactly is the difference between the man macro set and the mdoc macro sets and ...
0
votes
1answer
70 views

man/troff: Convert ^ to ˆ

This is a follow-up on man -t converts - to − This time the problem is with ^ which troff thinks should be changed into ˆ. Is there a general way of telling man -t not to mess with the input? If ...
4
votes
1answer
1k views

How do I convert a troff manpage with UTF-8 characters (czech to be precise) to PDF

I have a troff document (manpage) with UTF-8 characters and I am trying to convert it to a PDF. However, when using the -Tpdf option, the PDF generated does not show the correct characters. This is ...
3
votes
2answers
93 views

Gnu nroff - output a line with dot at beginning of line

i tried to write a self-replicating program ("quine") in raw (no macros) GNU nroff. Admittedly, this is pointless and eccentric, but it doesn't seem to have been done before. I have failed to do so. ...
1
vote
1answer
91 views

man -t converts - to −

man -t ls converts - to −. Is there a way I can tell man -t to not do that? I prefer having -, as the - is often part of examples where − would be wrong (e.g. options).
2
votes
3answers
148 views

How to add a dot to a raw man file at the end of a line?

I've got a fragment of a manual file which looks like this: .TP .I krb5_key_file Location of the key for this client's principal. Note that the key file must be owned by root and mode 0400. The ...
2
votes
1answer
79 views

Viewing mm files

The ksh source code at https://github.com/att/ast/tree/master/src/cmd/ksh93 contains files ending with the .mm suffix. E.g., https://github.com/att/ast/blob/master/src/cmd/ksh93/PROMO.mm At first ...
1
vote
0answers
104 views

Troff Load User Font

In Heirloom Troff, is it possible to just load an OTF font (or another supported format) via a URI? I’m trying, .fp 10 R /Users/jacob/Restore/Fonts/Roboto/Roboto-Medium.ttf ttf .ft 10 .ft R Test I’m ...
3
votes
2answers
1k views

How do I choose a groff macro package?

I want to try a classic groff macro package for structured technical documents as a replacement for the arguably more complex LaTeX and DocBook. I understand ms was the earliest macro package, and mm ...
5
votes
1answer
614 views

How do I generate manpages using escape codes for bold, etc.?

While inspecting the source code of less, I noticed that the included manpage (less.man) used terminal escape codes for showing bold text: ^[[1mNAME^[[0m less - opposite of more ^[[1mSYNOPSIS^...
1
vote
2answers
184 views

How to control content of header in groff man macros

I'm using the groff man macros to produce general purpose documentation (not actually man pages) because they are easy to learn and use. I'd like control of the postscript page header as free text ...
1
vote
0answers
160 views

Man page to PDF with groff: no space after headings

I have written a 250+ page manual page whose printed appearance I'm trying to polish. It uses the old-style man macros: the page begins with .TH, and uses things like .SH, .SS and .TP for sectioning. ...
2
votes
1answer
1k views

How do I display a manpage with groff in/on msysgit?

I've been unable to correctly set up a MANPATH environment variable in msysgit (1.9.0; 20140217) on Windows 7 (which is not my main concern here). Every time I execute the man command, I recieve the ...
2
votes
1answer
206 views

Properly inserting code samples in man pages

I'm trying to write a man page for a software, and would like to include some code snippets. I'm currently using the .RS and .RE macros as part of a custom-made .SAMPLE macro, but for some reason that ...
12
votes
3answers
7k views

Is troff/groff relevant anymore?

I've heard that troff/groff have largely been replaced by TeX. Is this true? The only thing that I know actually used troff nowadays is manpages. Is this also true? If not, what are some other uses?
2
votes
1answer
1k views

Man displaying groff control characters

Man is displaying groff control characters after I compiled a later version of groff. For example, when I try to view groff's man page: GROFF(1) General Commands Manual ...
6
votes
1answer
1k views

convert man output to ebook format

I can convert man output to PDF. First, man -t grep >grep.ps (grep is just an example; I am not looking for mobile version of grep man page). Then Adobe Distiller converts PostScript to PDF. ...
2
votes
3answers
1k views

Can groff create a ps file with interpreted ANSI escape characters?

This question is inspired by this one on SU. How can I print bold or color using lp and ANSI escape sequences? I know how to display, for example, bold text in the terminal: $ echo -e '\033[01;...