Linux

  1. Home
  2. Computing & Technology
  3. Linux

Introduction to Linux

From Machtelt Garrels, for About.com

8.1.2. Formatting

8.1.2.1. Tools and languages

If we want to get something sensible out of the printer, files should be formatted first. Apart from an abundance of formatting software, Linux comes with the basic UNIX formatting tools and languages.

Modern Linux systems support direct printing, without any formatting by the user, of a range of file types: text, PDF, PostScript and several image formats like PNG, JPEG, BMP and GIF.

For those file formats that do need formatting, Linux comes with a lot of formatting tools, such as the pdf2ps , fax2ps and a2ps commands, that convert other formats to PostScript.

Apart from these command line tools there are a lot of graphical word processing programs. Several complete office suites are available, many are free. These do the formatting automatically upon submission of a print job. Just to name a few: OpenOffice, KOffice, AbiWord, WordPerfect, etc.

The following are common languages in a printing context:

  • groff : GNU version of the UNIX roff command. It is a front-end to the groff document formatting system. Normally it runs the troff command and a post-processor appropriate for the selected device. It allows generation of PostScript files.

  • TeX and the macro package LaTeX : one of the most widely used markup languages on UNIX systems. Usually invoked as tex , it formats files and outputs a corresponding device-independent representation of the typeset document.

    Technical works are still frequently written in LaTeX because of its support for mathematic formulas, although efforts are being made at W3C (the World Wide Web Consortium) to include this feature in other applications.

  • SGML and XML: Free parsers are available for UNIX and Linux. XML is the next generation SGML, it forms the basis for DocBook XML, a document system (this book is written in XML, for instance).


       Printing documentation
        

The man pages contain pre-formatted troff data which has to be formatted before it can roll out of your printer. Printing is done using the -t option to the man command:

man -t command > man-command.ps

Then print the PostScript file. If a default print destination is configured for your system/account, you can just issue the command man -t command to send the formatted page to the printer directly.

For printing Info pages, refer to the Info pages on info (you will need the source code of the command).

8.1.2.2. Previewing formatted files

Anything that you can send to the printer can normally be sent to the screen as well. Depending on the file format, you can use one of these commands:

  • PostScript files: with the gv (GhostView) command.

  • TeX dvi files: with xdvi .

  • PDF files: xpdf or Adobe's viewer, acroread , which is also available for free.

  • From within applications, such as Firefox or OpenOffice, you can usually select Print Preview from one of the menus.


   Prev    Home    Next
   Printers and printing    Up    The server side

* License

* Introduction to Linux Index

Explore Linux

About.com Special Features

Linux

  1. Home
  2. Computing & Technology
  3. Linux
  4. Linux Documentation
  5. Introduction to Linux
  6. Introduction to Linux - 8.1.2. Formatting

©2009 About.com, a part of The New York Times Company.

All rights reserved.