% $Id: biblatex-chicago.sty,v 0.1.1.12 2009/07/02 11:10:06 dfussner Exp $

% Copyright (c) 2009 David Fussner.  This package is
% author-maintained.
%
% This work may be copied, distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3 of
% this license or (at your option) any later version.  The latest
% version of this license is in http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX version
% 2005/12/01 or later.  This software is provided as is,
% without warranty of any kind, either expressed or implied, including,
% but not limited to, the implied warranties of merchantability and
% fitness for a particular purpose.

\ProvidesPackage{biblatex-chicago}[2009/07/02 v.0.8 biblatex style]

\RequirePackage[style=chicago-notes-df]{biblatex}

\newtoggle{cms@nomark}

\ExecuteBibliographyOptions{%
  pagetracker=true,autocite=footnote,abbreviate=false,urldate=long,
  date=long,citetracker=true,ibidtracker=constrict,usetranslator=true,
  usecompiler=true}

\DeclareOption{footmarkoff}{\global\toggletrue{cms@nomark}}
\DeclareOption{natbib}{\blx@inputonce{bibnatex.def}{}{}{}{}{}}

\DeclareOption*{%
  \expandafter\ExecuteBibliographyOptions
  \expandafter{\CurrentOption}}


\ProcessOptions*

\setlength{\bibitemsep}{0.5\baselineskip plus 0.5\baselineskip}
\setlength{\bibhang}{2em}
\setlength{\lositemsep}{0.25\baselineskip plus 0.25\baselineskip}

\renewcommand*{\bibnamedash}{---------}

\iftoggle{cms@nomark}
{}
{\@ifclassloaded{memoir}%
  {\blx@warning@noline{%
      Since you are using the 'memoir' class,\MessageBreak
      I'm leaving the formatting of the footnote mark\MessageBreak
      and text to you.}}%
  {\renewcommand\@makefntext[1]{%
      \setlength\parindent{1em}%
      \noindent
      \makebox[2.3em][r]{\@thefnmark.\,\,}#1}}}

\@ifpackageloaded{babel}
{\ifthenelse{\equal{\languagename}{american}}
  {\DeclareLanguageMapping{american}{cms-american}}%
  {\ifthenelse{\equal{\languagename}{english}}%
    {\DeclareLanguageMapping{english}{cms-american}}%
    {}}}%
{\DeclareLanguageMapping{english}{cms-american}}

\endinput
