%
% This is a LaTeX style file to prepare CSO proposals - P. Schilke
% adapted from the IRAM style file - R. Lucas
% Last modified 4/28/11 DCL
% 2013-02-12, 2013-03-29 sradford
%
% modifications to the standard LaTeX styles
\textheight 255mm
%\textheight 275mm
\textwidth 186 mm
\oddsidemargin -13mm
\evensidemargin -13mm
\marginparwidth 50pt
\topmargin -26mm
\brokenpenalty=10000
\sloppy
%
% Some commands taken from A&A and elsewhere...
%
\newcommand {\msun}{\mbox{M$_\odot$}}
\newcommand {\sun}{\odot}
\newcommand {\kms}{\mbox{km~s$^{-1}$}}
\newcommand {\micron}{\mbox{$\mu$m}}
\newcommand{\twelveco}{\mbox{$^{12}$CO}} 
\newcommand{\thirteenco}{\mbox{$^{13}$CO}}
\newcommand{\htwo}{\mbox{H$_2$}}
\newcommand{\htwoo}{\mbox{H$_2$O}}
\newcommand{\htwos}{\mbox{H$_2$S}}
\newcommand{\hcoplus}{\mbox{HCO$^+$}}
\newcommand{\sotwo}{\mbox{SO$_2$}}%\put(108,152){  proposal number(s):}\put(144,151) {\ldots}
%\if@noblank\if@continue\put(144,152){\@continuen}\fi\fi

\newcommand{\etal}{{\it et~al.\/}}
\pagestyle{headings}
%
% Table of contents : redefine box size for numbers (default is too small)
\def\l@subsection{\@dottedtocline{2}{1.5em}{4.3em}}
\def\l@subsubsection{\@dottedtocline{3}{3.8em}{6.2em}}
\def\l@paragraph{\@dottedtocline{4}{7.0em}{8.1em}}
\def\l@subparagraph{\@dottedtocline{5}{10em}{10em}}
%
% \list parameters have been adjusted in the `thebibliography'
% environment to the match A&A layout of References.
\def\thebibliography#1{\section*{References\markboth
 {REFERENCES}{REFERENCES}}\list
% The \arabic{enumi} command has been removed because we don't use
% numbered citations in astronomical journals.
 {}{\setlength\labelwidth{1.4em}\leftmargin\labelwidth
 \setlength\parsep{0pt}\setlength\itemsep{0pt}
 \setlength{\itemindent}{-\leftmargin}
 \usecounter{enumi}}
 \def\newblock{\hskip .11em plus .33em minus -.07em}
 \sloppy
 \sfcode`\.=1000\relax}
\let\endthebibliography=\endlist
%
%\newenvironment{captions}
\def \captions    {\newcounter{fign}\section*{Figure Captions}
        \begin{list}{\bf Fig. \Arabic{fign}.}
        {\usecounter{fign}\setlength{\leftmargin}{0mm}
        \setlength{\itemindent}{0mm}}
        \small}
\def \endcaptions    {\end{list}\normalsize}
%
% Redefine \@cite so no square brackets are output.
% Redefine \@biblabel so the label is not output in the bibliography.
\def\@cite#1#2{{#1\if@tempswa , #2\fi}}
\def\@biblabel#1{}
% \vx reserves a fixed vertical space #1
    \def \vx#1{\rule[-#1]{0mm}{#1}}
% no page headings or numbers whatsoever
    \pagestyle{empty}
