%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% jalc.sty  Vers. 2.1   01.04.2003  B. Reichel
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% used by: \documentclass{article}
%          \usepackage{jalc}
% the sty-files theorem, fleqn are already read.
% The layout of the pages is fixed! 11pt and 12pt are not possible.
% The commands 
%   \title{...}, \markboth{<author(s)>}{<runninghead>}, 
%   \abstract{...}, \keywords{...}; 
%   \author{...}, \address{...}, \email{...@...},
%    and for the 2nd and 3rd author, if exist,
%   \authorB{...}, \addressB{...}, \emailB{...@...}; 
%   \authorC{...}, \addressC{...}, \emailC{...@...}
%    are expected in the mainfile. 
%
% The following environments should be used: 
%    proof, proof* (with \Box and without \Box, respectively, at the end)
% The following theorem-environments without numbering are available:
%    theoremw, lemmaw, corollaryw, examplew, definitionw, remarkw
% Theorem-environments with numbering create by yourself with
%   the LaTeX-command \newtheorem   
% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Other Style-Files 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{latexsym,amssymb,amsmath,theorem,graphicx,url}
\input{fleqn.clo}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The layout of the pages 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\@twosidetrue
\textwidth130mm
\textheight190mm
\oddsidemargin1cm\evensidemargin1cm\topmargin1.5cm  % Draft
\headheight10pt
\headsep6.7mm
\pagestyle{myheadings}
\flushbottom    
\mathindent9mm
\parindent4mm
\sloppy
\arraycolsep0.15em
\renewcommand{\arraystretch}{1.2} 
\renewcommand{\topfraction}{0.9999}
\renewcommand{\textfraction}{0.0001}
\renewcommand{\bottomfraction}{0.9999}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% THEOREM-ENVIRONMENTS WITHOUT NUMBERING
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\theorembodyfont{\it}
\newtheorem{definitionw}{Definition}\renewcommand{\thedefinitionw}{\hspace*{-0.33em}}
\newtheorem{lemmaw}{Lemma}\renewcommand{\thelemmaw}{\hspace*{-0.33em}}
\newtheorem{theoremw}{Theorem}\renewcommand{\thetheoremw}{\hspace*{-0.33em}}
\newtheorem{corollaryw}{Corollary}\renewcommand{\thecorollaryw}{\hspace*{-0.33em}}
\newtheorem{claimw}{Claim}\renewcommand{\theclaimw}{\hspace*{-0.33em}}
\theorembodyfont{\rm}
\newtheorem{examplew}{Example}\renewcommand{\theexamplew}{\hspace*{-0.33em}}
\newtheorem{remarkw}{Remark}\renewcommand{\theremarkw}{\hspace*{-0.33em}}
\newtheorem{notew}{Note}\renewcommand{\thenotew}{\hspace*{-0.33em}}
\theorembodyfont{\it}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PROOF
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\proof{\rm \trivlist
 \item[\hskip \labelsep{\it{Proof.}\hspace*{0.3em}}]}
\def\endproof{{}\hspace*{\fill} $\Box$ \endtrivlist}
\@namedef{proof*}{\rm \trivlist
 \item[\hskip \labelsep{\it{Proof.}\hspace*{0.3em}}]}
\@namedef{endproof*}{\endtrivlist}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LISTS 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\leftmargini 25pt
\leftmarginii 22pt
\leftmarginiii 18.7pt
\leftmarginiv 17pt
\leftmarginv 10pt
\leftmarginvi 10pt
\leftmargin\leftmargini
\labelsep 5pt
\labelwidth\leftmargini\advance\labelwidth-\labelsep
\def\@listI{\leftmargin\leftmargini \parsep 2\p@ plus\p@ minus\p@ 
    \topsep 6\p@ plus1\p@ minus2\p@
    \itemsep 1\p@ plus\p@ minus0.5\p@}
