\begindata{text,541121352}
\textdsversion{12}
\template{help}
\define{footnote
}
\define{title
}
\chapter{PSinset: PostScript inclusion in EZ

}
\section{What \typewriter{ps} insets are

}\leftindent{
A \typewriter{ps} inset is an\italic{ inset} which allows you to include a 
piece of PostScript text -- a chart, picture, specially formatted text, 
another document, or anyting else in the PostScript language.  On systems 
which support Display PostScript, it may be also possible to view the 
PostScript from within EZ.


A PostScript inset looks like:


\begindata{raster,540914184}
2 0 68266 68266 0 0 445 249
bits 540914184 445 249
zzv |
0fZZTc0 |
0a/22$2220p/22%22	40 |
08/88%88p/88%88	c0 |
0a/22$222003f0	h07h40h/22%22	40 |
08/88%880218g	0118c0g4008g/88%88	c0 |
0a/22$22200208	g011040h08g/22%22	40 |
08/88%880208f0	f3d0078b4b9eg	/88%88c0 |
0a/22$22200219	9909!0ccc4cc8	g/22%2240 |
08/88%8803f109	0103!08!48g/88%88	c0 |
0a/22$22200201	08f1gc808!48g	/22%2240 |
08/88%88020108	19g4808!48g/88%88	c0 |
0a/22$22200201	080910#48g/22%22	40 |
08/88%88020199	0918ccc84cc8g	/88%88c0 |
0a/22$222002g	!f0c707884b86	g/22%2240 |
08/88%88m08h/88%88	c0 |
0a/22$2220m08	h/22%2240 |
08/88/88/88%88	c0 |
0a2223zzr40 |
08g01zzr40 |
088889zzr40 |
08g01zzr40 |
0a2223zzr40 |
08g01zzr40 |
088889zzr40 |
08g01zzr40 |
0a2223zzr40 |
08g01zzr40 |
088889zzr40 |
08g01zzr40 |
0a2223zzr40 |
088889zzr40 |
0a2223zzr40 |
08bfc9zzr40 |
0fHzzr40 |
0c3fc3zzr40 |
0c3fc3zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0cg03zzr40 |
0fHzzr40 |
0a2223zzr40 |
088889zzr40 |
0a2223zzr40 |
08g01zzr40 |
088889zzr40 |
08g01zzr40 |
0a2223zzr40 |
08g01zzr40 |
088889zzr40 |
08g01zzr40 |
0a2223zzr40 |
08g01zzr40 |
088889zzr40 |
08g01zzr40 |
0a2223zzr40 |
08zzt40 |
0fZZTc0 |
zzv |
zzv |
zzv |
zzv |
\enddata{raster, 540914184}
\view{rasterview,540914184,46,0,0}

If you click on it's title bar, the inset will close, and the window will 
change to look like:

\begindata{raster,540916744}
2 0 68266 68266 0 0 22 28
bits 540916744 22 28
i |
i |
i |
i |
0fGc0 |
0fGc0 |
0cgc0 |
0cgc0 |
0cgc0 |
0cgc0 |
0cgc0 |
0cgc0 |
0c30c0 |
0fGc0 |
0fGc0 |
0cgc0 |
0cgc0 |
0cgc0 |
0cgc0 |
0cgc0 |
0cgc0 |
0cgc0 |
0fGc0 |
0fGc0 |
i |
i |
i |
i |
\enddata{raster, 540916744}
\view{rasterview,540916744,47,0,0}

To reopen it, simply click on the inset again. 


If your window server supports Display PostScript, you may choose the 
\bold{View} menu option on the }\italic{PostScript}\leftindent{ menu card to 
preview the PostScript in your Ez window.  Use the \bold{Edit }menu option on 
the same card to switch back to the text editting mode.

}
\section{Overview

}
\leftindent{This help file will introduce you to the use of ez PostScript 
insets.  It assumes that you are reasonably familiar with some of the general 
options discussed in the introductory  \italic{ez } help file.  This document 
has the following sections:


\leftindent{Making a \typewriter{ps} inset

Resizing a \typewriter{ps} inset

Deleting a \typewriter{ps} inset

Printing and Previewing with \typewriter{ps} insets

Popup Menu meanings

Warnings

Advice

Related Tools.

}}
\section{Making a \typewriter{ps} inset


}\leftindent{To insert a \typewriter{ps} inset into a working document, 
position the text caret where you want the \typewriter{ps} inset to appear, 
and select \bold{Insert PostScript }from the \bold{Special} menu card or type:


<ESC><TAB> \typewriter{ps<RETURN>}


(the escape key followed by the tab key, then "\typewriter{ps}" when prompted 
for the name of the object, then the return or enter key.).  EZ places a 
PostScript inset (See example above) at that point to indicate the presence of 
the inset. You may then all the usual EZ commands to put PostScript commands 
into the window.

}	

