%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                 %
%  JLAB Memo style, 09 Feb 1999, from:
%  CERN Memo style in LaTeX format                                %
%                                                                 %
%  Version 4.1  (July 4 1994 m.g.)                                %
%   Adapt to latex2e                                              %
%  Version 3.1  (Mar 26 1992 m.g.)                                %
%   Is now based on article sty                                   %
%  Version 2.1  (Oct 16 1991 m.g.)                                %
%   Introduce counters for section... (forgotten)                 %
%   Protect for NFSS (not newfont)                                %
%  Version 1.1  (Oct 16 1991 m.g.)                                %
%   Released Nov. 11th 1990                                       %
%                                                                 %
%  Last Mod. Jul  4 1994 10.30   m.g.                             %
%                                                                 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\def\fileversion{4.1}
\def\filedate{1999/02/09}
\def\docdate {1999/02/09}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{jlabmemo}[\filedate\space jlabmemo class]
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions
\LoadClass{article}
 
\typeout{Document Style `jlabmemo' 4.1  09 February 1999 (mg).}
%it uses the following info
%   \from{..}  printed in the FROM block
%   \to{..}    printed in the TO block
%   \copies{..}printed in the COPIES block
%   \subject{..}  printed in the SUBJECT block
%   \URL{..}  URL of document
%   \date{..}  if specified used in the date area, else the current date is used
%   \signature{..} printed after memo as your signature block
%   \begin{memo} follow this with your text
%   \end{memo}   follow your text with this
% You also need to use \begin{document} and \end{document}
% You can have multiple line from, to, subject and signature blocks, just
% separate the lines with \\
 
\headheight4mm  \headsep6mm \footskip8mm
\hoffset-5mm\voffset-5mm
\marginparwidth 0pt \oddsidemargin  0pt \evensidemargin  0pt
\marginparsep 0pt \topmargin   0pt \textwidth7.0in \textheight9in
 
\raggedbottom
 
\parskip .4em \parindent 0pt \topsep .4em \partopsep 0pt
 
\def\section{\@startsection {section}{1}{\z@}{-1.5ex plus-1ex minus
    -.2ex}{1.5ex plus.2ex}{\reset@font\Large\bf}}
\def\subsection{\@startsection{subsection}{2}{\z@}{-1.5ex  plus-1ex
    minus-.2ex}{1.5ex plus.2ex}{\reset@font\large\bf}}
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-1.5ex  plus
 -1ex minus-.2ex}{1.5ex plus.2ex}{\reset@font\normalsize\bf}}
\def\paragraph{\@startsection
     {paragraph}{4}{\z@}{1.5ex  plus1ex minus.2ex}{-1em}{\reset@font
     \normalsize\bf}}
\def\subparagraph{\@startsection
     {subparagraph}{4}{\parindent}{1.5ex  plus1ex minus
     .2ex}{-1em}{\reset@font\normalsize\bf}}
 
\def\today{\ifx\@empty\printdate\number\day\space\ifcase\month\or
 January\or February\or March\or April\or May\or June\or
 July\or August\or September\or October\or November\or December\fi
 \space\number\year
\else \printdate\fi}
 
\def\stopbreaks{\interlinepenalty \@M
 \def\par{\@@par\nobreak}\let\\=\@nobreakcr
 \let\vspace\@nobreakvspace}
\def\@nobreakvspace{\@ifstar{\@nobreakvspacex}{\@nobreakvspacex}}
\def\@nobreakvspacex#1{\ifvmode\nobreak\vskip #1\relax\else
 \@bsphack\vadjust{\nobreak\vskip #1}\@esphack\fi}
\def\@nobreakcr{\vadjust{\penalty\@M}\@ifstar{\@xnewline}{\@xnewline}}
\def\startbreaks{\let\\=\@normalcr
 \interlinepenalty 200\def\par{\@@par\penalty 200}}
\def\signature#1{\def\fromsig{#1}}
\def\fromsig{}
\def\subject#1{\def\printsubj{#1}}\def\printsubj{}
\def\from#1{\def\printfrom{#1}}\def\printfrom{}
\def\URL#1{\def\@URL{\texttt{#1}}}
\def\date#1{\def\printdate{#1}}\def\printdate{}
\def\to#1{\def\printto{#1}}\def\printto{}
\def\copies#1{\def\printcop{#1}}\def\printcop{}
\def\refmem#1{\def\printref{#1}}\def\printref{}
 
\def\ps@headings{%
\def\@oddhead{\sl\printsubj\hfil\today\hfil Page \thepage}
\def\@oddfoot{}}
\ps@headings
 
\def\opening{\thispagestyle{empty}
%%%%%%%%%%%% Font definitions (NFSS) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\Tit}{\fontfamily{cmr}\fontseries{bx}\fontshape{n}\fontsize{25}{30pt}\selectfont}%
\begin{center}
\mbox{}\\[-13mm]
\parbox{\textwidth}{Ref: \printref \hfill  Date: \today}\\[1mm]
\@ifundefined{@URL}{\vspace*{2mm}}%
                   {\parbox{\textwidth}{URL:\ \@URL\hfil}\\[3mm]}
{\Tit MEMORANDUM}
\end{center}
\ifx\printcop\empty
\begin{list}{}{\settowidth{\labelwidth}{\bf\quad Subject/Sujet:\quad }
  \setlength{\leftmargin}{\labelwidth}% set global width
  \parsep 2\p@ \itemsep\parsep\topsep 4\p@ plus2\p@ minus2\p@
  \renewcommand{\makelabel}[1]{\bf\hskip2mm##1\hfill:\ }}
\item[From]\printfrom
\item[To]\printto
\item[Subject]\printsubj
\end{list}
\else
\begin{list}{}{\settowidth{\labelwidth}{\bf\quad Subject/Sujet:\quad }
  \setlength{\leftmargin}{\labelwidth}% set global width
  \parsep 2\p@ \itemsep\parsep\topsep 4\p@ plus2\p@ minus2\p@
  \renewcommand{\makelabel}[1]{\bf\hskip2mm##1\hfill:\ }}
\item[From]\printfrom
\item[To]\printto
\item[Subject]\printsubj
\item[Copies]\printcop
\end{list}
\fi
\rule{\textwidth}{0.4pt}
%\vspace{\parskip}
\par\nobreak}
 
\long\def\closing{\par\nobreak\vspace{6\parskip}
 \stopbreaks
 \par}
 
\def\ps{\par\startbreaks}
\def\cc#1{\par\noindent
\parbox[t]{\textwidth}{\@hangfrom{\rm cc: }\ignorespaces #1\strut}\par}
\def\encl#1{\par\noindent
\parbox[t]{\textwidth}{\@hangfrom{\rm encl: }\ignorespaces #1\strut}\par}
\def\stopmemo{}
 
\long\def\memo{\newpage
 \c@page\@ne
 \interlinepenalty=200 \opening}
\def\endmemo{\closing\stopmemo\@@par\pagebreak\@@par
 \if@filesw
 \begingroup
 \def\protect{\string}
 \let\\=\relax
 \def\protect##1{\string##1\space}
 \endgroup
 \fi}
 
\endinput
