2022 Developer Survey is open! Take survey.

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
0 votes
3 answers
91 views

How can I prevent a line break between option and parameter using `.RB` and `.IR`?

When writing a manual page of a command, the SYNOPSIS contains: .RB [ \-v .IR version ] Unfortunately when formatting the SYNOPSIS there is a line break between "[-v" and "version]&...
user avatar
  • 801
0 votes
0 answers
14 views

Groff use rsvg-convert pdf images error

I'm experimenting with troff/groff typesenting system, to be more specific with ms macross, and I'm triing to use plantuml generated diagrams. I found out that I can render plantuml diagrams as svg ...
user avatar
2 votes
1 answer
90 views

Debian 11 (Bullseye): man stopped working after upgrade?

After a recent upgrade, man has stopped working, and I can't figure out why. This is my system: # cat /etc/*release* PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" NAME="Debian GNU/Linux&...
user avatar
  • 335
3 votes
1 answer
98 views

groff ms indentfirst and frenchspacing

I am typesetting drafts of my papers with the ms macro package, but in my language (Spanish) the custom is to indent all paragraphs and keep space regular after a period, contrary to US custom to ...
user avatar
  • 174
2 votes
1 answer
66 views

Why do groff -Tdvi | dvipdf and groff -Tpdf produce very different results?

Let's consider the following simple groff code .EQ s = sqrt { { sum from i=1 to N ( x sub i - x bar ) sup 2 } over { N - 1 } } .EN When I use the groff -e -Tpdf command I get the following (ugly) ...
user avatar
  • 71
3 votes
1 answer
49 views

pic(1): graphic cut off at right border

I created a graphic in the pic language as follows (v-modell.pic): .PS AF: box wid 1.6 ht 0.25 "Anforderungen" SA: box same "Systemarchitektur" at AF.se + (0.1, -0.5) KA: box same &...
user avatar
0 votes
1 answer
49 views

Can I call a mdoc macro inline?

Despite the many conveniences of mdoc, I find syntax of troff is still a bit too newline-rich or "spaghetti" compared to the other languages. Consider this example: .Sh DESCRIPTION The .Nm ...
user avatar
  • 1,161
1 vote
1 answer
61 views

How do I output an individual eqn described equation to a .ps or .eps?

I would like to reuse the output from eqn to get PS or EPS files which contains just the equation and not a complete A4 with the equation. If I try: $ cat test.eqn .EQ For ~ y=1 ~ -> ~ L( y hat , y)...
user avatar
  • 569
0 votes
2 answers
78 views

How do I scale a whole figure in pic?

Given a pic figure: .PS circle "Foo" arrow box "Bar" arrow box dashed "Foo" "Dashed" .PE Is it possible to scale the whole diagram element's widths and heights?...
user avatar
  • 569
2 votes
1 answer
250 views

How can I include a pic figure as external file in groff?

While using groff and pic it is possible to do: $ cat test.ms .TL Test .NH 1 Test Header .PS circle arrow box .PE $ cat test.ms | groff -ms -p > test.ps Which generates a valid test.ps file ...
user avatar
  • 569
9 votes
3 answers
693 views

Are ∈ and ℝ symbols available in eqn/roff?