\let\@listi\@listI
\@listi
\def\@listii{\leftmargin\leftmarginii
   \labelwidth\leftmarginii\advance\labelwidth-\labelsep
   \topsep 4\p@ plus2\p@ minus\p@
   \parsep 2\p@ plus\p@ minus\p@
   \itemsep 1\p@ plus\p@ minus0.5\p@}
\def\@listiii{\leftmargin\leftmarginiii
    \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
    \topsep 2\p@ plus\p@ minus\p@
    \parsep \z@ \partopsep \p@ plus\z@ minus\p@
    \itemsep 1\p@ plus\p@ minus0.5\p@}
\def\@listiv{\leftmargin\leftmarginiv
     \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
\def\@listv{\leftmargin\leftmarginv
     \labelwidth\leftmarginv\advance\labelwidth-\labelsep}
\def\@listvi{\leftmargin\leftmarginvi
     \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Algorithmusumgebung (wie figure und table)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcounter{algo}
\renewcommand\thealgo{\@arabic\c@algo}
\def\fps@algo{tbp}
\def\ftype@algo{2}
\def\ext@algo{lot}
\def\fnum@algo{\algoname~\thealgo}
\newenvironment{algo}
               {\@float{algo}}
               {\end@float}
\newenvironment{algo*}
               {\@dblfloat{algo}}
               {\end@dblfloat}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CAPTION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\fnum@algo{{\small Algorithm~\thealgo :}}
\def\fnum@figure{{\small Figure~\thefigure :}}
\def\fnum@table{{\small Table~\thetable :}}
\long\def\@makecaption#1#2{
 \vskip 10pt
 \setbox\@tempboxa\hbox{\small #1 #2}
 \ifdim \wd\@tempboxa >\hsize #1 #2\par \else \hbox
to\hsize{\hfil\box\@tempboxa\hfil}
 \fi}
\newcommand{\fnscaption}[1]{\caption{\protect\small{#1}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SECTIONS 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\section{\@startsection{section}{1}{\z@}%
{-3.5ex plus -1ex minus -.2ex}{2.3ex plus .2ex}{\normalsize\bf}}
\def\subsection{\@startsection{subsection}{2}{\z@}%
{-3.25ex plus -1ex minus -.2ex}{1.5ex plus .2ex}{\normalsize\it}}
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}%
{-3.25ex plus -1ex minus -.2ex}{1.5ex plus .2ex}{\normalsize\it}}
\def\@sect#1#2#3#4#5#6[#7]#8{\ifnum #2>\c@secnumdepth
     \let\@svsec\@empty\else
     \refstepcounter{#1}\edef\@svsec{\csname the#1\endcsname.\hskip 0.5em}\fi
     \@tempskipa #5\relax
      \ifdim \@tempskipa>\z@
        \begingroup #6\relax
          \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\par}%
        \endgroup
       \csname #1mark\endcsname{#7}\addcontentsline
         {toc}{#1}{\ifnum #2>\c@secnumdepth \else
                      \protect\numberline{\csname the#1\endcsname}\fi
                    #7}\else
        \def\@svsechd{#6\hskip #3\relax  
                   \@svsec #8\csname #1mark\endcsname
                      {#7}\addcontentsline
                           {toc}{#1}{\ifnum #2>\c@secnumdepth \else
                             \protect\numberline{\csname the#1\endcsname}\fi
                       #7}}\fi
     \@xsect{#5}}
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MAKETITLE  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newif\if@zweiautoren\@zweiautorenfalse
\newif\if@dreiautoren\@dreiautorenfalse
\newif\if@vierautoren\@vierautorenfalse
\newif\if@zusatz\@zusatzfalse
\newif\if@keywords\@keywordsfalse
\newif\if@emailB\@emailBfalse
\newif\if@emailC\@emailCfalse
\newif\if@emailD\@emailDfalse
\renewcommand{\maketitle}{\thispagestyle{empty}\par\noindent
 {\footnotesize Journal of Automata, Languages and Combinatorics 
  {\bf \@volume} (\@year) \@issue, \@pagerange\\[-0.7ex]
 \copyright{} Institut f\"ur Informatik, Justus-Liebig-Universit\"at Giessen}
 \vspace{10mm}\par\begin{center}\large\bf\@title\end{center}
 \vspace{5mm}\par\begin{center}\small{\sc\@author}\\[0.8mm]{\em\@address}\\
  {\em e-mail: {\tt \@email}}
 \if@zweiautoren
  \if@dreiautoren
    \if@vierautoren
     \vspace{5mm}\par{\sc\@authorB}\\[0.8mm]{\em\@addressB}
    \if@emailB 
      \\{\em e-mail: {\tt \@emailB}}
    \fi
     \vspace{5mm}\par{\sc\@authorC}\\[0.8mm]{\em\@addressC}
    \if@emailC 
      \\{\em e-mail: {\tt \@emailC}}
    \fi
     \vspace{3mm}\par and 
     \vspace{3mm}\par{\sc\@authorD}\\[0.8mm]{\em\@addressD}
    \if@emailD 
      \\{\em e-mail: {\tt \@emailD}}
    \fi
    \else
    \vspace{5mm}\par{\sc\@authorB}\\[0.8mm]{\em\@addressB}
    \if@emailB 
      \\{\em e-mail: {\tt \@emailB}}
    \fi
    \vspace{3mm}\par and 
    \vspace{3mm}\par{\sc\@authorC}\\[0.8mm]{\em\@addressC}
    \if@emailC 
      \\{\em e-mail: {\tt \@emailC}}
    \fi
    \fi
   \else
    \vspace{3mm}\par and
    \vspace{3mm}\par{\sc\@authorB}\\[0.8mm]{\em\@addressB}
    \if@emailB 
      \\{\em e-mail: {\tt \@emailB}}
    \fi
  \fi
 \fi
%
 \if@zusatz
    \vspace*{6mm}\par
    \@zusatz
 \fi    
%
 \end{center}\vspace{5mm}\par
{\footnotesize\baselineskip9pt\quotation
 \noindent\mbox{}\hfill ABSTRACT\hfill\mbox{}\\[0.8mm]
 \@abstract
 \if@keywords \vspace{1.5ex}\par\noindent
 {\em Keywords:\hspace*{0.25em}} \@keywords\fi\endquotation}}

% VARIABLES
\def\volume#1{\gdef\@volume{#1}}
\def\pagerange#1{\gdef\@pagerange{#1}}
\def\issue#1{\gdef\@issue{#1}}
\def\year#1{\gdef\@year{#1}}
\def\zusatz#1{\@zusatztrue\gdef\@zusatz{#1}}
\long\def\abstract#1{\gdef\@abstract{#1}}
\def\keywords#1{\@keywordstrue\gdef\@keywords{#1}}
\def\email#1{\gdef\@email{#1}}
\def\address#1{\gdef\@address{#1}}
\def\emailB#1{\@emailBtrue\gdef\@emailB{#1}}
\def\addressB#1{\gdef\@addressB{#1}}
\def\authorB#1{\@zweiautorentrue\gdef\@authorB{#1}}
\def\emailC#1{\@emailCtrue\gdef\@emailC{#1}}
\def\addressC#1{\gdef\@addressC{#1}}
\def\authorC#1{\@dreiautorentrue\gdef\@authorC{#1}}
\def\emailD#1{\@emailDtrue\gdef\@emailD{#1}}
\def\addressD#1{\gdef\@addressD{#1}}
\def\authorD#1{\@vierautorentrue\gdef\@authorD{#1}}
% 
\volume{u}\year{v}\issue{w}\pagerange{x--y}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% REFERENCES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\refname{References} 
\def\thebibliography#1{\section*{\refname\@mkboth
 {\uppercase{\refname}}{\uppercase{\refname}}}\list
 {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth
 \advance\leftmargin\labelsep
    \itemsep2.5pt plus1pt  minus1pt
 \usecounter{enumi}}
 \def\newblock{\hskip .11em plus .33em minus .07em}
 \sloppy\clubpenalty4000\widowpenalty4000
 \sfcode`\.=1000\relax}
\let\endthebibliography=\endlist
