Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!sun-barr!decwrl!ucbvax!bloom-beacon!eru!luth!sunic!ericom!hasse.ericsson.se!howard From: howard@hasse.ericsson.se (Howard Gayle) Newsgroups: comp.lang.postscript Subject: Re: ASCII -> Postscript Filter Summary: Hype for my cz system. Message-ID: <1989Dec14.163841.16431@ericsson.se> Date: 14 Dec 89 16:38:41 GMT References: <1252@corpane.UUCP> Sender: news@ericsson.se Reply-To: howard@ericsson.se (Howard Gayle) Organization: Ericsson Telecom AB, Stockholm, Sweden Lines: 124 In-Reply-To: drl@corpane.UUCP (Dan Lance) In article <1252@corpane.UUCP>, drl@corpane (Dan Lance) writes: >I am looking for a public domain program to convert ASCII text to PostScript, Allow me to hype cz a little, though it is free software, not public domain. DESCRIPTION The cz system converts text files in any "context-free octet-based" character set into PostScript. By octet-based, I mean that each character in the character set is represented by a sequence of one or more 8-bit bytes. By "context-free" I mean that only the octets of a character determine what the character is, not any other octets in the file. This excludes character sets that use locking shift sequences, for example (complete) ISO 2022. Currently, cz can handle the ISO 8859/1 character set, also known as Latin-1. This is a superset of ASCII, with characters for all major Western European languages. cz can also handle several national versions of ISO 646, including ASCII and "SWASCII," the Swedish national versions. SWASCII is the character set that uses vertical bar (|) for o with umlaut, etc. cz can also handle most of CCITT T.61, the teletext character set also used for X.400 mail. T.61 is (almost) a subset of ISO 6937/2. cz is completely table-driven, and it is easy to get cz to emit the PostScript for other character sets. The hard part is figuring out what PostScript cz should emit. An optional heuristic attempts to guess when certain ISO 646 bit codes represent ASCII (e.g. right curly brace) and when they represent SWASCII (e.g. a with ring.) The measured error rate of this heuristic is less than 3% on real swnet (Swedish news group hierarchy) news articles. There is also a heuristic for Danish, and tools and documentation for writing heuristics for other languages. These heuristics can be used for other purposes than printing text files, e.g. in mail and news readers. cz is very flexible. It can use any font available on the output device. You have complete control over font sizes, paper size, page layout, number of columns, line numbers, portrait or landscape mode, page reversal, leading (line spacing), tab expansion, and x- or y-axis adjustments to handle misaligned printers. cz handles the same typographic units as TeX, e.g. millimeters, inches, points, etc. For GNU Emacs users, there are functions cz-buffer and cz-region analogous to lpr-buffer and lpr-region. These print ISO 8859/1 by default, but the character set can be changed by changing the elisp variable cz-CommandFile. The elisp variables cz-FixedWidth and cz-AutoLandscape can be set to control the body font and format, and the variable cz-output can be modified to output to a different printer. If you read mail with the RMAIL mode of GNU Emacs, you can print a copy of any message with the function rmail-cz. This is by default bound to the "L" (Laser) key. If you read mail with Sun's mailtool, you can set the printmail variable in your .mailrc file to the command cz-news. This will print the current message when you click the print button. If you read news with the Gnews mode of GNU Emacs, you can print a copy of any article with the function Gnews-cz. This is by default bound to the "L" (Laser) key. If you read news with rn or rrn, you can define macros in your .rnmac file to call the command cz-news. The cz system has three mechanisms for handling long lines. AutoColumn can be used to reduce the number of page columns if a line exceeds a certain length. For example, you can specify two-column mode by default, but switch automatically to single-column mode in case a long line is encountered. AutoLandscape can be used to switch automatically from portrait mode to landscape mode if a long line is encountered. Both AutoColumn and AutoLandscape can operate on either a page-by-page or a whole file basis. For example, AutoLandscape in the page-by-page mode prints pages containing long lines in landscape mode, and other pages in portrait mode. Long lines can also be folded, i.e. broken across several output lines. The line breaks are marked by a special symbol, and the continuation lines are indented. Paper margins can be specified separately for landscape and portrait mode. For example, it is easy to have a 10 mm top margin in portrait mode and a 20 mm top margin in landscape mode. An option places a control-D at the end of the PostScript output, for printers that need one. Landscape rotation can be either positive or negative, i.e. with paper with holes, you can have the holes at the top or the bottom of the page. The line number of the last line in a file is always printed, if line number printing is enabled. This makes it easy to see how many lines are in a file. Turning off line number printing does not change the left margin. WHAT TO GET FROM THE ARCHIVE cz comp.sources.misc volume 8 issues 65-75, 77-78 ( 1 Oct 1989) issue 97 (28 Oct 1989) libhoward comp.sources.misc volume 8 issues 80-87 ( 1 Oct 1989) issue 96 (28 Oct 1989) -- Howard Gayle TN/ETX/TT/HL Ericsson Telecom AB S-126 25 Stockholm Sweden howard@ericsson.se uunet!ericsson.se!howard Phone: +46 8 719 5565 FAX : +46 8 719 8439