Questions tagged [groff]

Groff (GNU troff) is a typesetting system that reads plain text mixed with formatting commands and produces formatted output. Output may be PostScript or PDF, html, or ASCII/UTF8 for display at the terminal.

Groff (GNU troff) is a typesetting system that reads plain text mixed with formatting commands and produces formatted output. Output may be PostScript or PDF, html, or ASCII/UTF8 for display at the terminal.

http://www.gnu.org/software/groff/

67 questions
12
votes
2 answers

Escaping dots in groff

According to info groff (section 5.11 Character Translations), \. should print just the dot. However, this is not what seems to happen. If I render this manpage .TH x x x x \.SH foo I get foo rendered as a section heading, and .SH is not…
Roman Cheplyaka
  • 37,738
  • 7
  • 72
  • 121
9
votes
2 answers

groff: can I embed images?

I'm generating some troff-style documentation. Is there a way to embed an image (jpg, etc) into a groff file?
Mark Harrison
  • 297,451
  • 125
  • 333
  • 465
6
votes
2 answers

How to send EOF to a process in Java?

I want to run groff in a Java program. The input comes from a string. In real command line, we will terminate the input by ^D in Linux/Mac. So how to send this terminator in Java program? String usage += ".Dd \\[year]\n"+ ".Dt test 1\n"+ …
Li Dong
  • 1,088
  • 2
  • 16
  • 27
5
votes
1 answer

Embedding image from file in groff?

I tried .PSPIC image.eps and .PSPIC image.ps after converting a jpeg to postscript on converthub.com, compiled with groff -ms -p file.ms -Tpdf > file.pdf, and it shows up as a box with the correct dimensions but just the file name as a label and no…
Unaboober
  • 81
  • 2
4
votes
1 answer

Avoid space before comma after macro

I'm trying to write a manpage by using the man macro package of Groff. Specifically, I would like to write some text like the following: The daemon can be configured by means of a configuration file. The default location of such file is…
Dacav
  • 13,590
  • 11
  • 60
  • 87
4
votes
2 answers

How to escape new line in man pages

I have refactored a man page's paragraph so that each sentence is it's own line. When rendering with man ./somefile.3 The output is slightly different. Let me show an example: This is line 1. This is line 2. vs. This is line 1. This is line 2. Are…
mmlb
  • 877
  • 10
  • 24
3
votes
1 answer

Run multiple commands with entr

I am attempting to use the 'entr' command to automatically compile Groff documents. I wish to run the following line: refer references.bib $1 | groff -ms $1 -T pdf > $2 Sadly it will only compile once if I try this: echo $1 | entr refer…
Eidolon
  • 309
  • 3
  • 12
3
votes
1 answer

groff: Incorrect line width after page break

I'm using groff version 1.22.4 to create a two-page letter. The first page has three columns, the second page has 2 columns. The macros for printing columns 1-3 on the first page work as expected. The macro for starting the second page always gives…
9-Pin
  • 143
  • 8
3
votes
1 answer

Set papersize for pandoc with pdfroff

I'm using pandoc to convert markdown into PDFs. When using the LaTeX PDF engine (which is the default), I can specify a different paper size with -V geometry:a1paper. I want to use the pdfroff backend with --pdf-engine=pdfroff as it's faster and…
renehsz
  • 43
  • 6
3
votes
1 answer

Groff images on the same line?

Is there a way to put images on the same line as each other? I can get them on the same line as text using this code, which creates 2 lines with the text on the left and the images on the right, but it's pretty hacky and I still can't get the…
Unaboober
  • 81
  • 2
2
votes
2 answers

Vim not automatically recognizing groff (manpage) files

I have: $ vim --version VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Dec 1 2011 03:25:24) using Debian testing. I was playing around with an old manpage I wrote and noticed that vim (I used gedit to write it initially but have switched to vim) is…
narnie
  • 1,742
  • 1
  • 18
  • 34
2
votes
1 answer

How to set all arguments of the Title line in manpage written in reStructuredText, converted to groff with pandoc

How can I get pandoc to properly set all of the arguments in the "Title line" (.TH) when converting from a .rst file to a man file? According to the documentation man man-pages, the "Title line" takes positional arguments: Title line The…
Michael Altfield
  • 2,083
  • 23
  • 39
2
votes
3 answers

Aligning equations with multiple marks and lineups in `groff eqn`

I am trying to align some fairly long equations the way I would usually do with LaTeX in groff. The general form I am aiming for: A = B + C = D * E + F * G = H + I = J In LaTeX I would do this as…
2
votes
1 answer

Groff mom change table background color

I build some tables with groff and the mom macro package. White is the default background color. Is it possible to change the background color and text color in the table? I would like to have red in the columns 5 and 6 as background color and in…
Aaron
  • 769
  • 1
  • 14
  • 25
2
votes
1 answer

Groff text output processing issues

I need to format documents with the groff -mm macros and need help on some issues: ============ You can see it is putting some blank lines at the top and a page number. I need it to run one continuous column starting at the first line of the…
1
2 3 4 5