summaryrefslogtreecommitdiff
path: root/dviware/dvipage/readme
blob: bb6ffb0689511bba67e71f86d54e4631854df99f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
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