source: tags/initial/fig2dev/fig2ps2tex.script

Last change on this file was 2, checked in by oldcode, 24 years ago

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 456 bytes
Line 
1#! /bin/csh -f
2#
3# Fig2ps2tex - generate a TeX file for including a PostScript file
4#                involves calculating the bounding box from fig2ps output
5#
6set bbox = `grep "^%%BoundingBox:" $1`
7
8set xsp = `echo "3k $bbox[4] $bbox[2] - 72 / p" | dc`
9set ysp = `echo "3k $bbox[5] $bbox[3] - 72 / p" | dc`
10
11echo "\makebox[${xsp}in][l]{"
12echo "  \vbox to ${ysp}in{"
13echo "    \vfill"
14echo "    \special{psfile=$1}"
15echo "  }"
16echo "  \vspace{-\baselineskip}"
17echo "}"
Note: See TracBrowser for help on using the repository browser.