Archive for May, 2007

Chapter 21 . Working with Words and Images (Sri lanka web server)

Thursday, May 3rd, 2007

Chapter 21 . Working with Words and Images 557 (-man). The output is piped to less, to page through it on your screen. Instead of piping to less ( | less), you can direct the output to a file (> /tmp/chown.txt). To format a man page for typesetting, you can specify PostScript or HP LaserJet output. Direct the output to a file or to a printer. Here are a couple of examples: $ groff -Tps -man /tmp/chown.1 > /tmp/chown.ps $ groff -Tlj4 -man -l /tmp/chown.1 The first example creates PostScript output (-Tps) and directs it to a file called /tmp/chown.ps. That file can be read by a PostScript previewer (such as Ghostscript) or sent to a printer (lpr /tmp/chown.ps). The next example creates HP LaserJet output (-Tlj4) and directs it to the default printer (-l option). Creating a Man Page with Groff Before HOWTOs and info files, man pages were the foundation for information about UNIX and UNIX-like systems. Each command, file format, device, or other component either had its own man page or was grouped on a man page with similar components. To create your own man page requires that you learn a few macros (in particular, man macros). Figure 21-3 shows the source for a fictitious man page for a command called waycool. Figure 21-3: Simple markup is required to create man pages.
Note: In case you are looking for affordable webhost to host and run your servlet application check Vision mysql5 web hosting services

556 Part IV . Running Applications Groff (My space web page) macro

Thursday, May 3rd, 2007

