Search                        Top                                  Index
HELP VED_PRINT                                  Robert Duncan, June 1992
                                            Revised John Gibson Apr 1999

Printing files from Ved.

    <ENTER> print   [options ...] [files ...]
    <ENTER> printmr [options ...]


         CONTENTS - (Use <ENTER> g to access required sections)

  1   General
  2   Options
  3   Command Filters (Unix only)


-----------------------------------------------------------------------
1  General
-----------------------------------------------------------------------

The <ENTER> print command prints a named file or files; if no file names
are given, the contents of the current buffer are printed.

The <ENTER> printmr command prints the marked range from the current
buffer; you cannot specify named files to this command.

Both commands spawn an operating system command to do the printing: on
VMS this will be print; on Unix systems, it may be either lpr or lp,
depending on the particular version.

If the environment variable (logical name) "popprinter" is set, then
that is taken as the name of the printer device to use, otherwise the
system default applies: on VMS this is SYS$PRINT, on Unix it is
typically site-specific.

For example:

    <ENTER> print file.p            - prints the file "file.p"

    <ENTER> printmr                 - prints the marked range



-----------------------------------------------------------------------
2  Options
-----------------------------------------------------------------------

You can include the following options with either command: these are
translated into the appropriate operating system format.

    -ps [ [ args for postscript_line_consumer ... ] ]
        (Unix only) Specifies that output should be produced for a
        PostScript printer, e.g.

            <ENTER> print -ps

        will convert the file into a PostScript representation and print
        that. This is done using * postscript_line_consumer, and
        optional arguments for that procedure may be given inside square
        brackets following the -ps, e.g.

            <ENTER> print -ps [font=cou15 paper=a5 margin=40]

        See REF * postscript_line_consumer for details of the available
        options.

    -psfile filename
        (Unix only) Instead of spawning a print command, redirect the
        PostScript output to the file filename (implies -ps). This can
        be used with a PostScript previewer such as gv.

    -num
        Prints num copies of each file (num an integer > 0).

    -p printer
        Uses the named printer instead of the default (NB: selecting a
        non-existent printer will provoke a garbled message from the
        spawned print command).

    -h
        Prints the file with a header on each page.

    -m
        Notifies (by mail) when the printing job has completed.

    -f
        Suppresses printing of the "flag" (or "banner") page. (Not
        supported by the Unix "lp" command.)

    -l
        Doesn't print form-feeds at page breaks. (Not supported by the
        Unix "lp" command.)

    -d
        Double-spaces the output. (Not supported on Unix.)


Single letter options can be combined. For example:

    <ENTER> print -3ph lpa0

This prints three copies of the current file on printer lpa0 with a
header on each page.


-----------------------------------------------------------------------
3  Command Filters (Unix only)
-----------------------------------------------------------------------

On Unix systems, you can additionally specify one or more command
filters which you want run on the files before printing, where a filter
is simply a Unix command written inside parentheses. For example:

    <ENTER> print (expand -4)

This prints the current file after first filtering its contents through
the command 'expand -4'.

The expand command replaces tabs in the input by the indicated number of
spaces: the -4 option makes it especially useful for program files
written with Ved's default 4-character tab-stop (* vedindentstep). Not
all Unix systems have the expand command, but for those which don't the
following is likely to be equivalent:

    <ENTER> print (pr -t -e4)

Filters are combined into a pipeline with the lpr (or lp) command, so
each filter should read from its standard input and write to its
standard output. Multiple filters are run in the order given.

Filters can be combined with the standard options, e.g:

    <ENTER> printmr (expand -4) -p lpa0

See also HELP * lp, * lpr for a direct interface to the Unix lp and lpr
commands.



--- C.all/help/ved_print
--- Copyright University of Sussex 1999. All rights reserved.