[comp.text.desktop] How to include Framemaker 2.0 graphics into LaTeX?

mst@vexpert.dbai.tuwien.ac.at (Markus Stumptner) (02/15/91)

With the new release of Framemaker (2.0), our method of including
Encapsulated Postscript graphics into LaTeX documents (which worked
without problems under 1.5) does not work any more.  It appears there
are some basic changes in the EPS files written by 2.0.

Since 2.0 has been around for some time now, has anybody found a
solution or workaround to this problem?

Please reply by email, I'll summarize if there's interest.

-- 
Markus Stumptner                                mst@vexpert.dbai.tuwien.ac.at
University of Technology Vienna                 vexpert!mst@uunet.uu.net
Paniglg. 16, A-1040 Vienna, Austria             ...mcsun!vexpert!mst

xiaofei@acsu.buffalo.edu (Xiaofei Wang) (02/25/91)

I remember that I saw it somewhere [gnu.ghostscript.bug may be]
that the author of dvips5.4 wrote that Frame Maker prevent its
output to be included into any other format. He calls every one 
to write to them against this. He himself found a trick to include
the .eps to TeX, i.e. to assign a usually paper size when saving the
file to confuse Frame Maker.

Above info is based on the post I saw somewhere and I can not locate
the post. I presume writing to ``rokicki@neon.stanford.edu'' will get 
a better answer.
-- 
xiaofei@acsu.buffalo.edu / rutgers!ub!xiaofei / v118raqa@ubvms.bitnet

jdm5548@diamond.tamu.edu (James Darrell McCauley) (02/26/91)

Perhaps someone could write a summary of the FrameMaker/psfig
situation.  Here's something I picked up a while back.  It's
a pretty decent hack, but requires Sun OS 4.1 ('nawk,' the NEW
awk).
---cut here
#!/bin/sh
#
# psfilt: filter to translate various PostScript files to EPSF
#
# Copyright (c) 1991, Giovanni Pacifici
#
# Permission is granted to copy and distribute this file in modified
# or unmodified form, for noncommercial use, provided (a) this copyright
# notice is preserved, (b) no attempt is made to restrict redistribution
# of this file, and (c) this file is not distributed as part of any
# collection whose redistribution is restricted by a compilation copyright.
#
trap 'echo interrupt; exit' 1 2 3 9 15
if test $# -ne 3
	 then 
		echo "This Program Translates Frame Maker, Mathematica and Splus"
		echo "PostScript Files into Encapsulated PostScript Files."
		echo "You can include these files directly into Latex Documents."
		echo "To Run The Filter use:"
		echo " "
		echo $0 "filetype InputFile OutputFile"
		echo " "
		echo "filetype can be one of the following:"
		echo "	fmland: Specifies that the input file is a Frame Maker"
		echo "		PostScript in Landscape Format"
		echo "	fmport: Specifies that the input file is a Frame Maker"
		echo "		PostScript in Portrait Format"
		echo "	Splus:	Specifies that the input file is a Splus"
		echo "		PostScript in Landscape Format"
		echo "	Math:	Specifies that the input file is Mathematica"
		echo "		PostScript"
		echo " "
		exit
 fi
case $1 in
fml*)
	echo "PostScript To EPSF Filter"
	echo "Converting Landscape Frame Maker File:" $2
	echo "Output to File:" $3
	cat $2 | \
	nawk '
	BEGIN { }
	{
		if ($0 ~ "^%%BoundingBox")
		{
			print $1 " 180 180 612 792"
		}
		if ($0 ~ " FMDOCUMENT")
		{
			print $1, $2 " 2 2 " $5, $6, $7, $8
		}
		if ($0 ~ " 1 FMBEGINPAGE")
			{
			print $1, $2 " 0 " $4
		}
		if ($0 !~ " 1 FMBEGINPAGE" && $0 !~ " FMDOCUMENT" && $0 !~ "^%%BoundingBox")
		{
			print $0
		} 
	}
		END {
		}
		' > $3 ;;
fmp*)
	echo "PostScript To EPSF Filter"
	echo "Converting Portrait Frame Maker File:" $2
	echo "Output to File:" $3
	cat $2 | \
	nawk '
	BEGIN { }
	{
		if ($0 ~ "^%%BoundingBox")
		{
			print $1 " 0 0 612 792"
		}
		if ($0 ~ " FMDOCUMENT")
		{
			print $1, $2 " 2 2 " $5, $6, $7, $8
		}
		if ($0 !~ " FMDOCUMENT" && $0 !~ "^%%BoundingBox")
		{
			print $0
		} 
	}
		END {
		}
		' > $3 ;;
Sp*)
	echo "PostScript To EPSF Filter"
	echo "Converting Landscape Splus File:" $2
	echo "Output to File:" $3
	cat $2 | \
	nawk '
	BEGIN { }
	{
		if ($0 ~ "^%%BoundingBox")
		{
			print $1 " 20 150 792 792"
		}
		if ($0 ~ "Landscape true def")
		{
			print $1, "false",  $3
		}
		if ($0 ~ "^/Region ")
		{
			print "/Region [20 150 792 792] def"
		}
		if ($0 !~ "Landscape true def"&& $0 !~ "^/Region " && $0 !~ "^%%BoundingBox")
		{
			print $0
		} 
	}
		END {
		}
		' > $3 ;;
ma*)
	echo "PostScript To EPSF Filter"
	echo "Converting Mathematica File:" $2
	echo "Output to File:" $3
	cat $2 | \
	nawk '
	BEGIN { }
	{
		if ($0 ~ "^%!")
		{
			print $0
			print "%%BoundingBox: 0 100 612 632"
		}
		else
		{
			print $0
		} 
	}
		END {
		}
		' > $3 ;;
*)
	echo 'unexpected name:' $1 ;;
esac

-- cut here
James Darrell McCauley (jdm5548@diamond.tamu.edu, jdm5548@tamagen.bitnet)
Spatial Analysis Lab, Department of Agricultural Engineering,
Texas A&M University, College Station, Texas 77843-2117, USA