% fmosprop.sty
%
% Style file for Subaru FMOS Science Proposals
%
% Version 1.00 - 2003/08/29 Masayuki Akiyama
%

% Page layout commands
\pagestyle{empty}
\headheight 0mm
\headsep 0mm
\oddsidemargin -15pt
\parindent 0pt
\parskip 3pt
\topmargin -42pt
\textwidth 510pt
\textheight 750pt
\raggedbottom

\def\semester#1{\gdef\@semester{#1}}
    \gdef\@semester{S03B}
\def\proposalid#1{\ifx\empty#1\else\gdef\@proposalid{#1}\fi}
    \gdef\@proposalid{\@semester-}
\def\@slug{Last modified 08/20/2003}

% Category Information
\def\Categoryname#1{\gdef\@Categoryname{#1}}
    \gdef\@Categoryname{}

% Stuff for the front page
% PI information: name
\def\PIfirstname#1{\gdef\@PIfirstname{#1}}
    \gdef\@PIfirstname{}
\def\PIinitial#1{\gdef\@PIinitial{#1}}
    \gdef\@PIinitial{}
\def\PIlastname#1{\gdef\@PIlastname{#1}}
    \gdef\@PIlastname{}

% PI information: institute
\def\PIinstitute#1{\gdef\@PIinstitute{#1}}
    \gdef\@PIinstitute{}
\def\PIemail#1{\gdef\@PIemail{#1}}
    \gdef\@PIemail{}
\def\PIphone#1{\gdef\@PIphone{#1}}
    \gdef\@PIphone{}
\def\PIfax#1{\gdef\@PIfax{#1}}
    \gdef\@PIfax{}

% PI information
\newenvironment{PIinfo}%
{\maketoppageone\begin{picture}(1,1)\begin{minipage}[t]{\textwidth}}%
{\end{minipage}\end{picture}}

% Lines for page 1, plus print everything up to the Abstract
\def\maketoppageone{\begin{picture}(0,744)
\put(-9,0){\framebox(535,744){}}    % Whole Page Frame
\put(-9,748){\makebox{\small(FMOS Science Workshop 2003)}}
\put(525,-1){\makebox(0,0)[tr]{\footnotesize\it\@slug}}
\end{picture}\vspace*{-745pt}

\begin{center}
%\hspace*{55pt}
{\Large\bf FMOS Science Proposal}\\
\end{center}

\hspace*{-3pt}{\large\it 1. Title of Proposal}

\vspace*{6pt}\vbox to 12pt{\Large\bf\sf\@title}

\hspace*{-3pt}{\large\it 2. Category}

\hspace*{60pt}\vspace*{8pt}\vbox to 12pt{\normalsize\@Categoryname}

\vspace*{-3pt}\hspace*{-3pt}{\large\it 3. Principal Investigator}

% Print PI information
\makebox[0.10\textwidth][l]{\ Name:}%
\underline{\makebox[0.17\textwidth][c]{\@PIlastname}%
           \makebox[0.17\textwidth][c]{\@PIfirstname}%
           \makebox[0.05\textwidth][c]{\@PIinitial}\raisebox{-2pt}{}}
\makebox[0.10\textwidth][l]{Institute:}%
\underline{\makebox[0.4\textwidth][c]{\@PIinstitute}\raisebox{-2pt}{}}\\[3pt]
\makebox[0.17\textwidth][l]{E-mail Address:}%
\underline{\makebox[0.50\textwidth][c]{\@PIemail}\raisebox{-2pt}{}}\\[3pt]

} % end of \maketoppageone

% The Co-Is; use a picture environment to ensure fixed height
\newenvironment{investigators}%
{\vspace*{-19pt}\hspace*{-3pt}{\large\it 4. Co-Investigators}

\underline{\makebox[0.23\textwidth][l]{Name\raisebox{-2pt}{}}%
\makebox[0.29\textwidth][l]{Institute}%
\makebox[0.23\textwidth][l]{Name}%
\makebox[0.25\textwidth][l]{Institute}}

\begin{picture}(510,45)
\newcount\@CoIypos \@CoIypos=39
\newcount\@CoIxpos \@CoIxpos=0}{\end{picture}}

