diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-trad/trad-standard.bbx')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-trad/trad-standard.bbx | 776 |
1 files changed, 776 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-trad/trad-standard.bbx b/Master/texmf-dist/tex/latex/biblatex-trad/trad-standard.bbx new file mode 100644 index 00000000000..5b5afcddf06 --- /dev/null +++ b/Master/texmf-dist/tex/latex/biblatex-trad/trad-standard.bbx @@ -0,0 +1,776 @@ +%% Copyright (c) 2012 -- 2015 Marco Daniel +%% 2016 -- Moritz Wemheuer +%% +%% This package is released under the terms of the +%% LaTeX Project Public License v1.3c or later +%% See http://www.latex-project.org/lppl.txt +%% +\ProvidesFile{trad-standard.bbx}[2016/06/26 v0.3 biblatex-trad] +%==========================================% +%==========================================% +%==========================================% +\RequireBibliographyStyle{standard} +%==========================================% +%==========================================% +%==========================================% +\providebool{bbx:subentry} +\DeclareBibliographyOption{subentry}[true]{% + \setbool{bbx:subentry}{#1}} +\newbool{bbxtrad:doisequal} +\newbool{bbxtrad:eprintsequal} +\newbool{bbxtrad:urlsequal} +\newbool{bbxtrad:notesequal} +\newbool{bbxtrad:addendumsequal} +%==========================================% +%==========================================% +%==========================================% +\DeclareNameAlias{author}{default} +\DeclareNameAlias{editor}{default} +\DeclareNameAlias{translator}{default} +%==========================================% +%==========================================% +%==========================================% +% new commands and redefinitions +\newcommand*{\volumenumberdelim}{} % delim between number and volume +\renewcommand*{\intitlepunct}{\addspace} % after the bibstring in +\renewcommand*{\newunitpunct}{\addperiod\space} +\newcommand*{\newcommaunit}{\@ifstar\newcommaunitStar\newcommaunitNoStar} +\newcommand*{\newcommaunitStar}{\setunit*{\addcomma\space}} +\newcommand*{\newcommaunitNoStar}{\setunit{\addcomma\space}} +\renewcommand*{\labelnamepunct}{\addperiod\space} +\renewcommand*{\subtitlepunct}{\addperiod\space} +%==========================================% +%==========================================% +%==========================================% +% Field formatting +\DeclareFieldFormat*{title}{#1} +\DeclareFieldFormat[book,inbook,manual,thesis,proceedings]% + {title}{\mkbibemph{#1}} + +\DeclareFieldFormat*{number}{\mkbibparens{#1}} +\DeclareFieldFormat[book,incollection,inproceedings,proceedings]{number}{\biblstring{number}~#1} +\DeclareFieldFormat[techreport,report]{number}{#1} +\DeclareFieldFormat{edition}{% + \ifinteger{#1} + {\mkbibordedition{#1}~\bibstring{edition}} + {\MakeLowercase{#1}~\bibstring{edition}}} +\DeclareFieldFormat{chapter}{\bibstring{part}~#1} +\DeclareFieldFormat[article]{pages}{{#1}} +\DeclareFieldFormat[book,inproceedings,proceedings]{series}{\mkbibemph{#1}} +\DeclareFieldFormat{journaltitle}{\mkbibemph{#1}\isdot} +\DeclareFieldFormat{titlecase}{\MakeTitleCase{#1}} + +\newrobustcmd{\MakeTitleCase}[1]{% + \ifthenelse{\ifcurrentfield{booktitle}\OR\ifcurrentfield{booksubtitle}% + \OR\ifcurrentfield{maintitle}\OR\ifcurrentfield{mainsubtitle}% + \OR\ifcurrentfield{journaltitle}\OR\ifcurrentfield{journalsubtitle}% + \OR\ifcurrentfield{issuetitle}\OR\ifcurrentfield{issuesubtitle}% + \OR\ifentrytype{book}\OR\ifentrytype{mvbook}\OR\ifentrytype{bookinbook}% + \OR\ifentrytype{booklet}\OR\ifentrytype{suppbook}% + \OR\ifentrytype{collection}\OR\ifentrytype{mvcollection}% + \OR\ifentrytype{suppcollection}\OR\ifentrytype{manual}% + \OR\ifentrytype{periodical}\OR\ifentrytype{suppperiodical}% + \OR\ifentrytype{proceedings}\OR\ifentrytype{mvproceedings}% + \OR\ifentrytype{reference}\OR\ifentrytype{mvreference}% + \OR\ifentrytype{report}\OR\ifentrytype{thesis}} + {#1} + {\MakeSentenceCase{#1}}} + +\newbibmacro*{in:}{% + \printtext{% + \bibstring{in}% + \printunit{\intitlepunct}}} + +%==========================================% +%==========================================% +%==========================================% +% Setting the bibliography drivers: +\DeclareBibliographyDriver{article}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/translator+others}% + \setunit{\labelnamepunct}\newblock + \usebibmacro{title}% + \newunit + \printlist{language}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \usebibmacro{bytranslator+others}% + \newunit\newblock + \printfield{version}% + \newunit\newblock + \usebibmacro{journal+issuetitle}% + \newunit + \usebibmacro{byeditor+others}% + \newunit\newblock + \iftoggle{bbx:isbn} + {\printfield{issn}} + {}% + \newunit\newblock + \usebibmacro{doi+eprint+url}% + \newunit\newblock + \printfield{note}% + \newunit\newblock + \usebibmacro{addendum+pubstate}% + \setunit{\bibpagerefpunct}\newblock + \usebibmacro{pageref}% + \newunit\newblock + \iftoggle{bbx:related} + {\usebibmacro{related:init}% + \usebibmacro{related}} + {}% + \usebibmacro{finentry}} + +\DeclareBibliographyDriver{book}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/editor+others/translator+others}% + \setunit{\labelnamepunct}\newblock + \usebibmacro{maintitle+title}% + \newunit + \printlist{language}% + \newunit + \usebibmacro{byauthor}% + \newunit + \usebibmacro{byeditor+others}% + \newcommaunit + \usebibmacro{book:series+number}% + \newunit + \printfield{volumes}% + \newunit + \ifboolexpr{ + test {\iffieldundef{volume}} + and + test {\iffieldundef{part}} + and + test {\iffieldundef{number}} + }{}{\newblock}% + \usebibmacro{publisher+location+date}% + \newunit\newblock + \usebibmacro{chapter+pages}% + \newunit + \printfield{pagetotal}% + \newunit\newblock + \iftoggle{bbx:isbn} + {\printfield{isbn}} + {}% + \newunit\newblock + \usebibmacro{doi+eprint+url}% + \newunit\newblock + \printfield{note}% + \newunit\newblock + \usebibmacro{addendum+pubstate}% + \setunit{\bibpagerefpunct}\newblock + \usebibmacro{pageref}% + \newunit\newblock + \iftoggle{bbx:related} + {\usebibmacro{related:init}% + \usebibmacro{related}} + {}% + \usebibmacro{finentry}} + + +\DeclareBibliographyDriver{incollection}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/translator+others}% + \setunit{\labelnamepunct}\newblock + \usebibmacro{title}% + \newunit + \printlist{language}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \usebibmacro{in:}% + \usebibmacro{byeditor+others}% + \newcommaunit\newblock + \usebibmacro{maintitle+booktitle}% + \newunit\newblock + \iffieldundef{maintitle} + {\printfield{volume}% + \printfield{part}} + {}% + \newunit + \printfield{volumes}% + \newcommaunit\newblock + \usebibmacro{series+number}% + \newcommaunit\newblock + \usebibmacro{chapter+pages}% + \setunit{\addperiod\space} + \usebibmacro{publisher+location+date}% + \newunit\newblock + \iftoggle{bbx:isbn} + {\printfield{isbn}} + {}% + \newunit\newblock + \usebibmacro{doi+eprint+url}% + \newunit\newblock + \printfield{note}% + \newunit\newblock + \usebibmacro{addendum+pubstate}% + \setunit{\bibpagerefpunct}\newblock + \usebibmacro{pageref}% + \newunit\newblock + \iftoggle{bbx:related} + {\usebibmacro{related:init}% + \usebibmacro{related}} + {}% + \usebibmacro{finentry}} + +\DeclareBibliographyDriver{inproceedings}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/translator+others}% + \setunit{\labelnamepunct}\newblock + \usebibmacro{title}% + \newunit + \printlist{language}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \usebibmacro{in:}% + \iffieldundef{crossref} + {\usebibmacro{inproc:crossref:full}} + {\usebibmacro{crossref:label}} + \usebibmacro{chapter+pages}% + \iffieldundef{crossref} + {\usebibmacro{inproc:crossref:extra}} + {\usebibmacro{inproc:crossref:conditional}} + \setunit{\bibpagerefpunct}\newblock + \usebibmacro{pageref}% + \newunit\newblock + \iftoggle{bbx:related} + {\usebibmacro{related:init}% + \usebibmacro{related}} + {}% + \usebibmacro{finentry}} + +\DeclareBibliographyDriver{online}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/editor+others/translator+others}% + \setunit{\labelnamepunct}\newblock + \usebibmacro{title}% + \newunit + \printlist{language}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \usebibmacro{byeditor+others}% + \newunit\newblock + \printfield{version}% + \newunit\newblock + \printlist{organization}% + \newunit\newblock + \usebibmacro{date}% + \newunit\newblock + \iftoggle{bbx:eprint} + {\usebibmacro{eprint}} + {}% + \newunit\newblock + \usebibmacro{url+urldate}% + \newunit\newblock + \printfield{note}% + \newunit\newblock + \usebibmacro{addendum+pubstate}% + \setunit{\bibpagerefpunct}\newblock + \usebibmacro{pageref}% + \newunit\newblock + \iftoggle{bbx:related} + {\usebibmacro{related:init}% + \usebibmacro{related}} + {}% + \usebibmacro{finentry}} + +\DeclareBibliographyDriver{proceedings}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{editor+others}% + \setunit{\labelnamepunct}\newblock + \usebibmacro{maintitle+title}% + \newunit + \printlist{language}% + \newunit + \ifboolexpr{ + test {\iffieldundef{venue}} + and + test {\iffieldundef{eventtitle}} + and + test {\iffieldundef{eventyear}} + }% + {}% + {% + \newunit\newblock + \usebibmacro{event+venue+date}% + \newunit\newblock + }% + \usebibmacro{byeditor+others}% + \newcommaunit + \usebibmacro{book:series+number}% + \newcommaunit% + \iffieldundef{maintitle}% + {\printfield{volumes}% + \newcommaunit}% + {}% + \newunit + \printlist{location}% + \newcommaunit + \printfield{edition}% + \newcommaunit + \usebibmacro{date}% + \newunit + \printlist{organization}% + \newcommaunit* + \printlist{publisher}% + \newunit + \usebibmacro{chapter+pages}% + \newunit + \printfield{pagetotal}% + \newunit\newblock + \iftoggle{bbx:isbn} + {\printfield{isbn}} + {}% + \newunit\newblock + \usebibmacro{doi+eprint+url}% + \newunit\newblock + \printfield{note}% + \newunit\newblock + \usebibmacro{addendum+pubstate}% + \setunit{\bibpagerefpunct}\newblock + \usebibmacro{pageref}% + \newunit\newblock + \iftoggle{bbx:related} + {\usebibmacro{related:init}% + \usebibmacro{related}} + {}% + \usebibmacro{finentry}} + +\DeclareBibliographyDriver{thesis}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author}% + \setunit{\labelnamepunct}\newblock + \usebibmacro{title}% + \newunit + \printlist{language}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \printfield{type}% + \newcommaunit + \usebibmacro{institution+location+date}% + \newunit\newblock + \usebibmacro{chapter+pages}% + \newunit + \printfield{pagetotal}% + \newunit\newblock + \iftoggle{bbx:isbn} + {\printfield{isbn}} + {}% + \newunit\newblock + \usebibmacro{doi+eprint+url}% + \newunit\newblock + \printfield{note}% + \newunit\newblock + \usebibmacro{addendum+pubstate}% + \setunit{\bibpagerefpunct}\newblock + \usebibmacro{pageref}% + \newunit\newblock + \iftoggle{bbx:related} + {\usebibmacro{related:init}% + \usebibmacro{related}} + {}% + \usebibmacro{finentry}} + +%added 20150828 +\DeclareBibliographyDriver{report}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author}% + \setunit{\labelnamepunct}\newblock + \usebibmacro{title}% + \newunit + \printlist{language}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \printfield{type}% + \setunit*{\addspace}% + \printfield{number}% + \newunit\newblock + \printfield{version}% + \newcommaunit\newblock + \usebibmacro{institution+location+date}% + \newunit\newblock + \usebibmacro{chapter+pages}% + \newunit + \printfield{pagetotal}% + \newunit\newblock + \iftoggle{bbx:isbn} + {\printfield{isrn}} + {}% + \newunit\newblock + \usebibmacro{doi+eprint+url}% + \newunit\newblock + \printfield{note}% + \newunit\newblock + \usebibmacro{addendum+pubstate}% + \setunit{\bibpagerefpunct}\newblock + \usebibmacro{pageref}% + \newunit\newblock + \iftoggle{bbx:related} + {\usebibmacro{related:init}% + \usebibmacro{related}} + {}% + \usebibmacro{finentry}} + +%added 20150829 +% - changed order of note and date +\DeclareBibliographyDriver{misc}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/editor+others/translator+others}% + \setunit{\labelnamepunct}\newblock + \usebibmacro{title}% + \newunit + \printlist{language}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \usebibmacro{byeditor+others}% + \newunit\newblock + \printfield{howpublished}% + \newcommaunit\newblock + \printfield{type}% + \newcommaunit + \printfield{version}% + \newcommaunit + \usebibmacro{organization+location+date}% + \newunit\newblock + \usebibmacro{doi+eprint+url}% + \newunit\newblock + \printfield{note}% + \newunit\newblock + \usebibmacro{addendum+pubstate}% + \setunit{\bibpagerefpunct}\newblock + \usebibmacro{pageref}% + \newunit\newblock + \iftoggle{bbx:related} + {\usebibmacro{related:init}% + \usebibmacro{related}} + {}% + \usebibmacro{finentry}} + +\DeclareBibliographyDriver{unpublished}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author}% + \setunit{\labelnamepunct}\newblock + \usebibmacro{title}% + \newunit + \printlist{language}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \printfield{howpublished}% + \newcommaunit* + \printfield{note}% + \newcommaunit* + \usebibmacro{location+date}% + \newunit\newblock + \iftoggle{bbx:url} + {\usebibmacro{url+urldate}} + {}% + \newunit\newblock + \usebibmacro{addendum+pubstate}% + \setunit{\bibpagerefpunct}\newblock + \usebibmacro{pageref}% + \newunit\newblock + \iftoggle{bbx:related} + {\usebibmacro{related:init}% + \usebibmacro{related}} + {}% + \usebibmacro{finentry}} + +%==========================================% +%==========================================% +%==========================================% +%new-/redefinition of bibmacros +\newbibmacro*{crossref:label}{% + \usebibmacro{maintitle+booktitle:noemph}% + \setunit{\addspace} + \entrydata + {\strfield{crossref}} + {\printtext{\mkbibbrackets{\printfield{labelnumber}}}}} + +\newbibmacro*{maintitle+booktitle:noemph}{% + \iffieldundef{maintitle} + {} + {\usebibmacro{maintitle:noemph}% + \newunit\newblock + \iffieldundef{volume} + {} + {\printfield{volume}% + \printfield{part}% + \setunit{\addcolon\space}}}% + \usebibmacro{booktitle:noemph}% + \newunit} + +\newbibmacro*{maintitle:noemph}{% + \ifboolexpr{ + test {\iffieldundef{maintitle}} + and + test {\iffieldundef{mainsubtitle}} + }% + {}% + {\printtext{% + \printfield[titlecase]{maintitle}% + \setunit{\subtitlepunct}% + \printfield[titlecase]{mainsubtitle}}% + \newunit}% + \printfield{maintitleaddon}} + +\newbibmacro*{booktitle:noemph}{% + \ifboolexpr{ + test {\iffieldundef{booktitle}} + and + test {\iffieldundef{booksubtitle}} + }% + {}% + {\printtext{% + \printfield[titlecase]{booktitle}% + \setunit{\subtitlepunct}% + \printfield[titlecase]{booksubtitle}}% + \newunit}% + \printfield{booktitleaddon}} + +\newbibmacro*{inproc:crossref:full}{% + \ifboolexpr{ + test {\ifnameundef{editor}} + and + test {\ifnameundef{editora}} + and + test {\ifnameundef{editorb}} + and + test {\ifnameundef{editorc}} + and + test {\ifnameundef{translator}} + }% + {}% + {\usebibmacro{byeditor+others}\newcommaunit}% + \usebibmacro{maintitle+booktitle}% + \newunit + \usebibmacro{event+venue+date}% + \newcommaunit + \iffieldundef{maintitle}% + {\printfield{volume}% + \printfield{part}% + \ifboolexpr{ + test {\iffieldundef{volume}} + and + test {\iffieldundef{part}} + }% + {}% + {\setunit{\addspace\bibstring{ofseries}\addspace}}}% + {}% + \usebibmacro{series+number:emphcond}% + \newcommaunit% + \iffieldundef{maintitle}% + {\printfield{volumes}% + \newcommaunit}% + {}% +} + +\newbibmacro*{inproc:crossref:extra}{% + \newcommaunit + \printlist{location}% + \newcommaunit + \printfield{edition}% + \newunit + \printlist{organization}% + \newcommaunit* + \printlist{publisher}% + \newcommaunit + \usebibmacro{date}% + \newunit\newblock + \iftoggle{bbx:isbn} + {\printfield{isbn}} + {}% + \newunit\newblock + \usebibmacro{doi+eprint+url} + \newunit\newblock + \printfield{note}% + \newunit\newblock + \usebibmacro{addendum+pubstate}} + +\newbibmacro*{inproc:crossref:conditional}{% + \entrydata*{\strfield{crossref}}{ + \iffieldsequal{doi}{saveddoi} + {\global\booltrue{bbxtrad:doisequal}} + {\global\boolfalse{bbxtrad:doisequal}} + \iffieldsequal{eprint}{savedeprint} + {\global\booltrue{bbxtrad:eprintsequal}} + {\global\boolfalse{bbxtrad:eprintsequal}} + \iffieldsequal{url}{savedurl} + {\global\booltrue{bbxtrad:urlsequal}} + {\global\boolfalse{bbxtrad:urlsequal}} + \iffieldsequal{note}{savednote} + {\global\booltrue{bbxtrad:notesequal}} + {\global\boolfalse{bbxtrad:notesequal}} + \iffieldsequal{addendum}{savedaddendum} + {\global\booltrue{bbxtrad:addendumsequal}} + {\global\boolfalse{bbxtrad:addendumsequal}}} + \newunit\newblock + \iftoggle{bbx:doi} + {\ifbool{bbxtrad:doisequal}{}{\printfield{saveddoi}}} + {}% + \newunit\newblock + \iftoggle{bbx:eprint} + {\ifbool{bbxtrad:eprintsequal}{}{\usebibmacro{eprint}}} + {}% + \newunit\newblock + \iftoggle{bbx:url} + {\ifbool{bbxtrad:urlsequal}{}{\usebibmacro{url+urldate}}} + {}% + \newunit\newblock + \ifbool{bbxtrad:notesequal}{}{\printfield{note}}% + \newunit\newblock + \ifbool{bbxtrad:addendumsequal}{}{\printfield{addendum}}} + +\renewbibmacro*{journal+issuetitle}{% + \usebibmacro{journal}% + \newcommaunit*% + \iffieldundef{series} + {} + {\newunit + \printfield{series}% + \setunit{\addcomma\space}}% + \usebibmacro{volume+number+pages+eid}% + \newcommaunit +% \setunit{\addspace}% + \usebibmacro{issue+date-parens}% + \setunit*{\addcolon\space}% + \usebibmacro{issue}% + \newunit} + +\newbibmacro*{volume+number+pages+eid}{% + \printfield{volume}% + \setunit*{\volumenumberdelim}% + \printfield{number}% + \setunit{\addcolon} + \printfield{pages}% + \newcommaunit% + \printfield{eid}}% + + +\renewbibmacro*{byeditor+others}{% + \ifnameundef{editor} + {} + {% + \printnames[byeditor]{editor}% + \setunit{\addcomma\space}% + \usebibmacro{editorlstr}% + \clearname{editor}% + \newunit}% + \usebibmacro{byeditorx}% + \usebibmacro{bytranslator+others} +} + + +\newbibmacro*{editorlstr}{% + \ifboolexpr{ + test {\ifnumgreater{\value{editor}}{1}} + or + test {\ifandothers{editor}} + }% + {\biblstring{editors}}% + {\biblstring{editor}}% +} + +\renewbibmacro*{series+number}{% + \printfield{number}% + \setunit*{\addspace\bibstring{inseries}\addspace}% + \printfield{series}% + \newunit} + +\newbibmacro*{series+number:emphcond}{% + \printfield{number}% + \setunit*{\addspace\bibstring{inseries}\addspace}% + \ifboolexpr{ + not test {\iffieldundef{volume}} + }% + {\printfield{series}}% + {\ifboolexpr{ + test {\iffieldundef{volume}} + and + test {\iffieldundef{part}} + and + test {\iffieldundef{number}} + and + test {\ifentrytype{book}} + }% + {\newunit\newblock}% + {}% + \printfield[noformat]{series}}% + \newunit} + +\newbibmacro*{book:series+number}{% + \iffieldundef{maintitle}% + {\printfield{volume}% + \printfield{part}% + \ifboolexpr{ + test {\iffieldundef{volume}} + and + test {\iffieldundef{part}} + }% + {}% + {\setunit{\addspace\bibstring{ofseries}\addspace}}}% + {}% + \usebibmacro{series+number:emphcond}% + \newunit} + +\renewbibmacro*{volume+number+eid}{% + \printfield{volume}% + \setunit*{\volumenumberdelim}% + \printfield{number}% + \setunit{\addcomma\space}% + \printfield{eid}} + +\renewbibmacro*{publisher+location+date}{% + \printlist{publisher}% + \newcommaunit* + \printlist{location}% + \newcommaunit* + \printfield{edition}% + \newcommaunit* + \usebibmacro{date}% + \newunit} + +\renewbibmacro*{institution+location+date}{% + \printlist{institution}% + \newcommaunit* + \printlist{location}% + \newcommaunit* + \usebibmacro{date}% + \newunit} + +\newbibmacro*{location+date+publisher}{% + \printlist{location}% + \newcommaunit* + \printfield{edition}% + \newcommaunit* + \usebibmacro{date}% + \newunit + \printlist{publisher}} + +\newbibmacro*{issue+date-parens}{% + \iffieldundef{issue}% + {\usebibmacro{date}}% + {\printfield{issue}% + \newcommaunit*% + \usebibmacro{date}}% + \newunit} + + +\endinput |