Skip to main content.
Index | Support | Documentation | FAQ

Displaying Groff Files

I am using groff to prepare my definition files, is there a way to see what it looks like on the screen? - Yes.

Well there are actually two ways:

  • Using an X-Windows Application

    or

  • Loading into a Word Processor
  • Using an X Viewer

    You can use the Graphical Groff Viewer to get a rough idea. The Groff X viewer does not handle some of the groff features but it does a good job on the basics.

    The viewer is available in groff 1.19 (on our web site in the updates section). You must be using an X session either on the console or via the Windows VNC client.

    The command you need is:

    groff -t -mm -X -Tps name-of-file

    This is a little complicated :-), if you are using it frequently we would suggest you add a short cut as per:

    Now all you need to do is type gx name-of-file when in the text sub-directory. The script will automatically include any macro files you are sourcing.

    Using a Word Processor

    The groff processor we use has the option to export many different formats, many of these can be read by other applications e.g. OpenOffice, Microsoft Word etc as images. You setup a printer to export the files.

    This is done using a 'Reserved' option on the Groff Driver type (Option 5) on the printer setup screen e.g.

    When set to 'type 5' (EPS-Encapsulated PostScript), the resulting definition file will be dumped in the text sub-directory (called XXXXo.eps) - open it as a 'Picture' in Word and you will get an exact representation of what the document will look like.