summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/osa/optics_letters/mac/OL.sty
blob: a60cd720cf75d7c73c4a4dda18c39c8cc410bec6 (plain)
1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                File: OL.sty                         %
%                    VERSION: 1.1                     %
%               Date: May 15, 2004 [sdinee]           %
%                                                     %
%    For assistance, contact Joseph Richardson,       %
%    jricha@osa.org                                   %
%                                                     %
%               LaTeX style file for                  %
%        length check and submission of OSA           %
%              Optics Letters manuscripts             %
%                                                     %
%                                                     %
% \documentclass[10pt,letterpaper,twocolumn]{article} %
% \usepackage{OL}                                     %
%                                                     %
% (c) 2004 Optical Society of America                 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{ol}[2004/05/15 LaTeX package for length check of OSA Optics Letters MSS]

\usepackage{overcite}
\usepackage{fix2col}
\usepackage{color}
\usepackage{geometry}

\ifx\pdfoutput\undefined
\usepackage{graphicx}
\else
\usepackage[pdftex]{graphicx}
\fi

%%Page layout

\geometry{margin=1in}
\parindent1em
\parskip0pc
\linespread{1.7} %%essential for production
\sloppy


%%Title page elements

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

\newcommand\OSAJNLauthor[1]{\vskip6pt\centering \parbox{5in}{ \noindent% 
   \normalsize \bf \begin{center} #1 \end{center}\rm } \vskip2pt }

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

\newcommand\OSAJNLemail[1]{\vskip-1pt \parskip0pc\centering % 
   \parbox{5in}{\begin{center}\it #1 \rm \end{center} } \normalsize  \vskip-.2cm
   \PackageError{OL.sty}{\protect\email\space not used in Optics Letters front matter and can throw off length estimate}{If essential to give URL for affiliation, place at the back, after acknowledgments and before references.}
}%

\newcommand\homepage[1]{\vskip-1pt \parskip0pc\hskip.6in  %% CHANGE 8-3-99
   \parbox{4.25in}{\begin{center}\it \underline{#1} \rm \end{center} } \normalsize\vskip-.2cm 
}%

\newcommand\ocis[1]{\vskip-4pc \begin{center}\parbox{.8\textwidth}{\it OCIS codes: \ \rm #1 \hfill} \end{center}\vskip3pt}%

\renewenvironment{abstract}%%  
{\vskip2pc\noindent\centering\begin{minipage}{5.5in} \parindent.2in
   \noindent \rm}{\hskip.07in \copyright \hskip.05in \number\year \hskip.05in
   Optical Society of America \\ \hfil \end{minipage}\vskip-1pc}
   
\newenvironment{eqnfloat*}%%  
{}{}


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

%%Various customizations

\renewcommand\maketitle{} %%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}

% Captions
\long\gdef\@makecaption#1#2{%
  \vskip\abovecaptionskip
  \sbox\@tempboxa{#1. #2}%
  \ifdim \wd\@tempboxa >\hsize
    #1. #2\par
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}

%% New (more liberal than the default) float commands 5/12/2003 sdinee
\renewcommand{\topfraction}{.85}
\renewcommand{\bottomfraction}{.7}
\renewcommand{\textfraction}{.15}
\renewcommand{\floatpagefraction}{.66}
\renewcommand{\dbltopfraction}{.66}
\renewcommand{\dblfloatpagefraction}{.66}
\setcounter{topnumber}{9}
\setcounter{bottomnumber}{9}
\setcounter{totalnumber}{20}
\setcounter{dbltopnumber}{9}
\sloppy

%%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{}}
\let\endOSAJNLReferences\endthebibliography
\let\endOSAJNLlinks\endthebibliography
\let\endReferences\endthebibliography

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

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

\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 } 

\DeclareOption{twocolumn}{%
\linespread{1}\twocolumn %%essential for production
\geometry{letterpaper,hcentering,height=55pc,top=3.65pc,bottom=.75in,left=.75in,right=.75in}
\columnsep1.5pc
\parindent1em
\parskip0pc
\flushbottom

\renewcommand\author[1]{\noindent% 
   \normalsize \bf \begin{center} #1 \end{center}\rm \vskip-1pc}

\renewcommand\address[1]{\noindent% 
   \small  \begin{center} \it #1 \end{center}\rm \normalsize \vskip-.3pc}

\renewcommand\email[1]{\vskip-.6pc\noindent% 
   \small  \begin{center} \it #1 \end{center}\rm \normalsize \vskip-.3pc}

\renewcommand\homepage[1]{\noindent% 
   \small  \begin{center} \it #1 \end{center}\rm \normalsize \vskip-.3pc}

\renewcommand\ocis[1]{\vskip-.185in \hskip5pc {\footnotesize\it OCIS codes: \ \rm #1 \hfill} \normalsize\hskip1em\vskip2pc}

\renewenvironment{abstract}%%  
{\noindent\begin{center}{\footnotesize Compiled \today} \vskip4pt \begin{minipage}{34.25pc} \parindent.2in
   \noindent \footnotesize \rm}{\hskip.07in \copyright \hskip6pt \number\year \hskip.05in
   Optical Society of America \\ \hfil \end{minipage}\end{center}}


\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 \small}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist \vskip.2in}
\let\@openbib@code\@empty
\renewcommand\OSAJNLReferences{\thebibliography{}}
\renewcommand\OSAJNLReflinks{\thebibliography{}}
\renewcommand\References{\thebibliography{}}
\let\endOSAJNLReferences\endthebibliography
\let\endOSAJNLlinks\endthebibliography
\let\endReferences\endthebibliography

%% Code for floating math suggested by David Carlisle on comp.text.tex.

%\section{Floating Maths}
%
%  \begin{macro}{\fps@eqnfloat}
% Float to top or a page float. In fact probably only the star form of
% this environment will be used (and that can not do |b| or |h| due to
% a general restriction on double floats.) Also add |!| so that this
% type of float is less likely to float far away, which might cause
% it to be out of sequence with any non-floating numbered equations.
%    \begin{macrocode}
\def\fps@eqnfloat{!tp}
%    \end{macrocode}
%  \end{macro}
%
%  \begin{macro}{\ftype@eqnfloat}
% |figure| and |table| are 1 and 2 respectively, so make this type 4.
%    \begin{macrocode}
\def\ftype@eqnfloat{4}
%    \end{macrocode}
%  \end{macro}
%
%  \begin{environment}{eqnfloat}
%  \begin{environment}{eqnfloat*}
%  Nothing special here, Just call |\@float| or |\@dblfloat| as
%  appropriate.
%    \begin{macrocode}
\newenvironment{eqnfloat}
               {\@float{eqnfloat}}
               {\end@float}
%    \end{macrocode}
%
%    \begin{macrocode}
\renewenvironment{eqnfloat*}
               {\@dblfloat{eqnfloat}}
               {\end@dblfloat}
%    \end{macrocode}
%  \end{environment}
%  \end{environment}
}%

\ProcessOptions\relax
%% end OL.sty