Installation of Dvipage. ======================= Dvipage previews DVI files on Sun workstations under SunView. Version 3.0 has been tested on Sun 3 /160, /75, /60 under OS 3.5 and 4.0.1, and also on a Sun 4/260 under OS 4.0.1. An earlier version worked on many other configurations also. You should have the following files in a directory: -rw-r--r-- 1 hunt 2183 Dec 20 10:33 Makefile -r--r--r-- 1 hunt 4324 Dec 20 10:31 README -r--r--r-- 1 hunt 3606 Dec 15 19:14 args.c -r--r--r-- 1 hunt 7587 Dec 15 19:14 dvi.h -r--r--r-- 1 hunt 11199 Dec 15 19:14 dvipage.1 -rw-r--r-- 1 hunt 48924 Dec 15 19:14 dvipage.c -rw-r--r-- 1 hunt 8869 Dec 15 19:14 dvipage.h -r--r--r-- 1 hunt 8953 Dec 15 19:14 findfile.c -r--r--r-- 1 hunt 20760 Dec 15 19:14 fonts.c -r--r--r-- 1 hunt 12593 Dec 15 19:14 message.c -r--r--r-- 1 hunt 30047 Dec 15 19:14 sample.c -r--r--r-- 1 hunt 2883 Dec 15 19:14 utils.c Installation is simple; however, there are some system dependent parameters which must be set in the file dvipage.h, in particular, the FONT_AREA definition must reflect the location of the TeX fonts on your system; in the file as provided, there are conditionals which select a different font file location for different types of machine. FONT_AREA is a colon separated list of directories where font files will be found; either PXL or GF files can be used: #ifndef FONT_AREA #ifdef sparc #define FONT_AREA \ "/nfs/tex-server/tex/1988/lib/tex/fonts:/fonts/tex/pxl" #else !sparc #define FONT_AREA \ "/nfs/tex-server/tex/1988/lib/tex/fonts:/usr/spar/font/tex/pxl" #endif sparc #endif FONT_AREA You should also alter PRINT_SPOOLER and PRINT_PAGE_SPOOLER also in the file dvipage.h, in the obvious way to provide commands which can be used to print either the whole document or a single page of the document. /* * Define a command which will print the whole document. */ #ifndef PRINT_SPOOLER #define PRINT_SPOOLER "lpr -d %s >/dev/null 2>/dev/null" #endif PRINT_SPOOLER /* * Define a command which will print the specified page of the document. */ #ifndef PRINT_PAGE_SPOOLER #define PRINT_PAGE_SPOOLER \ "texpagefilter -f %d -t %d %s | lpr -d >/dev/null 2>/dev/null" #endif PRINT_PAGE_SPOOLER It may be that the simple PRINT_ definitions above do not have enough flexibility to deal with the printer configurations at your site. At Spar, we have some laserwriters and some imagen printers; the following hacks in the file `dvipage.c' examine the PRINTER environment variable and set the print_spooler and print_page_spooler strings accordingly: /* * Customise this part for your local printer environment. * ====================================================== */ #ifdef SPAR_HACKS /* * Set local printer hacks. */ printer = getenv("PRINTER"); if(printer && strncmp(printer, "lw", 2) == 0) { sprintf(print_spooler, "dvips -P%s %%s >/dev/null 2>/dev/null", printer); sprintf(print_page_spooler, "dvips -P%s -f %%d -t %%d %%s >/dev/null 2>/dev/null", printer); } else if(printer && strncmp(printer, "im", 2) == 0) { sprintf(print_spooler, "dviimp -P%s %%s >/dev/null 2>/dev/null", printer); sprintf(print_page_spooler, "dviimp -P%s -S %%d -E %%d %%s >/dev/null 2>/dev/null", printer); } else { fprintf(stderr, "PRINTER environment not recognised:\n"); fprintf(stderr, " using `%s' to print files\n", print_spooler); fprintf(stderr, " using `%s' to print pages\n", print_page_spooler); } if(verbose & DEBUG_PRINTER) { fprintf(stderr, "Using `%s' to print files\n", print_spooler); fprintf(stderr, "Using `%s' to print pages\n", print_page_spooler); } #endif SPAR_HACKS Remember to add a -DLOCAL_HACKS into the compile line in the Makefile, or in dvipage.h, if you add something similar. Finally, change the compile flags in `Makefile' if you are not running on a Sun 3 with a f68881 floating point unit. When all is set up, run `make'. It will build a program called dvipage, which can be installed in a suitable place. The manual pages dvipage.1 should be installed in /usr/man/man1 as dvipage.1l, or in you local manual pages directory. Enjoy, Neil Hunt. hunt@spar.slb.com ...{amdahl|decwrl|hplabs}!spar!hunt