%%
%% This is file `miller.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% miller.dtx  (with options: `package')
%% 
%%   miller package
%% 
%%   Copyright 2003, 2004 Harald Harders, Bj"orn Pedersen
%% 
%%   This program can be redistributed and/or modified under the terms
%%   of the LaTeX Project Public License Distributed from CTAN
%%   archives in directory macros/latex/base/lppl.txt; either
%%   version 1.3 of the License, or any later version.
%% 
%%   h.harders@tu-bs.de
%%   bjoern.pedersen@frm2.tum.de
%% 
\ProvidesPackage{miller}
  [2004/09/20 v1.2 print miller indices]
\newcommand*\millerskip{\,}
\newcommand*\millerminus{\overline}
\def\@millerno#1 #2\@empty{%
  \xdef\miller@secondarg{#2}%
  \ifx\@empty\miller@secondarg
    \@@@millerno#1#2\@empty\@empty\@empty
  \else
    \@@millerno#1 #2\@empty
  \fi
}%
\def\@checkminus#1#2\@empty{%
  \ifx-#1%
    \begingroup
    \edef\@tempa{#2}%
    \edef\@tempb{}%
    \ifx\@tempa\@tempb
      \PackageError{miller}{%
        \string\hkl\space command contains a single minus}{No entry of
        the \string\hkl\space command may consist only of a minus.}%
      #1%
    \else
      \millerminus{\vphantom{b}#2}%
    \fi
    \endgroup
  \else
    #1#2%
  \fi
}
\def\@@millerno#1 #2{%
  \ifx\@empty#2%
    \let\next\relax
  \else%
    \let\next\@@millerno
  \fi%
  \@checkminus#1\@empty
  \ifx\@empty#2\else\millerskip\fi
  \next #2%
}
\def\@@@millerno#1#2#3{%
  \ifx-#1
    \millerminus{\vphantom{b}#2}%
    \def\miller@nextarg{#3}%
    \ifx\@empty#3%
      \let\next\relax
      \@tempswafalse
      \ifx-#2 \@tempswatrue\fi
      \ifx\@empty#2 \@tempswatrue\fi
      \if@tempswa
        \PackageError{miller}{%
          Last character of \string\hkl\space command is a minus}{The
          last character may not be a minus.}%
      \fi
    \else%
      \let\next\@@@millerno
      \millerskip
    \fi%
  \else
    #1%
    \def\miller@nextarg{#2#3}%
    \ifx\@empty#2%
      \let\next\relax
      \ifx-#1
        \PackageError{miller}{%
          Last character of \string\hkl\space command is a minus}{The
          last character may not be a minus.}%
      \fi
    \else%
      \let\next\@@@millerno
      \millerskip
    \fi%
  \fi
  \expandafter\next\miller@nextarg
}
\def\hkleckig[#1]{\ensuremath{[\@millerno#1 \@empty]}}
\def\hklrund(#1){\ensuremath{(\@millerno#1 \@empty)}}
\def\hklspitz<#1>{\ensuremath{\langle\@millerno#1 \@empty\rangle}}
\def\hklgeschweift#1{\ensuremath{\{\@millerno#1 \@empty\}}}
\DeclareRobustCommand*\hkl{%
  \@ifnextchar[{\hkleckig}{%
    \@ifnextchar({\hklrund}{%
      \@ifnextchar<{\hklspitz}{\hklgeschweift}}}}
\endinput
%%
%% End of file `miller.sty'.
