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
1
vote
1answer
27 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)...
0
votes
2answers
28 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?...
2
votes
1answer
24 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 ...
7
votes
3answers
258 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 ...
1
vote
1answer
19 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 most PDF readers. (Here, Atril.) The error occurs with large round brackets and/or square ...
0
votes
1answer
24 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.)
0
votes
2answers
38 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 ...
2
votes
1answer
29 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 ...
1
vote
1answer
29 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....
1
vote
1answer
69 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 ...
0
votes
0answers
61 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, ...
1
vote
3answers
40 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 ...
1
vote
1answer
72 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&...
2
votes
1answer
38 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 ...
0
votes
1answer
18 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.
2
votes
1answer
97 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/...
1
vote
1answer
75 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?
1
vote
1answer
74 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?
1
vote
2answers
54 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 >...
0
votes
1answer
54 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 ...
0
votes
1answer
97 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 ...
3
votes
1answer
97 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 ...
2
votes
1answer
98 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 ...
0
votes
0answers
35 views

ANSI characters not displayed properly in terminal(konsole)

While using manual/git/possibly other applications my output is full of garbage characters(which looks like ansi characters). Example output: [1;36mDESCRIPTION[0m [1;36mman[0m is the system'...
2
votes
0answers
45 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 ...
0
votes
1answer
54 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 ...
1
vote
1answer
934 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 ...
4
votes
1answer
889 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. ...
3
votes
2answers
143 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
86 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 ...
4
votes
1answer
324 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
381 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 ...
4
votes
2answers
159 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 ...
2
votes
1answer
525 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
304 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 ...
1
vote
1answer
71 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 ...
1
vote
1answer
86 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
61 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.
4
votes
0answers
199 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
356 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 ...
2
votes
1answer
284 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\> ...
3
votes
0answers
227 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 ...
8
votes
2answers
784 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 ...
1
vote
2answers
664 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
208 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
274 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 ...
5
votes
1answer
1k 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 ...
0
votes
1answer
83 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 ...
6
votes
1answer
2k 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 ...
4
votes
2answers
191 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. ...