Linux Online Advertisement
[ Register ]

[ Applications ]
[ Documentation ]
[ Distributions ]
[ Download Info ]
[ General Info ]
[ Book Store ]

Advertisement

[ Courses ]
[ News ]
[ People ]
[ Hardware ]
[ Vendors ]
[ Projects ]
[ Events ]
[ User Groups ]
[ User Area ]

Programming Perl (3rd Edition)

[ About Us ]
[ Home Page ]
[ Advertise ]

Tips: Text Processing

Linux systems have a number of excellent utilities for processing and manipulating text files.

Latex


produce good PS or PDF files

If you're using LaTex, you'll get better font rendering if you use the utility 'pslatex' instead of just plain 'latex' to render your files.

pslatex file.tex

To create the PostScript file, issue this command:

dvips file.dvi -o file.ps

These files can be converted into PDF format with ps2pdf


latex2html

You can create one single file from a LaTex file with the following command:

latex2html -html_version 4.0 -info "" -split 0 -no_navigation

Misc.


enscript syntax

enscript is a utility for converting text to PostScript. The following command will create a book quality document from a text file. This works better if you've first used emacs' 'set-justification-full' on the text and saved it. That will ensure that the file has even sides with no staircase effect.

enscript -U 2 -i 4 -f Courier12 -L 50 --header='Author-Title: \
Page $%' file.txt -o file.ps

Some explanations
-U 2 = print two columns
-i 4 = indent 4 lines (looks better)
-L 50 = print 50 lines to a page

ADDITIONS:
--underlay=WORD - will print WORD in big letters across the page diagonally. This would come in handy for working drafts: --underlay=DRAFT. If you were a spy, you might use this: --underlay=SECRET


simple rot 13

A simple encryption technique, though not very secure, is what is known as rot 13. You simply shift a letter 13 places in the alphabet.

cat file | tr a-zA-Z n-za-mN-ZA-M > file.secret


[ return to main tips page ]




Comments: feedback (at) linux.org
Advertising: banners (at) linux.org
Copyright Linux Online Inc.
Compilation ©1994-2008 Linux Online, Inc.
All rights reserved.