vavasis@afi.cs.cornell.edu (Stephen Vavasis) (01/22/91)
Forgive me for the length of this message, but I am hoping that some guru who reads this message will follow up with the right solution to my problem. Earlier I complained on this newsgroup about erratic horizontal spacing produced by the dvi2ps program when running with the native postscript fonts. The erratic spacing was noticeable to me, a novice typesetter, only between variables and their subscripts; in this position it was very obvious. Nobody sent me a solution, but several people asked me to post a solution if I found one. Here is a hack I figured out that doesn't solve the general problem (erratic spacing) but fixes the most common visible problem with my camera-ready copy. (a) WHAT IS CAUSING ERRATIC SPACING? The widths of the native characters according postscript is slightly different from the width that TeX has in mind (this is my hypothesis). (b) WHY DOES THIS AFFECT SUBSCRIPTS IN PARTICULAR? If you have a line of text like this: blah blah blah $x_i$ then the dvi2ps program typesets "blah blah blah x" with a series of relative positioning commands, but then it typesets i at certain absolute coordinates. Clearly, if "blah blah blah x" take up less space than TeX thought, then there will be a big space before the i. (c) HOW CAN I FIX THIS? Here is my not-too-brilliant patch: Create a file called null.ps with nothing in it. Now put the following statement in your file: \everymath{\raise0.1ex\hbox{\special{psfile=null.ps}}} (d) WHAT DOES THIS STATEMENT DO? It typesets a null string that forces dvi2ps to generate an absolute positioning command for the first character of every math formula. Simpler-looking statements meant to do the same thing don't work, because TeX and dvi2ps have optimizations that eliminate less complicated instructions to typeset null strings. (e) WHY IS THIS NOT A GOOD SOLUTION? Really, what I would like is a solution that (a) forces absolute coordinates at the beginning of every word of text and at the beginning of every math symbol, and (b) doesn't cause the dvi2ps program to type out "[null.ps]" for every math formula in the paper. Any suggestions? Thanks, Steve Vavasis (vavasis@cs.cornell.edu)
spqr@ecs.soton.ac.uk (Sebastian Rahtz) (01/22/91)
In article <51014@cornell.UUCP> vavasis@afi.cs.cornell.edu (Stephen Vavasis) writes:
(a) WHAT IS CAUSING ERRATIC SPACING? The widths of the native
characters according postscript is slightly different from the width
that TeX has in mind (this is my hypothesis).
I would not care to get into the details of this; but I do think you
would be well-advised to change your dvi2ps if its the `traditional'
Unix one and use Rokicki's dvips. He has taken a lot of care to
sort out issues like this; for instance, dvips reads the tfm file for
a font and tells the printer about some character metrics explicitly
(some guru will tell me this is all wrong, but you know what I mean).
You really should not be having that mismatch between maths and
subscripts!
Sebastian
--
Sebastian Rahtz S.Rahtz@uk.ac.soton.ecs (JANET)
Computer Science S.Rahtz@ecs.soton.ac.uk (Bitnet)
Southampton S09 5NH, UK S.Rahtz@sot-ecs.uucp (uucp)