diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/biblatex-contrib/authoryear-icomp-tt/authoryear-icomp-tt.cbx |
Initial commit
Diffstat (limited to 'macros/latex/contrib/biblatex-contrib/authoryear-icomp-tt/authoryear-icomp-tt.cbx')
-rw-r--r-- | macros/latex/contrib/biblatex-contrib/authoryear-icomp-tt/authoryear-icomp-tt.cbx | 203 |
1 files changed, 203 insertions, 0 deletions
diff --git a/macros/latex/contrib/biblatex-contrib/authoryear-icomp-tt/authoryear-icomp-tt.cbx b/macros/latex/contrib/biblatex-contrib/authoryear-icomp-tt/authoryear-icomp-tt.cbx new file mode 100644 index 0000000000..7e404a9529 --- /dev/null +++ b/macros/latex/contrib/biblatex-contrib/authoryear-icomp-tt/authoryear-icomp-tt.cbx @@ -0,0 +1,203 @@ +% $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 |