556 Part IV . Running Applications Groff macro packages are stored in /usr/share/groff/*/tmac. The man macros are called from the an.tmac file, mm macros are from m.tmac, and me macros are from e.tmac. The naming convention for each macro package is xxx.tmac, where xxx represents the macro package. In each case, you can deduce the name of the macro package by adding an m to the beginning of the file prefix. Instead of noting a specific macro package, you can use -mandoc to choose one. When you run the groff formatting command, you can indicate on the command line which macro packages you are using. You can also indicate that the document should be run through any of the following commands that preprocess text for special formats: . eqn Formats macros that produce equations in groff. . pic Formats macros that create simple line drawings in groff. . tbl Formats macros that produce tables within groff. The formatted Groff document is output for a particular device type. The device can be a printer, a window, or (for plain text) your shell. Here are the output forms Groff supports: . ps PostScript output for PostScript printer or a PostScript previewer . lj4 Output for an HP LaserJet4 printer or other PCL5-compatible printer . ascii Plain-text output that can be viewed from a Terminal window . dvi Output in TeX dvi, to output to a variety of devices described later . X75 Output for an X11 75 dots/inch previewer . X100 Output for an X11 100 dots/inch previewer . latin1 Typewriter-like output using the ISO Latin-1 character set Formatting and Printing Documents with Groff Try formatting and printing an existing Groff document using any man pages on your system. You ll find some in /usr/share/man/*; they re compressed, so copy them to a temporary directory and unzip them to try out Groff. The following commands copy the chown man page to the /tmp directory, unzip it, and format it in plain text so you can page through it on your screen: $ cp /usr/share/man/man1/chown.1.gz /tmp $ gunzip /tmp/chown.1.gz $ groff -Tascii -man /tmp/chown.1 | less In this example, the chown man page (chown.1.gz) is copied to the /tmp directory, unzipped (using gunzip), and output in plain text (-Tascii) using the man macros Tip
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check Vision mysql hosting services

Chapter 21 . Working (Web host music) with Words and Images

Wednesday, May 2nd, 2007

Chapter 21 . Working with Words and Images 555 Here are the general steps for creating documents in Groff or LaTeX: 1. Create a document with any text editor. The document will contain text and markup. 2. Format the document using a formatting command that matches the style of the document that you created (for example, with groff or latex). During this step, you may need to indicate that the document contains special content, such as equations (eqn command), tables (tbl command), or line drawings (pic command). 3. Send the document to an output device (a printer or a display program). If you are accustomed to a word processor with a GUI, you may find these publishing tools difficult to learn at first. In general, Groff is useful for creating man pages for Linux. LaTeX is useful if you need to produce mathematical documents, perhaps for publication in a technical journal. Text Processing with Groff The nroff and troff text formatting commands were the first interfaces available for producing typeset-quality documents with the UNIX system. They aren t editors, but commands through which you send your text, with the result being formatted pages. The nroff command produces formatted plain text and includes the capability to do pagination, indents, and text justification, as well as other features. The troff command produces typeset text, including everything nroff can do, plus the capability to produce different fonts and spacing. The troff command also supports kerning. The groff command is the front end for producing nroff/troff documentation. Because Linux man pages are formatted and output in Groff, most of the examples here help you create and print man pages with Groff. People rarely use primitive nroff/troff markup. Instead, there are common macro packages that simplify creating nroff/troff formatted documents, which include: . man These macros are used to create Linux man pages. You can format a man page using the -man option to the groff command. . mm The mm macros (memorandum macros) were created to produce memos, letters, and technical white papers. This package includes macros for creating tables of contents, lists of figures, references, and other technicaldocument- style features. You can format an mm document using the -mm option to the groff command. . me These macros are popular for producing memos and technical papers on Berkeley UNIX systems. You format an me document using the groff command option -me.
Note: In case you are looking for affordable webhost to host and run your servlet application check Vision servlet hosting services

554 Part IV . Running Applications Choosing a (Web space)

Wednesday, May 2nd, 2007

554 Part IV . Running Applications Choosing a Text Editor Hardcore UNIX or Linux users tend to edit files with either the vi or emacs text editor. These editors have been around a long time and are hard to learn but efficient to use because your fingers never leave the keyboard. The emacs editor has some GUI support, although it runs fine in a Terminal window. There are also GUI versions of vi and emacs that add menu and mouse features to the editors. These are GVim (gvim command in the vim-X11 package) and Xemacs (xemacs command) editors. The following are some of the other, simpler text editors that can run on your graphical desktop: Text Editor Command Description gedit gedit Lightweight text editor that comes with the GNOME desktop environment. It has simple edit functions (cut, copy, paste, and select all), and you can set indentations and word wrap. Special functions, such as a spellchecker and a diff feature, are included. Start by typing gedit from a Terminal window. Go to http:// gedit.sourceforge.net for more information. Advanced Editor kwrite Includes a menu bar to create, open, and save files, and simple edit functions (cut, copy, paste, undo, and help). Other features enable you to set indents, find and replace text, and select all. This tool comes with the KDE desktop; access it by selecting Accessories. More Accessories.Kwrite. Text Editor kedit A simple text editor that comes with the KDE desktop. Features let you open files from your file system or from a URL. It also includes a convenient toolbar and a spell-checker. Access it by selecting Accessories. More Accessories.Text Editor. nedit nedit A rather plain-looking, but very advanced, X-based text editor. It provides all the usual editing functions, syntaxhighlighting modes for a plethora of programming languages, and an advanced macro system. Despite its advanced features, it s easy for beginners to use. joe joe A text-mode editor that s much simpler than either vi or emacs and has the capability to mimic other text editors, such as vi, emacs, pico, and even the late, lamented WordStar. In addition to standard features such as search and replace, arrow key movements for the cursor, and so on, it offers macros, codeediting features, and the capability to move or format large chunks of text easily.
Note: In case you are looking for affordable and reliable webhost to host and run your business application check Vision ftp web hosting services

Chapter 21 . Working with Words and Images (Make my own web site)

Tuesday, May 1st, 2007

Chapter 21 . Working with Words and Images 553 on TeX) are a pair of these classic tools and have been popular among technical people because: . You can manipulate files in plain text. Using tools such as sed and grep, you can scan and change one document or hundreds with a single command or script. . Scientific notation is supported. With geqn, you can create complex equations. LaTeX and TeX are suited for technical notation, and some math publications require LaTeX. . Editing can be faster because traditional Linux documents are created with a text editor. You usually get better performance out of a text editor than a word processor. Simple page layouts work well with Linux documentation tools. For example, a technical book with a few flow charts and images can be easily produced and maintained using Groff or TeX documentation tools. Letters and memos are also easy to do with these tools. And, of course, Linux man pages are created with text-based tools. Additionally, Linux likes PostScript. Although people think of PostScript as a printing language, it is really more of a programming language (you could write PostScript code directly). Most Linux document-processing software includes print drivers for PostScript. Some documents on the Web are distributed in PostScript (.ps). The drawback to the traditional Linux document tools is that they are not intuitive. Although there are some easier front ends to LaTeX (see the description of LyX later in this chapter), if you are creating documents in a text editor, you need to learn what macros to type into your documents and which formatting and print commands to use. For many years, the UNIX system documentation distributed by AT&T was created in troff/nroff formats, which predate Groff. The documents used separate macro packages for man pages and guide material. Using a source code control system (SCCS), AT&T ported thousands of pages of documentation to different UNIX systems. Creating Documents in Groff or LaTeX You can use any text editor to create documents for both Linux s Groff (troff/nroff) and LaTeX styles of publishing. Most Linux distributions come with several text editors. You always have the option to download others from the Internet. (See the Choosing a Text Editor sidebar for more information.) Note
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision j2ee hosting services

552 Part IV . Running Applications Other Microsoft (Web design rates)

Tuesday, May 1st, 2007

552 Part IV . Running Applications Other Microsoft Office applications offer similar functionality. PowerPoint can convert presentations to HTML and general image formats such as JPEG and TIFF. Excel can save tab- and comma-delimited files that are easily importable into a large number of applications. If you make use of Access to save data, you may want to move data stored in Access s .mdb format into a SQL database. SQL is more scalable, powerful, and virtually platform-independent. Migrating to SQL will preserve your data, but if your .mdb file will not open in OpenOffice.org, you will need to re-create any forms for accessing the data that you would like to continue using. If you are likely to continue to receive Microsoft Office files and you are concerned about interoperability, here are some options to consider: . Keep a copy of Microsoft Office installed using WINE and the CodeWeavers CrossOver Office plug-in. For more information about CrossOver Office, visit CodeWeavers Web site at www.codeweavers.com. . Ask individuals sending you documentation to use a less vendor-specific format, such as Adobe PDF. Document formatting can be exquisitely preserved and will be viewable by anyone capable of installing a PDF viewer, which supports virtually every operating system in widespread use today. . For forms that have user-editable fields, scripting, or complex embedded information, use HTML documents instead. Anyone with a compliant Web browser will be able to interact with the document, and Microsoft Office applications universally support saving files into this format. Before making any wholesale conversion away from Microsoft Office, make sure the files you need to use will work as expected with the new office suite you have selected or that you can construct suitable replacements if needed. Testing things ahead of time enables you to make necessary adjustments without later having to endure the frustration of finding some important document inaccessible or unusable. Using Traditional Linux Publishing Tools With old-school text processors such as Groff and TeX, you can ignore document appearance while writing. Plain-text macros instruct postprocessors how to lay out a document for printing after writing is done. With word processors such as OpenOffice.org Word and StarOffice Writer, you mark up text and see the basic layout of the document as you write. Some attributes of the traditional Linux document preparation tools make them particularly well suited for certain types of projects. TeX and Groff (which is based Caution
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision best web hosting services