What is nroff? - Definition from WhatIs.com
Part of the Programming glossary:

nroff and troff are UNIX commands (and the utilities that support them) for formatting text files for printing. (There are other UNIX commands for initiating printing.) nroff is designed for formatting output for line printers and letter-quality printers. troff is designed for formatting output for typesetters. troff contains some special functions that apply only to typesetters; otherwise, the commands are identical and either can be used.

In general, a text file designed for use with nroff or troff contains embedded codes for line spacing, margin settings, centering, tab stops, keeping lines together, and so forth. The command itself includes options that apply to the entire file. nroff and troff provide about the same level of formatting control as IBM's Script/VS language. In general, text formatting languages at this level have the drawback of making it difficult to reuse the text in a non-print medium (such as on the Web). This drawback led to the development of the non-output specific markup defined generally by Standard Generalized Markup Language in which a logical or functional description is applied to text elements that device-specific programs can interpret in an appropriate way.

Examples of nroff/troff formatting codes include:

Center the next lines of text.
Skip a line space.
.ps 10
Use 10-point type.

A popular UNIX replacement for nroff/troff is a formatter called TeX (pronounced "TEK"). TeX is designed to give the user a great deal of control over font choice and text arrangement and especially to support text containing mathematical symbols.

If you have inherited an nroff/troff file and need to convert it to HTML, you may be able to find a tool that will convert the file to HTML "preformatted" text (meaning that the file will look as though it has been brought in from somewhere). While this may be a temporary solution in some cases, it's likely that eventually you will have to strip the old codes and start with new formatting (using HTML tags) manually.

This was last updated in June 2010
Contributor(s): Elizabeth Holland Kern
Posted by: Margaret Rouse

Related Terms


  • encapsulation in Java

    - Java offers four different "scope" realms--public, protected, private, and package--that can be used to selectively hide data constructs. To achieve encapsulation, the programmer declares the class... (TheServerSide.com)

  • Java abstract class

    - In Java and other object oriented programming (OOP) languages, objects and classes may be abstracted, which means that they are summarized into characteristics that are relevant to the current prog... (TheServerSide.com)

  • neural network

    - A neural network is a hardware and software system based on the operation of neurons in the human brain that can learn from and adapt to training and pattern recognition. (SearchNetworking.com)


  • Programming

    - Terms related to software programming, including definitions about programming languages and words and phrases about software design, coding, testing and debugging.

  • Internet applications

    - This WhatIs.com glossary contains terms related to Internet applications, including definitions about Software as a Service (SaaS) delivery models and words and phrases about web sites, e-commerce ...

Ask a Question. Find an Answer.Powered by ITKnowledgeExchange.com

Ask An IT Question

Get answers from your peers on your most technical challenges

Ask Question

    Hi, one way to solve your problem is to use the "etime" format option of the "ps" command. This option shows the elapsed time since the process was started, in the nice form: [[dd-]hh:]mm:ss So, t...

Tech TalkComment



    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.