summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/miller
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-12 23:59:17 +0000
committerKarl Berry <karl@freefriends.org>2006-01-12 23:59:17 +0000
commit0976d66b38e191101d2affd047621bc3fc2d0d78 (patch)
tree6515be390ec017b9ddc2fd5c3c82ffb85ad8c541 /Master/texmf-dist/tex/latex/miller
parent9a89c155db5d4dea91aee65c36e9316083058276 (diff)
miller
git-svn-id: svn://tug.org/texlive/trunk@1095 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/miller')
-rw-r--r--Master/texmf-dist/tex/latex/miller/miller.sty106
1 files changed, 106 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/miller/miller.sty b/Master/texmf-dist/tex/latex/miller/miller.sty
new file mode 100644
index 00000000000..608be0dcdd8
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/miller/miller.sty
@@ -0,0 +1,106 @@
+%%
+%% 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'.