\ProvidesPackage{sheets}

% This package sets default linespacing and margins and sets up for
% the funky header, including eps icon and (when appropriate) the
% ``name of the character this FooSheet is for'' spot.
% (\doname is defined to do the header; thus when you call \name,
% which sets \me to its contents and then calls \doname, you get it.)

%   Written/edited by David Oh, November 1, 1991.
%   Certain Parts Copyright (C) David Oh and the MIT Assassin's Guild 1991
%   Modified for use in `One is not a Prime Number.' (1992)
%   Modified again for use in 'Midnight in Moscow, Take 2'' (1994)
%   and some more by Jeremy Brown, Aug. 24 1994
%   and for Moon Over Bourbon Street some more by Jeremy Brown, June, 1995
%   and for Catastrophe some more by Jeremy Brown, Oct, 1996
%   and for the Template (TM) by Jamie Morris, Spring 1998 and later


\RequirePackage{graphicx}	% for including postscript graphics
\RequirePackage{doublespace}	% for setting default linespacing
\setstretch{1.2}



%%%%%%%%%%%%%%%%%%%
% Set up  margins %
%%%%%%%%%%%%%%%%%%%

\topmargin       -0.5in
\textheight      +9.0in
\oddsidemargin   -.25in
\evensidemargin  \oddsidemargin
\textwidth       +7.0in



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Following Section Written by David Oh, later edited by Jamie Morris %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This sets up the macro that actually builds the header.
% If you have a .sty file that uses this, but you don't want this
% header there, \renewcommand\doname{make my header instead} there.
% \renewcommand\doname{} will have it not do anything at all.
% (\doname is called by \name just after it sets \me.)

\newcommand\sheetname{Miscellaneous Sheet}
% Specific sheet .sty files will \renewcommand that to whatever they are,
% but you can also use [sheets] as a style by itself.


% Put in the eps of the char name if available (the perl scripts
% cause it to be; it's not there otherwise unless you're 
% doing it by hand on purpose).  This doesn't take args to
% fiddle the offset and scaling (alter llx/lly/urx/ury/rwi)... yet.
% Styles based on this style that don't want the charname to appear
% (e.g. character sheets, where it would be highly redundant)
% should \renewcommand\docharnamehere{}. 
% 
\newcommand\docharnamehere{%
  \special{psfile=charnameheader.eps llx=0 lly=0 urx=1 ury=0 rwi=-10}%
}

%% \useicon[optional width]{eps icon file}
% sets what icon goes in the header, and optionally what width it is.
% We pass it the default here; the Czar could overrule that in specific
% sheet styles (bluesheet icon, greensheet icon...) and/or the GMs can
% overrule it for individual sheets.  Width defaults if not present.
% Zero width arg or empty icon arg mean no icon.
%
\newcommand\useicon[2][7em]{%
  \def\icon@width{#1}%
  \ifdim\icon@width>0pt \def\icon@file{#2}\relax \else \def\icon@file{}\fi
}
\useicon{icon.eps}

% And now the header itself.  \name will set \me, then call \doname.
%
\renewcommand\doname{% 
  \def\line@across{\leaders\hrule height.6ex depth-.55ex\hfill\null}
  \noindent
  \valign{\centering \vfil##\vfil\cr
      \ifx\icon@file\empty\else
        \hsize=\icon@width \includegraphics[width=\hsize]{\icon@file}\cr
        \advance\hsize by -\icon@width
      \fi
      \parindent 5pt
      {\small\sc \gamename~\line@across}%
      \docharnamehere
      \break\vfil
      {\Large\me{}}%
      \break\vfil
      {\small\sc \sheetname~\line@across}%
      \cr
  }
  \vspace{.15in}
}


% stolen from Andre' DeHon, edited by Jeremy Brown, edited by Jamie Morris
\newenvironment{tightlist}{
  \begin{list}{$\bullet$}{%
    \advance\partopsep by \topsep
    \setlength{\topsep}{0in}
    \setlength{\itemsep}{0in}
    \setlength{\parsep}{0em}
    \setlength{\leftmargin}{1.5em}
    \setlength{\rightmargin}{0in}
    \setlength{\itemindent}{0in}
    \def\tightlist@empty{}
  }
}
{\ifx\tightlist@empty\empty \item[$\circ$] None \fi \end{list}\vspace{1ex}}

\let\normalitem@macro=\item   % make the above auto-insertion work right
\def\item{\def\tightlist@empty{Nope}\normalitem@macro}

%Mike's adds, edited
\newdef\topquote[2]{%
  \begin{quotation} \em #1 \par \leftskip=0pt plus1fill #2 \end{quotation}}
