TEACH PRINTING Aaron Sloman, Oct 1998 Here is a list of useful online files concerning printing facilities for Poplog and VED users here in Birmingham. If you read this file in VED, you can put the VED cursor at the asterisk and type "ESC h". That will then follow up the cross reference. "ESC n" takes you to the Next cross reference. CHECKING THE PRINTER QUEUE Before giving a print command you should (a) check that the printer has paper loaded, and that it looks as if it is in a usable state (e.g. there is not a huge pile of paper on it. (b) check the queue of jobs for the printer. You can check the queue by giving the following command either on the VED command line, or directly to a unix shell prompt (e.g in an xterm window). lpq -P e.g., in VED ENTER lpq -Plw-g3 (when that command is given in Ved you can leave out "-P".) More information on printing is available in the following files. HELP PRINTING.TXT and gives an overview of printers available in the school, which type they are, where they are, and who can use them. This is a link to /bham/doc/system/printing.txt NB Currently this file is out of date. If you can use a Web browser you can get more up to date information from the online student handbook: http://www.cs.bham.ac.uk/studentinfo/computing-handbook/ The laser printers connected to the Unix network are `postscript' printers. That means that they can only print files that have the "postscript" format. Other files have to be converted to postscript. The psprint command described next, converts plain text files to postscript and sends them to a printr. HELP VED_PSPRINT Tells you how to use VED to print a plain text file (e.g. a program file) on a postscript printer. The VED commands ENTER psprint and ENTER psprintmr described in that file make use of the unix "a2ps" program to convert your text file to postscript, so that the printer can print it. The first command works on the whole file, the second on the marked range. See the HELP file for more details. The help file gives information about several options, including changing font size, printing two pages side by side (landscape mode) or one page at a time (portrait mode). If your file has some very long lines, e.g. more than 75 characters long, then you may need to use a small font, e.g. 7.5 If you want to know more about options in the a2ps program, you can read the Unix information file about it (the "MAN(ual) file") by giving VED the command ENTER man a2ps or you can directly run the unix "man" command by typing to the shell, in an Xterm window: man a2ps TEACH LATEX, TEACH LATEX.TEX, HELP LATEX, HELP VED_LATEX These files tell you how to use LaTeX, a very sophisticated text formatting package, which can be driven from VED. If you have trouble using this on one of the DEC Alpha workstations, try logging through to one of the Suns to run VED there. HELP RNO Tells you about a slightly more sophisticated formatting and printing mechanism which you can use for project reports and essays. It describes how you can use VED to prepare files using the NROFF or TROFF formatting commands, and then preview them in VED and finally get them printed. HELP LPR Tells you how to invoke the unix lpr command from inside VED. This is only suitable for printing either a postscript file to a postscript printer or a non-postscript file to a non-postscript printer. It does no file conversion. See also MAN LPR (Not recommend on our Unix network. Use psprint, or psprintmr ) SPECIFYING A PRINTER For Unix printing commands you need to specify the printer to which file should go for printing. You normally do this by using the format -P e.g. ENTER psprint -Plw-g3 to print a plain text file to the laser printer called "lw-g3" USING THE ENVIRONMENT VARIABLE $PRINTER If you always use the same printer, you can use the Unix environment variable $PRINTER to tell programs which printer to use. The variable can be set in your .login file, by the following command: setenv PRINTER e.g. setenv PRINTER lw-g3 After putting that line (with the appropriate printer name) in your .login file, you will need to log out and log in again, or you can type that command in an xterm window, direct to unix, before starting up VED. If you set the PRINTER variable in your .login file then if ever you forget to specify the printer name in a print command it will always go to that printer, even if that is not what you want! If you do not set the printer environment variable, you will need to specify the printer to be used every time you give a printing command, e.g. by adding the "flag" -P to the printing command. REPORTING PROBLEMS If there are problems with printers you should report them on the logging notice on the wall in the lab and/or send an email message to "support". Make the subject line indicate the problem, and then give further details in the body of the message. For a lot more information about Unix commands see TEACH UNIX.INTRO HELP UNIX.COMMANDS HELP SHELL --- $poplocal/local/teach/printing --- Copyright University of Birmingham 2000. All rights reserved. ------