yorkw@barb.ecn.purdue.edu (Willis F York) (11/16/90)
Well some nice dude sent me the Below .STY file. my problems are 1) I don't know how to use a STY file. (I just include it right?) 2) i edited the sty file so it's print out a grid added a /begin{document} \end{document} and the thinf will print a grid that's 3 "units" from the top and left side of the paper. (ie i say do a 3x3 in qrid and it'll be 3 in down/right. I wnat to fill the paper. 3) The thing prints the grid then prints 3 blank pages. Will the guy who sent me this mail back, (I lost the adress) Here's the file for other interested people. ----------------------Cut grid.sty------------------------------ %grid.sty %This style option produces a grid of dimensions n by m. This %should prove useful to people who make exams and other kind of grid %plots. It takes 5 arguments and should be used in the following manner: %\grid{horizontal axis label}{vertical axis label}{horizontal %dimen}{vertical dimen}{length of 1 unit(can be defined in any %units)} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % EXAMPLE USAGE: % % \grid{$x$}{$f(x)$}{8}{4}{0.25in} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % (yorkw) i added the below line so i could test the macro. delete for a sty file. \begin{document} \typeout{GRID.STY: AUTHORED BY GYAN P. SINHA 10/06/90} \newcommand{\grid}[5]{ \begin{center} \newdimen\unit \unit=#5 \setlength{\unitlength}{\the\unit} \newcount\n \newcount\m \newcount\l \newcount\o \newcount\p \newcount\e \newcount\f \newcount\g \newcount\h \n=#3 \advance\n by 4 \m=#4 \advance\m by 4 \begin{picture}(\the\n,\the\m) \l=#3\advance\l by 1 \p=#4\advance\p by 1 \o=0 \advance\o by 2 \e=#3 \advance\e by 2 \f=1 \g=0%\the\f \h=#4 \advance \h by 2 \multiput(\the\o,\the\o)(0,1){\the\p}{\line(1,0){#3}} \multiput(\the\o,\the\o)(1,0){\the\l}{\line(0,1){#4}} \put(\the\e.\number2,\the\f.\number5){\makebox(0,0)[br]{#1}} \put(\the\g.\number6,\the\h){\makebox(0,0)[tl]{#2}} \end{picture} \end{center} } \newcommand{\graph}[5]{ \thicklines \begin{center} \newdimen\unit \unit=#5 \setlength{\unitlength}{\the\unit} \newcount\n \newcount\m \newcount\l \newcount\o \newcount\p \newcount\e \newcount\f \newcount\g \newcount\h \n=#3 \advance\n by 4 \m=#4 \advance\m by 4 \begin{picture}(\the\n,\the\m) \l=#3\advance\l by 1 \p=#4\advance\p by 1 \o=0 \advance\o by 2 \e=#3 \advance\e by 1 \f=1%\advance\f by 1 \g=0%\the\f \h=#4 \advance \h by 1 \put(\the\o,\the\o){\line(1,0){#3}} \put(\the\o,\the\o){\line(0,1){#4}} \put(\\grid{$x$}{$f(x)$}{8}{4}{0.25in}the\e.\number3,\the\f.\number5){#1} \put(\the\g.\number5,\the\h.\number8){#2} \end{picture} \end{center} } % A test line to print a grid, 8x10 1 in, \grid{$X Stuff$}{$Y Stuff$}{8}{10}{1in} % I added the Below line so i could test the file delete for a sty file \end{document} -- yorkw@ecn.purdue.edu Willis F York ---------------------------------------------- Macintosh... Proof that a Person can use a Computer all day and still not know ANYTHING about computers.