Questions tagged [troff]

troff is an typesetting language for producing documents.

troff is a typesetting language for producing documents. While popular a long time ago (most famous computer science books were written with troff), nowadays its use is primarily related to writing man pages and most modern usage is done with groff instead. There are a set of tools (pre-processors) that work with troff/groff that enhance its functionality:

  • tbl - writing tables
  • pic - mainly for writing diagrams and flow charts
  • chem - drawing chemical structure diagrams
  • eqn - writing mathematical equations

References

Related Tags

38 questions
9
votes
3 answers

What tools are available to edit manpages, i.e. GUI WYSIWYG editors (any platform)

Is there any decent GUI(Graphical User Interface) WYSIWYG(What You See is What You Get) editor (on any platform) that can be used for authoring/editing manpages? An app that can export to the troff format would also be fine.
HairOfTheDog
  • 2,489
  • 2
  • 29
  • 35
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
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
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

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
2 answers

Alternative Version of the World Wide Web using different markup languages

Theoretically, a version of the Internet using TeX or Markdown would be possible, right? (Okay, MD websites probably aren't that advanced, but never mind). So my question is twofold: Has this appeared as an idea before and Did someone even try…
user10582695
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
3
votes
1 answer

Period in a man page?

I have a bold line, followed by a line starting with a period. man thinks that the . is the start of a command... is there a way to "escape" it? .B bold words ./something The ./something is a command to type in a terminal, not a man macro. I want…
Thanatos
  • 42,585
  • 14
  • 91
  • 146
2
votes
1 answer

avoid space in manpage after .BI

I'm attempting to write a somewhat portable manpage, in which I need to describe the format of a particular string. I use the .BI macro to switch between fixed and variable parts, however I have more than six components (which is non-portable), and…
Simon Richter
  • 28,572
  • 1
  • 42
  • 64
1
vote
1 answer

Where can latex classes ported to g/troff?

I’m becoming horrified at latex’s verbosity so excited by g/troff But where can I find popular latex classes like ieeetrans or acmart ported to g/troff?
Tim Menzies
  • 641
  • 5
  • 14
1
vote
1 answer

Is there a way to exit double column mode without page break in groff?

I'm trying to write up my CV in groff/troff and would like to have my contact details in two columns at the top, one column adjusted on the left and the other on the right. I tried doing it like this: .2C Name .LP Address line 1 .LP Address line…
1
vote
2 answers

Groff Eqn - How to do higher roots (cube root, etc)

Does someone know how to do higher roots (cube roots, 4th roots, etc) in groff eqn? Been searching around the docs and cant seem to find the answer
1
vote
1 answer

GROFF PDFPIC converted w ImageMagick to .ms document causes "troff: sample.ms:18: division by zero" and leads images to show very right of the pdf doc

I converted my original image to pdf with ImageMagick. If viewed independently, the pdf image looks perfectly normal. sample.ms : .PDFPIC Figure_1.pdf Once I try to compile my .ms document with the following command: groff -ms sample.ms -U -T pdf…
1
vote
1 answer

groff putting single word on line after trap

I have a groff document, however, when I set the trap to create a footer, groff puts one word after the specified height, then executes the macro for the trap. I am compilinig the document with groff -Tpdf -P-pletter ex.groff > ex.pdf. ex.groff: .de…
theman25
  • 50
  • 6
1
2 3