Skip to main content

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
3 votes
1 answer
245 views

Word split between two lines is not found in man pages search

I'm on Linux Mint 21 (Ubuntu based). Just noted man pages internal search (/) does not find a word if split between two lines (the word is whole in the source of the page, displayed with a hyphen and ...
Martian2020's user avatar
  • 1,219
0 votes
1 answer
38 views

Change header/footer font with groff mm

I am currently testing the mm and mom macro packages and noticed that the default font family is not used for headers/footers with mm (unlike mom, which uses the selected font for all text). My test ...
janeden's user avatar
  • 145
4 votes
1 answer
51 views

Input encoding in groff macro files

The -K option allows me to specify my troff file's encoding, but this does not seem to extend to macro files. If a custom macro file contains non-ASCII characters in a string, the output looks like ...
janeden's user avatar
  • 145
0 votes
1 answer
45 views

Slight indentation with non-regular (bold/italic) font in groff

I am new to groff and noticed a slight indentation if the first word of a paragraph (or new line) is set in a non-regular font. In the following example, this happens only in the second and third ...
janeden's user avatar
  • 145
1 vote
1 answer
236 views

GREP error: warning: cannot select font 'i'

I am in the process of learning the usage of iscsiadm and somehow I noticed a strange behavior of grep. Attempting to run the following grep command man iscsiadm | grep "aia" results in ...
Cane's user avatar
  • 13
0 votes
2 answers
64 views

Groff -ms .R macro not working; Can't format heading

groff version: 1.22.4 My style guide insists on formatting headings following way: Level 1 UPPERCASE BOLD 12pt Level 2 Bold italic letters 10pt Level 3 Italic letters 10pt According to reference for ...
p4wos8000's user avatar
0 votes
2 answers
95 views

groff -mandoc creating "ESC[1m" versus overstriking with backspace for bold text

I found that groff uses different ways to indicate bold text for the utf8 output format. On FreeBSD 14, groff emits escape codes for a terminal (ESC, [1m): $ printf ".Dd today\n.Sh NAME\n" | ...
Jens's user avatar
  • 1,787
1 vote
1 answer
50 views

Converting non-English manual pages to PDF/PostScript

I'm trying to convert manual pages containing either Japanese or Russian characters to the PDF/PostScript formats. I'm doing it with the following commands. man -Tpdf /usr/share/man/ja/man1/vim.1.gz &...
Shamaoke's user avatar
  • 201
1 vote
2 answers
200 views

Two Columns For Text And One For Footnotes In Groff

I'm new to groff, so excuse me if it's a silly question. I can't find an appropriate solution for have two-columned content with one-columned footnotes. I've messed with .1C and .2C macros to get the ...
Monsieur Pierre Doune's user avatar
0 votes
2 answers
177 views

Console doesn't render according to man manual

So why is my console on Ubuntu doesn't render according to the man manual? If I type in man man in the console I get a manual for man. And for example, it points out that italic text replace ...
Juandev's user avatar
  • 101
1 vote
2 answers
55 views

groff: check file exists, or suppress error message from .so

In groff, is there a way to ".so" a file if but only if the file exists? I either want to do ".so file" and have it proceed without error message if the file doesn't exist, or ...
cind's user avatar
  • 41
0 votes
3 answers
239 views

Linux 9 commands send ANSI/color sequences to monochrome terminal

I'm using a Wyse50 Terminal emulation on Rocky Linux 9. Man pages, help screens, etc., are unusable because the system outputs attribute and color codes that the terminal emulator doesn't understand;...
Darrel Barton's user avatar
1 vote
1 answer
114 views

{\LaTeX} symbol in groff

Is there a way to print the {\LaTeX} original symbol in groff? I would like to use the typography every time the word LaTeX appears in a document made with groff.
ranemirusG's user avatar
0 votes
3 answers
176 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]&...
U. Windl's user avatar
  • 1,493
2 votes
1 answer
387 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&...
j4nd3r53n's user avatar
  • 717
3 votes
1 answer
300 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 ...
jarnosz's user avatar
  • 200
2 votes
1 answer
218 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
3 votes
1 answer
69 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 &...
Patrick Bucher's user avatar
0 votes
1 answer
153 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 ...
Mingye Wang's user avatar
  • 1,203
1 vote
1 answer
102 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)...
M.E.'s user avatar
  • 609
0 votes
2 answers
173 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?...
M.E.'s user avatar
  • 609
2 votes
1 answer
853 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 ...
M.E.'s user avatar
  • 609
9 votes
3 answers
1k 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 ...
M.E.'s user avatar
  • 609
2 votes
1 answer
143 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 ...
kleinbottle4's user avatar
0 votes
1 answer
95 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.)
Philipp L.'s user avatar
1 vote
2 answers
501 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 ...
Shane Bishop's user avatar
3 votes
1 answer
264 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 ...
Jamie Ramone's user avatar
1 vote
1 answer
107 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....
Shane Bishop's user avatar
1 vote
1 answer
941 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 ...
Shane Bishop's user avatar
0 votes
1 answer
498 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, ...
Shane Bishop's user avatar
1 vote
3 answers
348 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 ...
Shane Bishop's user avatar
2 votes
1 answer
346 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&...
Shane Bishop's user avatar
2 votes
2 answers
170 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 ...
Good Bye's user avatar
0 votes
1 answer
167 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.
Jamie Ramone's user avatar
2 votes
2 answers
299 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/...
Good Bye's user avatar
1 vote
2 answers
345 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?
Good Bye's user avatar
1 vote
2 answers
141 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?
Good Bye's user avatar
1 vote
2 answers
431 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 >...
user143266's user avatar
0 votes
1 answer
358 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 ...
anon's user avatar
  • 35
3 votes
2 answers
737 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 ...
Porcupine's user avatar
  • 2,056
7 votes
2 answers
379 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 ...
Eric Cousineau's user avatar
2 votes
1 answer
372 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 ...
M.E.'s user avatar
  • 609
4 votes
2 answers
292 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
154 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 ...
Soulthym's user avatar
  • 177
4 votes
1 answer
3k 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 ...
Daniel Bandeira's user avatar
4 votes
1 answer
2k 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. ...
zoomer's user avatar
  • 43
3 votes
2 answers
682 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 ...
Soulthym's user avatar
  • 177
0 votes
0 answers
216 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 ...
xfnw's user avatar
  • 21
4 votes
1 answer
617 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.
GeriatricJacob's user avatar
1 vote
2 answers
1k 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 ...
Ljm Dullaart's user avatar
  • 4,863