% Print a new Co-I; do first column (up to 4), then move onto second one
\newcommand{\CoI}[2]{
\ifnum\@CoIxpos<500
\put(\@CoIxpos,\@CoIypos){\makebox[0.23\textwidth][l]{#1}#2}\fi
\advance\@CoIypos by -13
\ifnum\@CoIypos<0 \@CoIypos=39\advance\@CoIxpos by 265\fi}

% Observing run information; have counter to tot up requested nights
% use a picture environment to ensure fixed height
\newenvironment{observingrun}{\vspace*{5pt}\hspace*{-3pt}%
{\large\it 5. Observing Run}

\underline{\makebox[0.15\textwidth][l]{Instrument}%
\makebox[0.1\textwidth]{\# Nights}%
\makebox[0.15\textwidth]{Moon}%
\makebox[0.22\textwidth][c]{Preferred Dates}%
\makebox[0.15\textwidth][c]{Mode}
\makebox[0.15\textwidth][c]{Central $\lambda$}}

\begin{picture}(510,53)
\newcount\@targetypos \@targetypos=45}%
{\end{picture}\vspace*{-8pt}}

% A new observing run...
\newcommand{\run}[6]{
\ifnum\@targetypos>0 %Only so many targets can be printed!
\put(0,\@targetypos){\large\makebox[0.15\textwidth][l]{#1}%
\makebox[0.1\textwidth]{#2}%
\makebox[0.15\textwidth]{#3}%
\makebox[0.22\textwidth]{#4}%
\makebox[0.15\textwidth]{#5}%
\makebox[0.15\textwidth]{#6}}\fi %
\advance\@targetypos by -15}

% Targets (plus finish up the bottom of page 1);
% use a picture environment to ensure fixed height
\newenvironment{targets}{\vspace*{9pt}\hspace*{-3pt}%
{\large\it 6. List of Fields}

\underline{\makebox[0.25\textwidth][l]{Target Name}%
\makebox[0.10\textwidth][l]{RA}%
\makebox[0.10\textwidth][l]{Dec}%
\makebox[0.11\textwidth][l]{Equinox}%
\makebox[0.13\textwidth][l]{Magnitude}%
\makebox[0.10\textwidth][l]{Number}%
\makebox[0.07\textwidth][l]{SN }%
\makebox[0.13\textwidth][l]{Exp (min)}}%

\begin{picture}(510,163)
\newcount\@targetypos \@targetypos=156}%
{\end{picture}\vspace*{-8pt}}

\newcommand{\target}[8]{
\ifnum\@targetypos>0 %Only so many targets can be printed!
\put(0,\@targetypos){\makebox[0.25\textwidth][l]{#1}%
\makebox[0.10\textwidth][l]{#2}%
\makebox[0.10\textwidth][l]{#3}%
\makebox[0.11\textwidth][l]{#4}%
\makebox[0.13\textwidth][l]{#5}%
\makebox[0.10\textwidth][l]{#6}%
\makebox[0.07\textwidth][l]{#7}%
\makebox[0.13\textwidth][l]{#8}}\fi
\advance\@targetypos by -13}

% Technical Information
\newenvironment{technicalinfo}%
{
\vspace*{-20pt}\hspace*{-3pt}{\large\it 7. Technical Justification 
and Instrumental Requirements}

\begin{picture}(1,1)\begin{minipage}[t]{\textwidth}\normalsize}%
{\end{minipage}\end{picture}}%

% Scheduling Information
\newenvironment{schedinfo}%
{
\vspace*{100pt}\hspace*{-3pt}{\large\it 8. Scheduling Requirements}

\begin{picture}(1,1)\begin{minipage}[t]{\textwidth}\normalsize}%
{\end{minipage}\end{picture}\eject}

% Scientific Justificatoin

\def\scienceobj{\begin{picture}(0,744)
\put(-9,0){\framebox(535,744){}}    % Whole Page Frame
\put(-9,748){\makebox{\small(FMOS Science Workshop 2003)}}
\put(525,-1){\makebox(0,0)[tr]{\footnotesize\it\@slug}}
\put(0,725){\makebox{\large\it 9. Scientific Background and Objective}}
\end{picture}
\vspace*{-720pt}\hspace*{-5pt}\normalsize
}

% Overall Strategy, and Required preparation
\newenvironment{preparation}%
{
\vspace*{0pt}\hspace*{-3pt}{\large\it 10. Overall Strategy and Required Preparation for FMOS Observation}

\begin{picture}(1,1)\begin{minipage}[t]{\textwidth}\normalsize}%
{\end{minipage}\end{picture}}

% And that's it!

% Some AASTeX goodies
\def\ion#1#2{#1$\;${\sc\@roman{#2}}\relax}
\def\lesssim{\mathrel{\hbox{\rlap{\hbox{\lower4pt\hbox{$\sim$}}}\hbox{$<$}}}}
\def\gtrsim{\mathrel{\hbox{\rlap{\hbox{\lower4pt\hbox{$\sim$}}}\hbox{$>$}}}}





