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

Disable groff hyphenation at the command line

I am using the program groff to format text. groff is hyphenating words and breaking them onto multiple lines. I would not like it to do that. The manual outlines methods for disabling hyphenation. However, I can't figure out how to invoke .hn at…
Kevin Burke
  • 61,194
  • 76
  • 188
  • 305
1
vote
1 answer

Can man pass an option to the roff formatter?

SYNOPSIS From man(1): -l Format and display local manual files instead of searching through the system's manual collection. -t Use groff -mandoc to format the manual page to stdout. From groff_tmac(5): papersize This macro file is already loaded at…
Olius
  • 226
  • 1
  • 6
1
vote
1 answer

ASCII diagram formatting messed up in Nroff

I am using Nroffeditor to develop a rfc like document and adding a ascii diagram, which I handcrafted. There is a online tool asciiflow.com, which can also be used. When I paste the ASCII diagram in the NroffEditor, it shows a messed up diagram in…
AnilJ
  • 1,951
  • 2
  • 33
  • 60
1
vote
1 answer

creating tables in UNIX using tbl troff/nroff

I would like to create tables from some CSV files in UNIX(AIX) and send them as mail(message body). I tried the examples at http://www.snake.net/software/troffcvt/tbl.html but none of them is working for me. After I run the file as, tbl input-file…
uncomwder
  • 11
  • 1
  • 3
1
vote
1 answer

Creating a table in UNIX using tbl & troff

I have to create a table in troff, what I have: .TS tab(:); c s s c | c | c l | l | n. My Custome PC Specs = Component:Selection:Price _ CPU:Intel Core i5-4690K 3.5GHz Quad-Core Processor:$219.99 _ Motherboard:MSI Z97-GAMING 5 ATX…
Jesse T
  • 21
  • 3
1
vote
1 answer

mdoc(7) markup for accumulating options with arguments

is there a "proper" or "canonical" markup for a command (section 1) "accumulating" option with argument? (or without for that matter) an accumulating option can be given multiple times and the effects add up: think gcc's -I or -W. let's say i'm…
just somebody
  • 18,602
  • 6
  • 51
  • 60
1
vote
1 answer

Text codepage in groff

How to setup a correct codepage in groff? For example to use a cyrillic language. Man page notes about -T switch. But troff -T utf8 -ms troff_file.txt gives: warning: invalid input character code 128`
egor7
  • 4,678
  • 7
  • 31
  • 55
1
vote
1 answer

Preview a troff file

So, I have a text file, embedded with troff formatting commands. However, my printer is currently broken, but I want to see what the file looks like, so I can make sure everything is correct. Is there a program that can interpret the commands and…
1
vote
1 answer

Convert troff to nroff

My project requires me to convert DITA to nroff, but the toolkit I'm using (DITA Open Toolkit) only converts to troff. Are there any toolkits (preferably java, but any language will do) that can convert from troff to nroff? I'm not even sure of…
KevMo
  • 5,590
  • 13
  • 57
  • 70
1
vote
1 answer

Including manpages in Sphinx-generated documentation?

I'd like to include a unix manpage written in the traditional troff format in some Sphix-generated docs. Is there any troff-to-rst converter? The only solution I can think of is to convert the manpage directly to html with man2html.
Federico
  • 722
  • 12
  • 12
0
votes
1 answer

How to convert a PDF file to letter size using groff?

I am trying to convert a text file in groff format to PDF, using the following command: groff -Tps -dpaper=letter -P-letter -P-l -ms foo.ms | ps2pdf - output.pdf The command works fine and outputs me a PDF file, but the paper size is "a4". I would…
null null
  • 19
  • 1
0
votes
1 answer

GNU make: several targets in one pattern rule

With explicit targets I can combine several rules like foo.o bar.o: $(SOURCES) cc $< -o $@ This is equivalent of foo.o: $(SOURCES) cc $< -o $@ bar.o: $(SOURCES) cc $< -o $@ But I want to use pattern rules. I have several troff…
user996142
  • 2,753
  • 3
  • 29
  • 48
0
votes
1 answer

Groff: how to successfully compile a manpage, containing Cyrillic in UTF-8?

Colleagues, please tell me what arguments you need to set for groff so that it compiles the manpage writed in Cyrillic, in UTF-8 encoding. I have a number of pages written in markdown and converted to nroff by the lowdown utility. Groff version…
ogogon
  • 70
  • 5
0
votes
2 answers

Is it possible to make man page from troff format?

I have a file with troff format and would like to recast to man page file.txt: .. c:function:: bool is_module_percpu_address (unsigned long addr) test whether address is from module static percpu **Parameters** ``unsigned long addr`` …
Herdsman
  • 799
  • 1
  • 7
  • 24
0
votes
1 answer

Are trailing whitespaces important in Troff manual files?

I couldn't find a specification of the troff file format. Does the removal of trailing whitespaces have an effect?
Martin Thoma
  • 124,992
  • 159
  • 614
  • 958