% These macros are for use with LaTex running within the Textures environment.
% They permit the use of a scaled MacPaint drawing within the LaTex figure environment.
% I keep them in a separate file "picmacs.tex" and then include or input that file into a document.
% The usage is as follows:
% where dimension1 and dimension2 are (actual) measurements from the picture window,
% picturename is the name of the picture from the picture window,
% scalefactor is an integer scaling factor (e.g.,1000 = full size, 500 = half size),
% captiontext is whatever text you wish to appear as the figure's caption, and
% uniquekeyword is a keyword distinct from all others in the document, permitting
% you to reference this figure using the "\ref{uniquekeyword}" command.
% Thanks to Jack Kuipers and Textures for doing the groundwork. - Joel C. Adams
% The corrected Textures macro for referencing a picture.
\def\centerpicture #1 by #2 (#3 scaled #4){
\dimen0=#1 \dimen1=#2 % local dimension variables
\divide\dimen0 by 1000 \multiply\dimen0 by #4 % calculate scaled dimensions
\divide\dimen1 by 1000 \multiply\dimen1 by #4
\noindent % get rid of figure's auto-indent
\vbox{ % create box for picture
\hspace*{\fill} % pad from left margin
\mpicture \dimen0 by \dimen1 (#3 scaled #4) % call picture with scaled dimensions
\hspace*{\fill} % pad from right margin to center
\vfill}} % leave space for the picture
% An alternative technique is to define a newcommand for each picture (in the preamble), and
% then give that command within the figure environment, in place of the "\centerpicture...".
\newcommand{\commandname}{\centerpicture dim1 by dim2 (picurename scaled scalefactor)}
%Uncomment the above line to use this macro with LaTeX.