XEROX MULTIPLE-HARDCOPY 2 4 1 MULTIPLE-HARDCOPY 1 4 By: Sami Shaio (Sami@CSLI.STANFORD.EDU) (MULTIPLE.HARDCOPY STREAM FILELST GLOSSERY.FILE TOFILE? DONTSEND UNFORMATTED? <>) [Function] STREAM - a TEdit textstream with the parameters for the pagelayout set. If a stream is not specified then the first file in FILELST will be fetched. This is useful if the first file already contains specifications for the pagelayout. FILELST - a list of files to be hardcopied in the order that they should be numbered. GLOSSARY.FILE - The file which will contain the table of contents once MULTIPLE-HARDCOPY is finished. If NIL, no table of contents will be saved. TOFILE? - If non-NIL then an IP file will be created for each file in FILELST that is the same name as the file with the extension .IP. These files will be written onto the connected directory. DONTSEND - If non-NIL then the files will not be sent to the printer (this only makes sense if you're creating IP files). UNFORMATTED? - same as arg to TEDIT.GET ie. NIL for formatted files T for unformatted GET. <> - same arguments as TEDIT.HARDCOPY would take (minus the initial stream argument). These args will be applied to the hardcopying of each file in FILELST Returned value: a list L of the form: ( . ) where each pair is of the form ( ) This list is set to the variable MULTIPLE.HARDCOPY.LIST. Example Use: You have a list of files: (FILE1 FILE2 FILE3... FILEN) that you wish to hardcopy with consecutive page numbers. This list can be set to a variable, which can be used instead of typing the list when calling the function. Let us assume it has been set to FILE.LIST. Set your connected directory to be {DSK}. Open a TEdit window and the Page Layout Menu. The looks that are in the Menu will be applied to each and every file. Set the starting number to the number you want the first file to start with. Call MULTIPLE-HARDCOPY with the following: (MULTIPLE-HARDCOPY (WHICHW) FILE.LIST 'INDEX.TEDIT T NIL NIL] (Assuming your mouse cursor is positioned inside theTEdit window). This will bring up the files in the specified TEdit window, format them for print, store them in files named {DSK}FILE1.IP, {DSK}FILE2.IP, etc. The files will be printed, as DONTSEND is NIL. Keeping IP files is very useful in the case where your printer breaks in mid-print and you can't continue. In this case, the files will still be stored as IP files, and when you wish to print them, they can be set to the printer (or in any order) and they will be printed with the correct page numbers. The Table of Contents from this session will be stored in {DSK}INDEX.TEDIT. Comments: If any of the files in FILELST is not found, MULTIPLE.HARDCOPY will prompt with a replacement file to use instead. This will continue until an existing file is found. If, however, you type NIL, then MULTIPLE.HARDCOPY will abort. It will still return a partial list of the files hardcopied so far in the same form as mentioned above. Other useful functions: (SET.STARTINGPAGE# PG# FRAME) PG# - is the number of the page FRAME - a TXTPAGEFRAME. This can be found on the TEXTOBJ of the TEdit Stream that we are interested in modifying. (ie. (fetch TXTPAGEFRAMES of (TEXTOBJ <>) )) If you wish to specify a default for all TEdit streams rather than a specific one, you can pass TEDIT.PAGE.FRAMES as the value of FRAME. To Be Implemented: A menu version (from the TEdit menu) which will prompt for a list of files and print them with consecutive page numbers. (È (È (È (È(ŠŠ8(ŠŠ8DÈÈ PAGEHEADING RUNNINGHEAD(TERMINAL MODERN MODERN MODERN MODERN MODERNLOGO?1(DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8))  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN )T êV’Â{[mF&(9 2Â+>~ M  w.‰zazº