| 1 |
This is an adapted version of Paul Vojta's FAQ for (non-k) xdvi, which is |
| 2 |
available from <URL:http://math.berkeley.edu/~vojta/xdvi_faq.txt>. |
| 3 |
|
| 4 |
This file answers the following questions about installing xdvi: |
| 5 |
|
| 6 |
1. Why do I get the message, ``Caution: overstrike characters may be |
| 7 |
incorrect'' when running netscape and xdvi simultaneously, and why |
| 8 |
does the screen output look so grainy? |
| 9 |
2. I have font files cmr10.tfm, etc. Why can't xdvi use them? |
| 10 |
3. I can't seem to set the font path correctly. Can you help me? |
| 11 |
4. Whenever I run xdvi, it prints out things like: |
| 12 |
- mktexpk --mfmode cx --bdpi 300 --mag 'magstep(0)' --dpi 300 cmr7 '>&3' |
| 13 |
mktexpk: /var/cache/fonts/pk/cx/public/cm/cmr7.300pk already exists. |
| 14 |
Why is this? |
| 15 |
5. Why can't xdvi correctly display metapost files containing text? |
| 16 |
6. Why do I get weird vertical color stripes when using xdvi on my S3 |
| 17 |
Virge video card? |
| 18 |
7. What does the message "gs: No such file or directory" mean, and why |
| 19 |
does xdvi need to call ghostscript? |
| 20 |
8. I am using gs 5.50 to render PostScript figures, and I find that |
| 21 |
sometimes characters appear on the wrong page. Why is that? |
| 22 |
9. I am using gs 3.33 to render PostScript figures, but find that it |
| 23 |
cuts some off below or to the right of a certain point, and others |
| 24 |
are omitted entirely. |
| 25 |
10. I am trying to display PostScript specials with -DPS_GS, but |
| 26 |
instead I get the message `gs: gs: Malformed ghostview color property.' |
| 27 |
11. What is this "_get_wmShellWidgetClass undefined" error? |
| 28 |
|
| 29 |
Last modified: 2002/08/23 |
| 30 |
|
| 31 |
---------- |
| 32 |
|
| 33 |
1. Why do I get the message, ``Caution: overstrike characters may be |
| 34 |
incorrect'' when running netscape and xdvi simultaneously, and why |
| 35 |
does the screen output look so grainy? |
| 36 |
|
| 37 |
This is because your video setup has only a limited number (typically 256) |
| 38 |
of different colors that can be displayed at any given time, and netscape |
| 39 |
is using most of them. There are several ways around this problem: |
| 40 |
|
| 41 |
o Start xdvi before netscape. This should eliminate the problem for |
| 42 |
that copy of xdvi (only). |
| 43 |
o Invoke netscape via "netscape -ncols 130" This limits netscape's |
| 44 |
color usage to 130. Other numbers may be used as well. |
| 45 |
o Invoke netscape via "netscape -install" This causes netscape to run |
| 46 |
with its own colormap. A disadvantage of this approach is that |
| 47 |
netscape's colors will be bizarre when the cursor is outside netscape's |
| 48 |
window, and conversely all other colors on the screen will look funny |
| 49 |
when the cursor is in the netscape window. |
| 50 |
|
| 51 |
The screen output looks so grainy because xdvi is not able to use its |
| 52 |
anti-aliasing features without enough colors. |
| 53 |
|
| 54 |
---------- |
| 55 |
|
| 56 |
2. I have font files cmr10.tfm, etc. Why can't xdvi use them? |
| 57 |
|
| 58 |
tfm files contain only minimal information about the characters |
| 59 |
in a font: just the height, width, depth, and kerning and ligature |
| 60 |
information. To obtain information about the shapes of the |
| 61 |
characters, xdvi needs pk, gf or pfb files. (pxl files also contain |
| 62 |
this information, but are obsolete. There are utilities to convert |
| 63 |
them to pk files though.) |
| 64 |
|
| 65 |
---------- |
| 66 |
|
| 67 |
3. I can't seem to set the font path correctly. Can you help me? |
| 68 |
|
| 69 |
Try |
| 70 |
xdvi -debug 4000 file.dvi |
| 71 |
to find out where xdvi is looking for the fonts. |
| 72 |
|
| 73 |
---------- |
| 74 |
|
| 75 |
4. Whenever I run xdvi, it prints out things like: |
| 76 |
- mktexpk --mfmode cx --bdpi 300 --mag 'magstep(0)' --dpi 300 cmr7 '>&3' |
| 77 |
mktexpk: /var/cache/fonts/pk/cx/public/cm/cmr7.300pk already exists. |
| 78 |
Why is this? |
| 79 |
|
| 80 |
It means either that: |
| 81 |
|
| 82 |
(1) Your ls-R database is not up to date (fix this by running texhash), or |
| 83 |
(2) Your font path is not set correctly (see #3, above). |
| 84 |
|
| 85 |
---------- |
| 86 |
|
| 87 |
5. Why can't xdvi correctly display metapost files containing text? |
| 88 |
|
| 89 |
The problem is that the PS files created by MP are (normally) not |
| 90 |
self-contained. xdvi delegates the display of PS files to |
| 91 |
ghostscript, which fails to handle those files. |
| 92 |
|
| 93 |
A solution is to instruct MP to create true EPS files, by including |
| 94 |
prologues:=2; |
| 95 |
at the top of the document. If you have the CM postscript fonts |
| 96 |
installed so that ghostscript can find them, you can continue to use |
| 97 |
the CM fonts, otherwise you'll have to switch to Times or such for the |
| 98 |
illustrations. |
| 99 |
|
| 100 |
Switching the fonts can be done setting 'defaultfont' to something |
| 101 |
like "ptmr8r" (for Times). For the TeX material in 'btex .. etex' |
| 102 |
blocks, it is best to set up the fonts once in a 'verbatimtex .. etex' |
| 103 |
block. (And same for LaTeX of course.) |
| 104 |
|
| 105 |
This answer courtesy of Olaf Weber. |
| 106 |
|
| 107 |
---------- |
| 108 |
|
| 109 |
6. Why do I get weird vertical color stripes when using xdvi on my |
| 110 |
S3 Virge video card? |
| 111 |
|
| 112 |
This is a bug in the XF86_S3V X server. It has been reported to XFree86. |
| 113 |
The response from them is that the XF86_S3V server is being phased out |
| 114 |
and that users should use the XF86_SVGA server instead (which also, as of |
| 115 |
XFree86 3.3.3, supports the S3 Virge chipset). |
| 116 |
|
| 117 |
---------- |
| 118 |
|
| 119 |
7. What does the message "gs: No such file or directory" mean, and why |
| 120 |
does xdvi need to call ghostscript? |
| 121 |
|
| 122 |
The message "gs: No such file or directory" means that xdvi needs to call |
| 123 |
ghostscript, but does not find it on your system. Ghostscript is a program |
| 124 |
used for rendering PostScript. It is needed by xdvi (1) for displaying |
| 125 |
PostScript specials in documents, and (2) for rendering PostScript fonts |
| 126 |
occurring in documents. In the latter case, xdvi calls a script (usually |
| 127 |
named mktexpk) which in turn calls the program gsftopk to render the font |
| 128 |
in a form usable by xdvi. |
| 129 |
|
| 130 |
---------- |
| 131 |
|
| 132 |
8. I am using gs 5.50 to render PostScript figures, and I find that |
| 133 |
sometimes characters appear on the wrong page. Why is that? |
| 134 |
|
| 135 |
This is a bug in ghostscript 5.50. The following patch will fix it: |
| 136 |
|
| 137 |
*** gdevx.c.orig Fri Jul 17 07:31:27 1998 |
| 138 |
--- gdevx.c Sat Oct 17 23:42:50 1998 |
| 139 |
*************** |
| 140 |
*** 59,65 **** |
| 141 |
((gx_device_X *)(dev))->up_area = 0,\ |
| 142 |
((gx_device_X *)(dev))->up_count = 0 |
| 143 |
#define update_flush(dev)\ |
| 144 |
! if ( ((gx_device_X *)(dev))->up_area != 0 ) update_do_flush(dev) |
| 145 |
private void update_do_flush(P1(gx_device *)); |
| 146 |
|
| 147 |
#define flush_text(dev)\ |
| 148 |
--- 59,66 ---- |
| 149 |
((gx_device_X *)(dev))->up_area = 0,\ |
| 150 |
((gx_device_X *)(dev))->up_count = 0 |
| 151 |
#define update_flush(dev)\ |
| 152 |
! if ( ((gx_device_X *)(dev))->up_area != 0 || IN_TEXT((gx_device_X *)(dev)) )\ |
| 153 |
! update_do_flush(dev) |
| 154 |
private void update_do_flush(P1(gx_device *)); |
| 155 |
|
| 156 |
#define flush_text(dev)\ |
| 157 |
|
| 158 |
|
| 159 |
---------- |
| 160 |
|
| 161 |
9. I am using gs 3.33 to render PostScript figures, but find that it |
| 162 |
cuts some off below or to the right of a certain point, and others |
| 163 |
are omitted entirely. |
| 164 |
|
| 165 |
You should apply the following patch. This will also fix similar errors |
| 166 |
with ghostview. This patch supersedes a previous patch I have suggested |
| 167 |
to some people. |
| 168 |
|
| 169 |
*** gdevxini.c.orig Sun Nov 6 13:46:42 1994 |
| 170 |
--- gdevxini.c Mon Jun 5 15:40:18 1995 |
| 171 |
*************** |
| 172 |
*** 319,344 **** |
| 173 |
|
| 174 |
/* The following sets the imageable area according to the */ |
| 175 |
/* bounding box and margins sent by ghostview. */ |
| 176 |
! { float m[4]; |
| 177 |
! m[0] = (llx - left_margin) / 72.0; /* left */ |
| 178 |
! m[1] = (lly - bottom_margin) / 72.0; /* bottom */ |
| 179 |
! m[2] = xdev->width / xdev->x_pixels_per_inch - |
| 180 |
! (urx + right_margin) / 72.0; /* right */ |
| 181 |
! m[3] = xdev->height / xdev->y_pixels_per_inch - |
| 182 |
! (ury + top_margin) / 72.0; /* top */ |
| 183 |
! |
| 184 |
! /****** |
| 185 |
! ****** For reasons I don't understand, |
| 186 |
! ****** we have to set the margins to zero here |
| 187 |
! ****** in order for Ghostview to do landscape display right. |
| 188 |
! ******/ |
| 189 |
! #if 0 |
| 190 |
! m[0] = m[1] = m[2] = m[3] = 0; |
| 191 |
! #endif |
| 192 |
! |
| 193 |
! gx_device_set_margins((gx_device *)xdev, m, false); |
| 194 |
! } |
| 195 |
! |
| 196 |
} else if (xdev->pwin == (Window)None) { |
| 197 |
eprintf("gs: Cannot get ghostview property.\n"); |
| 198 |
exit(1); |
| 199 |
--- 319,329 ---- |
| 200 |
|
| 201 |
/* The following sets the imageable area according to the */ |
| 202 |
/* bounding box and margins sent by ghostview. */ |
| 203 |
! xdev->ImagingBBox[0] = llx - left_margin; |
| 204 |
! xdev->ImagingBBox[1] = lly - bottom_margin; |
| 205 |
! xdev->ImagingBBox[2] = urx + right_margin; |
| 206 |
! xdev->ImagingBBox[3] = ury + top_margin; |
| 207 |
! xdev->ImagingBBox_set = true; |
| 208 |
} else if (xdev->pwin == (Window)None) { |
| 209 |
eprintf("gs: Cannot get ghostview property.\n"); |
| 210 |
exit(1); |
| 211 |
|
| 212 |
---------- |
| 213 |
|
| 214 |
10. I am trying to display PostScript specials with -DPS_GS, but |
| 215 |
instead I get the message `gs: gs: Malformed ghostview color property.' |
| 216 |
|
| 217 |
xdvi needs at least version 2.6.2 of ghostscript. It will also run with |
| 218 |
ghostscript 2.6.1, provided you have applied fixes 1-4. This particular |
| 219 |
error message means that you are running gs 2.6.1 without fixes 1-4. |
| 220 |
Probably you should get a newer version of ghostscript. |
| 221 |
|
| 222 |
---------- |
| 223 |
|
| 224 |
11. What is this "_get_wmShellWidgetClass undefined" error? |
| 225 |
|
| 226 |
In SunOS 4.1.2 Sun fixed a shared-library bug in ld which conflicts |
| 227 |
with the way X builds the shared Xmu library, causing these symbols, notably, |
| 228 |
to be undefined when building some X11 clients on SunOS 4.1.[23]: |
| 229 |
_get_wmShellWidgetClass |
| 230 |
_get_applicationShellWidgetClass |
| 231 |
Compiling "-Bstatic -lXmu -Bdynamic" is overkill; be sure to set |
| 232 |
OSTeenyVersion correctly in the config/sun.cf file and rebuild X11R5. |
| 233 |
|
| 234 |
To solve the problem if you are using OpenWindows 3.0 (X11R4-based Xt), please |
| 235 |
contact your local Sun office and request the following patches: |
| 236 |
|
| 237 |
Patch i.d. Description |
| 238 |
100512-02 4.1.x OpenWindows 3.0 libXt Jumbo patch |
| 239 |
100573-04 OpenWindows 3.0: xstdcmap fails to set XStandardColomap for |
| 240 |
24-bit machines [this also fixes bug 1087332, "With patched |
| 241 |
ld and libc, customer is getting undefined symbols"] |
| 242 |
|
| 243 |
[Greg Earle, [email protected]; 7/92] |
| 244 |
|
| 245 |
A source patch for use with the X11R4 libraries was developed by Conrad |
| 246 |
Kimball ([email protected]); it retrofits into R4 some fixes made in R5 to |
| 247 |
get around this problem. The patch is on ftp.x.org in [1/93] |
| 248 |
contrib/X11R4_sunos4.1.2_patch_version3.Z |