%		GRASP style file

%
%	Apart from settings of page size and margins, and
%	setting appropriate math-mode italics,
%	the following macros are provided:
%	
%	\ToDo{x} 	Highlighted note for something left to do
%	\srcloc{x}	Marginal note of source file x.  x is set in
%			typewriter font
%	\smiley		Well, you need one of these sometimes :-)

%****************************************************************
%*								*
%*		Page and paragraph format			*
%*								*
%****************************************************************

% 			Margins and page layout

\sloppy				% Reduce complaints

\setlength{\marginparwidth}{1.5cm}

% 			Block paragraphs

\setlength{\parskip}{0.25cm}
\setlength{\parsep}{0.25cm}
\setlength{\topsep}{0cm}	% Reduces space before and after verbatim,
				% which is implemented using trivlist 
\setlength{\parindent}{0cm}

\renewcommand{\textfraction}{0.2}
\renewcommand{\floatpagefraction}{0.7}



%****************************************************************
%*								*
%*			ToDo					*
%*								*
%****************************************************************

\newcommand{\ToDo}[1]{$\spadesuit$~{\bf ToDo:} {\em #1} $\spadesuit$}


%****************************************************************
%*								*
%*			srcloc					*
%*								*
%****************************************************************

\newcommand{\srcloc}[1]{\mbox{}\marginpar{\footnotesize\tt #1}}
%
% to avoid src-location marginpars, put this in your doc's pre-amble.
%\renewcommand{\srcloc}[1]{}


%****************************************************************
%*								*
%*			smiley					*
%*								*
%****************************************************************

\newcommand{\smiley}{%
\hbox{$\bigcirc\mskip-13.3mu{}^{..}
\mskip-11mu\scriptscriptstyle\smile\ $}}

%%\setbox0=\hbox{$\bigcirc$}
%%\dimen0=\wd0
%%\newbox\smileybox
%%\setbox\smileybox=\hbox{\box0 \kern-.5\dimen0
%%	\lower .25ex\hbox to 0pt{\hss\vpt$\smile$\hss}%
%%	\raise .25ex\hbox to 0pt{\hss\$\cdot\kern 0.1em\cdot$\hss}}
%%\wd\smileybox=\dimen0
%%\def\smiley{\copybox\smileybox}
%%
%%Of course, you can substitute \frown for \smile :-) (but you may need
%%to adjust the spacing) :-(
%%--
%%Andrew Innes (aci10@eng.cam.ac.uk)
%%Engineering Dept.
%%Cambridge University


%****************************************************************
%*								*
%*			Math codes				*
%*								*
%****************************************************************

% The mathcodes for the letters A, ..., Z, a, ..., z are changed to
% generate text italic rather than math italic by default. This makes
% multi-letter identifiers look better. The mathcode for character c
% is set to "7000 (variable family) + "400 (text italic) + c.
%


%	LaTeX with New Font Selection Scheme (NFSS)

\@ifundefined{selectfont}
  {}
  {\newmathalphabet{\textit}
   \addtoversion{normal}{\textit}{cmr}{m}{it}
   \addtoversion{bold}{\textit}{cmr}{bx}{it}
   \everymath{\textit}
   \everydisplay{\textit}
  }

%	LaTeX without NFSS
%
%\def\@setmcodes#1#2#3{{\count0=#1 \count1=#3
%        \loop \global\mathcode\count0=\count1 \ifnum \count0<#2
%        \advance\count0 by1 \advance\count1 by1 \repeat}}
%
%\@setmcodes{`A}{`Z}{"7441}
%\@setmcodes{`a}{`z}{"7461}


%****************************************************************
%*                                                              *
%*        Definitions for macros used in figures		*
%*    These are produced by fig2dev, so we need defns for them	*
%*                                                              *
%****************************************************************

%	These ones work for 11-pt typesetting

\@ifundefined{selectfont} %DL is MS scheme present? 
{}{
\def\fiverm{\rm\tiny}		% Five pt
\def\sevrm{\rm\scriptsize}	% Seven pt

\def\nintt{\tt\footnotesize}
\def\ninrm{\rm\footnotesize}

\def\tenrm{\rm\small}		% Ten pt
\def\tentt{\tt\small}		% Ten pt

\def\elvrm{\rm\normalsize}	% Eleven pt
\def\elvit{\em\normalsize}

\def\twlbf{\bf\large}		% Twelve pt
\def\twlit{\em\large}
\def\twltt{\tt\large}
\def\twlrm{\rm\large}
\def\twfvtt{\tt\large}

\def\frtnrm{\rm\Large}		% Fourteen pt
\def\frtnbf{\bf\Large}
\def\frtnit{\em\Large}
\def\frtntt{\tt\Large}

\def\svtnsf{\sf\huge}		% Seventeen pt


% cant remember why I need these
\def\egt{\size{8}{9} }
\def\elv{\size{11}{12} }
\def\five{\size{5}{7} }
\def\fiv{\size{5}{6} }
\def\frtn{\size{14}{15} }
\def\nin{\size{9}{10} }
\def\sev{\size{7}{8} }
\def\six{\size{6}{7} }
\def\svtn{\size{17}{18} }
\def\ten{\size{10}{11} }
\def\twfv{\size{25}{27} }
\def\twl{\size{12}{14} }
\def\twty{\size{20}{22} }
}






