Angus Leeming <[EMAIL PROTECTED]> writes: > One more question. > > Using the file I posted together with > latex trial > dvips -o trial.ps trial.dvi > gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=png16m -sOutputFile=trial%03d.png > -r300 trial.ps > > Results in the following file (attached). > > How do I ensure that this is cropped more elegantly?
What's inelegant about this? It is a displayed equation, and this equation is set in a vbox. The size of this vbox is what is used for the preview. You presumably would want to have "white space" to the left of the equation cropped away. DviPS can determine bounding boxes automatically if you use the -E -i options and generate EPS that way. However, this is quite slower than the tightpage mechanism and generates more files. There are also other disadvantages: a) the TeX bounding box (which is what tightpage uses) is pretty reliable even in the case of PStricks pictures and similar constructs, or rotation and scaling, since all of those constructs are usually embedded into constructs that tell TeX how much space to reserve for them. In contrast, dvips -E gets fooled a lot by such constructs. The information TeX has available about the boxes does not make it into DVI files. b) if you "crop" displayed equations for the sake of smaller graphics, they don't line up any more. The result is that, for example, equation numbers get a ragged right outline instead of lining up. preview.sty takes some pain to disassemble boxes as far as reasonable. Everything is set in vboxes. vboxes are then disassembled, removing trailing glue and checking whether they contain just a single line of material, which in that case gets stripped to the enclosed material put into a hbox. Usually, this means that text math and short phrases and horizontal material get a "tight" bounding box horizontally, whereas larger paragraph-mode based stuff (like displayed equations) gets a line width bounding box. Since you would usually want to have the paragraph based stuff line up, this has turned out to be about the most desirable mode of operations for our application. I hope this makes sense. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum Email: [EMAIL PROTECTED]