% Nanotech.cls
% LaTeX2e class file for Nanotech proceedings
% Save as Nanotech.cls
% Please suggest changes to:
% bfr@nsti.org
% References style from IEEE magazine style

\typeout{Document Style Option `Nanotech' -- Ver. Sep. 7 2003}

% Load standard LaTeX article style
\LoadClass{article}

% Define printed area size, margins, etc.
\evensidemargin -1.04cm
\oddsidemargin -1.04cm
\topmargin -0.94cm
\headheight 0pt
\headsep 0pt
\footskip 0pt
%\textheight 23.5cm
\textheight 25cm
\textwidth 18cm
\columnsep 1cm
\columnseprule 0pt
\pagestyle{empty}

% Redefine \tiny to 6pt on 7pt spacing:
\def\tiny{\@setsize\tiny{7pt}\vipt\@vipt\let\@listi\@listI}

% Define style for title
\def\@titlefntext#1{\vskip 1em \parindent 1em #1}

\def\maketitle{\par
 \begingroup
 \let\@makefntext\@titlefntext
 \twocolumn[\@maketitle]
 \endgroup
 \let\maketitle\relax
 \let\@maketitle\relax
 \gdef\@title{}
 \gdef\@author{}
}

\def\@maketitle{
 \vbox to 1.75in{%
  \hsize\textwidth
  \linewidth\hsize
  %Adjust spacing between lines in title:
  \baselineskip 14 pt
  \vfil
  \centering
  {\Large\bf \@title}\par
  \vskip 1em
  {\normalsize \begin{tabular}[t]{c}
   \large \@author
  \end{tabular}} \par
  \vfil
 }
}

% Define style for keywords
\def\keywords#1{{\flushleft \boldmath $Keywords$\/}: \ignorespaces 
{#1}}

% Define styles for sections/subsections
\def\section{\@startsection {section}{1}{\z@}{2.5ex plus 1ex minus
 0.2ex}{1.7ex plus 0.2ex}{\centering \large \bf}}
\def\subsection{\@startsection{subsection}{2}{\z@}{2.25ex plus 1ex
 minus 0.2ex}{1.5ex plus .2ex}{\flushleft \large \bf}}

% change rubber space between figures/tables and text from 20pt to 10pt
\textfloatsep 10pt plus 2pt minus 4pt

% References, much help from APS' RevTex.sty, American Physical
% Society, 1991

\def\@cite#1#2{#1\if@tempswa, #2\fi}

\def\cite{%
 \@ifnextchar[{\@tempswatrue\@xcite}{\@tempswafalse\@xcite[]}
}

\def\@xcite[#1]#2{%
 \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
 [\@cite{\@collapse{#2}}{#1}]%
}%

\def\@stripdollars#1{%
 {% we use latex temps, therefore we group
 \edef\@tempd{#1}%
 \def\@tempa##1##2+@?{\def\@tempb{##1}\def\@tempc{##2}}%
  \expandafter\@tempa\@tempd+@?% tempb is first tok, tempc rest.
  \if$\@tempb%
   \def\@tempb##1${\def\@tempa{##1}}%
   \expandafter\@tempb\@tempc % now temp b is stripped stuff
   \@tempa%
  \else
   \@tempd%
  \fi
 }% end of grouping
}% end of def

\def\@collapse#1{%
 {% grouping to allow use of latex temps
 \sfcode`,=2000\relax
 \dimen0=\the\fontdimen2\textfont0\relax
 \xspaceskip = .6\dimen0 plus.3\dimen0 minus.3\dimen0\relax
 \let\@temp\relax
 \@tempcntb\@MM
 \def\@citea{}%
 \@for \@citeb:=#1\do{%
  \@ifundefined{b@\@citeb}%
   {\@temp\@citea{\bf ?}%
    \@tempcntb\@MM\def\@citea{,}\let\@temp\relax%
    \@warning{Citation `\@citeb ' on page \thepage\space undefined}%
   }% end of \@ifundefined #1 arg
   {\@tempcnta\@tempcntb \advance\@tempcnta\@ne
    \edef\MyTemp{\csname b@\@citeb\endcsname}%
    \def\@tempa{\@temptokena=\bgroup}% toss rest (non#) of footmark
    \if0A{\fi% hack to match brackets in \@collapse def
    \afterassignment\@tempa % non# part of cite goes into temp toks
    % NEXT LINE: curly opens in \@tempa, 0 default if non#
    \@tempcntb=0\MyTemp\relax}%
    \ifnum\@tempcntb=0\relax% non-# cite mark SHOULD NOT OCCUR-LDC
     \@tempcntb=\@MM
     \@citea\@stripdollars{\MyTemp}%
     \let\@temp = \relax
     \def\@citea{,}%
    \else % treating cite mark as #
     \edef\@tempd{\number\@tempcntb}%
     \ifnum\@tempcnta=\@tempcntb%
      \ifx\@temp\relax
       \edef\@temp{\@citea\@tempd}%
      \else%
       \edef\@temp{\hbox{]--[}\@tempd}%
      \fi%
     \else%
      \@temp\@citea\@tempd
      \let\@temp\relax
     \fi
    \def\@citea{], [}%
    \fi%
   }% end of @ifundefined #2 arg
  }% end of do loop
  \@temp % drop in last bit saved
 }% end of grouping to allow use of latex temps
}% end of \@collapse def


\def\thebibliography#1{
 \section*{REFERENCES}
 \list{{\normalsize[\arabic{enumi}]}}
      {\settowidth\labelwidth{[#1]}
       \leftmargin\labelwidth
       \advance\leftmargin\labelsep
       \usecounter{enumi}
       \partopsep 0pt
       \parsep 0pt
       \itemsep 0pt
      }
 \def\newblock{\hskip .11em plus .33em minus .07em}
 \sloppy
 \clubpenalty 4000
 \widowpenalty 4000
 \sfcode`\.=1000\relax
 \normalsize
 }

\def\endthebibliography{\normalsize\endlist}

% initializations
\parindent 0.5cm
\flushbottom
