summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-fiwi/fiwi.cbx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-fiwi/fiwi.cbx')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-fiwi/fiwi.cbx176
1 files changed, 107 insertions, 69 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-fiwi/fiwi.cbx b/Master/texmf-dist/tex/latex/biblatex-fiwi/fiwi.cbx
index 54e46ba2d5b..d8baafaee69 100644
--- a/Master/texmf-dist/tex/latex/biblatex-fiwi/fiwi.cbx
+++ b/Master/texmf-dist/tex/latex/biblatex-fiwi/fiwi.cbx
@@ -1,10 +1,10 @@
-% $Id: fiwi.cbx,v 1.2d 2013/05/13 Simon Spiegel
+% $Id: fiwi.cbx,v 1.2e 2014/01/10 Simon Spiegel
\ProvidesFile{fiwi.cbx}
-[\abx@cbxid $Id: fiwi.cbx,v 1.2d 2013/05/13 spiegel $]
+[\abx@cbxid $Id: fiwi.cbx,v 1.2e 2014/01/09 spiegel $]
-\ExecuteBibliographyOptions{labeldate=true,autocite=inline,firstinits=false,uniquename=full,uniquelist=true}
+\ExecuteBibliographyOptions{labeldate=true,autocite=inline,firstinits=false,uniquename=full,uniquelist=true,ibidtracker=constrict}
\RequireBibliographyStyle{fiwi}
@@ -12,6 +12,8 @@
\newbool{cbx@bool}
+\newbool{cbx:parens}
+\newbool{cbx:loccit}
\providetoggle{citefullfilm}
\newcommand*{\fullcitefilm}{\settoggle{citefullfilm}{true}}
\DeclareBibliographyOption{fullcitefilm}[false]{\settoggle{citefullfilm}{#1}}
@@ -39,6 +41,11 @@
\providetoggle{xindy}
\DeclareBibliographyOption{xindy}[true]{\settoggle{xindy}{#1}}
+\DeclareBibliographyOption{ibidpage}[true]{%
+ \ifstrequal{#1}{true}
+ {\ExecuteBibliographyOptions{loccittracker=constrict}}
+ {\ExecuteBibliographyOptions{loccittracker=false}}}
+
\DeclareFieldFormat{citeyear}{\mkbibparens{#1}}
\DeclareFieldFormat{citetitle:incollection}{\emph{#1}\isdot}
@@ -61,6 +68,11 @@
\fi
\usebibmacro{name:andothers}}
+\newbibmacro*{cite:postnote}{%
+ \ifbool{cbx:loccit}
+ {}
+ {\usebibmacro{postnote}}}
+
\renewbibmacro*{name:last}[4]{%
\iftoggle{citeprefix}
{\usebibmacro{name:delim}{#3#1}%
@@ -104,6 +116,12 @@
\newcommand{\citealts}{\cites}
\newcommand{\Citealts}{\Cites}
+\newbibmacro*{cite:ibid}{%
+ \printtext[bibhyperref]{\bibstring[\mkibid]{ibidem}}%
+ \ifloccit
+ {\global\booltrue{cbx:loccit}}
+ {}}
+
\renewbibmacro*{citeindex}{%
\ifciteindex{%
\indexnames[indexname]{labelname}}
@@ -144,7 +162,7 @@ and test {\iffieldundef{maintitle}}}
{\iffieldundef{maintitle}
{\printtext[bibhyperref]{\printfield[film]{title}}}%
{\printtext[bibhyperref]{\printfield[tvmaintitle]{maintitle}%
-\printfield[film]{title}}}
+\printfield[film]{title}}}%
}
\newbibmacro*{cite:serialfull}{%
@@ -209,34 +227,58 @@ and test {\iftoggle{citecompletefilm}}}
\printnames{director}%
\addcomma\addthinspace\printlist{location}\addspace\printfield{year}}}
+
\newbibmacro*{cite}{%
-\iffieldundef{shorthand}
-{\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{year}\AND\iffieldundef{urlyear}}%
-{\usebibmacro{cite:label}}%
-{\printtext[bibhyperref]{\printnames{labelname}}\nameyeardelim%
-\usebibmacro{cite:year+labelyear}}}%
-{\usebibmacro{cite:shorthand}}}%
+ \global\boolfalse{cbx:loccit}%
+ \iffieldundef{shorthand}
+ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
+ {\usebibmacro{cite:ibid}}
+ {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
+ {\usebibmacro{cite:label}%
+ \setunit{\addspace}}
+ {\printnames{labelname}%
+ \setunit{\nameyeardelim}}%
+ \usebibmacro{cite:labelyear+extrayear}}}
+ {\usebibmacro{cite:shorthand}}}
+
\newbibmacro*{textcite}{%
+ \global\boolfalse{cbx:loccit}%
\ifnameundef{labelname}
{\iffieldundef{shorthand}
- {\usebibmacro{cite:label}}
+ {\usebibmacro{cite:label}%
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \addspace\bibopenparen}%
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \usebibmacro{cite:labelyear+extrayear}}
{\usebibmacro{cite:shorthand}}}
{\printnames{labelname}%
- \global\booltrue{cbx@bool}%
- \addspace\bibopenparen
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \addspace\bibopenparen}%
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
\iffieldundef{shorthand}
- {\ifthenelse{\iffieldundef{year}\AND\iffieldundef{urlyear}}
- {\usebibmacro{cite:label}}
- {\usebibmacro{cite:year+labelyear}}}
+ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
+ {\usebibmacro{cite:ibid}}
+ {\iffieldundef{labelyear}
+ {\usebibmacro{cite:label}}
+ {\usebibmacro{cite:labelyear+extrayear}}}}
{\usebibmacro{cite:shorthand}}}}
-
+
\newbibmacro*{citeyear}{%
+ \global\boolfalse{cbx:loccit}%
\iffieldundef{shorthand}
- {\iffieldundef{year}
- {\usebibmacro{cite:label}}
- {\usebibmacro{cite:year+labelyear}}}
- {\usebibmacro{cite:shorthand}}}
+ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
+ {\usebibmacro{cite:ibid}}
+ {\iffieldundef{labelyear}
+ {\usebibmacro{cite:label}}
+ {\usebibmacro{cite:labelyear+extrayear}}}}
+ {\usebibmacro{cite:shorthand}}}
\newbibmacro*{cite:shorthand}{%
\printtext[bibhyperref]{\printfield{shorthand}}}
@@ -246,13 +288,13 @@ and test {\iftoggle{citecompletefilm}}}
{\BibliographyWarning{Missing author/editor+year or label}}
{\printtext[bibhyperref]{\printnames{labelname}}}}
-\newbibmacro*{cite:year+labelyear}{%
+\newbibmacro*{cite:labelyear+extrayear}{%
\printtext[bibhyperref]{%
\iffieldundef{year}%
{\bibstring[\mkbibbrackets]{undated}\printfield{extrayear}}%
{\printfield{labelyear}}%
\printfield{extrayear}}}
-
+
\newbibmacro*{xindy:name}[5]{%
\begingroup
\ifuseprefix
@@ -279,7 +321,16 @@ and test {\iftoggle{citecompletefilm}}}
\unexpanded{#1}{#3}}%
\theindexentry
\endgroup}
-
+
+\newbibmacro*{textcite:postnote}{%
+ \ifthenelse{\iffieldundef{postnote}\OR\boolean{cbx:loccit}}
+ {\ifbool{cbx:parens}
+ {\bibcloseparen}
+ {}}
+ {\ifbool{cbx:parens}
+ {\postnotedelim}
+ {\addspace\bibopenparen}%
+ \printfield{postnote}\bibcloseparen}}
\DeclareCiteCommand{\fullcite}
{{}%
@@ -288,44 +339,36 @@ and test {\iftoggle{citecompletefilm}}}
{}
{\thefield{entrytype}}}
{\multicitedelim\unspace}% aus unklaren Gruenden hat es hier ein Space zu viel
- {\usebibmacro{postnote}}
+ {\usebibmacro{cite:postnote}}
\DeclareCiteCommand{\cite}
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
- \ifthenelse{\ifciteibid\AND
- \NOT\iffirstonpage}
- {\bibstring[\mkibid]{ibidem}}{\usebibmacro{cite}}}
+ \usebibmacro{cite}}
{\multicitedelim}
- {\usebibmacro{postnote}}
+ {\usebibmacro{cite:postnote}}
\DeclareCiteCommand*{\cite}
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
- \ifthenelse{\ifciteibid\AND
- \NOT\iffirstonpage}
- {\bibstring[\mkibid]{ibidem}}{\usebibmacro{citeyear}}}
+ \usebibmacro{citeyear}}
{\multicitedelim}
- {\usebibmacro{postnote}}
+ {\usebibmacro{cite:postnote}}
\DeclareCiteCommand{\parencite}[\mkbibparens]
{\usebibmacro{prenote}}
- {\ifthenelse{\ifciteibid\AND
- \NOT\iffirstonpage}%
- {\bibstring[\mkibid]{ibidem}\unspace}%
- {\usebibmacro{citeindex}%
- \usebibmacro{cite}}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
{\multicitedelim}
- {\usebibmacro{postnote}}
+ {\usebibmacro{cite:postnote}}
\DeclareCiteCommand*{\parencite}[\mkbibparens]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
- \iffirstonpage{\usebibmacro{citeyear}}
- {\bibstring[\mkibid]{ibidem}}}
+ \usebibmacro{citeyear}}
{\multicitedelim}
- {\usebibmacro{postnote}}
+ {\usebibmacro{cite:postnote}}
\DeclareCiteCommand{\inparencite}[]
{}
@@ -335,7 +378,7 @@ and test {\iftoggle{citecompletefilm}}}
\usebibmacro{prenote}%
\usebibmacro{citeyear}}%
{\multicitedelim}%
- {\usebibmacro{postnote}
+ {\usebibmacro{cite:postnote}
\unspace\bibcloseparen}
\DeclareCiteCommand{\citetitle}
@@ -345,26 +388,26 @@ and test {\iftoggle{citecompletefilm}}}
{\indexfield{indextitle}%
\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
{\multicitedelim}
- {\usebibmacro{postnote}}
+ {\usebibmacro{cite:postnote}}
\DeclareCiteCommand{\citeyear}
{\usebibmacro{prenote}}
{\usebibmacro{citeyear}}
{\multicitedelim}
- {\usebibmacro{postnote}}
+ {\usebibmacro{cite:postnote}}
\DeclareCiteCommand{\citeurl}
{\usebibmacro{prenote}}
{\printfield[citeurl]{url}}
{\multicitedelim}
- {\usebibmacro{postnote}}
+ {\usebibmacro{cite:postnote}}
\DeclareCiteCommand{\citealtnoibidem}
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite}}
{\multicitedelim}
- {\usebibmacro{postnote}}
+ {\usebibmacro{cite:postnote}}
\DeclareCiteCommand{\citetnoibidem}
{\usebibmacro{prenote}}
@@ -396,31 +439,26 @@ and test {\iftoggle{citecompletefilm}}}
\printfield{postnote}\bibcloseparen}}
\DeclareCiteCommand{\textcite}
- {\boolfalse{cbx@bool}%
- \usebibmacro{prenote}}
+ {\boolfalse{cbx:parens}}
{\usebibmacro{citeindex}%
- \ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}%
- {\bibstring[\mkibid]{ibidem}}%
- {\usebibmacro{textcite}}}
- {\ifbool{cbx@bool}
- {\bibcloseparen\global\boolfalse{cbx@bool}}
- {}%
- \multicitedelim}
- {\iffieldundef{postnote}
- {\ifbool{cbx@bool}
- {\bibcloseparen}
- {}}
- {\ifbool{cbx@bool}
- {\postnotedelim}
- {\addspace\bibopenparen}%
- \printfield{postnote}\bibcloseparen}}
+ \iffirstcitekey
+ {\setcounter{textcitetotal}{1}}
+ {\stepcounter{textcitetotal}%
+ \textcitedelim}%
+ \usebibmacro{textcite}}
+ {\ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}}
+ {\usebibmacro{textcite:postnote}}
+
+
\DeclareCiteCommand{\citeepisode}
{\usebibmacro{prenote}}
{\indexfield{indextitle}%
\usebibmacro{cite:episode}}
{\multicitedelim}
- {\usebibmacro{postnote}}
+ {\usebibmacro{cite:postnote}}
\DeclareCiteCommand{\citefilm}
{\usebibmacro{prenote}}
@@ -431,14 +469,14 @@ and test {\iftoggle{citecompletefilm}}}
{\usebibmacro{cite:tv}}{\ifciteseen{\usebibmacro{cite:film:seen}}
{\usebibmacro{cite:film}}}}}
{\multicitedelim}
- {\usebibmacro{postnote}}
+ {\usebibmacro{cite:postnote}}
\DeclareCiteCommand{\citecfilm}
{\usebibmacro{prenote}}
{\indexfield{indextitle}%
\usebibmacro{cite:film:countryear}}
{\multicitedelim}
- {\usebibmacro{postnote}}
+ {\usebibmacro{cite:postnote}}
\DeclareCiteCommand{\citefullfilm}
{\usebibmacro{prenote}}
@@ -447,12 +485,12 @@ and test {\iftoggle{citecompletefilm}}}
{\usebibmacro{cite:serialfull}}
{\usebibmacro{cite:film}}}
{\multicitedelim}
- {\usebibmacro{postnote}}
+ {\usebibmacro{cite:postnote}}
\DeclareCiteCommand{\citefilmnoindex}
{\usebibmacro{prenote}}
{\usebibmacro{cite:film}}
{\multicitedelim}
- {\usebibmacro{postnote}}
+ {\usebibmacro{cite:postnote}}
\endinput