#!/bin/sh # Script to print f2k draft to ps files. # # Uses the print-ps.doc file from the scripts-sun subdir as a # template to do print-to-file. # Ignore all the warning messages about not using some # stuff from the print template file. The message is irrelevant, # but there doesn't seem to be a way to turn it off. # # Also uses the linenum2 program from the scripts-sun subdir. # # The defaults write the toc, lof, and lot all to the same file name, # so we do them one at a time and move the files. # # The sleeps are to wait for fmprint to complete; # it seems to spool "print-to-file" operations, # which causes a mess if we continue before its done. # # Run this from the scripts-sun directory FMPRINT=/opt/frame55/bin/fmprint cd ../frame55 # No line numbering for title or contents. $FMPRINT -p ../scripts-sun/print-ps.doc title.doc sleep 60 mv title.ps ../ps $FMPRINT -p ../scripts-sun/print-ps.doc f2kTOC.fm sleep 60 mv f2kTOC.ps ../ps/toc.ps $FMPRINT -p ../scripts-sun/print-ps.doc f2kLOT.fm sleep 60 mv f2kLOT.ps ../ps/lot.ps $FMPRINT -p ../scripts-sun/print-ps.doc f2kIX.fm sleep 60 mv f2kIX.ps ../ps/index.ps $FMPRINT -p ../scripts-sun/print-ps.doc \ intro.doc c*.doc a*.doc sleep 300 # Add line numbers. for name in *.ps do ../scripts-sun/linenum2 <$name >../ps/${name} rm $name done # Allow printing on A4 paper. cd ../ps for name in *.ps do sed /FMAllowPaperSizeMismatch/s/false/true/ <$name >a4.ok mv a4.ok $name done cd ../scripts-sun