%%
%% This is file `contour.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% contour.dtx  (with options: `package')
%% 
%%   contour package
%% 
%%   Copyright  1999--2004 Harald Harders, Morten H�gholm
%% 
%%   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 of the License, or any later version.
%% 
%%   h.harders@tu-bs.de, moho01ab@student.cbs.dk
%% 
%% 
%%   Original: Richard Pfeiffer (richard.pfeiffer@t-online.de)
%%   Totally rewritten end extended.
%% 
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{contour}
  [2004/11/18  v2.14  Print contoured text (HH, MH)]
\RequirePackage{color}
\RequirePackage{trig}
\def\con@coloroff{%
  \def\@undeclaredcolor[##1]##2{}%
  \def\@declaredcolor##1{}%
}
\newcommand*\con@put[3]{%
  \rlap{\hskip#1\raisebox{#2}[0pt]{#3}}%
}
\newcommand*\contourlength[1]{\def\con@base@length{#1}}
\contourlength{0.03em}
\newcommand*\contournumber[1]{\def\con@default@copies{#1}}
\contournumber{16}
\newlength{\con@length}
\newcommand*\con@define@copyangles[1]{%
  \edef\con@tempa{auto}%
  \edef\con@tempb{#1}%
  \ifx\con@tempa\con@tempb
    \expandafter\ifdim\f@size pt<15pt\relax
      \edef\con@tempb{16}%
    \else
      \expandafter\ifdim\f@size pt<25pt\relax
        \edef\con@tempb{32}%
      \else
        \expandafter\ifdim\f@size pt<50pt\relax
          \edef\con@tempb{60}%
        \else
          \edef\con@tempb{120}%
        \fi
      \fi
    \fi
  \fi
  \@tempcnta=\con@tempb\relax
  \@ifundefined{con@\number\@tempcnta @copies}{%
    \global\@namedef{con@\number\@tempcnta @copies}{}%
    \@tempdima=360\p@
    \divide\@tempdima by \@tempcnta
    \@tempdimb=\z@
    \@tempcntb=\z@
    \loop
      \ifnum\@tempcntb<\@tempcnta
        \edef\con@temp@fdim{\strip@pt\@tempdimb}%
        \CalculateSin{\con@temp@fdim}%
        \CalculateCos{\con@temp@fdim}%
        \advance\@tempcntb \@ne
        \advance\@tempdimb \@tempdima\relax
    \repeat
  }{}%
  \let\con@tempa\@undefined
  \let\con@tempb\@undefined
}
\newcommand*\contour{\@ifstar{\@contour[32]}{\@contour}}
\newcommand*\@contour[3][\con@default@copies]{%
  \ifvmode
    \leavevmode
  \fi
  \setlength\con@length{\con@base@length}%
  \ifcon@outline
    \typeout{contour: Using real outline for `#3'\on@line.}%
    \@contour@outline{#2}{#3}%
  \else
    \begingroup
      \con@define@copyangles{#1}%
      \typeout{contour: Using \the\@tempcnta\space copies for `#3'\on@line.}%
      \@tempdima=360\p@
      \divide\@tempdima by \@tempcnta\relax
      \@tempdimb=\z@
      \@tempcntb=\z@
      \color{#2}%
      \con@coloroff
      \loop
        \ifnum\@tempcntb<\@tempcnta\relax
          \edef\con@temp@fdim{\strip@pt\@tempdimb}%
          \con@put
            {\UseSin{\con@temp@fdim}\con@length}%
            {\UseCos{\con@temp@fdim}\con@length}%
            {#3}%
          \advance\@tempcntb \@ne\relax
          \advance\@tempdimb\@tempdima\relax
      \repeat
    \endgroup
    \mbox{#3}%
  \fi
}
\providecommand*\con@driver{\@empty}
\newif\ifcon@outline
\DeclareOption{auto}{\contournumber{auto}}
\DeclareOption{dvips}{\def\con@driver{dvips.cnt}}
\DeclareOption{xdvi}{\ExecuteOptions{dvips}}
\DeclareOption{pdftex}{\def\con@driver{pdftex.cnt}}
\DeclareOption{vtex}{\def\con@driver{vtex.cnt}}
\DeclareOption{dvipsone}{\def\con@driver{dvipsone.cnt}}
\DeclareOption{outline}{\con@outlinetrue}
\DeclareOption{copies}{\con@outlinefalse}
\InputIfFileExists{contour.cfg}{%
  \typeout{Loading configuration file `contour.cfg'.}%
}{%
  \typeout{No configuration file `contour.cfg' found.}%
}
\ProcessOptions\relax
\expandafter\ifx\con@driver\@empty
  \ifcon@outline
    \PackageError{contour}{Chosen package option `outline' but no
      driver defined}{Leave out the `outline' option or define a driver}%
  \else
    \PackageWarning{contour}{No driver defined (which does not matter
      when using copies)}%
  \fi
\else
  \InputIfFileExists{\con@driver}{%
    \typeout{contour: Using driver file `\con@driver'.}%
  }{%
    \PackageError{contour}{Driver file `\con@driver' does not exist}{}%
  }%
\fi
\endinput
%%
%% End of file `contour.sty'.
