Subject: Summary: MOLDEN Postscript-Problems

From: Jochen Buehler <[email-masked]>
Date: Thu, 9 May 1996 16:14:44 +0200 (MET DST)

Dear CCL'ers,

because I recieved a lot of mails from people with the same problem,
here is my original query and thereafter the response from the author
of MOLDEN (which I've  sent a separate query), including the solution.
Commenting out the "initgraphics" command in the MOLDEN-generated
postscript-file does the trick. It is then possible to scale and
rotate the pictures in LaTeX.
For rotating the MOLDEN ps-picture to portrait, not landscape representation 
using e.g. the LaTeX graphicx-package,
it is necessary to adjust the bounding box, because the original one
then does not fit on the page any more.
MOLDEN ps-output is missing a ":" after the %%BoundingBox  keyword,
which causes ghostview and the various LaTeX-packages not to recognize the
BoundingBox. Adding a ":" by hand fixes this (see also bottom of this mail).

A big thanks to G. Schaftenaar for his help.

              Jochen

Original Query:
---------------
<Hi CCL'ers,
<
<maybe it's a bit off-topic but I think now and then every computational
<chemist wants to present some results... :-)
<
<Is there any MOLDEN (3.0,Linux,g77) user out there, who has 
<successfully included MOLDEN color-postscript output in
<LaTeX/SliTeX documents ? There seems to be something special with the
<ps-code produced by the program, so that the common graphics-packages
<for TeX do not manage to a) get the BoundingBox right and 
<b) cannot scale nor rotate or translate the picture which is
<always shifted out of it's BoundingBox.
<
<        any help greatly appreciated
<
<                 Jochen 

Responses:
----------
<Subject: Re: Problems with MOLDEN ColorPS output
<To: [email-masked] (Jochen Buehler)
<Date: Thu, 9 May 1996 14:09:38 +0200 (MDT)
<
<
<Hi Jochen,
<
<About the encapsulated postscript problems in molden.
<You were right about the bounding box missing the ":".
<Also it is indeed to small.
<To rescale the picture all you need to do is remove the "initgraphics"
<command.
<
<Please let me know if this works for you.
<
<Regards, Gijs
<
<-- 
<    +----------------------------+-----------------------------------+
<      Gijs Schaftenaar, Drs.     | CAOS/CAMM Center
<      Email: [email-masked]  | University of Nijmegen
<      URL  : http://www.caos.kun.nl/staff/schaft.html
<      Tel. : +31 24 3653369      | Toernooiveld 1
<      Fax  : +31 24 3652977      | 6525 ED Nijmegen, The Netherlands
<    +-------- CAOS/CAMM is the Dutch National Node in EMBnet --------+

and a hint from Alain Kessi, which made me aware of the missing ":"
in the MOLDEN-generated postscript-file:

<Return-Path: [email-masked]
<Date: Thu, 9 May 1996 11:51:54 +0200
<To: [email-masked]
<Subject: Re: CCL:MOLDEN ps-output
<
<> Is there any MOLDEN (3.0,Linux,g77) user out there, who has 
<> successfully included MOLDEN color-postscript output in
<> LaTeX/SliTeX documents ? There seems to be something special with the
<> ps-code produced by the program, so that the common graphics-packages
<> for TeX do not manage to a) get the BoundingBox right and 
<> b) cannot scale nor rotate or translate the picture which is
<> always shifted out of it's BooundingBox.
<
<I have no experience whatsoever with Molden, but I do have some with
<the LaTeX system. Do you see the symptoms you are talking about on
<the paper output (after dvips) or only in xdvi? xdvi, at least older
<versions of it, cannot do any rotating and scaling of the PostScript
<pictures. dvips on the other hand will handle them fine. Are you using
<the graphicx package of LaTeX? This is now the standard interface, and
<psfig or epsfig should not be used any longer.
<
<Does ghostview figure out the bounding box correctly? Is the bounding box
<comment line present in the PostScript file's preamble? Does the
<first line of the PostScript file indicate an EPS file or a PS file?
<If a PS file, is there a flag in Molden to indicate output to an
<EMBEDDED PostScript format (EPSF)?
<
<
< Hope this helps...
<
<Alain
<
<--
<Alain Kessi ([email-masked])
<at Paul Scherrer Institut, Zuerich, Switzerland