%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                   File: osajnl.sty                  %
%                     VERSION: 2.1                    %
%                  Date: June 22, 2006                %
%                                                     %
%                                                     %
%                                                     %
%              LaTeX style file for use with          %
%        the following OSA Journals: JOSA A, JOSA B,  %
%              Applied Optics, Optics Letters         %
%                                                     %
%    THIS FILE REPLACES osa2.sty and predecessors     %
%                                                     %
%     THIS FILE IS NOT COMPATIBLE WITH LATEX 2.09     %
%                                                     %
%                                                     %
%                   FOR LATEX 2E USE                  %
%         \documentclass[12pt]{article}               %
%         \usepackage{osajnl}                         %
%                                                     %
% (c) 2006 Optical Society of America                 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%\documentclass[osajnl,preprint,showpacs]{revtex4} %% REVTeX 4.0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\documentclass[12pt,letterpaper]{article}                  %% LaTeX 2e
%\usepackage{osajnl}

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{osajnl2}[2007/03/14 LaTeX package for submission to OSA's print journals]

%% packages
\usepackage{cite}
\RequirePackage{geometry}
\usepackage{color}
\usepackage{graphicx}


\geometry{letterpaper,nohead,margin=1in} %% uses geometry.sty
\parindent1em %% em tied to font
\parskip0pc
\linespread{1.2}
\pagestyle{plain}
\sloppy

%%Title page elements

\newcommand\OSAJNLtitle[1]{\Large \bf \noindent \begin{center} #1
\end{center}\rm \normalsize \vskip.125in }%

\newcommand\OSAJNLauthor[1]{\vskip.1in\noindent%
   \large  \begin{center} \textsf{#1} \end{center}\rm \vskip-.1in}

\newcommand\OSAJNLaddress[1]{\vskip3pt\noindent%
   \normalsize  \begin{center} \it #1 \end{center}\rm \vskip-.2in}

\newcommand\OSAJNLemail[1]{\vskip3pt\normalsize
   \begin{center}\it #1 \rm \end{center} \vskip-.25in}

\newcommand\homepage[1]{\vskip12pt\normalsize
    \begin{center}\it \textcolor{blue}{\underline{#1}} \end{center}\rm \vskip-.2in}

\newcommand\ocis[1]{\vskip-1pc \hskip3pc {\normalsize\it OCIS codes: \rm #1 \hfill}\vskip1pc}

\renewenvironment{abstract}%%
{\vskip2.75pc\noindent\begin{center}\begin{minipage}{5.5in} \parindent.2in
   \noindent \rm}{\hskip.07in \copyright \hskip.05in \number\year \hskip.05in
   Optical Society of America \\ \hfil \end{minipage}\end{center}}

\newenvironment{abstract*}%%
{\vskip2.75pc\noindent\hskip.3in\begin{minipage}{5.5in} \parindent.2in
   \noindent \rm}{\hfil \end{minipage}\vskip.25in}

\let\title\OSAJNLtitle
\let\author\OSAJNLauthor
\let\affil\OSAJNLaddress
\let\address\OSAJNLaddress
\let\email\OSAJNLemail
\let\pacs\ocis



%%Various customizations

\renewcommand\maketitle{\vskip0pt} %%deactivates \maketitle in LaTeX
\def\affiliation{\address}
\def\onlinecite{\citeonline}
%Fig. and Table Labels

\renewcommand\figurename{Fig.}
\def\fps@table{h}%\def\fps@table{!htbp}
\renewcommand\tablename{Table}

%% New caption command
\newcommand\@MaxCapWidth{5.5in}
\setlength\belowcaptionskip{.2in}
\setlength\abovecaptionskip{.4in}
\long\def\@makecaption#1#2{%
  \normalsize
  \vskip\abovecaptionskip
  \sbox\@tempboxa{#1. #2}%
  \ifdim \wd\@tempboxa >\@MaxCapWidth
    \hskip.5in\parbox{5.5in}{#1. #2}
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip\normalsize}

%%References

\renewcommand\refname{\normalsize References \rm}
\setlength\bibindent{.2in}
\renewenvironment{thebibliography}[1]
     {\section*{\refname
        \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}}%
      \list{\@arabic\c@enumiv .}
           {\settowidth\labelwidth{.25in}%
            \leftmargin\labelwidth
  \setlength{\parsep}{0pc}
  \setlength{\labelsep}{0.5em}
  \setlength{\itemsep}{0.05pc}%{-0.06in}
  \setlength{\listparindent}{0in}
  \setlength{\itemindent}{0in}
  \setlength{\leftmargin}{.2in}
  \setlength{\rightmargin}{0in}
            \advance\leftmargin\labelsep
            \@openbib@code
            \usecounter{enumiv}%
            \let\p@enumiv\@empty
            \renewcommand\theenumiv{\@arabic\c@enumiv}}%
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m \normalsize}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist \vskip.2in}
\let\@openbib@code\@empty
\newcommand\OSAJNLReferences{\thebibliography{}}
\newcommand\OSAJNLReflinks{\thebibliography{}}
\newcommand\References{\thebibliography{}}
\newcommand\references{\thebibliography{}}
\let\endOSAJNLReferences\endthebibliography
\let\endOSAJNLlinks\endthebibliography
\let\endReferences\endthebibliography

%%Section parameters
\renewcommand\@seccntformat[1]{\csname the#1\endcsname.\quad }
\renewcommand\thesubsection{\thesection.\Alph{subsection}}
\renewcommand\thesubsubsection{\thesubsection.\arabic{subsubsection}}

\renewcommand\section{\@startsection {section}{1}{0pt}%
                                   {-2.5ex plus -1ex minus -.2ex}%
                                   {1.3ex plus .2ex}%
                                   {\normalsize\bfseries}}
\renewcommand\subsection{\@startsection{subsection}{2}{0pt}%
                                     {-2.25ex plus -1ex minus -.2ex}%
                                     {1ex plus .2ex}%
                                     {\normalsize\itshape}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{0pt}%
                                     {-2.25ex plus -1ex minus -.2ex}%
                                     {1ex plus .2ex}%
                                     {\small\upshape}}

\frenchspacing

\hyphenation {ac-cord-ing
           allow
           back-scat-ter
           back-scat-te-ring
           back-scat-tered
           scat-te-ring
           Based based
           cases
           cen-tered
           changed
           co-incide
           con-cerning
           con-ven-tional
           de-creased
           de-po-lar-iz-ation
           de-tector de-tectors
           de-vi-ation
           dis-cussion
           dis-tribu-tion
           dis-tribu-tions
           dis-trib-ute
           dis-trib-uted
           Ehhalt
           extinc-tion
           found
           Geest-hacht
           ground
           Hink-ley
           il-lus-trated
           il-lus-trate
           Intro-ducing
           Klap-heck
           lati-tude
           measure-ment
           measure-ments
           meas-ured
           measuring
           mixing
           north-east
           orig-inated
           op-er-ating
           out-flow
           pres-ence
           primary
           rather
           rela-tive
           sig-nal
           sig-nals
           solid
           tem-pera-ture
           Tem-pera-ture
           trans-ported
           tropo-pause
           Tropo-pause
           tropo-sphere
           Tropo-sphere
           tube
           tubes
           Values
           varies
           Weather}

\def\opex{ Opt.\ Express }
\def\ao{ Appl.\  Opt.\ }
\def\ap{ Appl.\  Phys.\ }
\def\apa{ Appl.\  Phys.\ A }
\def\apb{ Appl.\  Phys.\ B }
\def\apl{ Appl.\ Phys.\ Lett.\ }
\def\apj{ Astrophys.\ J.\ }
\def\bell{ Bell Syst.\ Tech.\ J.\ }
\def\jqe{ IEEE J.\ Quantum Electron.\ }
\def\assp{ IEEE Trans.\ Acoust.\ Speech Signal Process.\ }
\def\aprop{ IEEE Trans.\ Antennas Propag.\ }
\def\mtt{ IEEE Trans.\ Microwave Theory Tech.\ }
\def\iovs{ Invest.\ Ophthalmol.\ Visual\ Sci.\ }
\def\jcp{ J.\ Chem.\ Phys.\ }
\def\jmo{ J.\ Mod.\ Opt.\ }
\def\jon{J.\ Opt.\ Netw.\ }
\def\josa{ J.\ Opt.\ Soc.\ Am.\ }
\def\josaa{ J.\ Opt.\ Soc.\ Am.\ A }
\def\josab{ J.\ Opt.\ Soc.\ Am.\ B }
\def\jpp{ J.\ Phys.\ (Paris) }
\def\nat{ Nature (London) }
\def\oc{ Opt.\ Commun.\ }
\def\ol{ Opt.\ Lett.\ }
\def\pl{ Phys.\ Lett.\ }
\def\pra{ Phys.\ Rev.\ A }
\def\prb{ Phys.\ Rev.\ B }
\def\prc{ Phys.\ Rev.\ C }
\def\prd{ Phys.\ Rev.\ D }
\def\pre{ Phys.\ Rev.\ E }
\def\prl{ Phys.\ Rev.\ Lett.\ }
\def\rmp{ Rev.\ Mod.\ Phys.\ }
\def\pspie{ Proc.\ SPIE\ }
\def\sjqe{ Sov.\ J.\ Quantum Electron.\ }
\def\vr{ Vision Res.\ }
\def\cleo{ {\it Conference on Lasers and Electro-Optics }}
\def\assl{ {\it Advanced Solid State Lasers }}
\def\tops{ Trends in Optics and Photonics }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Option: copyedit
%% Adds space in between lines and in margins
%% for traditional copyediting
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\DeclareOption{copyedit}{%
\linespread{2.2}
\geometry{letterpaper,hcentering,nohead,right=1.25in,left=1.25in} %% uses geometry.sty
}%
\ProcessOptions\relax

%% end osajnl.sty
