.\" $Header .TH MP 1 "12 April 2002" .ds Ps P\s-2OST\s+2S\s-2CRIPT\s+2 .SH NAME .\" don't use Ps register in line below; goofs up output from whatis command mp \- POSTSCRIPT pretty printer .SH SYNOPSIS .B mp [ .B \-a4 ] [ .B \-addhdr .I type ] [ .B \-alias .I name ] [ .B \-allhdrs ] [ .B \-article ] [ .B \-bottom .I # ] [ .B \-bsdprint ] [ .B \-chars .I # ] [ .B \-columns .I # ] [ .B \-config .I name ] [ .B \-content ] [ .B \-copies .I # ] [ .B \-digest ] [ .B \-elm ] [ .B \-flip ] [ .B \-folder ] [ .B \-forcepage ] [ .B \-from ] [ .B \-help ] [ .B \-landscape ] [ .B \-left .I # ] [ .B \-linelength .I # ] [ .B \-modtime ] [ .B \-name .I appname ] [ .B \-newpage ] [ .B \-nobanners ] [ .B \-noburstpage ] [ .B \-number ] [ .B \-onesided ] [ .B \-organiser .I type ] [ .B \-pagelength .I # ] [ .B \-portrait ] [ .B \-postscript ] [ .B \-printer .I name ] [ .B \-prologue .I name ] [ .B \-remhdr .I type ] [ .B \-right .I # ] [ .B \-subject .I text ] [ .B \-tab .I # ] [ .B \-text ] [ .B \-top .I # ] [ .B \-tumble ] [ .B \-twosided ] [ .B \-us ] [ .B \-version ] [ .B \-words .I # ] [ .B \-wrap ] [ .I filename .\|.\|. ] .PP The version of .B mp installed at your site might also support the command line options from the previous version. These are: .PP .B mp [ .B \-A4 ] [ .B \-F ] [ .B \-PS ] [ .B \-US ] [ .B \-a ] [ .B \-d ] [ .B \-e ] [ .B \-f ] [ .B \-l ] [ .B \-m ] [ .B \-o ] [ .B \-p .I prologue ] [ .B \-s .I subject ] [ .B \-tm ] [ .B \-ts ] [ .B \-v ] [ .B \-? ] [ .I filename .\|.\|. ] .PP Use the -help command line option to determine if these options are supported. .SH DESCRIPTION The .I mp program reads each .I filename in sequence and generates a prettified version of the contents in \*(Ps format. By default the output is sent to standard output. If you use one of the different names, output is sent direct to the printer. .PP The program will use the .B PRINTER or .B LPDEST environment variables to determine which printer the output is sent to. .PP If no filename argument is provided, .I mp reads the standard input. If the standard input is a terminal, input is terminated by an .SM EOF signal, usually .SM Ctrl-D\s0. .PP Mail items, news articles, ordinary ASCII files, complete mail folders, and digests are all acceptable input formats for .IR mp . The output format includes grayscale lozenges containing banner information at the top and bottom of every page. .PP The program is conveniently used in conjunction with the print button of the .RI SunView/ xnews (1) .IR mailtool (1) programs, or the .I pipe command provided by .IR mail (1). Add the following two lines to your .I .mailrc file: .br .in +1.0i .nf \fCset printmail='mp -printer' set cmd="mp -printer &"\fP .fi .in -1.0i .PP Source the .I .mailrc file, and you are ready to use .IR mp . For printing ordinary ASCII files, the following alias (to be placed in your .I .cshrc file) may also prove useful: .br .in +1.0i .nf \fCalias print 'mp -text -printer -subject "\\!*" <\\!*'\fP .fi .in -1.0i .SH OPTIONS .TP .B \-a4 Use A4 paper size (8.5 x 11.4 inches). The default paper size is none, in which case .I mp will try to fill the paper. .\"========================================================================= .TP .BI \-addhdr " type" Add .I type to the list of mail or news headers to be printed. .\"========================================================================= .TP .BI \-alias " name" The user name alias that should be printed out in the .I mp banner heading, to show who the output is for. This will override the NAME environment variable and the users entry in the password file. .\"========================================================================= .TP .B \-allhdrs If set, then print out all mail or news headers. .\"========================================================================= .TP .B \-article Format the file as a news article. The top banner contains the text: "Article from .I newsgroup ", where .I newsgroup is the first news group found on the Newsgroups: line. By default, the input files are assumed to be mail messages. .\"========================================================================= .TP .BI \-bottom " #" The size (in points) for the bottom margin on each page. There are approximately 72 points per inch. The default value is 8 points. .\"========================================================================= .TP .B \-bsdprint If set, then assume this is a BSD system, and use the appropriate print command, and command line options. The default value for this option is false. .\"========================================================================= .TP .BI \-chars " #" The maximum number of characters to extract from the gecos field of the users .I /etc/passwd entry. The default is 40. .\"========================================================================= .TP .BI \-columns " #" Number of columns of output per page. This value will override the default value in the prologue file. .\"========================================================================= .TP .BI \-config " name" The name of an alternate X resource configuration file, which will be read by .I mp at startup time. The default name is .I $HOME/.mpdefaults .\"========================================================================= .TP .B \-content Instead of using "\\nFrom" to denote the start of new mail messages, mp will look for (and use) the value of the Content-Length: mail header. If the Content-Length doesn't take you to the next "\\nFrom", then it's wrong, and mp falls back to looking for the next "\\nFrom" in the mail folder. .\"========================================================================= .TP .BI \-copies " #" Number of copies of each file to output. This option only works when the filenames to print are given on the command line. The default number of copies is 1. .\"========================================================================= .TP .B \-digest Format the file as a digest. .\"========================================================================= .TP .B \-elm Assume the ELM mail frontend intermediate file format. Used when printing messages from within ELM (using the "p" command), especially for printing tagged messages. This option must be specified in your ELM option setup. .\"========================================================================= .TP .B \-flip Flip the top and bottom banners on the output. By default, the banners are not flipped. .\"========================================================================= .TP .B \-folder Format the file as a mail folder, printing multiple messages. By default, this option is not set. .\"========================================================================= .TP .B \-forcepage Always start a new page (rather than a new column) when in landscape or multi-page personal organiser mode. .\"========================================================================= .TP .B \-from Instead of printing who the mail article is for, the top header will contain who the mail article is from. A useful option for people with their own personal printer. .\"========================================================================= .TP .B \-help Print the usage message for .I mp .\"========================================================================= .TP .B \-landscape Format output in landscape mode. Two pages of text will be printed per sheet of paper. By default, output will be in portrait mode. .\"========================================================================= .TP .BI \-left " #" The size (in points) for the left margin on each page. There are approximately 72 points per inch. The default value is 8 points. .\"========================================================================= .TP .BI \-linelength " #" Maximum number of characters on each line of output. This value will override the default value in the prologue file. .\"========================================================================= .TP .B \-modtime Use the files last modification time (rather than the current time) in the .I mp banner. Note that this only works when the files are supplied on the command line (as opposed to standard input). .\"========================================================================= .TP .BI \-name " appname" Use this name, when looking for X resources for this application. .\"========================================================================= .TP .B \-newpage Always start a new sheet of paper for each new file when printing in duplex mode. .\"========================================================================= .TP .B \-nobanners Don't print a header and a footer banner on each page. By default, banners will be printed. .\"========================================================================= .TP .B \-noburstpage If the output is destined for a printer, than the printing of the burst page is disabled. Most of the information that typically appears on the burst page sheet is output in the \fImp\fR banners. By default, a burst page will be printed. .\"========================================================================= .TP .B \-number Print the line number on each line output. This option is not set by default. .\"========================================================================= .TP .B \-onesided Print the output in simplex (one-sided) mode. The default is to print in duplex (two-sided) mode. .\"========================================================================= .TP .BI \-organiser " type" Format the file for use with the given organiser type. Valid organiser types are filofax, franklin, proplan, timeman, tsintl and tspartner .\"========================================================================= .TP .BI \-pagelength " #" Maximum number of lines on each page of output. This value will override the default value in the prologue file. .\"========================================================================= .TP .B \-portrait Format output in portait mode. One page of text will be printed per sheet of paper. This is the default value. .\"========================================================================= .TP .BI \-printer " name" Send output to the named printer. Otherwise send output to the printer named in the PRINTER or LPDEST environment variables. .\"========================================================================= .TP .B \-ps If the mail or digest message just has PostScript as the text of the message, then this is normally just passed straight through. Specifying this option, causes PostScript to be printed as text. .\"========================================================================= .TP .BI \-prologue " name" Employ the file .I name as the \*(Ps prologue file, overriding any previously defined file names. .\"========================================================================= .TP .BI \-remhdr " type" Add .I type to the list of mail or news headers which will not be printed. .\"========================================================================= .TP .BI \-right " #" The size (in points) for the right margin on each page. There are approximately 72 points per inch. The default value is 8 points. .\"========================================================================= .TP .BI \-subject " text" Use .I " text" as the new subject for the printout. If you are printing ordinary ASCII files which have been specified on the command line, the subject will default to the name of each of these files. Note that as .I mp automatically assumes the default input file format is a mail file, you will have to include the -text command line option to make this happen. .\"========================================================================= .TP .BI \-tab " #" The number of spaces to output when encountering a tab character. The default value is 8. .\"========================================================================= .TP .B \-text Format the file as an ordinary ASCII text file. By default, the file is assumed to be a mail message. .\"========================================================================= .TP .BI \-top " #" The size (in points) for the top margin on each page. There are approximately 72 points per inch. The default value is 8 points. .\"========================================================================= .TP .B \-tumble If printing in duplex mode, adjust the alignment of the reverse page. By default, the reverse page is not tumbled. .\"========================================================================= .TP .B \-twosided Print the output in duplex (two-sided) mode. This is the default. This obviously only works if the printer is capable of printing on both sides of the paper. .\"========================================================================= .TP .B \-us Use US paper size (8.5 x 11 inches). The default paper size is none, in which case .I mp will try to fill the paper. .\"========================================================================= .TP .B \-version Print the version number of this release of .IR mp . .\"========================================================================= .TP .BI \-words " #" The maximum number of words to extract from the gecos field of the users .I /etc/passwd entry. The default is 3. .\"========================================================================= .TP .B \-wrap Wrap words onto the next line of output. By default, this option is not set. .\"========================================================================= .SH RESOURCES .PP On startup, .B mp will use the following X resources which by default are stored in .B $HOME/.mpdefaults. Note these resource names will be prepended with the running application name (mp, newsp, mailp ...). This means that you can have different sets of resources for each type of program. .\"========================================================================= .TP 15 .PD 0 .B Resource: addHeaders .TP .B Values: Headers to add (string) .TP .B Description A comma separated list of the extra headers that .I mp should print out. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: aliasName .TP .B Values: Text string (NULL). .TP .B Description The user name alias that should be printed out in the .I mp banner heading, to show who the output is for. This will override the NAME environment variable and the users entry in the password file. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: allHeaders .TP .B Values: True, False (False) .TP .B Description If set to true, then all mail or news headers are printed out. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: bottomMargin .TP .B Values: positive integer (8) .TP .B Description The size (in points) for the bottom margin on each page. There are approximately 72 points per inch. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: bsdPrinter .TP .B Values: True, False (False) .TP .B Description If set to true, then it is assumed that this is a BSD system, and the appropriate printer command and command line options are used. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: copies .TP .B Values: positive integer (1) .TP .B Description The number of copies to be printed for each file. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: doubleSided .TP .B Values: True, False (True) .TP .B Description Determines whether the output will be printed on one side of the paper or two. Obviously for two-sided output to work, the printer has to support it. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: elmMail .TP .B Values: True, False (False) .TP .B Description If set to true, assumes the ELM mail frontend intermediate file format. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: fileType .TP .B Values: Mail, News, Postscript or Text (Mail) .TP .B Description Describes the type of the input file to be processed. Either mail messages, news articles, pure PostScript or plain text files. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: flipBanners .TP .B Values: True, False (False) .TP .B Description If set to true, flips the top and bottom banners on the output. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: forcePage .TP .B Values: True, False (False) .TP .B Description If set to true, always starts a new page (rather than a new column) when in landscape or multi-page personal organiser mode. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: leftMargin .TP .B Values: positive integer (8) .TP .B Description The size (in points) for the left margin on each page. There are approximately 72 points per inch. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: lineLength .TP .B Values: positive integer (80) .TP .B Description The maximum number of characters printed on each line. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: mailDigest .TP .B Values: True, False (False) .TP .B Description If set to true then .I mp assumes the input is in the form of a mail digest. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: mailFolder .TP .B Values: True, False (False) .TP .B Description If set to true then .I mp assumes the input is a file containing more then one mail message, and processes (and prints) each in turn. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: nameChars .TP .B Values: 1-255 (40) .TP .B Description The maximum number of characters to extract from the gecos field of the users .I /etc/passwd entry. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: nameWords .TP .B Values: 1-255 (3) .TP .B Description The maximum number of words to extract from the gecos field of the users .I /etc/passwd entry. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: newPage .TP .B Values: True, False (False) .TP .B Description If set to true, and printing duplex (two-sided), then printing of each new file is started on a new sheet of paper. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: numberColumns .TP .B Values: positive integer (1) .TP .B Description The number of columns of output per page. This value will override the default value in the prologue file. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: numberLines .TP .B Values: True, False (False) .TP .B Description If set to true then .I mp will number each line of output. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: organiserType .TP .B Values: Filofax, Franklin, Proplan, Timeman, Tsintl or Tspartner .TP .B Description Describes the personal organiser output format. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: outputType .TP .B Values: Portrait, Landscape or Organiser (Portrait) .TP .B Description Describes the printed output format. Either portrait, landscape or one of the special personal organiser formats. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: pageLength .TP .B Values: positive integer (66) .TP .B Description The maximum number of lines printed on each page. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: paperSize .TP .B Values: None, A4 or US (None) .TP .B Description Describes the size of the paper the the output will be printed on. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: printHeaderPage .TP .B Values: True, False (False) .TP .B Description If set to true then a burst banner page will be printed at the beginning of the .I mp output. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: printerName .TP .B Values: Text string (NULL) .TP .B Description The name of the printer to send output to. If no name is supplied, then .I mp will use the default printer. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: prologueName .TP .B Values: UNIX pathname (NULL) .TP .B Description Use this as the prologue filename overriding any previously defined file names. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: removeHeaders .TP .B Values: Headers to remove (string) .TP .B Description A comma separated list of the standard headers that .I mp should not print out. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: rightMargin .TP .B Values: positive integer (8) .TP .B Description The size (in points) for the right margin on each page. There are approximately 72 points per inch. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: subject .TP .B Values: Text string (NULL) .TP .B Description The subject that will be printed out in the banner for each file printed. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: tabSize .TP .B Values: positive integer (8) .TP .B Description The number of spaces to output when encountering a tab character. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: topMargin .TP .B Values: positive integer (8) .TP .B Description The size (in points) for the top margin on each page. There are approximately 72 points per inch. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: tumble .TP .B Values: True, False (False) .TP .B Description If set to true and printing in duplex mode, adjust the alignment of the reverse page. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: useContent .TP .B Values: True, False (False) .TP .B Description If set to true, instead of using "\\nFrom" to denote the start of new mail messages, .I mp will look for (and use) the value of the Content-Length: mail header. If the Content-Length doesn't take you to the next "\\nFrom", then it's wrong, and .I mp falls back to looking for the next "\\nFrom" in the mail folder. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: useFrom .TP .B Values: True, False (False) .TP .B Description If set to true, instead of printing who the mail article is for, the top header will contain who the mail article is from. A useful option for people with their own personal printer. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: useModTime .TP .B Values: True, False (False) .TP .B Description If set to true, use the files last modification time (rather than the current time) in the .I mp banner. .sp .\"========================================================================= .TP 15 .PD 0 .B Resource: wrapWords .TP .B Values: True, False (False) .TP .B Description If set to true, wrap words onto the next line of output. .sp .\"========================================================================= .SH "ENVIRONMENT VARIABLES" The default output printer is determined by looking at the .I PRINTER environment variable for BSD systems or the .I LPDEST environment variable for System V systems. .PP An alternative file containing the .I mp X resources can be given with the .I MPDEFAULTS environment variable. .PP The .I mp prologue file is determined by first looking for the environment variable .IR MP_PROLOGUE , which specifies the directory where .I mp prologue files are to be found. If .I MP_PROLOGUE is not found, then the default directory is assumed .RI ( LIBDIR/mp.pro.ps ). .sp .SH "SUPPLIED PROLOGUE FILES" The following prologue files are provided: .RS .TP .I mp.pro.ps Used by default .TP .I mp.pro.l.ps Used by the .B \-landscape landscape mode option .TP .I mp.pro.ff.ps Used if the .B \-filofax option is in effect .TP .I mp.pro.fp.ps Used if the .B \-franklin option is in effect .TP .I mp.pro.pp.ps Used if the .B \-proplan option is in effect .TP .I mp.pro.tm.ps Used if the .B \-timeman option is in effect .TP .I mp.pro.tsi.ps Used if the .B \-tsintl option is in effect .TP .I mp.pro.tsp.ps Used if the .B \-tspartner option is in effect .TP .I mp.pro.alt.ps An alternative modification of the default prologue file which outputs the page number in the right corner of the bottom banner. .TP .I mp.pro.altl.ps An alternative landscape option mode prologue file. .RE .SH FILES .TP .I .cshrc initialization file for .IR csh (1) .TP .I .mailrc initialization file for .IR mail (1) .TP .I $HOME/.mpdefaults X resource initialisation file. .TP .I BINDIR/mp executable .TP .I LIBDIR/mp.pro.ps \*(Ps prologue for mail printing .TP .I LIBDIR/mp.pro.l.ps \*(Ps prologue for landscape format .TP .I LIBDIR/mp.pro.alt.ps alternative "default" \*(Ps prologue, inserts page numbers in the bottom right corner of each page .TP .I LIBDIR/mp.pro.altl.ps alternative "landscape" \*(Ps prologue. .TP .I LIBDIR/mp.pro.ff.ps \*(Ps prologue for Filofax format .TP .I LIBDIR/mp.pro.fp.ps \*(Ps prologue for Franklin Planner format. .TP .I LIBDIR/mp.pro.tm.ps \*(Ps prologue for Time Manager format .TP .I LIBDIR/mp.pro.tsi.ps \*(Ps prologue for Time/System (International) format .TP .I LIBDIR/mp.pro.tsp.ps \*(Ps prologue for Time/System (Partner) format .SH "SEE ALSO" .IR mail (1), .IR mailtool (1), .IR xnews (1) .SH AUTHORS Original version by Steve Holden. .PP Converted to C then C++, modified and maintained by Rich Burridge, Sun Microsystems Inc. .PP Original modified to handle net news articles and MH mail by Bruno Pillard, Chorus Systemes, France. .PP Handling of mail digests added by Dave Glowacki of Public Works Computer Services, St Paul, MN. .PP Original manual page revised by Rick Rodgers, UCSF School of Pharmacy, San Francicso. .PP Support for Personal Organiser printing style added by Douglas Buchanan, Sun Microsystems Europe. .PP Substantial modifications to header parsing by Jeremy Webber, Computer Science Department, University of Adelaide, Australia. .PP Support for printing multiple files and subject line filename print for ordinary ASCII files added by Sam Manoharan, Edinburgh University. .PP Support for landscape mode written by Michael Tuchiarone. .PP Revision of the \*(Ps structuring and the way that the prologue files are handled was included by Johan Vromans. .PP New style \*(Ps prologue files by John Macdonald. .PP Support for the ISO8859 character set by Bertrand DeCouty. .PP .nf Rich Burridge. MAIL: Rich.Burridge@Sun.Com .fi .\" end of man page