%
% Specific commands
%
% \blank will produce the proposal form.
%
\newif\if@noblank\@noblanktrue \def \blank{\@noblankfalse}
%
\def\full{~\raisebox{1mm}{\circle*{3.5}}}
%\def\checkoff{~\raisebox{1mm}{\circle{3.5}}}
%\def\checkon{\if@noblank\full\else\checkoff\fi}
\def\checkoff{$\bigcirc$}
\def\checkon{\if@noblank$\bigotimes$\else\checkoff\fi}
\def\check#1{#1\checkon\else\checkoff\fi}
\def\nocheck#1{#1\checkoff\else\checkon\fi}
%
%\newif\if@semesterone \@semesteronefalse\def\semesterone{\@semesteronetrue}
%\newif\if@semestertwo \@semestertwofalse\def\semestertwo{\@semestertwotrue}
%
\def\@propyear{}
\def\@propmonth{}
\def\propdate#1#2{\gdef\@propyear{#1}\gdef\@propmonth{#2}}
%
%\newif\if@singledish \@singledishfalse\def\singledish{\@singledishtrue}
%\newif\if@interferometer \@interferometerfalse\def\interferometer{\@interferometertrue}
\newif\if@exgalcont \@exgalcontfalse\def\exgalcont{\@exgalconttrue}
\newif\if@exgalco \@exgalcofalse\def\exgalco{\@exgalcotrue}
\newif\if@exgalother \@exgalotherfalse\def\exgalother{\@exgalothertrue}
\newif\if@plancont \@plancontfalse\def\plancont{\@planconttrue}
\newif\if@planline \@planlinefalse\def\planline{\@planlinetrue}
\newif\if@galcont \@galcontfalse\def\galcont{\@galconttrue}
\newif\if@gallines \@gallinesfalse\def\gallines{\@gallinestrue}
\newif\if@galcloud \@galcloudfalse\def\galcloud{\@galcloudtrue}
\newif\if@galcse \@galcsefalse\def\galcse{\@galcsetrue}
\newif\if@galyse \@galysefalse\def\galyse{\@galysetrue}
\newif\if@galcloud \@galcloudfalse\def\galcloud{\@galcloudtrue}
\newif\if@galchem \@galchemfalse\def\galchem{\@galchemtrue}
\newif\if@galother \@galotherfalse\def\galother{\@galothertrue}
%
\def\first#1{\gdef\@first{#1}}
\def\others#1{\gdef\@others{#1}}
\def\sourcelist#1{\gdef\@sourcelist{#1}}
\def\abstract#1{\gdef\@abstract{#1}}
\newif\if@resubmit \@resubmitfalse
\def\resubmit#1{\@resubmittrue\gdef\@resubmitn{#1}}
\newif\if@continue \@continuefalse
\def\continue#1{\@continuetrue\gdef\@continuen{#1}}
\newif\if@publications \@publicationsfalse
\def\publications{\@publicationstrue}
%
%
\newif\if@firsthalf \@firsthalffalse\def\firsthalf{\@firsthalftrue}
\newif\if@secondhalf \@secondhalffalse\def\secondhalf{\@secondhalftrue}
\newif\if@fullnights \@fullnightsfalse\def\fullnights{\@fullnightstrue}
%
%
\def\@nights{}
\def\nights#1{\gdef\@nights{#1}}
\def\@lstaa{}\def\@lstab{}\def\@lstac{}
\def\@lstba{}\def\@lstbb{}\def\@lstbc{}
\def\lsta#1#2#3{\gdef\@lstaa{#1}\gdef\@lstab{#2}\gdef\@lstac{#3}}
\def\lstb#1#2#3{\gdef\@lstba{#1}\gdef\@lstbb{#2}\gdef\@lstbc{#3}}
%\def\@totalnightsa{}
%\def\@totalnightsb{}
%\def\totalnights#1#2{\gdef\@totalnightsa{#1}\gdef\@totalnightsb{#2}}
\def\specials#1{\gdef\@specials{#1}}\def\@specials{}
\def\frequenciesone#1{\gdef\@frequenciesone{#1}}\def\@frequenciesone{}
\def\frequenciestwo#1{\gdef\@frequenciestwo{#1}}\def\@frequenciestwo{}
%
\def\abstract#1{\gdef\@abstract{#1}}\def\@abstract{}
\def\observer#1{\gdef\@observer{#1}}\def\@observer{}
%\def\reducer#1{\gdef\@reducer{#1}}\def\@reducer{}
%
\newif\if@twothirty \@twothirtyfalse\def\twothirty{\@twothirtytrue}
\newif\if@threefourtyfive \@threefourtyfivefalse\def\threefourtyfive{\@threefourtyfivetrue}
\newif\if@fourninety \@fourninetyfalse\def\fourninety{\@fourninetytrue}
\newif\if@sixfifty \@sixfiftyfalse\def\sixfifty{\@sixfiftytrue}
\newif\if@eightfifty \@eightfiftyfalse\def\eightfifty{\@eightfiftytrue}
\newif\if@thirteenhundred \@thirteenhundredfalse\def\thirteenhundred{\@thirteenhundredtrue}
\newif\if@camerafourfifty \@camerafourfiftyfalse\def\camerafourfifty{\@camerafourfiftytrue}
\newif\if@camerathreefifty \@camerathreefiftyfalse\def\camerathreefifty{\@camerathreefiftytrue}
\newif\if@fts \@ftsfalse\def\fts{\@ftstrue}
%\newif\if@champ \@champfalse\def\champ{\@champtrue}
\newif\if@barney \@barneyfalse\def\barney{\@barneytrue}
%\newif\if@zrex \@zrexfalse\def\zrex{\@zrextrue}
\newif\if@sharp \@sharpfalse\def\sharp{\@sharptrue}
\newif\if@otherinstr \@otherinstrfalse\def\otherinstr{\@otherinstrtrue}
\newif\if@bolocamone \@bolocamonefalse\def\bolocamone{\@bolocamonetrue}
%\newif\if@bolocamtwo \@bolocamtwofalse\def\bolocamtwo{\@bolocamtwotrue}
\newif\if@confdone \@confdonefalse\def\confdone{\@confdonetrue}
\newif\if@confdtwo \@confdtwofalse\def\confdtwo{\@confdtwotrue}
\newif\if@confdthree \@confdthreefalse\def\confdthree{\@confdthreetrue}
\newif\if@confcone \@confconefalse\def\confcone{\@confconetrue}
\newif\if@confctwo \@confctwofalse\def\confctwo{\@confctwotrue}
\newif\if@confcthree \@confcthreefalse\def\confcthree{\@confcthreetrue}
\newif\if@confbone \@confbonefalse\def\confbone{\@confbonetrue}
\newif\if@confbtwo \@confbtwofalse\def\confbtwo{\@confbtwotrue}
\newif\if@confbthree \@confbthreefalse\def\confbthree{\@confbthreetrue}
%
\def\position#1{\gdef\@position{#1}}\def\@position{}
\def\structuresize#1{\gdef\@structuresize{#1}}\def\@structuresize{}
\def\continuumflux#1{\gdef\@continuumflux{#1}}\def\@continuumflux{}
\def\continuumsize#1{\gdef\@continuumsize{#1}}\def\@continuumsize{}
\def\continuumfreq#1{\gdef\@continuumfreq{#1}}\def\@continuumfreq{}
\def\contamination#1{\gdef\@contamination{#1}}\def\@contamination{}
\def\avoidfreq#1{\gdef\@avoidfreq{#1}}\def\@avoidfreq{}
\def\bandres#1{\gdef\@bandres{#1}}\def\@bandres{}
\def\linezerowidth#1{\gdef\@linezerowidth{#1}}\def\@linezerowidth{}
\def\numberlines#1{\gdef\@numberlines{#1}}\def\@numberlines{}
\def\linefreq#1{\gdef\@linefreq{#1}}\def\@linefreq{}
\def\linesize#1{\gdef\@linesize{#1}}\def\@linesize{}
\def\linestrength#1{\gdef\@linestrength{#1}}\def\@linestrength{}
\def\configuration#1{\gdef\@configuration{#1}}\def\@configuration{}
\def\observingtime#1{\gdef\@observingtime{#1}}\def\@observingtime{}
\def\baselinerange#1{\gdef\@baselinerange{#1}}\def\@baselinerange{}
\def\configlist#1{\gdef\@configlist{#1}}\def\@configlist{}
\def\hourangles#1{\gdef\@hourangles{#1}}\def\@hourangles{}
\def\hourangletime#1{\gdef\@hourangletime{#1}}\def\@hourangletime{}
\def\calibrators#1{\gdef\@calibrators{#1}}\def\@calibrators{}
\def\bandpass#1{\gdef\@bandpass{#1}}\def\@bandpass{}
\def\particulars#1{\gdef\@particulars{#1}}\def\@particulars{}
%
% Define title and authors format (\frontpage)
%
%
\def \frontpage {
\small
\setlength{\unitlength}{1mm}
\begin{picture}(195,255)(0,0)
%
\put(10,251){\Huge \bf Caltech Submillimeter Observatory}
%
\put(25,244){\large \bf PROPOSAL SUMMARY SHEET FOR TELESCOPE USE}
% Title box:
\thicklines\put(0,230){\framebox(182,12){}}
\thinlines
\put(3,239){{\bf TITLE:} {\em}}
\if@noblank
\put(92,235){\makebox(0,0){\parbox[t]{170mm}
{\begin{center}\large\bf\@title\end{center}}}}
\fi
%
% Semester:
%\put(0,225){{\bf Semester:}}
%\put(32,225){
%Feb. 1 -- Jul. 31 (deadline Oct. 31) \check{\if@semesterone} \quad
%\quad \quad \quad \quad
%Sep. 1 -- Jan. 31 (deadline May 31) \check{\if@semestertwo} }
%
% Proposal date
\put(0,225){{\bf Proposal Date:}\ \@propyear\ \@propmonth}
%
% Proposal type:
\put(0,220){{\bf Type:} 
%single dish \check{\iAf@singledish} \quad CSO/JCMT interferometer
%\check{\if@interferometer}}
}
\put(5,215) 
{extragalactic: continuum \check{\if@exgalcont} 
~~CO lines \check{\if@exgalco} 
~~other \check{\if@exgalother} }    
\put(120,215){planetary: continuum \check{\if@plancont}~~lines 
\check{\if@planline} }
%
\put(5,210){galactic: continuum \check{\if@galcont}
~~lines \check{\if@gallines} ~~circumstel. env. \check{\if@galcse}
~~YSOs \check{\if@galyse}
~~cloud structure \check{\if@galcloud} ~~chemistry \check{\if@galchem}
~~other \check{\if@galother} }
%
% Abstract box:
\thicklines\put(0,166){\framebox(183,40){}}
\thinlines
\put(3,203){\bf ABSTRACT:}
%\put(3,172){\em (max. 8 lines)}
\if@noblank
\put(7,200){\makebox(0,0)[tl]{\parbox[t]{170mm}{\@abstract}}}
\fi
% 
% Resubmission ?
\put(0,162){  Is this a resubmission of a previous proposal ?}
\put(81,162){  no \nocheck{\if@resubmit} }
\put(93,162){  yes \check{\if@resubmit} ;}
\put(108,162){  proposal number:}\put(139,161) {\ldots}
\if@noblank\if@resubmit\put(139,162){\@resubmitn}\fi \fi
%
% Continuation ?
\put(0,157){  Is this a continuation  of (a) previous proposal(s) ?}
\put(81,157){  no \nocheck{\if@continue} }
\put(93,157){  yes \check{\if@continue} ;}
\put(108,157){  proposal number(s):}\put(144,156) {\ldots}
\if@noblank\if@continue\put(144,157){\@continuen}\fi\fi
% List of publication ?
\put(0,152){ Have you attached a list of publications resulting from
  recent, prior CSO observations ?}