\section{Resizing a \typewriter{ps} inset}


\leftindent{The size of the "PostScript" inset on the screen and the size of 
the area which will be reserved blank for its contents to fit themselves into 
when the ez file is previewed or printed are totally unrelated.


\subsection{Resizing the box on the screen}


Position the cursor precisely over either the right or bottom border of the 
PostScript box, until the cursor changes to a double arrow.  Click and hold 
the left or right mouse button, and drag the border out to its new position, 
then release the mouse button.


\subsection{Resizing the printing space of the inset}


Select from the \italic{PostScript} menu card either \bold{Set Inch Size} to 
specify the size in inches, or \bold{Set Point Size} to specify the size in 
points.  You will be prompted for first the width and then the height of the 
area to be reserved blank when the document is previewed or printed so that 
your PostScript may be printed there (see\bold{ Warnings} and\bold{ Advice} 
below).

}
\section{Deleting a \typewriter{ps} inset}

\leftindent{
To delete a PostScript entry, position the text caret to the right of the 
PostScript inset and type either the delete or backspace key.  The dialog box:


\center{\
\begindata{raster,541044744}
2 0 68266 68266 0 0 187 115
bits 541044744 187 115
zj |
zj |
zj |
/44&4440 |
zi20 |
04/44%4440 |
/11&1120 |
/44&4440 |
/11&1120 |
04/44%4440 |
11/aa$aaa120 |
44/55$554440 |
1180z0120 |
0440z1440 |
1180z0120 |
4440z0440 |
1180z0120 |
0440g3fhd8g03	gc018g30h1830	060fh1440 |
1180g3180gd8g	03gc018j186003	1980g0120 |
4440g319e3cdb	181b3ccf3cf036	c78f3c63c31980	g0440 |
1180g31b366db	183766d9999837	6cd998c66183h	0120 |
0440g3f3306d9	b03366d9999836	6e1998c70186h	1440 |
1180g333f3ed9	b0337edf99f836	639f98!c186h01	20 |
4440g31b066d8	e03360d8198036	61d818c0e180h	0440 |
1180g31b366d8	e03766d99b9836	6cd99ac66186h	0120 |
0440g319e3bd8	601b3ccf0cf036	678f0cc3c186h	1440 |
1180k40o6003i	0120 |
4440kc0o6003i	0440 |
1180j0180o3006	i0120 |
0440z1440 |
1180z0120 |
4440z0440 |
1180z0120 |
0440z1440 |
1180z0120 |
/44&4440 |
1180z0120 |
04/44%4440 |
/11&1120 |
/44&4440 |
/11&1120 |
04/44%4440 |
/11&1120 |
/44&4440 |
/11&1120 |
04/44%4440 |
/11&1120 |
/44&4440 |
(1110i01(1120 |
04'4440,4440 |
,1119(1120 |
/44&4440 |
,1119(1120 |
04'4440,4440 |
)11!911119(11	20 |
)44c704*4440 |
)11d3!1119(11	20 |
04'444066!5e)44	40 |
)1166333b19(11	20 |
)443c7770)4440 |
)113d3f1e19(11	20 |
04'4440587047	)4440 |
)1119311319(11	20 |
)4458!7b)4440 |
)1119!1e19(11	20 |
04'44#40)4440 |
,1119(1120 |
/44&4440 |
,1119(1120 |
04'4440,4440 |
(1112"aaa9(11	20 |
(4445"5554(44	40 |
/11&1120 |
04/44%4440 |
/11&1120 |
/44&4440 |
/11&1120 |
04'4445"5554(44	40 |
(111a"aaa9(11	20 |
/44&4440 |
(1119,1120 |
04+4440(4440 |
(1119,1120 |
/44&4440 |
(11!1931*1120 |
04(445c744440	(4440 |
(11191d31*1120 |
)445a74e4)4440 |
(11191b31b1)11	20 |
04(4459771840	(4440 |
(11!19b319)11	20 |
)4458b758)4440 |
(11!197319)11	20 |
04(445875b040	(4440 |
(11!1930e1)11	20 |
)44404404)4440 |
(1119,1120 |
04+4440(4440 |
(1119,1120 |
/44&4440 |
(1118i01(1120 |
04'4441"1110(44	40 |
/11&1120 |
/44&4440 |
/11&1120 |
04/44%4440 |
/11&1120 |
/44&4440 |
/11&1120 |
04/44%4440 |
/11&1120 |
/55&5540 |
2a/aa%aaa0 |
zj |
zj |
\enddata{raster, 541044744}
\view{rasterview,541044744,48,0,0}}

should appear.  Click on the appropriate button: either \bold{yes} to confirm 
or \bold{no} to abort the deletion.  When properly deleted, the entire inset 
vanishes leaving only the text caret in its place.


}

\section{Printing and Previewing with \typewriter{ps} insets}\leftindent{

}
\leftindent{To see how the document will appear in the final printout, choose 
the \bold{Preview} option from the \italic{File} menu.  EZ opens a separate 
Preview window that displays a picture of the final document as it will appear 
when printed.  For more information, see the \italic{preview }help document.


A space which can be set with the Set Pixel Size and Set Inch Size commands 
will be reserved blank at thelocation of the \typewriter{ps} inset in the 
document.  Unless your system is set up to use Display PostScript, the 
PostScript code will not be translated and will not appear in the window -- 
you will only see the position and size of the spave left for it.  In this 
case, to see what the translated PostScript will look like, you must use the 
\bold{Print} option from the\italic{ File} menu.  See \bold{Warnings 
}and\bold{ Advice }below.

}
\section{Pop-up menu meanings

}\leftindent{
\subsection{View

}Allows you to preview your translated PostScript code in EZ.  This menu item 
is only available with X servers which support the Display PostScript 
extension.


\subsection{Edit

}Will allow you to return to the edit mode from the view mode.  This menu item 
is only available with X servers which support the Display PostScript 
extension.


\subsection{Set Inch Size}

Prompts first for width and then for height of the area to be reserved in the 
previewed or printer document for the PostScript program, in inches.


\subsection{Set Point Size}

Prompts first for width and then for height of the area to be reserved in the 
previewed or printer document for the PostScript program, in points.  There 
are 72 points per inch.


\subsection{Scan for bounds}

Looks inside of the PostScript code for the BoundingBox header (which is 
required in any PostScript program which conforms to the Adobe Document 
Structuring Conventions, which includes Encapsulated PostScript or EPS files). 
 The \typewriter{ps} inset will use the bounding box information to set the 
point size for you (see above), and will also insert a \typewriter{translate} 
command before your PostScript code to cause the image to be shifted into the 
printable region.


See \bold{Warnings }and \bold{Advice}.

}
\section{Warnings

}\leftindent{
You are entirely responsible for the validity and visibility of your 
PostScript code included in the inset.  No interpretation or checking of the 
PostScript is done at this time.


The size of the open PostScript inset on the screen and the size of the blank 
area reserved for the code in the previewed or printer document are totally 
unrelated.


Use the \bold{Scan for bounds}, \bold{Set Point Size}, or \bold{Set Inch Size} 
menu commands to ensure a proper area on the page, and then test and check 
your PostScript code to see that it fits where the space is reserved for it. 
 The PostScript inset will  clip the figure to the size you gave unless your 
PostScript code issues its own \typewriter{clip} command.  Also, watch out for 
PostScript code that uses \typewriter{initgraphics}.


}\section{Advice


}\leftindent{It is easy and nearly default to create a valid PostScript 
inclusion which obligingly places itself several inches off the page where you 
told it to go, so that it is completely invisible when printed.


Check for boundingbox, scale, and rotation commands, and include them as early 
in the PostScript text if possible.  Future versions of \typewriter{ps} inset 
will try to make sure that the included PostScript and the area allocated for 
it on the page are compatible, but at this point keeping an  image to the 
lower left of the page when creating it, and scaling it down with, for 
example, ".3 .3 scale" when first attempting to proofread the document will 
help keep it from being printed over the text above it on the page or, worse 
yet, somewhere off the page where it can't be seen.


Rotating a PostScript page rotates it about its upper left corner, effectively 
placing it off the page unless an appropriate offset is also used.

}
\section{Related tools}  


\leftindent{Select (highlight) one of the italicized names and choose "Show 
Help on Selected Word" from the pop-up menu to see the help file for:


\leftindent{\italic{ez

ez-contents

ez-index

ezprint

insets

preview


}}}\leftindent{
}\section{Program Authors}


\leftindent{Paul Boutin, MIT Project Athena, paul@athena.mit.edu

DPS and BoundingBox scan extensions by Michael McInerny, ITC/CMU, 
mcinerny+@andrew.cmu.edu

}\enddata{text,541121352}
