Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
Linux Magazine: The source for advanced Linux know-how

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
Copyright Info
Terms of Use
Privacy Info
Masthead / Impressum
Your Account

Private Messages

News Archive
Submit News
User Articles
Web Links


The Web

Who's Online
There are currently, 70 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here




       roff  is  the  general name for a set of type-setting pro­
       grams, known under names like troff, nroff, groff, etc.

       The roff type-setting system consists of a formatting lan­
       guage,  macro  packages, preprocessors, postprocessors for
       output devices, user front-end  programs,  and  conversion

       The  most  common  roff  system today is the free software
       implementation groff  (from  `GNU roff').   The  pre-groff
       implementations  are  referred  to  as `classical' (dating
       back as long as 1973).

       groff is backward-compatible to its  classical  ancestors,
       but  has many extensions, and is still evolving.  As it is
       available for almost every computer system it is  the  de-
       facto roff standard today.

       In  spite of its age, roff is in wide use today, e.g., the
       manual pages on UNIX systems (man-pages)  are  written  in
       roff.    The   roff  output  for  text  devices  is  still
       unmatched, and its graphical output has the  same  quality
       as the other free type-setting programs and is better than
       some of the commercial systems.

       This document gives only an overview and provides pointers
       to further documentation.

       This  document is not maintained and might be out of date.
       For the real documentation refer to the  groff  info  file
       that  contains  the detailed, actual and concise reference


       There are three terms that refer to the  language  of  the
       roff  system.   The  term  troff language is used when the
       classical aspects of roff are  stressed,  the  term  groff
       language  includes  the  GNU extensions, whereas roff lan­
       guage is the general term.

       The main source of documentation for all  aspects  of  the
       groff  language  is  the groff info file.  The manual page
       groff(7) gives a short description of all predefined  lan­
       guage elements.

       Documents  using  roff  are normal text files decorated by
       formatting elements.  It is very easy to write  high-qual­
       ity  documents  by using one of the macro packages.  These
       are like high-level programming languages, while the  bare
       roff  language  compares to a low-level language like C or

       Escape sequences are  in-line  elements  starting  with  a
       backslash  `\'.  They  are  used to implement various fea­
       tures, including the  insertion  of  non-ASCII  characters
       with \(, the content of strings with \* and register vari­
       ables with \n, font changes with \f, in-line comments with
       \",  the  escaping  of special control characters like \\,
       and many other features.


       Formatters are the front-end programs that analyze a groff
       document and translate it into a form that is suitable for
       a special device.  The traditional roff  had  two  format­
       ters,  nroff  for  text  devices  and  troff for graphical

       These programs still exist in  the  groff  implementation,
       but  usually  they  are  accessed through a program called
       groff.  This combined and extended the  old  functionality
       into  a single program.  It has many command-line options,
       most of them herited from troff.  To ease the option  jun­
       gle,  the  user-friendly utility grog (from `groff guess')
       was created.  It tries to guess from  the  document  which
       arguments  should  be used and displays a suitable command
       line.  Though not being perfect, it  is  a  good  starting


       The  classical  preprocessors  that are still available in

              eqn    for including mathematical equations.
              grap   for constructing  graphical  elements  (this
                     preprocessor  doesn't come with groff; it is
                     an extra package).
              grn    for including gremlin pictures.
              pic    for creating diagrams.
              refer  for bibliographic references.
              soelim for including other roff files.
              tbl    for rectangular tables.

       Each of these preprocessors defines its own language  that
       is  translated into roff code when run through the prepro­
       cessor program.  So parts written in these  languages  may
       be included within a roff document.  Such an enhanced doc­
       ument is run through one or more corresponding  preproces­
       sors before it is fed into the actual formatter.

       The  preprocessor programs extract and transform the docu­
       ment parts determined for them.  They can be called either
       in  a  UNIX  pipeline with their program name or automati­
       cally with a groff option.
                     |   refer     |      -R      |
                     |    tbl      |      -r      |
                     |   soelim    |      -s      |


       Macro packages are collections of macros that are suitable
       to format a special kind of documents in a convenient way.
       This greatly eases the usage of roff.  The  macro  defini­
       tions of a package are kept in a file called name.tmac (or
       tmac.name) where name is the internal roff name  for  this
       package.   All  tmac  files  are stored in a single or few
       directories at standard positions.

       A macro package that is used in a document is specified by
       the command line option -m for the formatter like troff -m
       name or groff -m name. General details on  the  naming  of
       macro   packages   and   their   placement   is  found  in

       Famous classical macro packages are man, mandoc, and  mdoc
       for  manual  pages and me, ms, and mm for books, articles,
       and letters.  Besides these collections, groff provides an
       increasing number of new macro packages for various appli­
       cations, for example integration  of  or  conversion  into
       other file formats.


       Manual pages (man-pages) take the section number as a file
       name extension, e.g., the filename for  this  document  is
       roff.7, i.e., it is kept in section 7 of the man-pages.

       The  classical  macro packages take the package name as an
       extension, e.g.  file.me for a document using the me macro
       package,  file.mm for mm, file.ms for ms, file.pic for pic
       files, etc.


       Most text editors provide support  for  editing  documents
       using  roff.   Especially  useful is the nroff-mode in all
       flavors of the Emacs editor.


              A colon separated list of directories in  which  to
              search for macro files, see groff_tmac(5).

              Default device.

              A  colon  separated list of directories in which to


              Initialization file for troff.

              Macro files.

              Device description file for device name.

              Font file for font F of device name.

       Finally,  a  local  macro directory /usr/share/groff/site-
       tmac is provided for site-specific macros and packages; by
       default,  it will be searched before the main macro direc­


       The groff documentation is in evolution at the moment.  It
       is  possible  that small inconsistencies between different
       documents exist temporarily.


       This document is part of groff, the GNU roff distribution.
       It was written by Bernd Warken <bwarken@mayn.de>.

       It  is  distributed  under  the terms of the FDL (GNU Free
       Documentation License) version 1.1 or later.   You  should
       have received a copy of the FDL on your system, it is also
       available on-line under



       The main source of information is the groff info(1)  file.

       The  predefined  elements  of  the groff language are also
       documented in the manual page groff(7).

       Formatters  and   their   wrappers:   groff(1),   grog(1),
       nroff(1), and troff(1).

       Postprocessors  for  the  output  devices: grodvi(1), gro­
       html(1), grolbp(1), grolj4(1), grops(1), and grotty(1).

       Standard preprocessors: eqn(1), grn(1),  grap(1),  pic(1),
       refer(1), soelim(1), and tbl(1).

       The  man  pages  for macro packages include groff_tmac(5),
       Many classical  documents  are  still  available  on-line.
       Especially informative are the original Bell Labs proceed­
       ings for the old, free UNIX  7  found  at  http://cm.bell-
       labs.com/cm/cs/cstr.html  and  the  collection of the late
       Richard S. Stevens at  http://www.kohala.com/start/troff/.

Groff Version 1.17.2       27 June 2001                   ROFF(7)



Security Code
Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!

Amazon Wish List

Did You Know?
You can choose larger fonts by selecting a different themes.


Tell a Friend About Us

Bookmark and Share

Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.09 Seconds