% $Id: authoryear-icomp-tt.cbx, v0.1a 2009/07/17 00:04:00 ttitz $ \ProvidesFile{authoryear-icomp-tt.cbx} [\abx@cbxid $Id: authoryear-icomp-tt.cbx, v0.1a 2009/07/17 00:04:00 ttitz $] \ExecuteBibliographyOptions{labelyear,uniquename,ibidtracker=constrict,pagetracker,sortcites,autocite=inline} \providecommand*{\mkibid}[1]{#1} \newbool{cbx:parens} \newbool{cbx:loccit} \DeclareBibliographyOption{ibidpage}[true]{% \ifstrequal{#1}{true} {\ExecuteBibliographyOptions{loccittracker=constrict}} {\ExecuteBibliographyOptions{loccittracker=false}}} \newbibmacro*{cite:init}{% \global\boolfalse{cbx:parens}% \global\let\cbx@tempa=\empty \global\undef\cbx@lasthash \global\undef\cbx@lastyear \global\boolfalse{cbx:loccit}} \newbibmacro*{cite}{% \iffieldundef{shorthand} {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage} {\usebibmacro{cite:ibid}} {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{year}} {\cbx@tempa \usebibmacro{cite:label}% \setunit{\addspace}% \usebibmacro{cite:year+labelyear}% \usebibmacro{cite:init}} {\iffieldequals{namehash}{\cbx@lasthash} {\iffieldequals{year}{\cbx@lastyear} {\setunit{\addcomma}% \usebibmacro{cite:labelyear}} {\setunit{\compcitedelim}% \usebibmacro{cite:year+labelyear}% \savefield{year}{\cbx@lastyear}}} {\cbx@tempa \printnames{labelname}% \setunit{\nameyeardelim}% \usebibmacro{cite:year+labelyear}% \savefield{namehash}{\cbx@lasthash}% \savefield{year}{\cbx@lastyear}}}}} {\cbx@tempa \usebibmacro{cite:shorthand}% \usebibmacro{cite:init}}% \global\let\cbx@tempa=\multicitedelim} \newbibmacro*{citeyear}{% \iffieldundef{shorthand} {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage} {\usebibmacro{cite:ibid}} {\iffieldundef{year} {\cbx@tempa \usebibmacro{cite:label}% \usebibmacro{cite:init}} {\iffieldequals{namehash}{\cbx@lasthash} {\iffieldequals{year}{\cbx@lastyear} {\setunit{\addcomma}% \usebibmacro{cite:labelyear}} {\setunit{\compcitedelim}% \usebibmacro{cite:year+labelyear}% \savefield{year}{\cbx@lastyear}}} {\cbx@tempa \usebibmacro{cite:year+labelyear}% \savefield{namehash}{\cbx@lasthash}% \savefield{year}{\cbx@lastyear}}}}} {\cbx@tempa \usebibmacro{cite:shorthand}% \usebibmacro{cite:init}}% \global\let\cbx@tempa=\multicitedelim} \newbibmacro*{textcite}{% \iffieldequals{namehash}{\cbx@lasthash} {\iffieldundef{shorthand} {\iffieldequals{year}{\cbx@lastyear} {\setunit{\addcomma}% \usebibmacro{cite:labelyear}} {\setunit{\compcitedelim}% \usebibmacro{cite:year+labelyear}% \savefield{year}{\cbx@lastyear}}} {\setunit{\compcitedelim}% \usebibmacro{cite:shorthand}% \global\undef\cbx@lastyear}} {\cbx@tempa \ifnameundef{labelname} {\iffieldundef{shorthand} {\usebibmacro{cite:label}% \setunit{% \global\booltrue{cbx:parens}% \addspace\bibleftparen}% \usebibmacro{cite:year+labelyear}} {\usebibmacro{cite:shorthand}}} {\printnames{labelname}% \setunit{% \global\booltrue{cbx:parens}% \addspace\bibleftparen}% \iffieldundef{shorthand} {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage} {\usebibmacro{cite:ibid}} {\iffieldundef{year} {\usebibmacro{cite:label}} {\usebibmacro{cite:year+labelyear}}% \savefield{year}{\cbx@lastyear}}} {\usebibmacro{cite:shorthand}% \global\undef\cbx@lastyear}% \savefield{namehash}{\cbx@lasthash}}}% \gdef\cbx@tempa{% \ifbool{cbx:parens} {\bibrightparen\global\boolfalse{cbx:parens}} {}% \multicitedelim}} \newbibmacro*{cite:shorthand}{% \printtext[bibhyperref]{\printfield{shorthand}}} \newbibmacro*{cite:ibid}{% \printtext[bibhyperref]{\bibstring[\mkibid]{ibidem}}% \ifloccit {\global\booltrue{cbx:loccit}} {}} \newbibmacro*{cite:label}{% \iffieldundef{label} {\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}} {\printtext[bibhyperref]{\printfield{label}}}} \newbibmacro*{cite:year}{% \printtext[bibhyperref]{\printfield{year}}} \newbibmacro*{cite:labelyear}{% \printtext[bibhyperref]{\printfield{labelyear}}} \newbibmacro*{cite:year+labelyear}{% \iffieldundef{year} {} {\printtext[bibhyperref]{% \printfield{year}% \printfield{labelyear}}}} \newbibmacro*{cite:postnote}{% \ifbool{cbx:loccit} {} {\usebibmacro{postnote}}} \DeclareCiteCommand{\cite} {\usebibmacro{cite:init}% \usebibmacro{prenote}} {\usebibmacro{citeindex}% \usebibmacro{cite}} {} {\usebibmacro{cite:postnote}} \DeclareCiteCommand*{\cite} {\usebibmacro{cite:init}% \usebibmacro{prenote}} {\usebibmacro{citeindex}% \usebibmacro{citeyear}} {} {\usebibmacro{cite:postnote}} \DeclareCiteCommand{\parencite}[\mkbibparens] {\usebibmacro{cite:init}% \usebibmacro{prenote}} {\usebibmacro{citeindex}% \usebibmacro{cite}} {} {\usebibmacro{cite:postnote}} \DeclareCiteCommand*{\parencite}[\mkbibparens] {\usebibmacro{cite:init}% \usebibmacro{prenote}} {\usebibmacro{citeindex}% \usebibmacro{citeyear}} {} {\usebibmacro{cite:postnote}} \DeclareCiteCommand{\footcite}[\mkbibfootnote] {\usebibmacro{cite:init}% \usebibmacro{prenote}} {\usebibmacro{citeindex}% \usebibmacro{cite}} {} {\usebibmacro{cite:postnote}} \DeclareCiteCommand{\textcite} {\usebibmacro{cite:init}% \usebibmacro{prenote}} {\usebibmacro{citeindex}% \usebibmacro{textcite}} {} {\iffieldundef{postnote} {\ifbool{cbx:parens} {\bibrightparen} {}} {\ifbool{cbx:parens} {\postnotedelim} {\addspace\bibleftparen}% \printfield{postnote}\bibrightparen}} \endinput