A set of commonly used symbols to represent that a variable belongs to a given real coordinate space are ∈ ("ELEMENT OF", Unicode U+2208) and ℝ ("DOUBLE-STRUCK CAPITAL R", Unicode ...
user avatar
  • 569
2 votes
1 answer
79 views

Groff renders brackets and square roots incorrectly

The groff source .EQ left ( sqrt {1 over 2} right ) .EN produces this when a PDF is made, and viewed with some PDF readers. (Here, Atril.) The error occurs with large round brackets and/or square ...
user avatar
0 votes
1 answer
33 views

Prevent groff form setting bigger whitespace after sentence

Is there a way to prevent that groff is setting more whitespace after each sentence? (Not on a per sentence basis, but in general.)
user avatar
1 vote
2 answers
189 views

Inserting the date in groff

How can I insert today's date in groff? I know I can type today's date directly, but I would like the date to dynamically be produced, so that a document could be recompiled with a new date without ...
user avatar
2 votes
1 answer
57 views

How do you put an image at the start of a paragraph in groff mom?

I'm trying to place a small image, about the height of two lines, at the beginning of a paragraph...kind of like how a drop-cap is placed. I've tried .PSPIC and .PDFIMAGE with different combinations ...
user avatar
1 vote
1 answer
43 views

groff: How can I place punctuation after a link generated with the PDF_WWW_LINK mom macro?

I am trying to include a link to an online web resource using the groff mom macros. Below is a minimal reproducible example of my problem: Here is some text with a .PDF_WWW_LINK https://unix....
user avatar
1 vote
1 answer
287 views

How to add a hyperlink to a URL in groff with mom macros?

How can I create a hyperlink to a URL in groff, using the mom macros? I know it is possible to create links to other sections within the same document, but I want to know how to create a clickable ...
user avatar
0 votes
1 answer
236 views

Using Palatino font with groff mom macros

I am trying to use the Palatino font with my groff mom document. The documentation says FAMILY takes one argument: the name of the family you want. Groff comes with a small set of basic families, ...
user avatar
1 vote
3 answers
102 views

How can I have a multi-row cell with the Unix tbl utility?

I am trying to work with groff to generate a table where one cell spans multiple rows. I tried .TS BOXED LABEL "Table 1: Use Case 1" allbox, tab(@); l l l ld l ^ . Use Case Identifier@UC1 ...
user avatar
1 vote
1 answer
176 views

groff: How can I correctly render paragraphs between embedded images?

I have the following groff source using the mom macros: .PRINTSTYLE TYPESET .CAPTION_AFTER_LABEL IMG .START .PDF_IMAGE img/uc1.pdf 657p 152p SCALE 70 CAPTION "Figure 1: Activity diagram for UC1&...
user avatar
2 votes
1 answer
52 views

Is there some way (command, request,...) in Groff to measure the height of a string or character?

I'm working on a preprocessor to draw the square root for the equation (attempt to improve aesthetic of the EQN equation) which involves finding the size (width and height) of the string. I've found ...
user avatar
0 votes
1 answer
49 views

How can you customise headings in the ms package for groff?

I noticed there's a similar answered question here, but that one's pertaining to the me package. I'd like to know if and how, if so, is it possible to that using ms instead.
user avatar
2 votes
2 answers
182 views

Writing Vietnamese in Groff

Using ms macro, is there some way to support more Vietnamese accented characters in Groff? I looked through the page but there doesn't seem to have enough accented characters. https://www.gnu.org/...
user avatar
1 vote
1 answer
151 views

Make Numbered Equation in Groff

Using the ms macros and eqn, is there some way to number an equation in Groff automatically similar to LaTeX?
user avatar
1 vote
2 answers
96 views

Formatting Proof in Groff

Is there a way to append a tombstone symbol (usually a square) to the right at the end of line of a proof similar to LaTeX proof?
user avatar
1 vote
2 answers
137 views

How do I format man page for printing on custom page size?

I know that I can specify the custom page size to groff by passing -P-p... option. When I run the following command: gunzip -dc /usr/share/man/man1/fswebcam.1.gz | groff -mandoc -P-p612p,396p >...
user avatar
0 votes
1 answer
130 views

Difference between "groff" and "gtroff"

From the groff documentation: GNU 'troff' (or 'groff') is a system for typesetting documents. Again: In this document, we consequently say 'gtroff' when talking about the GNU 'troff' program. One ...
user avatar
  • 25
0 votes
1 answer
230 views

Render troff file on terminal like the man outputs on terminal

I was trying to render the troff file https://github.com/bit-team/backintime/blob/master/common/man/C/backintime-config.1 in terminal. How can I make the output (using cat or some other utility) look ...
user avatar
  • 1,364
5 votes
1 answer
167 views

`man --html` and `man --gxditview` exit with errors?

Problem On my machine (Ubuntu 18.04), I am able to view man pages normally in the console. However, I cannot seem to get man --html (man -H) or man --gxditview (man -X) to work. Might anyone have any ...
user avatar
2 votes
1 answer
182 views

groff ms column break macro

I have seen here how to perform a page break: groff ms page break macro I have been trying to find the equivalent but for columns in a .2C two columns formatted document. Sometimes the header of a ...
user avatar
  • 569
3 votes
2 answers
123 views

How to search for end-of-line hyphenated words in less(1)

Does less (or any other lightweight pager I could use as $PAGER) has such a feature? For example, if I type man bash and then enter /incorporates it doesn't find the word, despite it being right ...
user avatar
0 votes
1 answer
82 views

groff registers not defined during macro

Context: Let's say I am trying to write a macro in groff in order to draw a rectangle given some arguments (like width and height for example). For this I need to perform some simple arithmetic, that ...
user avatar
  • 167
2 votes
1 answer
2k views

How do I install gropdf?

I am a new user of groff and want to generate pdf files with it. I know that the basic syntax is as follows: groff -ms inputcode.ms -T pdf > outputfile.pdf But, when I try it, I get the ...
user avatar
4 votes
1 answer
1k views

Can't use different font families in groff -ms

I'm using groff with ms macros and outputting it to PostScript. On Linux Void. I want to have a different font and also output Unicode characters. I have converted my font as written in this question. ...
user avatar
  • 43
3 votes
2 answers
274 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 ...
user avatar
  • 167
0 votes
0 answers
126 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 ...
user avatar
  • 21
4 votes
1 answer
457 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.
user avatar
1 vote
2 answers
643 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 ...
user avatar
  • 3,077
3 votes
2 answers
199 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 ...
user avatar
  • 167
1 vote
1 answer
778 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 ...
user avatar
  • 167
1 vote
1 answer
559 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 ...
user avatar
  • 71
2 votes
1 answer
104 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 ...
user avatar
  • 19
1 vote
1 answer
110 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 . ...
user avatar
  • 71
0 votes
0 answers
74 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.
user avatar
5 votes
1 answer
310 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. ...
user avatar
2 votes
1 answer
472 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 ...
user avatar
  • 123
2 votes
1 answer
351 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\> ...
user avatar
3 votes
1 answer
329 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 ...
user avatar
8 votes
2 answers
1k 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 ...
user avatar
1 vote
2 answers
856 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....
user avatar