Archive for April, 2007

514 Part IV . Running Applications Most man (X web hosting)

Monday, April 30th, 2007

514 Part IV . Running Applications Most man pages are stored in subdirectories of /usr/share/man. Before you create a man page, refer to similar man pages to see the markup and the headings they include. Man1 has commands; man2 has system calls; man3 has library functions; man4 has special device files (/dev/*); man5 has file formats; man6 has games; man7 has miscellaneous components; and man8 has administrative commands. A few other kinds of macros are used in the man page. The .IP macros format indented paragraphs for things such as options. The man page also contains some lower-level font requests; for example, fB says to change the current font to bold, fI changes the font to italic, and fR changes it back to regular font. (This markup is better than asking for a particular font type because it just changes to bold, italic, or regular for the current font.) Figure 20-4 shows what the waycool man page looks like after it is formatted with groff: $ groff -man -Tps -l waycool.1 Figure 20-4: Man page formatting adds headers and lays out the page of text. Table 20-1 lists the macros that you can use on your man pages. These macros are described on the man(7) manual page (type man 7 man to view that page). Tip
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check Vision mysql hosting services

Chapter 20 . Working with Words and Images (Graphic web design)

Monday, April 30th, 2007

Chapter 20 . Working with Words and Images 513 To format a man page for typesetting, you could 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 20-3 shows the source for a fictitious man page for a command called waycool. Figure 20-3: Simple markup is required to create man pages.
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision best web hosting services

Best web hosting - 512 Part IV . Running Applications When you

Sunday, April 29th, 2007

512 Part IV . Running Applications 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 output forms supported by Groff: Form Produces 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 (-man). The output is piped to less, to page through it on your screen. Instead of piping to less ( | less), you could direct the output to a file (> /tmp/chown.txt).
Note: If you are looking for best quality webspace to host and run your tomcat application check Vision tomcat hosting services

Web hosting directory - Chapter 20 . Working with Words and Images

Sunday, April 29th, 2007

Chapter 20 . Working with Words and Images 511 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. nroff produces formatted plain text and includes the capability to do pagination, indents, and text justification, as well as other features. troff 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. Format an me document using the groff command option -me. 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 is replaced by one or more letters representing the macro package. In each case, you can understand the name of the macro package by adding an m to the beginning of the file suffix. Tip Instead of noting a specific macro package, you can use -mandoc to choose one.
Note: If you are looking for high quality webhost to host and run your jsp application check Vision florida web design services

Sri lanka web server - 510 Part IV . Running Applications Choosing a

Saturday, April 28th, 2007

510 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. (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 spell-checker and a diff feature, are included. Start by typing gedit from a Terminal window. Go to http://gedit.sourceforge.net for more information. Advanced kwrite Includes a menu bar to create, open, and save files, and Editor 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, syntax-highlighting 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 like search and replace, arrow key movements for the cursor, and so on, it offers macros, code-editing features, and the capability to move or format large chunks of text easily.
Note: In case you are looking for affordable webhost to host and run your servlet application check Vision make web site services

Chapter 20 . Working with Words and Images (Web hosting company)

Saturday, April 28th, 2007

Chapter 20 . Working with Words and Images 509 . 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), thousands of pages of documentation were ported 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 (TeX) 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.) 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). Note
Note: In case you are looking for affordable webhost to host and run your servlet application check Vision mysql5 web hosting services

Web host forum - 508 Part IV . Running Applications applications. If

Saturday, April 28th, 2007

508 Part IV . Running Applications applications. If you make use of Access to save data, you may want to move your .mdb-stored data 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 interoperation, here are some options to consider: . Keep a copy of Microsoft Office installed using WINE and the CodeWeavers plug-in. . 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 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 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. Caution
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check Vision mysql hosting services

Chapter 20 . Working with Words and Images (Jetty web server)

Friday, April 27th, 2007

Chapter 20 . Working with Words and Images 507 Getting Away from Windows For casual home users, small-office workers, and large corporation personnel alike, moving away from Microsoft Office to another Office suite is an experience that can range from simple to harrowing. In general, it is useful to examine this migration in terms of home use versus work use. Home users typically have to concern themselves with maintaining access to their own documents. In a personal context, it may be rare for friends and relatives to send Excel spreadsheets, Word documents, and PowerPoint presentations. But over the years you may have accumulated untold numbers for term papers, recipes, letters to the editor, and other such documents that you d like to be able to read and print. Because many of these formats are easily read by OpenOffice.org or can be readily saved in Microsoft Office to another, more interoperable format, your issues should be few. At work, in addition to accumulation of documents over time, there is a more pressing issue; other people will be sending you Microsoft Office documents. So while home users need to concern themselves mostly with access to historical documents, in the workplace you will probably need to accommodate new documents as well as your historical information. Because you can also convert your documents, there are no real challenges to migrating simple documents. However, if your Microsoft Office documents include extensive macro, scripting, or embedded object usage, you may find the conversion is not a very clean one. Make sure you attempt conversions using the following options before moving on to the last resort of using multiple applications or re-creating documents. Using Microsoft Office to convert documents enables you to save your files in an alternative format. For example, Word 2002 allows you to save your .doc files (the Word versions anyway) to a variety of formats, including: . HTML (.htm/.html) HTML is a great format for your information if it is basically text and you need only a few formatting options and some embedded images and links. The resulting HTML document will be smaller than the corresponding .doc file. . Rich Text Format (.rtf) Another wonderful minimalist format that will preserve some formatting and graphics, but any scripting or macro usage will be lost. . Plain Text (.txt) Works if all you need to save is the text of the file. Everything else will be lost. . Word 6.0/95 (.doc) An alternative format that may save some of the elements you want yet make it more accessible to OpenOffice.org. Using this format may not resolve all of the issues you have with converting those hard-to-change documents, but it just might do the trick. 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
Note: If you are looking for best quality webspace to host and run your tomcat application check Vision shared web hosting services

506 Part IV . Running Applications AbiWord is (Web hosting isp)

Friday, April 27th, 2007

506 Part IV . Running Applications AbiWord is a great first try as a usable word processor. Recently added features, such as styles and bullets, continue to make it a more useful word-processing tool. It s not yet competitive with comparable commercial products, but its developers continue to improve it. Using KOffice There is now a KDE office suite of applications that goes with the KDE desktop. The KOffice package has the basic applications you would expect in an integrated office suite: a word processor (KWord), spreadsheet (KSpread) program, a presentation creator (KPresenter), and a diagram-drawing program (KChart). Start by opening the KOffice Workspace (usually from a KDE panel menu). In the workspace window that opens, you can select from the different office applications presented in the left column. Open multiple documents in any of the applications, and then click on Documents in the left column to choose which one to display at the moment. Figure 20-2 shows the KOffice workspace, displaying a KWord document. Figure 20-2: The KOffice Workspace lets you work with multiple KDE office applications at once. You can work with a variety of document, spreadsheet, and image types. Not many commercial document types are supported yet, so you may need to import documents using other tools before you can read them into KWord. KSpread, however, can open several different spreadsheet styles, including Microsoft Excel and GNUmeric spreadsheets.
Note: In case you are looking for affordable webhost to host and run your web application check Vision cheap hosting services

Web hosting service - Chapter 20 . Working with Words and Images

Thursday, April 26th, 2007

Chapter 20 . Working with Words and Images 505 Other tools in StarOffice enable you to create business graphics, edit raster images, and edit mathematical formulas. You can download StarOffice 7 for Linux or purchase a boxed set from the StarOffice Web site at www.sun.com/staroffice. Although StarOffice was once available free for download, the current price to download the software for home users is $75.95. One reason for paying for StarOffice when you can get OpenOffice.org software for free is that you get a bunch of extras with StarOffice. The extras include a spellchecker, clip art, many more file converters (although the best ones are for converting Microsoft formats), a database module, and technical support. OpenOffice.org is an open source project sponsored by Sun Microsystems. Sun takes the shared source code used to create OpenOffice.org and combines it with other modules to produce the StarOffice suite. This is very similar to Mozilla, an open source Web browser, and Netscape, a commercial product built from the Mozilla sources. Using AbiWord The AbiWord word processor is a very nice, free word processor from the AbiSource project (www.abisource.com). If you are starting documents from scratch, AbiWord includes many of the basic functions you need to create good-quality documents. With AbiWord, you can select the type of document the file contains, and select to read the file in the following formats: AbiWord (.abw) GZipped AbiWord (.zabw) Rich Text Format (.rtf) Microsoft Word (.doc) UTF8 (.utf8) Text (.txt) AbiWord doesn t yet import all these file types cleanly. Although the recent version supports Word styles, sometimes tables, graphics, and other features don t translate perfectly. If you want to work with a Word document in AbiWord, open it as AbiWord, correct any font problems, and save the document in AbiWord format. AbiWord has vastly improved in the past few releases, but you may still experience problems if you need to exchange files with others who are using Word. (If you want to keep files in the Word format, you ll find that OpenOffice.org and StarOffice work much better, but not perfectly.) Note
Note: In case you are looking for affordable webhost to host and run your servlet application check Vision ecommerce web hosting services