diff options
author | Karl Berry <karl@freefriends.org> | 2012-07-22 22:53:22 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-07-22 22:53:22 +0000 |
commit | 8552ae7941203f1a1cf1779b74b219b9b838a7e3 (patch) | |
tree | ef9d45d7b5de601712097d38d048ad6555438f11 /Master/texmf-dist/tex/latex/biblatex-fiwi/fiwi.bbx | |
parent | 6fd75aabad83fbb48ec147ceff36a609f6e1e6ba (diff) |
biblatex-fiwi 1.2 (19jul12)
git-svn-id: svn://tug.org/texlive/trunk@27096 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-fiwi/fiwi.bbx')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-fiwi/fiwi.bbx | 320 |
1 files changed, 207 insertions, 113 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-fiwi/fiwi.bbx b/Master/texmf-dist/tex/latex/biblatex-fiwi/fiwi.bbx index 0ba480046f3..926c73f7036 100644 --- a/Master/texmf-dist/tex/latex/biblatex-fiwi/fiwi.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-fiwi/fiwi.bbx @@ -1,18 +1,18 @@ -% $Id: fiwi.bbx, v1.1d 2012/02/16 Simon Spiegel +% $Id: fiwi.bbx, v1.2 2012/07/20 Simon Spiegel -\ProvidesFile{fiwi.bbx}[v1.1d 2012/02/16 film studies bibliography style] +\ProvidesFile{fiwi.bbx}[v1.2 2012/07/20 film studies bibliography style] -\@ifpackagelater{biblatex}{2011/11/12} +\@ifpackagelater{biblatex}{2012/07/01} {} {\PackageError{biblatex} {Outdated 'biblatex' package} - {The 'fiwi' style requires biblatex v1.7 or later.\MessageBreak + {The 'fiwi' style requires biblatex v2.0 or later.\MessageBreak You are using: '\csuse{ver@biblatex.sty}'.\MessageBreak This is a fatal error. I'm aborting now.}% \endinput} \RequireBibliographyStyle{standard} -\RequireBiber[2] +%\RequireBiber[2] \defcounter{highnamepenalty}{0} @@ -20,6 +20,7 @@ \renewcommand*{\multinamedelim}{\addslash}% \renewcommand*{\finalnamedelim}{\addslash}% +%\renewcommand*{\finentrypunct}{\iftoggle{dontprintorig}{AA}{BB\addperiod}} % Diverse Variablen @@ -52,10 +53,14 @@ \togglefalse{bibpages} \providetoggle{isreview} \togglefalse{isreview} +\providetoggle{ignorearticle} +\toggletrue{ignorearticle} +\DeclareBibliographyOption{ignorearticle}[true]{\settoggle{ignorearticle}{#1}} \DeclareBibliographyOption{partofcited}[true]{\settoggle{partofcitedflag}{#1}} \DeclareBibliographyOption{germ}[true]{\settoggle{germfassung}{#1}} +\DeclareBibliographyOption{translatedas}[true]{\settoggle{germfassung}{#1}} \DeclareBibliographyOption{noseries}[true]{% \ifstrequal{#1}{true} {\togglefalse{printseriesflag}} @@ -98,8 +103,8 @@ {} }% -\ExecuteBibliographyOptions{indexing=cite,maxnames=3,minnames=1,maxitems=9,useprefix=true,sorting=nyt,date=long,urldate=long,hyperref=auto,pagetracker=true,ibidtracker=context,citetracker=true,labelyear=true,isbn=false,babel=hyphen} -\ExecuteBibliographyOptions[misc,movie,video]{uniquename=false,labelyear=false} +\ExecuteBibliographyOptions{indexing=cite,maxnames=3,minnames=1,maxitems=9,useprefix=true,sorting=nyt,date=long,urldate=long,hyperref=auto,pagetracker=true,ibidtracker=context,citetracker=true,labelyear=true,isbn=false,babel=hyphen,} +\ExecuteBibliographyOptions[misc,movie,video]{uniquename=false,labelyear=false,labeltitle=true} \InitializeBibliographyStyle{% \let\bbx@lasthash\undefined} @@ -123,14 +128,17 @@ \iftoggle{bibpages} {\addspace\mkpageprefix[pagination]{#1}} {\addspace #1}} + \DeclareFieldFormat{postnote}{% \iftoggle{citepages} {\mkpageprefix[pagination]{#1}} {#1}} + \DeclareFieldFormat{volcitepages}{% \iftoggle{citepages} {\mkpageprefix[pagination]{#1}} {#1}} + \DeclareFieldFormat{multipostnote}{% \iftoggle{citepages} {\mkpageprefix[pagination]{#1}} @@ -166,7 +174,7 @@ {\addspace\mkbibparens{\textsuperscript{1}#1}}} \DeclareFieldFormat{origyearart}{\mkbibparens{#1}} \DeclareFieldFormat{origtit}{\mkbibparens{Original\addcolon\addspace #1}} -\DeclareFieldFormat{germfassung}{\mkbibbrackets{\bibstring{translatedto}\adddot\addcolon\addspace#1}} +\DeclareFieldFormat{germfassung}{\mkbibbrackets{\midsentence\bibstring{translatedto}\adddot\addcolon\addspace#1}} \DeclareFieldFormat{origyear}{\iftoggle{origyearsuperscript} {\textsuperscript{1}#1} {#1}} @@ -197,6 +205,7 @@ {\ifthenelse{\value{listcount}=3}{}{\addslash}}% {}}} + \DeclareNameAlias{byeditor}{bytranslator} \DeclareNameAlias{withafterword}{bytranslator} \DeclareNameAlias{byredactor}{bytranslator} @@ -296,21 +305,15 @@ \newcommand*{\mkfinalnamedelimfirst}[1]{\addspace\bibstring{and}\addspace} -\newbibmacro*{translatedversion}[1]{% - \toggletrue{intransdecision}% - \edef\@tempa{\noexpand\docsvlist{#1}}% - \def\do##1{\toggletrue{dontprintextrayear}\printtext[germfassung]{% - \fullcite{##1}}}% - \@tempa\toggletrue{dontprintorig}% - \togglefalse{dontprintextrayear}\togglefalse{intransdecision}} +%\newbibmacro*{translatedversion}[1]{% +% \toggletrue{intransdecision}% +% \edef\@tempa{\noexpand\docsvlist{#1}}% +% \def\do##1{\toggletrue{dontprintextrayear}\printtext[germfassung]{% +% \fullcite{##1}}}% +% \@tempa\toggletrue{dontprintorig}% +% \togglefalse{dontprintextrayear}\togglefalse{intransdecision}} -\newbibmacro*{review}[1]{% - \edef\@tempa{\noexpand\docsvlist{#1}}% - \def\do##1{\toggletrue{dontprintextrayear}\printtext{% - \mkbibquote{% - \iffieldundef{title}{}% - {\usebibmacro{title}}\bibstring{reviewof}\addspace\fullcite{##1}}}}% - \@tempa\togglefalse{dontprintextrayear}} + \renewbibmacro*{url+urldate}{% \printfield{url}% @@ -329,39 +332,9 @@ \field{sortkey} } \sort{ - \name{sortname} - \name{author} - \name{editor} - \name{translator} \field{maintitle} \field{sorttitle} - \field{title} - } - \sort{ - \field{sortyear} - \field{year} - } - \sort{ - \field{sorttitle} - \field{title} - } - \sort{ - \field[padside=left,padwidth=4,padchar=0]{volume} - \field[padside=left,padwidth=4,padchar=0]{number} - \literal{0000} - } -} - -\DeclareSortingScheme{filmtitle}{ - \sort{ - \field{presort} - } - \sort[final]{ - \field{sortkey} - } - \sort{ - \field{sorttitle} - \field{maintitle} + \field{title} } \sort{ \field{sorttitle} @@ -377,8 +350,46 @@ } } -\DeclareSortExclusion{misc,movie,video,reference,collection,periodical}{sortname,author,editor,translator} -\DeclareSortExclusion{book,incollection,collection}{maintitle} + + +% biber sorting + +\AtEndPreamble{% +\iftoggle{ignorearticle} +{\DeclareNosort{ +\nosort{type_title}{\regexp{\A.*\/}} +\nosort{type_title}{\regexp{\AThe\s+}} +\nosort{type_title}{\regexp{\ADie\s+}} +\nosort{type_title}{\regexp{\ADer\s+}} +\nosort{type_title}{\regexp{\ADas\s+}} +\nosort{type_title}{\regexp{\AEin\s+}} +\nosort{type_title}{\regexp{\AEine\s+}} +\nosort{type_title}{\regexp{\AA\s+}} +\nosort{type_title}{\regexp{\AUne\s+}} +\nosort{type_title}{\regexp{\AUn\s+}} +\nosort{type_title}{\regexp{\ALe\s+}} +\nosort{type_title}{\regexp{\ALa\s+}} +\nosort{type_title}{\regexp{\AGli\s+}} +\nosort{type_title}{\regexp{\AIl\s+}} +\nosort{type_title}{\regexp{\AEl\s+}} +\nosort{type_title}{\regexp{\ALes\s+}} +\nosort{type_title}{\regexp{\ALos\s+}} +\nosort{type_title}{\regexp{\AL'\s+}} +} +\DeclareSourcemap{ + \maps[datatype=bibtex]{ + \map{ + \step[fieldset=abstract, null] + \step[fieldset=annote, null] + \step[fieldset=annotation, null] +} } +}} +{} +\DeclareSortExclusion{book,incollection}{maintitle} +\DeclareSortExclusion{collection}{maintitle,author,editor} +} + +\DeclareSortExclusion{misc,video,movie}{author,editor,translator} % Data inheritance @@ -406,8 +417,10 @@ \NewBibliographyString{translatedto} \NewBibliographyString{prepublished} \NewBibliographyString{reviewof} -\NewBibliographyString{citepage} -\NewBibliographyString{citepages} +\NewBibliographyString{airdate} +\NewBibliographyString{undated} +%\NewBibliographyString{citepage} +%\NewBibliographyString{citepages} \DefineBibliographyStrings{german}{% andothers = {et al\adddot}, @@ -425,6 +438,8 @@ phdthesis ={Unver\"offentlichte Dissertation}, minutes = {min}, tvseason = {Staffel}, tvepisode = {Folge}, +airdate = {}, +undated = {undatiert}, translatedto = {dt\adddot}, reviewof = {Rezension von}, prepublished = {Online-Vorver\"offentlichung}, @@ -455,7 +470,7 @@ january = {Januar}, \DeclareRobustCommand{\film}{\textsc} \renewbibmacro*{bytranslator+others}{% Bei incollection wird translator nach dem Titel ausgegeben -\ifthenelse{\ifnameundef{translator} \or \iffieldequalstr{entrytype}{incollection}} +\ifthenelse{\ifnameundef{translator} \or \ifentrytype{incollection}} {} {\def\abx@tempa{bytranslator}% \ifnamesequal{translator}{commentator} @@ -523,7 +538,7 @@ january = {Januar}, \renewbibmacro*{author}{% \ifboolexpr{ - test \ifuseauthor + test {\ifuseauthor} and not test {\ifnameundef{author}} } @@ -602,9 +617,7 @@ january = {Januar}, \renewbibmacro*{date}{% \iffieldundef{year}% - {\iffieldundef{urlyear}% - {}% - {\printfield{urlyear}}}% + {\bibstring[\mkbibbrackets]{undated}\addcolon\addspace}% {\iffieldundef{month} {\printfield{labelyear}} {\iffieldundef{day} @@ -615,20 +628,33 @@ january = {Januar}, \newbibmacro*{labelyear+extrayear}{% \ifboolexpr{test {\iftoggle{usera}} -or test {\iffieldequalstr{entrytype}{set}}} +or test {\ifentrytype{set}}} {\usebibmacro{labelyear}} {\iffieldundef{year} - {} + {\bibstring[\mkbibbrackets]{undated}\addcolon\addspace} {\printtext{% \iffieldundef{endyear}% {\printfield{year}% \ifboolexpr{( test {\iftoggle{origyearwithyear}} - and not test {\iffieldundef{origyear}} - and test {\iffieldundef{origtitle}} )} + ( and not test {\iffieldundef{origyear}} + or test {\iffieldequalstr{relatedtype}{origpubin}} ) + and test {\iffieldundef{origtitle}} ) } {\iftoggle{origyearbrackets} - {\addthinspace\mkbibbrackets{\printfield{origyear}}} - {\addslash\printfield{origyear}}}{}}% + {\addthinspace\mkbibbrackets{% + \iffieldequalstr{relatedtype}{origpubin} + {\entrydata*{\thefield{related}}{% + \printfield[origyear]{year} + }} + {\printfield{origyear}} + }} + {\addslash% + \iffieldequalstr{relatedtype}{origpubin} + {\entrydata*{\thefield{related}}{% + \printfield[origyear]{year} + }} + {\printfield{origyear}} + }}{}}% {\printfield{year}\iffieldsequal{year}{endyear}% {}{\printfield{endyear}}}% \iftoggle{dontprintextrayear}% @@ -673,15 +699,21 @@ or test {\iffieldequalstr{entrytype}{set}}} \printfield[noformat]{title}% \newunit\printfield[noformat]{subtitle}}}% \printfield{titleaddon} - \ifboolexpr{ test {\iffieldundef{origyear}} - or (not test {\iffieldundef{origyear}} and test {\iftoggle{origyearwithyear}} - and test {\iffieldundef{origtitle}} )} + \ifboolexpr{ (test {\iffieldundef{origyear}} and not test {\iffieldequalstr{relatedtype}{origpubin}} ) + or (not test {\iffieldundef{origyear}} + and not test {\iffieldequalstr{relatedtype}{origpubin}} + and test {\iftoggle{origyearwithyear}} + and test {\iffieldundef{origtitle}} )} {} + {\iffieldequalstr{relatedtype}{origpubin} + {\setunit{\addspace}\printtext[origyearart]{\printfield{year}% + \iffieldundef{endyear}% + {}{\printfield{endyear}}}} {\iffieldundef{origtitle} {\setunit{\addspace}\printtext[origyearart]{\printfield{origyear}% \iffieldundef{origendyear}% {}{\printfield{origendyear}}}} - {} + {}} }} \newbibmacro*{mtitle+mstitle+vol+part+title+stitle}{% @@ -737,29 +769,62 @@ or test {\iffieldequalstr{entrytype}{set}}} + \newbibmacro*{decidetranslatedversion} {% \iftoggle{dontprintorig} {} {\ifboolexpr{% test {\iftoggle{germfassung}} - and - not test {\iffieldundef{usera}}} - {\toggletrue{dontprintorig}% - \usebibmacro{translatedversion}{\thefield{usera}}}% +and test {\iffieldequalstr{relatedtype}{translatedas}}} + {\toggletrue{dontprintorig}\toggletrue{intransdecision}% + \usebibmacro{related:translatedas}{\thefield{related}} + \togglefalse{intransdecision}}% {\usebibmacro{origyear+location+title}}% }} +\newbibmacro*{related:translatedas}[1]{% + \entrydata{#1}{% + \printtext[germfassung]{% + \usedriver{}{\thefield{entrytype}}}% + }} + +\newbibmacro*{review}[1]{% +\toggletrue{dontprintextrayear}\printtext{% + \mkbibquote{% + \iffieldundef{title}{}% + {\usebibmacro{title}}\bibstring{reviewof}\addspace% + \entrydata{#1}{% + \usedriver{}{\thefield{entrytype}}}% + }}% + \togglefalse{dontprintextrayear}} + \newbibmacro*{origyear+location+title}{% \iffieldundef{origtitle}% -{}{\setunit{}\newblock\printtext[origtit]{\printfield{origtitle}% +{\iffieldequalstr{relatedtype}{translationof} +{\entrydata*{\thefield{related}}{% +\setunit{}\newblock\printtext[origtit]{\printfield[noformat]{title}% +\iflistundef{location}{}% +{\adddot\addspace\printlist{location}% +\iftoggle{printpublisher} +{\iflistundef{publisher} +{} +{\setunit{\isdot\addcolon\addspace} +\printlist{publisher}\setunit{\addcomma\space}}} +{}}% +\addspace\printdate% +\iffieldundef{endyear}% +{}{\printfield{endyear}}% +}}} +{}} +{\setunit{}\newblock\printtext[origtit]{\printfield{origtitle}% \iflistundef{origlocation}{}% {\adddot\addspace\printlist{origlocation}% \iftoggle{printpublisher}% {\iflistundef{origpublisher}% {}% {\setunit{\isdot\addcolon\addspace} - \printlist{origpublisher}\setunit{\addcomma\space}}}% + \printlist{orgpublisher}\setunit{\addcomma\space}}}% {}% }% \iffieldundef{origyear}{}% @@ -769,10 +834,34 @@ or test {\iffieldequalstr{entrytype}{set}}} {}{\printfield{origendyear}}}% }}} +% serials +\newbibmacro*{movie:serials}{ +\addcomma\newunit% +\usebibmacro{filmloc}\addcomma\newunit% +\usebibmacro{filmorg} +\addspace\printdate% +\iffieldequalstr{endyear}{} +{\addspace .} +{}% +\newunit\newblock} + +%normale Filme +\newbibmacro*{movie:regular}{ +\addcomma\addspace +\usebibmacro{filmloc} +\addspace\printdate} + +%normale Filme +\newbibmacro*{movie:tv}{% +\usebibmacro{filmorg}% +\addcomma% +\printtext{\addspace\bibstring{airdate}\addspace\printdate}} + + \newbibmacro*{filmtitle} {\iffieldundef{maintitle} {\printfield[film]{title}} -{\printfield[film]{maintitle}}% +{\printfield[film]{maintitle}\newunit}% \iffieldundef{subtitle}% {}% {\setunit{}\addspace\printfield[plain]{subtitle}}% @@ -800,8 +889,12 @@ or test {\iffieldequalstr{entrytype}{set}}} {\printlist{organization}} } -\newbibmacro*{director}{ -\ifpunct{\unspace}{}\printnames[director]{author} +\newbibmacro*{director}{% +\ifnameundef{director} +{\ifnameundef{author} +{} +{\ifpunct{\unspace}{}\printnames[director]{author}}} +{\ifpunct{\unspace}{}\printnames[director]{director}} } \newbibmacro*{mtitle+vol+btitle+bstitle}{% @@ -832,7 +925,7 @@ or test {\iffieldequalstr{entrytype}{set}}} {\setunit*{\addcomma}}} \renewbibmacro*{journal+issuetitle}{% - \iffieldequalstr{entrytype}{periodical} + \ifentrytype{periodical} {\usebibmacro{periodical}} {\usebibmacro{journal}} \setunit*{\addspace}% @@ -880,13 +973,23 @@ or test {\iffieldequalstr{entrytype}{set}}} }% \newbibmacro*{origyear}{% -\iffieldundef{origyear}% +\ifboolexpr{ +not test {\iffieldequalstr{relatedtype}{origpubin}} +and (test {\iffieldundef{origyear}}% + )} {}% {\ifboolexpr{ (test {\iffieldundef{origtitle}} and not test {\iftoggle{origyearwithyear}} )} % - {\printtext[origyearbook]{\printfield{origyear}% - \iffieldundef{origendyear}{}{\printfield{origendyear}}}}% + {\printtext[origyearbook]{\iffieldequalstr{relatedtype}{origpubin} + {\entrydata*{\thefield{related}}{% + \printfield{year}% + \iffieldundef{endyear}% + {}{\printfield{endyear}}% + }}% + {\printfield{origyear}% + \iffieldundef{origendyear} + {}{\printfield{origendyear}}}}}% {}}% } @@ -975,7 +1078,7 @@ or test {\iffieldequalstr{entrytype}{set}}} \usebibmacro{begentry}% \usebibmacro{author/translator}% \newblock\toggletrue{isreview} -\usebibmacro{review}{\thefield{usera}}% +\usebibmacro{review}{\thefield{related}}% \togglefalse{isreview}\newunit\newblock \usebibmacro{bytranslator}% \newunit\newblock @@ -1010,7 +1113,9 @@ or test {\iffieldequalstr{entrytype}{set}}} \usebibmacro{journal+issuetitle}% \newunit\usebibmacro{chap+pag}% \newblock -\bibsentence\printfield{note}% +\iffieldundef{note} +{} +{\bibsentence\printfield{note}}% %\setunit{.}\newblock \usebibmacro{decidetranslatedversion}% \newblock @@ -1169,35 +1274,24 @@ or test {\iffieldequalstr{entrytype}{set}}} \usebibmacro{bibindex}% \usebibmacro{begentry}% \newblock% - \iffieldequalstr{entrysubtype}{serial} -% Film- und Fersehserien - {\usebibmacro{filmtitle}% - \newblock% - \usebibmacro{director}\addcomma\newunit% - \usebibmacro{filmloc}\addcomma\newunit% - \usebibmacro{filmorg} - \addspace\printdate% - \iffieldequalstr{endyear}{} - {\addspace .} - {}% + \usebibmacro{filmtitle}% \newunit\newblock% - \iffieldundef{pagetotal} + \usebibmacro{director}% +\iffieldundef{entrysubtype} +{\usebibmacro{movie:regular}}% +{\iffieldequalstr{entrysubtype}{serial}% +{\usebibmacro{movie:serials}}% +{\iffieldequalstr{entrysubtype}{tv}% +{\usebibmacro{movie:tv}}% +{\usebibmacro{movie:regular}}}}% +\iffieldundef{pagetotal} {}{ \iftoggle{filmruntime}{\addcomma\addspace\printfield{pagetotal}}{}} - \iffieldundef{note}{}{\printfield{note}} - \usebibmacro{pageref}} -% Normale Filme -{\usebibmacro{filmtitle}% - \newblock% - \usebibmacro{director}\addcomma\addspace - \usebibmacro{filmloc} - \addspace\printdate% - \iffieldundef{pagetotal} - {}{ - \iftoggle{filmruntime}{\addcomma\addspace\printfield{pagetotal}}{}} - \iffieldundef{note}{}{\printfield{note}} - \usebibmacro{pageref}}% - \usebibmacro{finentry}} + \iffieldundef{note}{}{\printfield{note}}% + \newunit\newblock +%\usebibmacro{doi+eprint+url} + \usebibmacro{pageref} + \usebibmacro{finentry}} \DeclareBibliographyDriver{online}{% \usebibmacro{bibindex}% |