summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-chicago/biblatex-chicago.sty
blob: c36619ae7f884867e9fb302ca17015ae601062d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
% $Id: biblatex-chicago.sty,v 0.1.1.48 2013/03/12 14:19:12 dfussner Exp $

% Copyright (c) 2009-2013 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}[2013/03/12 v 2.5 biblatex style]

\RequirePackage{etoolbox}

\DeclareOption{authordate}{\def\cms@style{authordate}}
\DeclareOption{notes}{\def\cms@style{notes}}
\DeclareOption{authordate-trad}{\def\cms@style{authordatetrad}}
\DeclareOption{authordate15}{\def\cms@style{authordateold}}
\DeclareOption{notes15}{\def\cms@style{notesold}}
\DeclareOption*{\eappto\cms@options{\CurrentOption,}}
\let\cms@options\empty
\ExecuteOptions{notes}%

\newtoggle{cms@nomark}

\DeclareOption{footmarkoff}{\global\toggletrue{cms@nomark}}

\DeclareOption{natbib}{%
  \PassOptionsToPackage{natbib}{biblatex}}

\DeclareOption{backend=biber}{%
  \PassOptionsToPackage{\CurrentOption}{biblatex}}%

\DeclareOption{backend=bibtex}{%
  \PassOptionsToPackage{\CurrentOption}{biblatex}}%

\DeclareOption{backend=bibtex8}{%
  \PassOptionsToPackage{\CurrentOption}{biblatex}}%

\DeclareOption{backend=bibtexu}{%
  \PassOptionsToPackage{\CurrentOption}{biblatex}}%

\ProcessOptions*

\def\cms@authordate{%
  \RequirePackage[style=chicago-authordate]{biblatex}%
  \ExecuteBibliographyOptions{%
    pagetracker=true,autocite=inline,alldates=comp,labelyear=true,
    uniquename=minfull,useeditor=true,usetranslator=true,usecompiler=true,
    ibidtracker=constrict,sorting=cms,punctfont,cmslos=true,nodates,
    uniquelist=minyear,maxbibnames=10,minbibnames=7,sortcase=false,
    abbreviate=false,dateabbrev=false,avdate=true}}

\def\cms@notes{%
  \RequirePackage[style=chicago-notes]{biblatex}%
  \ExecuteBibliographyOptions{%
    pagetracker=true,autocite=footnote,abbreviate=false,alldates=comp,
    citetracker=true,ibidtracker=constrict,usetranslator=true,
    usecompiler=true,loccittracker=constrict,dateabbrev=false,
    maxbibnames=10,minbibnames=7,sorting=\cms@choose,sortcase=false}}

\def\cms@authordatetrad{%
  \RequirePackage[style=chicago-authordate-trad]{biblatex}%
  \ExecuteBibliographyOptions{%
    pagetracker=true,autocite=inline,alldates=comp,labelyear=true,
    uniquename=minfull,useeditor=true,usetranslator=true,usecompiler=true,
    ibidtracker=constrict,sorting=cms,punctfont,cmslos=true,nodates,
    uniquelist=minyear,maxbibnames=10,minbibnames=7,sortcase=false,
    abbreviate=false,dateabbrev=false,avdate=true}}

\def\cms@authordateold{%
  \RequirePackage[style=chicago-authordate15]{biblatex}%
  \ExecuteBibliographyOptions{%
    pagetracker=true,autocite=inline,alldates=comp,labelyear=true,
    uniquename=minfull,useeditor=true,usetranslator=true,usecompiler=true,
    ibidtracker=constrict,sorting=cms,punctfont,cmslos=true,nodates,
    uniquelist=minyear,maxbibnames=10,minbibnames=7,sortcase=false}}

\def\cms@notesold{%
  \RequirePackage[style=chicago-notes15]{biblatex}%
  \ExecuteBibliographyOptions{%
    pagetracker=true,autocite=footnote,abbreviate=false,alldates=comp,
    citetracker=true,ibidtracker=constrict,usetranslator=true,
    usecompiler=true,loccittracker=constrict,dateabbrev=false,
    maxbibnames=10,minbibnames=7}}

\csuse{cms@\cms@style}
\undef\cms@authordate
\undef\cms@notes
\undef\cms@authordatetrad
\undef\cms@authordateold
\undef\cms@notesold
\expandafter\ExecuteBibliographyOptions\expandafter{\cms@options}

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

\renewcommand*{\bibnamedash}{\rule[.4ex]{3em}{.6pt}}

\iftoggle{cms@nomark}
{}
{\@ifclassloaded{memoir}%
  {\blx@warning@noline{%
      Since you are using the 'memoir' class,\MessageBreak
      I'm leaving the formatting of the foot- and/or\MessageBreak
      end-note mark and text to you.}}%
  {\renewcommand\@makefntext[1]{% Provides in-line footnote marks
      \setlength\parindent{1em}%
      \noindent
      \makebox[2.3em][r]{\@thefnmark.\,\,}#1}
    \@ifpackageloaded{endnotes}% Provides in-line endnote marks
    {\def\enotesize{\small}% This size recommended by the Manual
      \renewcommand{\enoteformat}{%
        \renewcommand{\makeenmark}{%
          \hbox{\theenmark.\,\,}}
        \rightskip\z@ \leftskip\z@ \parindent=2.3em
        \leavevmode\llap{\makeenmark}}}
    {}}}

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

\DeclareLanguageMapping{british}{cms-british}
\DeclareLanguageMapping{german}{cms-german}
\DeclareLanguageMapping{french}{cms-french}
\DeclareLanguageMapping{finnish}{cms-finnish}
\DeclareLanguageMapping{ngerman}{cms-ngerman}
\DeclareLanguageMapping{icelandic}{cms-icelandic}
\DeclareLanguageMapping{norsk}{cms-norsk}
\DeclareLanguageMapping{nynorsk}{cms-nynorsk}

\@ifpackagelater{biblatex}{2012/06/30}
{\def\cms@choose{%
    \ifblx@load@version@one
    nty%
    \else
    cms%
    \fi}}
{\def\cms@choose{%
    \ifnum\blx@backend=\blx@backend@biber
    cms%
    \else
    nty%
    \fi}}

\endinput