summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/archaeologie/archaeologie.cbx
blob: 894ceebd79c8b2573f11e1ff28855c34adf6d241 (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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
\ProvidesFile{archaeologie.cbx}%
               [2015/09/17 v1.1  archaeologie --%
                biblatex fuer Archaeologen, Historiker und Philologen, cbx-Datei]
\ExecuteBibliographyOptions{%
  citetracker=true,% 
  idemtracker=false,% 
  ibidtracker=true,%
  opcittracker=true,%
  loccittracker=true,%
  labeldate=true,%
  sortcites=false%
}%

%%%%%%%% cbx %%%%%%%%%%
\newbool{cbx:jahrinklammern}%
\newbool{cbx:kapitaelchen}%*
%%%%%%%% \DeclareBibliographyOption %%%%%%%%%%
\DeclareBibliographyOption{jahrinklammern}[true]{\csuse{bool#1}{cbx:jahrinklammern}}%
\DeclareBibliographyOption{kapitaelchen}[true]{\csuse{bool#1}{cbx:kapitaelchen}}%

\DeclareFieldFormat{prenote}{#1\isdot}%
\DeclareFieldFormat{postnote}{#1}%
\DeclareFieldFormat{shorttitle}{#1}%
\DeclareNameFormat{frg}{%
  #1%
  \ifthenelse{\value{listcount}<\value{liststop}}%
    {\addspace\textendash\addspace}{}%
}%
\renewcommand*{\multicitedelim}{\setunit{\addsemicolon\addspace}}%
\newcommand*{\citeautorenschriftart}{\ifbool{cbx:kapitaelchen}{\scshape}{}}% 
\newcommand*{\citeautorentrennzeichen}{\addnbspace\textendash\addspace}%

                         
\DeclareNameFormat{cite:author}{%
  {\citeautorenschriftart%
   \ifblank{#5}{}{#5\addspace}%
   #1}%
  \ifthenelse{\value{listcount}<\value{liststop}}%
    {\citeautorentrennzeichen}{\ifmorenames{\andothersdelim\bibstring{andothers}}{}}{}%
}

\renewbibmacro*{prenote}{%
  \iffieldundef{prenote}{}%
    {\printfield{prenote}%
     \setunit{\addspace}}}%
\renewbibmacro*{postnote}{%
  \ifboolexpr{bool {cbx:antik}%
           or bool {cbx:frgantik}%
           or bool {cbx:nurshorthand}%                
           }%                                                
              {\setunit{\addspace}}%
              {\newunit}%
  \iffieldundef{postnote}{}%
    {\ifboolexpr{bool{cbx:antik} or bool{cbx:frgantik}}{%
       \ifbool{cbx:antik}{\printfield{postnote}}{}%
       \ifbool{cbx:frgantik}{%
         \printfield{postnote}\addspace%
         \ifnameundef{shorteditor}%
           {\printnames[frg]{editor}}%  
           {\printnames[frg]{shorteditor}}%
       }{}%
     }{\printfield{postnote}%
     }%
   }%
}%

\newbibmacro*{cite:name}{%    
  \ifciteindex{\indexnames{labelname}}{}%
  \printtext[bibhyperref]{%
    \ifboolexpr{bool{cbx:antik} or bool{cbx:frgantik}}{%
      \printnames{namea}%
    }{%
      \iffootnote{%
        \printnames{labelname}%
      }{%
        \ifbool{cbx:nurnachname}{%
          \printnames{labelname}%
        }{%
          \ifbool{cbx:vollername}{%
            \ifnameundef{author}{%
              \printnames[first-last]{editor}%
            }{%
              \printnames[first-last]{author}%
            }%
          }{%
            \ifnameundef{author}{%
              \printnames[first-last-inits]{editor}%
            }{%
              \printnames[first-last-inits]{author}%
}}}}}}}%

\newbibmacro*{cite:title}{%                           
     \iffieldundef{shorttitle}{%                   
  \printfield{title}%           
      }{\printfield{shorttitle}}}%                   


\newbibmacro*{cite:year}{%			
  \iffieldundef{labelyear}
    {}%
    {\ifbool{cbx:jahrinklammern}%
       {\printtext[bibhyperref]{\printtext[parens]{\printfield{labelyear}\printfield{extrayear}}}}%
       {\printtext[bibhyperref]{\printfield{labelyear}\printfield{extrayear}}}%
}}



\newbibmacro*{shorthand+year}{%
\printtext[brackets]{\printfield{shorthand}%
 \setunit{\addspace}%
 {\ifbool{cbx:jahrinklammern}%
       {\printtext[]{\printtext[parens]{\printfield{labelyear}\printfield{extrayear}}}}%
       {\printtext[]{\printfield{labelyear}\printfield{extrayear}}}%
       }%
}}
  

  
\newbibmacro*{lexikon}{%
  \ifbool{bbx:lexika}{%
  				\printfield{maintitle}\addspace%
  				\printfield{volume}%
  				\addspace
  				\printfield[parens]{year}%
  				\addspace%
  							\iffieldundef{postnote}{\printfield{pages}}{\printfield{postnote}}%
  				\addspace\printtext{s\adddot\addnbthinspace v\adddot}%
  				\addspace\printfield{title}%
  				\addspace\printtext[parens]{\printnames[first-last-inits]{author}}%
  }{\bibhyperref{\printnames[cite:author]{labelname}%              
           \setunit{\addspace}\usebibmacro{cite:year}%
            }}%
}

\newbibmacro*{cite}{%
  \ifboolexpr{bool{cbx:antik} or bool {cbx:frgantik}}%
  {\bibhyperref{\printfield{shorthand}\setunit{\adddot\addspace}}}%
  {\ifboolexpr{bool {cbx:nurshorthand} or bool {cbx:unbekannt} or bool {cbx:lexikon}}%
    {%      
      \ifbool{cbx:nurshorthand}{\bibhyperref{\printfield{shorthand}}}{}%
       \ifbool{cbx:unbekannt}{\bibhyperref{\usebibmacro{shorthand+year}}}{}%     
       \ifbool{cbx:lexikon}{\usebibmacro{lexikon}}{}}%
       %
     {\bibhyperref{\printnames[cite:author]{labelname}%    
           \setunit{\addspace}\usebibmacro{cite:year}%
            }}%
         }%
      }%


%%% Cite Commands %%%
\DeclareCiteCommand{\cite}%              
  {\usebibmacro{prenote}}%
  {\usebibmacro{citeindex}%
  \usebibmacro{cite}}%
  {\multicitedelim}%
  {\ifboolexpr{bool{cbx:lexikon} and bool {bbx:lexika}}{}{\usebibmacro{postnote}}}%
  
\DeclareCiteCommand{\parencite}[\mkbibparens]%
  {\usebibmacro{prenote}}%
  {\usebibmacro{citeindex}%
  \usebibmacro{cite}}%
  {\multicitedelim}%
  {\ifboolexpr{bool{cbx:lexikon} and bool {bbx:lexika}}{}{\usebibmacro{postnote}}}%
  

\DeclareCiteCommand{\citeauthor}%
  {\usebibmacro{prenote}}%
  {\usebibmacro{cite:name}}
  {\multicitedelim}%
  {\usebibmacro{postnote}}%

\DeclareCiteCommand{\citetitle} %
  {\boolfalse{citetracker}%
    \boolfalse{pagetracker}%
    \usebibmacro{prenote}}%
  {\printtext[bibhyperref]{%
   \ifbool{cbx:antik}{\mkbibemph{\usebibmacro{cite:title}}}%
      {\mkbibemph{\usebibmacro{cite:title}}% 
      			\addspace%
      			\mkbibparens{\printfield{year}%
      			\iffieldundef{origyear}{}{\addspace\mkbibparens{\printfield{origyear}}}%
     	}%
    	}}}%
    {\multicitedelim}%
    {\usebibmacro{postnote}}%
%
\endinput
%%
%% End of file `archaeologie.cbx'.