Xref: utzoo comp.text.desktop:1469 comp.text.tex:5671 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!diamond!jdm5548 From: jdm5548@diamond.tamu.edu (James Darrell McCauley) Newsgroups: comp.text.desktop,comp.text.tex Subject: Re: How to include Framemaker 2.0 graphics into LaTeX? Keywords: LaTeX, Framemaker, EPS Message-ID: <12600@helios.TAMU.EDU> Date: 25 Feb 91 20:22:45 GMT References: <3994@vexpert.dbai.tuwien.ac.at> Sender: usenet@helios.TAMU.EDU Reply-To: jdm5548@diamond.tamu.edu (James Darrell McCauley) Followup-To: comp.text.desktop Organization: Ag Engineering Dept, Texas A&M University Lines: 149 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