\put(140,152){  yes \check{\if@publications} }
\put(152,152){  no \nocheck{\if@publications} }
%
\put(0,150){\line(1,0){185}}
% Nights requested
\put(0,146){  {\bf Nights} requested for this period:}
\put(75,146){ first half \check{\if@firsthalf} ~second half \check{\if@secondhalf}
~full nights \check{\if@fullnights}
}
\thicklines
\if@noblank\put(55,144.55){\framebox(10,5){\bf \@nights} }
\else\put(55,144.55){\framebox(10,5){} }
\fi
\thinlines
%
\put(0,144){\line(1,0){185}}
%
%\put(0,138){  {\bf Number of nights} foreseen for full completion of this proposal:}
%\if@noblank\put(103,136.5){\framebox(10,5){\@totalnightsa}}
%\else\put(103,136.5){\framebox(10,5){ }}\fi
%\put(117,138){  of which}
%\if@noblank\put(136,136.5){\framebox(10,5){\@totalnightsb}}
%\else\put(136,136.5){\framebox(10,5){}}\fi
%\put(150,138){  were already allocated}
%
\put(0,134){\line(1,0){185}}
\put(0,130){  {\bf Special requirements:}}
\if@noblank\put(60,130){\@specials}\fi
\put(0,128){\line(1,0){185}}
%
% Receivers
\put(0,122) {  {\normalsize\bf Receivers:} 230~GHz \check{\if@twothirty}
~~345~GHz \check{\if@threefourtyfive} 
~~490~GHz \check{\if@fourninety}
~~650~GHz \check{\if@sixfifty}
~~850~GHz \check{\if@eightfifty}
~~Barney (345~GHz) \check{\if@barney}
%~~Z-Rex \check{\if@zrex}
}
\put(0,116) {  {\normalsize\bf SHARC\,II:} 
~450 \micron{} \check{\if@camerafourfifty}  
~~350 \micron{} \check{\if@camerathreefifty}  
~~SHARP \check{\if@sharp}
}
%\put(85,116) {{\normalsize\bf CHAMP:} \check{\if@champ} }
%\put(150,116) {{\normalsize\bf FTS:} \check{\if@fts} }
\put(90,116) {  {\normalsize\bf Bolocam:}
~1.1~mm \check{\if@bolocamone}  
%~~2.1~mm \check{\if@bolocamtwo}  
}
\put(160,116) {{\normalsize\bf Other:}
~\check{\if@otherinstr}
}
%
% Frequencies
\put(0,110){  \normalsize\bf Lines and frequencies (including redshifts):} 
%\put(95,109){\makebox(90,10)[b]{\dotfill} }
%\put(0,104){\makebox(185,10)[b]{\dotfill} } 
\if@noblank\put(96,110){\@frequenciesone}\fi
\if@noblank\put(1,105){\@frequenciestwo}\fi
%
% Source list
\thicklines
\put(0,16){\framebox(185,85) { } }
\thinlines
\put(92,16){\line(0,1){85}}
\put(2,91){{\normalsize \bf List of Objects} (give most common names)}
\put(2,87){with equatorial coordinates}
\put(2,19){(continue on separate sheet, if needed) }
\if@noblank\put(3,80){\makebox(0,0)[tl]{\parbox[t]{78mm}{\@sourcelist} } }\fi
%
% Investigators
\put(94,95) {{\bf Principal Investigator:}} 
\put(94,91) {name, institution, address, fax, e-mail:}
\if@noblank\put(94,88){\makebox(0,0)[tl]{\parbox[t]{80mm}{\@first}}} \fi
\put(94,57){{\bf Other Investigators} (name, institution):}
\if@noblank\put(94,54){\makebox(0,0)[tl]{\parbox[t]{80mm}{\@others}}}\fi
\put(94,28){\bf Expected observers (at least 2):}
\if@noblank\put(94,25){\makebox(0,0)[tl]{\parbox[t]{80mm}{\@observer}}}\fi
%
% begin dcl 5/3/05
%\put(0,12){\em Join to this form: {\bf scientific aims} ($\leq 2$ typed
%pages) and a {\bf complete list of full references} for publications}
%\put(0,7){\em resulting from prior CSO observations, on a separate page.}
\put(0,12){\em Attach to this form: {\bf scientific justification} 
($\leq 2$ typed pages). See the latest CSO Call for Proposals for a complete}
\put(0,7){\em list of additional required attachments.}
\put(158,7){form: 2013 March}
\end{picture}  }
%
%
\def\maketitle{
\if@noblank
\newpage\begin{center}{\Large\bf\@title}\end{center}
\fi}
