diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx | 1983 |
1 files changed, 1152 insertions, 831 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx index 01fb395227a..199eed988bb 100644 --- a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx @@ -13,7 +13,10 @@ %% The Current Maintainer of this work is Daniel B. Marques. \ProvidesFile{abnt.bbx}% -[2016/07/06\space v2.0.1\space ABNT biblatex citation style]% +[2016/10/03\space v3.0\space ABNT BibLaTeX citation style]% + + +% Init >>>1 \RequireBiber[3]% \DeclareLanguageMapping{brazilian}{abnt-brazilian}% @@ -24,36 +27,40 @@ \InitializeBibliographyStyle{\global\undef\bbx@lasthash}% +% <<<1 + -% ---------- -% Options -% ---------- +% Options >>>1 -% Option to make titles bold. -\newtoggle{bftitles}% -\DeclareBibliographyOption{bftitles}[true]{% - \settoggle{bftitles}{#1}}% +% Print titles in italics >>>2 +\newtoggle{ittitles}% +\DeclareBibliographyOption{ittitles}[true]{% + \settoggle{ittitles}{#1}}% +% <<<2 -% Option to use small caps in the bibliography. +% Use small caps in the bibliography >>>2 \newtoggle{scbib}% \DeclareBibliographyOption{scbib}[true]{% \settoggle{scbib}{#1}}% +% <<<2 -% Option to hide "[s.l.]". +% Hide "[s.l.]" >>>2 \newtoggle{nosl}% \DeclareBibliographyOption{nosl}[true]{% \settoggle{nosl}{#1}}% \DeclareEntryOption[boolean]{nosl}[true]{% \settoggle{nosl}{#1}}% +% <<<2 -% Option to hide "[s.n.]". +% Hide "[s.n.]" >>>2 \newtoggle{nosn}% \DeclareBibliographyOption{nosn}[true]{% \settoggle{nosn}{#1}}% \DeclareEntryOption[boolean]{nosn}[true]{% \settoggle{nosn}{#1}}% +% <<<2 -% Option to hide "[S.l.: sn]". +% Hide "[S.l.: sn]" >>>2 \newtoggle{noslsn}% \DeclareBibliographyOption{noslsn}[true]{% \settoggle{noslsn}{#1}% @@ -63,17 +70,19 @@ \settoggle{noslsn}{#1}% \settoggle{nosl}{#1}% \settoggle{nosn}{#1}}% +% <<<2 +% Repeat titles >>>2 \newtoggle{repeattitle}% \DeclareBibliographyOption[boolean]{repeattitles}[true]{% \settoggle{repeattitle}{#1}% \ifstrequal{#1}{true}{% - \newbibmacro*{bbx:savetitle}{}% - \newbibmacro*{bbx:savesubtitle}{}% + \renewbibmacro*{bbx:savetitle}{}% + \renewbibmacro*{bbx:savesubtitle}{}% }{% \ExecuteBibliographyOptions{pagetracker}% - \newbibmacro*{bbx:savetitle}{\savefield{title}{\bbx@lasttitle}}% - \newbibmacro*{bbx:savesubtitle}{\savefield{subtitle}{\bbx@lastsubtitle}}% + \renewbibmacro*{bbx:savetitle}{\savefield{title}{\bbx@lasttitle}}% + \renewbibmacro*{bbx:savesubtitle}{\savefield{subtitle}{\bbx@lastsubtitle}}% }% }% \DeclareEntryOption[boolean]{repeattitle}[true]{% @@ -82,7 +91,19 @@ \DeclareEntryOption[boolean]{repeattitles}[true]{% \settoggle{repeattitle}{#1}% }% +% <<<2 + +% Repeat first fields >>>2 +\newtoggle{repeatfirstfields}% +\DeclareBibliographyOption[boolean]{repeatfirstfields}[true]{% + \settoggle{repeatfirstfields}{#1}% +}% +\DeclareEntryOption[boolean]{repeatfirstfields}[true]{% + \settoggle{repeatfirstfields}{#1}% +}% +% <<<2 +% Repeat fields >>>2 \newtoggle{repeatfields}% \DeclareBibliographyOption[boolean]{repeatfields}[true]{% \settoggle{repeatfields}{#1}% @@ -102,31 +123,46 @@ \DeclareEntryOption[boolean]{repeatfields}[true]{% \settoggle{repeatfields}{#1}% }% +% <<<2 -% Option to use the original dashes instead of underscores. +% Use original dashes instead of underscores >>>2 +\newtoggle{usedashes}% \DeclareBibliographyOption[boolean]{usedashes}[true]{% - \ifstrequal{#1}{true}% - {\renewcommand*{\bibnamedash}{% - \ifdimless{\leftmargin}{0.75em}% - {\mbox{\textemdash\addspace}}% - {\makebox[\leftmargin][l]{% - \ifdimless{\leftmargin}{1.25em}% - {\textendash}% - {\textemdash}}}}}{}}% - -% Option to use hanging indentation. + \settoggle{usedashes}{#1}% + \ifstrequal{#1}{true}{% + \renewcommand*{\bibnamedash}{% + \ifdimless{\leftmargin}{0.75em}{% + \mbox{\textemdash\addspace}% + }{% else + \makebox[\leftmargin][l]{% + \ifdimless{\leftmargin}{1.25em}{% + \textendash% + }{% + \textemdash% + }% + }% + }% + }% + }{}% +}% +% <<<2 + +% Use hanging indentation >>>2 \setlength{\bibhang}{0pt}% \DeclareBibliographyOption{indent}[true]{% - \ifstrequal{#1}{true}% - {\setlength{\bibhang}{\ifnumequal{\parindent}{0}{1em}{\parindent}}}% - {}}% + \ifstrequal{#1}{true}{% + \setlength{\bibhang}{% + \ifnumequal{\parindent}{0}{1em}{\parindent}% + }% + }{}}% +% <<<2 +% <<<1 -% ---------- -% DeclareSortingScheme -% ---------- -\DeclareSortingScheme{nty}{% +% Data model and sorting >>>1 + +\DeclareSortingScheme{nty}{%% >>>2 \sort{% \field{presort}% }% @@ -165,15 +201,10 @@ \field[padside=left,padwidth=4,padchar=0]{volume}% \literal{0000}% }% -}% +}% <<<2 - -% ---------- -% DeclareSourcemap -% ---------- - -% This maps some fields used in abntex2cite to biblatex fields. -\DeclareSourcemap{% +\DeclareSourcemap{%% >>>2 + % This maps some fields used in abntex2cite to biblatex fields. \maps[datatype=bibtex]{% \map{% \step[fieldsource=conference-number,fieldtarget=number]% @@ -206,16 +237,16 @@ \step[fieldset=bookpagination, fieldvalue={sheet}]% }% }% -}% +}% <<<2 -\DeclareDatamodelFields[type=field,datatype=literal]{% +\DeclareDatamodelFields[type=field,datatype=literal]{%% >>>2 section,% illustrated,% dimensions,% reprinted-text,% -}% +}% <<<2 -\DeclareDatamodelEntryfields[monography]{% +\DeclareDatamodelEntryfields[monography]{%% >>>2 location,% author,% chapter% @@ -233,64 +264,109 @@ addendum,% pubstate,% pageref,% - date}% + date% +}% <<<2 +% <<<1 -% ---------- -% newcommand -% ---------- -\newcommand{\abntnum}[1]{\ifrmnum{#1}{\rmntonum{#1}}{#1}}% +% Formatting >>>1 -% Use "John Doe, Jack Roe and Joe Blow" for byeditor+others, -% "Doe; Roe; Blow" everywhere else. -\newtoggle{byeditor+others}% -\renewcommand*{\multinamedelim}{\iftoggle{byeditor+others}{\addcomma\addspace}{\addsemicolon\addspace}}% -\renewcommand*{\finalnamedelim}{\iftoggle{byeditor+others}{\addspace\bibstring{and}\addspace}{\addsemicolon\addspace}}% - -\renewcommand*{\nameyeardelim}{\addcomma\addspace}% - -\renewcommand*{\subtitlepunct}{\addcolon\addspace}% +% Capitalization commands >>>2 -% Use a period to separate the backref from what comes before -% E.g.: "1973. p. 33–79. Ver p. 2." -\renewcommand*{\bibpagerefpunct}{\addperiod\addspace}% +\renewcommand*{\mkbibacro}[1]{% + \iftoggle{scbib}{% + \textsc{\MakeLowercase{#1}}% + }{\MakeUppercase{#1}}% +}% -% A command to make the first word in a sentence uppercase, -% used for the title when a book has no author. \newcommand\FirstWordUpper[1]{\@firstwordupper#1 \@nil}% \newcommand\@firstwordupper{}% \def\@firstwordupper#1 #2\@nil{\MakeUppercase{#1} #2\unskip}% -% A command to print the first word in a sentence in small caps, -% used for the title when a book has no author. \newcommand\FirstWordSC[1]{\@firstwordsc#1 \@nil}% \newcommand\@firstwordsc{}% \def\@firstwordsc#1 #2\@nil{\textsc{#1} #2\unskip}% -% A command to print the first word in a sentence in lowercase and in small caps. \newcommand\FirstWordLCSC[1]{\@firstwordlcsc#1 \@nil}% \newcommand\@firstwordlcsc{}% \def\@firstwordlcsc#1 #2\@nil{\textsc{\MakeLowercase{#1}} #2\unskip}% -% This has to do with the dashed option -\newbool{bbx@inset}% +\long\def\addto#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}}% -% This replaces repeated authors' names. -\renewcommand*{\bibnamedash}{\underline{\hspace*{4em}}\addperiod\addspace}% +\def\traceparam#1{\def\paramL{}\traceparamA #1\end}% +\def\traceparamA{\futurelet\next\traceparamB}% +\def\traceparamB{% + \let\nexts=\undefined% + \expandafter\ifx\space\next \let\nexts=\traceparamS \fi% + \ifx\bgroup\next \let\nexts=\traceparamD \fi% + \ifx\end\next \let\nexts=\traceparamE \fi% + \ifx\nexts\undefined \let\nexts=\traceparamC\fi% + \nexts% +}% +\def\traceparamS{\addto\paramL{ }\afterassignment\traceparamA \let\next= }% +\def\traceparamC#1{\addto\paramL{#1}\traceparamA}% +\def\traceparamD#1{% + \expandafter\addto\expandafter\paramL\expandafter% + {\expandafter\noexpand\csname ll:\detokenize{#1}\endcsname}% + \expandafter\def\csname ll:\detokenize{#1}\endcsname{\normalfont #1}% + \traceparamA% +}% +\def\traceparamE\end{}% -% Use or not small caps for acronyms, depending on the scbib option. -\renewcommand*{\mkbibacro}[1]{% - \iftoggle{scbib}% - {\textsc{\MakeLowercase{#1}}}% - {#1}}% +\def\smartuppercase#1{% + \bgroup % + \traceparam{#1}% + \MakeUppercase{\paramL}% + \egroup% +}% +\def\smartlowercase#1{% + \bgroup % + \traceparam{#1}% + \MakeLowercase{\paramL}% + \egroup% +}% -% ---------- -% DeclareNameFormat -% ---------- +\def\smartlcsc#1{% + \bgroup % + \traceparam{#1}% + \textsc{\MakeLowercase{\paramL}}% + \egroup% +}% -\DeclareNameFormat{LAST-first}{% +\def\smartsc#1{% + \bgroup % + \traceparam{#1}% + \textsc{\paramL}% + \egroup% +}% + +% <<<2 + +% Name format >>>2 + +% Name delimiters >>>3 +\newtoggle{byeditor+others}% + +\renewcommand*{\multinamedelim}{% + \iftoggle{byeditor+others}{% + \addcomma\addspace% + }{% + \addsemicolon\addspace% + }% +}% + +\renewcommand*{\finalnamedelim}{% + \iftoggle{byeditor+others}{% + \addspace\bibstring{and}\addspace% + }{% + \addsemicolon\addspace% + }% +}% +% <<< + +\DeclareNameFormat{LAST-first}{%% >>>3 \ifgiveninits{% \usebibmacro{name:family-given}{% \iftoggle{scbib}{% @@ -315,14 +391,15 @@ {\namepartsuffix}% }% \usebibmacro{name:andothers}% -}% +}% <<< -\DeclareNameFormat{full}{% +\DeclareNameFormat{full}{%% >>>3 \usebibmacro{name:given-family}% {\namepartfamily}% {\namepartgiven}% {\namepartprefix}% - {\namepartsuffix}}% + {\namepartsuffix}% +}% <<< \DeclareNameAlias{default}{LAST-first}% @@ -340,72 +417,189 @@ \DeclareNameAlias{withforeword}{given-family}% \DeclareNameAlias{withafterword}{given-family}% -% ---------- -% DeclareFieldFormat -% ---------- +\DeclareBibliographyAlias{legislation}{article}% +\DeclareBibliographyAlias{jurisdiction}{article}% +\DeclareBibliographyAlias{legal}{article}% -% Use bold or italics for the main titles, depending on what the user chose. -\DeclareFieldFormat{journaltitle}{\iftoggle{bftitles}{\addspace\mkbibbold{#1}\isdot}{\addspace\mkbibemph{#1}\isdot}}% -\DeclareFieldFormat{issuetitle}{\iftoggle{bftitles}{\addspace\mkbibbold{#1}\isdot}{\addspace\mkbibemph{#1}\isdot}}% -\DeclareFieldFormat{maintitle}{\iftoggle{bftitles}{\addspace\mkbibbold{#1}\isdot}{\addspace\mkbibemph{#1}\isdot}}% -\DeclareFieldFormat{booktitle}{\iftoggle{bftitles}{\addspace\mkbibbold{#1}\isdot}{\addspace\mkbibemph{#1}\isdot}}% -\DeclareFieldFormat{citetitle}{\iftoggle{bftitles}{\addspace\mkbibbold{#1}\isdot}{\addspace\mkbibemph{#1}\isdot}}% -\DeclareFieldFormat*{title}{\iftoggle{bftitles}{\addspace\mkbibbold{#1}\isdot}{\addspace\mkbibemph{#1}\isdot}}% +% <<<2 -\DeclareFieldFormat{authortype}{\bibsentence#1} -\DeclareFieldFormat{editortype}{\bibsentence#1} +% Field format >>>2 -% Use normal text for the title in these entries. -\DeclareFieldFormat% - [article, inbook, incollection, bookinbook, inproceedings, unpublished]% - {title}{\addspace #1\isdot}% +% Standard entry fields >>>3 -\DeclareNumChars*{,-/}% Strings with these characters will still be considered numbers. +\DeclareFieldFormat{authortype}{\printtext[parens]{\bibsentence#1}}% +\DeclareFieldFormat{editortype}{\printtext[parens]{\bibsentence#1}}% -% Add "n." and "v." abbreviations and make them, along with "p.", always lowercase, -% even if preceded by a period. E.g.: "London: Routledge, 2009. p. 235–250." -\DeclareFieldFormat*{number}{% - \ifnumerals{#1}% - {\addspace \MakeLowercase{\bibstring{number}}~\abntnum{#1}}% - {\addspace #1\isdot}}% +\DeclareFieldFormat{nameaddon}{\addspace #1}% -\DeclareFieldFormat[book, proceedings, inproceedings, misc]{number}{\addcomma\addspace #1}% +% titles >>>4 -\DeclareFieldFormat*{volume}{% +\renewcommand*{\subtitlepunct}{\addcolon\addspace}% +\renewcommand*{\bibpagerefpunct}{\addcomma\addspace}% + +\DeclareFieldFormat{journaltitle}{%% >>> + \iftoggle{ittitles}{% + \addspace\mkbibemph{#1}\isdot% + }{% + \addspace\mkbibbold{#1}\isdot% + }% +}%% <<< +\DeclareFieldFormat{issuetitle}{%% >>> + \iftoggle{ittitles}{% + \addspace\mkbibemph{#1}\isdot% + }{% + \addspace\mkbibbold{#1}\isdot% + }% +}%% <<< +\DeclareFieldFormat{maintitle}{%% >>> + \iftoggle{ittitles}{% + \addspace\mkbibemph{#1}\isdot% + }{% + \addspace\mkbibbold{#1}\isdot% + }% +}%% <<< +\DeclareFieldFormat{booktitle}{%% >>> + \iftoggle{ittitles}{% + \addspace\mkbibemph{#1}\isdot% + }{% + \addspace\mkbibbold{#1}\isdot% + }% +}%% <<< +\DeclareFieldFormat{citetitle}{%% >>> + \iftoggle{ittitles}{% + \addspace\mkbibemph{#1}\isdot% + }{% + \addspace\mkbibbold{#1}\isdot% + }% +}%% <<< +\DeclareFieldFormat*{title}{%% >>> + \iftoggle{ittitles}{% + \addspace\mkbibemph{#1}\isdot% + }{% + \addspace\mkbibbold{#1}\isdot% + }% +}%% <<< +\DeclareFieldFormat[% title >>> + article,% + legislation,% + jurisdiction,% + legal,% + inbook,% + incollection,% + bookinbook,% + inproceedings,% + unpublished% +]{title}{\addspace #1\isdot}%% <<< + +% <<< + +% number >>>4 +\DeclareNumChars*{,-/}% +\newcommand{\abntnum}[1]{\ifrmnum{#1}{\rmntonum{#1}}{#1}}% +\DeclareFieldFormat*{number}{%% >>> + \ifnumerals{#1}% + {\addspace \MakeLowercase{\bibstring{number}}~\abntnum{#1}}% + {\addspace #1\isdot}% +}%% <<< +\DeclareFieldFormat[% number >>> + book,% + collection,% + proceedings,% + inproceedings,% + misc% +]{number}{\addcomma\addspace #1}%% <<< +% <<< + +\DeclareFieldFormat*{volume}{%% >>>4 \ifnumerals{#1}% {\addspace \MakeLowercase{\bibstring{volume}}~#1}% - {\addspace #1\isdot}}% + {\addspace #1\isdot}% +}%% <<< -\DeclareFieldFormat*{chapter}{% +\DeclareFieldFormat*{chapter}{%% >>>4 \ifnumerals{#1}% {\addspace \MakeLowercase{\bibstring{chapter}~#1}}% - {\addspace #1\isdot}}% + {\addspace #1\isdot}% +}%% <<< -\DeclareFieldFormat{edition}{% +\DeclareFieldFormat{edition}{%% >>>4 \ifnumerals{#1}% {\addspace #1\adddot\addspace\bibstring{edition}}% - {\addspace #1\isdot}}% + {\addspace #1\isdot}% +}%% <<< + +\DeclareFieldFormat*{pages}{%% >>>4 + \MakeLowercase{\mkpageprefix[bookpagination]{#1}}% +}%% <<< -\DeclareFieldFormat*{pages}{\MakeLowercase{\mkpageprefix[bookpagination]{#1}}}% -\DeclareFieldFormat*{pagetotal}{\MakeLowercase{\mkpagetotal[bookpagination]{#1}}}% -% Always use "f." for the pagination in thesis. -%\DeclareFieldFormat[thesis]{pagetotal}{\MakeLowercase{#1 \bibstring{sheet}}}% +\DeclareFieldFormat*{pagetotal}{%% >>>4 + \MakeLowercase{\mkpagetotal[bookpagination]{#1}}% +}%% <<< \DeclareFieldFormat{illustrated}{\addspace #1\isdot}% \DeclareFieldFormat{url}{\bibstring{url}\addcolon\addspace\url{<#1>}}% \DeclareFieldFormat{urldate}{\bibstring{urlseen}\addcolon\addspace #1}% -\DeclareFieldFormat*{note}{\addspace #1\addperiod\addspace}% +\DeclareFieldFormat*{note}{\addspace #1}% \DeclareFieldFormat{mathesis}{\bibstring{mathesis}}% \DeclareFieldFormat{phdthesis}{\bibstring{phdthesis}}% -\DeclareFieldFormat[monography]{type}{\bibstring{monography}\addspace\printtext[parens]{#1}}% +\DeclareFieldFormat[monography]{type}{%% >>>4 + \bibstring{monography}\addspace\printtext[parens]{#1}% +}%% <<< + +\DeclareFieldFormat{origlanguage}{%% >>>4 + \ifbibstring{#1}% + {\bibxstring{#1}}% + {\ifbibstring{from#1}% + {\bibxstring{from#1}}% + {#1}}% +}%% <<< + +% is*n >>>4 +\DeclareFieldFormat{isbn}{\mkbibacro{ISBN}\space #1}% +\DeclareFieldFormat{isrn}{\mkbibacro{ISRN}\space #1}% +\DeclareFieldFormat{issn}{\mkbibacro{ISSN}\space #1}% +% <<< + +% relatedstring >>>4 +\DeclareFieldFormat{relatedstring:reprintfrom}{#1\addcolon\addspace}% +\DeclareFieldFormat{relatedstring:reviewof}{#1\addcolon\addspace}% +\DeclareFieldFormat{relatedstring:default}{#1\addcolon\addspace}% +% <<< + +% <<< + +% Capitalization >>>3 -\DeclareFieldFormat{uppercase}{\iftoggle{scbib}{\textsc{\smartlowercase{#1}}}{\smartuppercase{#1}}}% \DeclareFieldFormat{lowercase}{\smartlowercase{#1}}% -\DeclareFieldFormat{upperfirst}{% + +\DeclareFieldFormat{uppercase}{%% >>> + \iftoggle{scbib}{% + \textsc{\smartlowercase{#1}}% + }{% + \smartuppercase{#1}% + }% +}%% <<< + +\DeclareListFormat{uppercase}{%% >>> + \usebibmacro{list:delim}{#1}% + \iftoggle{scbib}{% + \ifgiveninits{% + \normalfont\smartsc{#1}% + }{% + \normalfont\smartlcsc{#1}% + }% + }{% + \normalfont\smartuppercase{#1}% + }% + \isdot% + \usebibmacro{list:andothers}% +}%% <<< + +\DeclareFieldFormat{upperfirst}{%% >>> \iftoggle{scbib}{% \ifgiveninits{% \normalfont\FirstWordSC{#1}% @@ -415,37 +609,9 @@ }{% \normalfont\FirstWordUpper{#1}% }% -}% -\DeclareFieldFormat{noformat}{\normalfont{#1}}% - -\DeclareFieldFormat{nameaddon}{\addspace #1}% - -\DeclareFieldFormat{relatedstring:reprintfrom}{\addspace #1\addcolon\addspace}% -\DeclareFieldFormat{relatedstring:default}{\addspace #1\addcolon\addspace}% +}%% <<< -\DeclareFieldFormat{origlanguage}{% - \ifbibstring{#1}% - {\bibxstring{#1}}% - {\ifbibstring{from#1}% - {\bibxstring{from#1}}% - {#1}}% -}% - -\DeclareListFormat{uppercase}{% - \usebibmacro{list:delim}{#1}% - \iftoggle{scbib}{% - \ifgiveninits{% - \normalfont\smartsc{#1}% - }{% - \normalfont\smartlcsc{#1}% - }% - }{% - \normalfont\smartuppercase{#1}% - }% - \isdot% - \usebibmacro{list:andothers}}% - -\DeclareListFormat{upperfirst}{% +\DeclareListFormat{upperfirst}{%% >>> \usebibmacro{list:delim}{#1}% \iftoggle{scbib}{% \ifgiveninits{% @@ -458,59 +624,121 @@ }% \isdot% \usebibmacro{list:andothers}% -}% +}%% <<< +% <<< -% ---------- -% newbibmacro -% ---------- +\DeclareFieldFormat{noformat}{\normalfont{#1}}% -% Always use a period after the year. -\renewbibmacro*{date}{\printdate\addperiod}% +% <<<2 -% Use a comma after journal volumes. -\renewbibmacro*{volume+number+eid}{% - \printfield{volume}% - \setunit*{\addcomma\addspace}% - \printfield{number}% - \setunit{\addcomma\addspace}% - \printfield{eid}}% +% <<<1 -% Don't use parenthesis around the date. -\renewbibmacro*{issue+date}{% - \iffieldundef{issue}% - {\usebibmacro{date}}% - {\printfield{issue}% - \setunit*{\addspace}% - \usebibmacro{date}}% - \newunit}% -% Add a comma after journal names and remove the date. -\renewbibmacro*{journal+issuetitle}{% - \usebibmacro{journal}% - \setunit*{\addcomma\addspace}% - \iffieldundef{series}% - {}% - {\newunit% - \printfield{series}% - \setunit{\addspace}}% - \usebibmacro{volume+number+eid}% - \newunit}% +% Macros >>>1 -% Remove the parenthesis around the backref. -\renewbibmacro*{pageref}{% - \iflistundef{pageref}% - {}% - {\printtext{% \printtext[parens]{% - \ifnumgreater{\value{pageref}}{1}% - {\bibstring{backrefpages}\ppspace}% - {\bibstring{backrefpage}\ppspace}% - \printlist[pageref][-\value{listtotal}]{pageref}}}}% +% Dashed option >>>2 + +\newbool{bbx@inset}% + +\newtoggle{isdashed}% + +\newcommand*{\bibnameunderscore}{\underline{\hspace*{4em}}}% +\newcommand*{\nopunctdash}{\bibnameunderscore\addspace}% +\renewcommand*{\bibnamedash}{\bibnameunderscore\addperiod\addspace}% + +\renewbibmacro*{begrelated}{%% >>>3 + \booltrue{bbx@inset}% +}%% <<<3 + +\newbibmacro*{bbx:savehash}{%% >>>3 + \savefield{fullhash}{\bbx@lasthash}% +}%% <<<3 + +\newbibmacro*{bbx:saveorg}{%% >>>3 + \savelist{organization}{\bbx@lastorg}% +}%% <<<3 + +\newbibmacro*{bbx:savetitle}{%% >>>3 + \savefield{title}{\bbx@lasttitle}% +}%% <<<3 + +\newbibmacro*{bbx:savesubtitle}{%% >>>3 + \savefield{subtitle}{\bbx@lastsubtitle}% +}%% <<<3 + +\newbibmacro*{bbx:dashcheck}[2]{%% >>>3 + \ifboolexpr{% + (% + test {\iffieldequals{fullhash}{\bbx@lasthash}}% + or% + test {\iflistequals{organization}{\bbx@lastorg}}% + )% + and% + not test \iffirstonpage% + and% + not test {\iftoggle{repeatfields}}% + and% + not test {\iftoggle{repeatfirstfields}}% + and% + (% + not bool {bbx@inset}% + or% + test {\iffieldequalstr{entrysetcount}{1}}% + )% + }% + {\settoggle{isdashed}{true}#1}% + {\settoggle{isdashed}{false}#2}% +}%% <<<3 + +\newbibmacro*{bbx:titledashcheck}[2]{%% >>>3 + \iftoggle{isdashed}{% + \ifboolexpr{% + test {\iffieldequals{title}{\bbx@lasttitle}}% + and% + (% + test {\iffieldequals{subtitle}{\bbx@lastsubtitle}}% + or% + test {\iffieldundef{subtitle}}% + )% + and% + not test {\iftoggle{repeattitle}}% + }% + {#1}% + {#2}% + }{% + #2% + }% +}%% <<<3 -\newbibmacro*{titleiskey}[2]{% +\newbibmacro*{bbx:ineditordashcheck}[2]{%% >>>3 + \ifboolexpr{% + test {\ifnamesequal{editor}{author}}% + and% + not test {\iftoggle{repeatfields}}% + and% + (% + not bool {bbx@inset}% + or% + test {\iffieldequalstr{entrysetcount}{1}}% + )% + }% + {\settoggle{isdashed}{true}#1}% + {\settoggle{isdashed}{false}#2}% +}%% <<<3 + +% <<<2 + +% Titles >>>2 + +\newbibmacro*{titleiskey}[2]{%% >>>3 \ifboolexpr{% test {\ifnameundef{author}}% and% + test {\ifnameundef{editor}}% + and% + test {\ifnameundef{holder}}% + and% test {\ifcsundef{saveded}}% and% test {\ifcsundef{savedorg}}% @@ -518,9 +746,10 @@ test {\iffieldundef{eventtitle}}% }% {#1}% - {#2}}% + {#2}% +}%% <<<3 -\renewbibmacro*{title}{% +\renewbibmacro*{title}{%% >>>3 \ifboolexpr{% test {\iffieldundef{title}}% and% @@ -535,16 +764,77 @@ \printtext[title]{% \usebibmacro{titleiskey}% {\unspace\printfield[upperfirst]{title}}% - {\iffieldundef{maintitle}% + {\ifboolexpr{% + test {\iffieldundef{maintitle}}% + and% + test {\iffieldundef{related}}% + }% {\printfield[titlecase]{title}}% {\printfield[noformat]{title}}}% \normalfont{\setunit*{\subtitlepunct}% \printfield[noformat]{subtitle}% \setunit{\addperiod\addspace}}}% \newunit}}% - \printfield{titleaddon}}% + \printfield{titleaddon}% +}%% <<<3 -\newbibmacro*{inmaintitle}{% +\newbibmacro*{booktitleiskey}[2]{%% >>>3 +\ifboolexpr{% + test {\ifnameundef{bookauthor}}% + and% + test {\ifnameundef{editor}}% + and% + test {\iffieldundef{organization}}% + and% + test {\ifcsundef{saveded}}% + and% + test {\ifcsundef{savedorg}}% + and% + test {\iffieldundef{eventtitle}}% +}% + {#1}% + {#2}% +}%% <<<3 + +\renewbibmacro*{booktitle}{%% >>>3 + \ifboolexpr{% + test {\iffieldundef{booktitle}}% + and% + test {\iffieldundef{booksubtitle}}% + }% + {}% + {\printtext[booktitle]{% + \usebibmacro{booktitleiskey}{% + \printfield[upperfirst]{booktitle}% + }{% + \printfield[titlecase]{booktitle}% + }% + \normalfont{\setunit*{\subtitlepunct}}% + \printfield[noformat]{booksubtitle}}% + \newunit}% + \printfield{booktitleaddon}% +}%% <<<3 + +\renewbibmacro*{maintitle}{%% >>>3 + \ifboolexpr{% + test {\iffieldundef{maintitle}}% + and% + test {\iffieldundef{mainsubtitle}}% + }% + {}% + {\printtext[maintitle]{% + \usebibmacro{titleiskey}{% + \printfield[upperfirst]{maintitle}% + }{% + \printfield[titlecase]{maintitle}% + }% + \normalfont{\setunit*{\subtitlepunct}}% + \printfield[noformat]{mainsubtitle}}% + \newunit}% + \printfield{maintitleaddon}% +}%% <<<3 + +\newbibmacro*{in:maintitle}{%% >>>3 \iffieldundef{maintitle}{}{% \usebibmacro{in:}% \iftoggle{repeatfields}% @@ -553,9 +843,9 @@ \newunit\newblock% \usebibmacro{maintitle}% }% -}% +}%% <<<3 -\renewbibmacro*{maintitle+booktitle}{% +\renewbibmacro*{maintitle+booktitle}{%% >>>3 \iffieldundef{maintitle}% {}% {\usebibmacro{maintitle}% @@ -566,157 +856,45 @@ \printfield{part}% \setunit{\addcolon\addspace}}}% \usebibmacro{booktitle}% - \newunit}% + \newunit% +}%% <<<3 -\newbibmacro*{maintitle/booktitle}{% +\newbibmacro*{maintitle/booktitle}{%% >>>3 \iffieldundef{maintitle}% {\usebibmacro{booktitle}}% {\usebibmacro{maintitle}}% -}% +}%% <<<3 -\renewbibmacro*{booktitle}{% - \ifboolexpr{% - test {\iffieldundef{booktitle}}% - and% - test {\iffieldundef{booksubtitle}}% - }% - {}% - {\printtext[booktitle]{% - \printfield[titlecase]{booktitle}% - \normalfont{\setunit*{\subtitlepunct}}% - \printfield[noformat]{booksubtitle}}% - \newunit}% - \printfield{booktitleaddon}}% - -\renewbibmacro*{maintitle}{% - \ifboolexpr{% - test {\iffieldundef{maintitle}}% - and% - test {\iffieldundef{mainsubtitle}}% - }% +\renewbibmacro*{journal}{%% >>>3 + \iffieldundef{journaltitle}% {}% - {\printtext[maintitle]{% - \printfield[titlecase]{maintitle}% - \normalfont{\setunit*{\subtitlepunct}}% - \printfield[noformat]{mainsubtitle}}% - \newunit}% - \printfield{maintitleaddon}}% - -\newbibmacro*{publisher}{% - \iflistundef{publisher}% - {\iftoggle{nosn}{}{\printtext[brackets]{\bibstring{sinenomine}}}}% - {\printlist{publisher}}}% - -\newbibmacro*{location}{% - \iflistundef{location}% - {\iftoggle{nosl}{}{\printtext[brackets]{\bibstring{sineloco}}}}% - {\printlist{location}}}% - -\newbibmacro*{venue}{% - \iffieldundef{venue}% - {\iftoggle{nosl}{}{\printtext[brackets]{\bibstring{sineloco}}}}% - {\printfield{venue}}}% - -\renewbibmacro*{location+date}{% - \usebibmacro{location}% - \setunit*{\addcomma\addspace}% - \usebibmacro{date}% - \newunit% -}% - -\renewbibmacro*{series+number}{% - \iffieldundef{series}{}{% - \printtext[parens]{% - \printfield{series}% - \setunit*{\addspace}% - \printfield{number}% - \newunit}% - }% - }% - -% Add s.l. and s.n. when fields are missing. -\renewbibmacro*{publisher+location+date}{% - \ifboolexpr{% - test {\iflistundef{publisher}}% - and% - test {\iflistundef{location}}% - and% - not test {\iftoggle{nosl}}% - and% - not test {\iftoggle{nosn}}% - }% - {\printtext[brackets]{\bibstring{sineloco}% - \setunit{\addcolon\addnbspace}% - \bibstring{sinenomine}}}% - {\ifboolexpr{% - test {\ifnameundef{author}}% - and% - test {\ifnameundef{editor}}% - and% - test {\iflistundef{publisher}}% - and% - not test {\iflistundef{organization}}% - }% - {\usebibmacro{location}}% - {\usebibmacro{location}% - \setunit*{\addcolon\addspace}% - \usebibmacro{publisher}}}% - \setunit*{\addcomma\addspace}% - \usebibmacro{date}% - \newunit}% - -\renewbibmacro*{url+urldate}{% - \usebibmacro{url}% - \iffieldundef{urlyear}% - {}% - {\setunit*{\addperiod\addspace}% - \usebibmacro{urldate}}}% - -\newbibmacro*{mathesis}{% - \iffieldundef{type}{% - \bibstring{dissertation}\addspace\printtext[parens]{\bibstring{mathesis}}% - }{% - \bibstring{dissertation}\addspace\printtext[parens]{\printfield{type}}% - }% -}% - -\newbibmacro*{phdthesis}{% - \iffieldundef{type}{% - \bibstring{thesis}\addspace\printtext[parens]{\bibstring{phdthesis}}% - }{% - \bibstring{thesis}\addspace\printtext[parens]{\printfield{type}}% - }% -}% + {\printtext[journaltitle]{% + \printfield[titlecase]{journaltitle}% + \setunit{\subtitlepunct}% + \printfield[noformat]{journalsubtitle}}}% +}%% <<<3 -\newbibmacro*{inbookauthor+others}{% - \usebibmacro{in:}% - \ifboolexpr{% - test {\ifnameundef{author}}% - and% - test {\ifcsundef{saveded}}% - and% - test {\ifcsundef{savedorg}}% - }% +\newbibmacro{journal+section}{%% >>>3 + \usebibmacro{journal}% + \iffieldundef{section}% {}% - {\ifboolexpr{% - test {\ifnameundef{bookauthor}}% - or% - test {\ifnamesequal{author}{bookauthor}}% - }% - {\iftoggle{repeatfields}% - {\usebibmacro{author/editor+others}}% - {\bibnamedash}}% - {\printnames{bookauthor}}}% -}% + {\setunit{\addspace\textendash\addspace}% + \printfield{section}}% +}%% <<<3 -% For @bookinbook entries: use the bookauthor when available, -% else use editor+others. -\newbibmacro*{bookauthor/editor+others}{% - \ifnameundef{bookauthor}{% - \usebibmacro{editor+others}}% - {\printnames{bookauthor}}}% +\renewbibmacro*{journal+issuetitle}{%% >>>3 + \usebibmacro{journal}% + \setunit*{\addcomma\addspace}% + \iffieldundef{series}% + {}% + {\newunit% + \printfield{series}% + \setunit{\addspace}}% + \usebibmacro{volume+number+eid}% + \newunit% +}%% <<<3 -\renewbibmacro*{periodical}{% +\renewbibmacro*{periodical}{%% >>>3 \iffieldundef{title}% {}% {\iffieldundef{issue}{% @@ -730,128 +908,370 @@ \normalfont{\setunit*{\subtitlepunct}% \printfield[noformat]{subtitle}}}}% }% -}% +}%% <<<3 -\renewbibmacro*{issue}{% - \iffieldundef{issuetitle}% - {}% - {\printtext[issuetitle]{% - \printfield[upperfirst]{issuetitle}% - \setunit*{\subtitlepunct}% - \printfield[noformat]{issuesubtitle}}}}% +% <<<2 -\newbibmacro*{organization}{% - \iflistundef{organization}% - {\global\undef\bbx@lastorg}% - {\usebibmacro{bbx:dashcheck}% - {\bibnamedash}% - {\usebibmacro{bbx:saveorg}% - \printlist[uppercase]{organization}}% - \savelistcs*{organization}{savedorg}% - \clearlist{organization}% - \newunit\newblock% - \printfield{nameaddon}}% -}% +% Names >>>2 -\renewbibmacro*{author}{% +\renewbibmacro*{author}{%% >>>3 \ifboolexpr{% test \ifuseauthor% and% not test {\ifnameundef{author}}% }{% \usebibmacro{bbx:dashcheck}{% - \bibnamedash% + \iffieldundef{authortype}{% + \bibnamedash% + \newunit\newblock% + \printfield{nameaddon}% + }{% + \nopunctdash% + \usebibmacro{authorstrg}% + \newunit\newblock% + \printfield{nameaddon}% + }% }{% \usebibmacro{bbx:savehash}% \printnames{author}% + \addspace% + \usebibmacro{authorstrg}% + \newunit\newblock% + \printfield{nameaddon}% }% - \addspace% - \usebibmacro{authorstrg}% - \newunit\newblock% - \printfield{nameaddon}% }{% \global\undef\bbx@lasthash% }% -}% +}%% <<<3 -\renewbibmacro*{editor+others}{% +\renewbibmacro*{editor+others}{%% >>>3 \ifboolexpr{% test \ifuseeditor% and% not test {\ifnameundef{editor}}% }{% \usebibmacro{bbx:dashcheck}{% - \bibnamedash% + \iffieldundef{editortype}{% + \bibnamedash% + }{% + \nopunctdash% + \usebibmacro{editor+othersstrg}% + }% }{% \usebibmacro{bbx:savehash}% \printnames{editor}% \setunit{\addspace}% - \printtext[parens]{\usebibmacro{editor+othersstrg}}% + \usebibmacro{editor+othersstrg}% }% \savenamecs*{editor}{saveded}% - \clearname{editor}% + \clearname{editor}% }{% \global\undef\bbx@lasthash% \usebibmacro{organization}% }% -}% +}%% <<<3 + +\renewbibmacro*{byeditor+others}{%% >>>3 + \toggletrue{byeditor+others}% + \ifnameundef{editor}{}{% else + \usebibmacro{byeditor+othersstrg}% + \setunit*{\addspace}% + \printnames[byeditor]{editor}% + \clearname{editor}% + \newunit% + }% + \usebibmacro{byeditorx}% + \usebibmacro{bytranslator+others}% + \togglefalse{byeditor+others}% +}%% <<<3 + +\newbibmacro*{organization}{%% >>>3 + \iflistundef{organization}% + {\global\undef\bbx@lastorg}% + {\usebibmacro{bbx:dashcheck}% + {\bibnamedash}% + {\usebibmacro{bbx:saveorg}% + \printlist[uppercase]{organization}}% + \savelistcs*{organization}{savedorg}% + \clearlist{organization}% + \newunit\newblock% + \printfield{nameaddon}}% +}%% <<<3 + +\newbibmacro*{author/organization}{%% >>>3 + \ifnameundef{author}% + {\usebibmacro{organization}}% + {\usebibmacro{author}}% +}%% <<<3 -\newbibmacro*{in:editor+others}{% +\newbibmacro*{editor+others/organization}{%% >>>3 + \ifnameundef{editor}% + {\usebibmacro{organization}}% + {\usebibmacro{editor+others}}% +}%% <<<3 + +\newbibmacro*{organization/eventtitle}{%% >>>3 + \iffieldundef{eventtitle}% + {\usebibmacro{organization}}% + {\printfield[uppercase]{eventtitle}}% +}%% <<<3 + +\newbibmacro*{bookauthor/editor+others}{%% >>>3 + \ifnameundef{bookauthor}{% + \usebibmacro{editor+others}}% + {\printnames{bookauthor}}% +}%% <<<3 + +\newbibmacro*{in:bookauthor+others}{%% >>>3 + \usebibmacro{in:}% + \ifnameundef{bookauthor}{% + % do nothing + }{% else + \ifnamesequal{author}{bookauthor}{% + \iftoggle{repeatfields}{% + \usebibmacro{author/editor+others}% + }{% else + \bibnamedash% + }% + }{% else + \printnames{bookauthor}% + }% + }% +}%% <<<3 + +\newbibmacro*{in:editor+others}{%% >>>3 \usebibmacro{in:}% \addspace% \ifnameundef{editor}{% \printlist[uppercase]{organization}% }{% - \printnames{editor}% - \setunit*{\addspace}% - \printtext[parens]{\usebibmacro{editor+othersstrg}}% - \clearname{editor}% + \usebibmacro{bbx:ineditordashcheck}{% + \iffieldundef{editortype}{% + \bibnamedash% + }{% + \nopunctdash% + \usebibmacro{editor+othersstrg}% + \savenamecs*{editor}{saveded}% + \clearname{editor}% + }% + }{% + \printnames{editor}% + \setunit*{\addspace}% + \usebibmacro{editor+othersstrg}% + \savenamecs*{editor}{saveded}% + \clearname{editor}% + }% }% -}% +}%% <<<3 -\newbibmacro*{in:eventtitle/organization/editor}{% +\newbibmacro*{in:eventtitle/organization/editor}{%% >>>3 \usebibmacro{in:}% \iffieldundef{eventtitle}{% \ifnameundef{editor}{% \printlist[uppercase]{organization}% \clearlist{organization}% }{% - \printnames{editor}% + \usebibmacro{editor+others}% }% }{% \printfield[uppercase]{eventtitle}% }% +}%% <<<3 + +% <<<2 + +% Publisher, location, date, issue >>>2 + +\renewbibmacro*{date}{% + \printdate% + \printunit{\addperiod\addspace}% }% -\newbibmacro*{editor+others/organization}{% - \ifnameundef{editor}% - {\usebibmacro{organization}}% - {\usebibmacro{editor+others}}}% +\newbibmacro*{publisher}{%% >>>3 + \iflistundef{publisher}% + {\iftoggle{nosn}{}{\printtext[brackets]{\bibstring{sinenomine}}}}% + {\printlist{publisher}}% +}%% <<<3 -\newbibmacro*{author/organization}{% - \ifnameundef{author}% - {\usebibmacro{organization}}% - {\usebibmacro{author}}}% +\newbibmacro*{location}{%% >>>3 + \iflistundef{location}% + {\iftoggle{nosl}{}{\printtext[brackets]{\bibstring{sineloco}}}}% + {\printlist{location}}% +}%% <<<3 -\newbibmacro*{organization/eventtitle}{% - \iffieldundef{eventtitle}% - {\usebibmacro{organization}}% - {\printfield[uppercase]{eventtitle}}}% +\newbibmacro*{venue}{%% >>>3 + \iffieldundef{venue}% + {\iftoggle{nosl}{}{\printtext[brackets]{\bibstring{sineloco}}}}% + {\printfield{venue}}% +}%% <<<3 -\renewbibmacro*{byeditor+others}{% - \toggletrue{byeditor+others}% - \ifnameundef{editor}% +\renewbibmacro*{location+date}{%% >>>3 + \usebibmacro{location}% + \setunit*{\addcomma\addspace}% + \usebibmacro{date}% + \newunit% +}%% <<<3 + +\renewbibmacro*{publisher+location+date}{%% >>>3 + \ifboolexpr{% + test {\iflistundef{publisher}}% + and% + test {\iflistundef{location}}% + and% + not test {\iftoggle{nosl}}% + and% + not test {\iftoggle{nosn}}% + }{% + \printtext[brackets]{\bibstring{sineloco}% + \setunit{\addcolon\addnbspace}% + \bibstring{sinenomine}}% + }{% + \ifboolexpr{% + test {\ifnameundef{author}}% + and% + test {\ifnameundef{editor}}% + and% + test {\iflistundef{publisher}}% + and% + not test {\iflistundef{organization}}% + }{% + \usebibmacro{location}% + }{% + \usebibmacro{location}% + \setunit*{\addcolon\addspace}% + \usebibmacro{publisher}% + }% + }% + \setunit*{\addcomma\addspace}% + \usebibmacro{date}% + \newunit% +}%% <<<3 + +\renewbibmacro*{issue}{%% >>>3 + \iffieldundef{issuetitle}% {}% - {\usebibmacro{byeditor+othersstrg}% + {\printtext[issuetitle]{% + \printfield[upperfirst]{issuetitle}% + \setunit*{\subtitlepunct}% + \printfield[noformat]{issuesubtitle}}}% +}%% <<<3 + +\renewbibmacro*{issue+date}{%% >>>3 + \iffieldundef{issue}% + {\usebibmacro{date}}% + {\printfield{issue}% \setunit*{\addspace}% - \printnames[byeditor]{editor}% - \clearname{editor}% - \newunit}% - \usebibmacro{byeditorx}% - \usebibmacro{bytranslator+others}}% - \togglefalse{byeditor+others}% + \usebibmacro{date}}% + \newunit% +}%% <<<3 + +\newbibmacro*{publisher+location+issue+date}{%% >>>3 + \ifboolexpr{% + test {\iflistundef{publisher}}% + and% + test {\iflistundef{location}}% + and% + not test {\iftoggle{nosl}}% + and% + not test {\iftoggle{nosn}}% + }{% + \printtext[brackets]{\bibstring{sineloco}% + \setunit{\addcolon\addnbspace}% + \bibstring{sinenomine}}% + }{% + \ifboolexpr{% + test {\ifnameundef{author}}% + and% + test {\ifnameundef{editor}}% + and% + test {\iflistundef{publisher}}% + and% + not test {\iflistundef{organization}}% + }{% + \usebibmacro{location}% + }{% + \usebibmacro{location}% + \setunit*{\addcolon\addspace}% + \usebibmacro{publisher}% + }% + }% + \setunit*{\addcomma\addspace}% + \printfield[number]{issue}% + \setunit*{\addcomma\addspace}% + \usebibmacro{date}% + \newunit% +}%% <<<3 + +% <<<2 + +% Misc >>> + +\renewbibmacro*{volume+number+eid}{%% >>>3 + \printfield{volume}% + \setunit*{\addcomma\addspace}% + \printfield{number}% + \setunit{\addcomma\addspace}% + \printfield{eid}% +}%% <<<3 + +\renewbibmacro*{series+number}{%% >>>3 + \iffieldundef{series}{}{% + \printtext[parens]{% + \printfield{series}% + \setunit*{\addcomma\addspace}% + \printfield[noformat]{number}% + \newunit}% + }% +}%% <<<3 + +\renewbibmacro*{pageref}{%% >>>3 + \iflistundef{pageref}% + {}% + {\printunit{\addperiod\addspace} + \printtext{% \printtext[parens]{% + \ifnumgreater{\value{pageref}}{1}% + {\bibstring{backrefpages}\ppspace}% + {\bibstring{backrefpage}\ppspace}% + \printlist[pageref][-\value{listtotal}]{pageref}}}% +}%% <<<3 + +\renewbibmacro*{url+urldate}{%% >>>3 + \usebibmacro{url}% + \iffieldundef{urlyear}% + {}% + {\setunit*{\addperiod\addspace}% + \usebibmacro{urldate}}% +}%% <<<3 + +\newbibmacro*{mathesis}{%% >>>3 + \iffieldundef{type}{% + \bibstring{dissertation}\addspace\printtext[parens]{\bibstring{mathesis}}% + }{% + \bibstring{dissertation}\addspace\printtext[parens]{\printfield{type}}% + }% +}%% <<<3 + +\newbibmacro*{phdthesis}{%% >>>3 + \iffieldundef{type}{% + \bibstring{thesis}\addspace\printtext[parens]{\bibstring{phdthesis}}% + }{% + \bibstring{thesis}\addspace\printtext[parens]{\printfield{type}}% + }% +}%% <<<3 + +\newbibmacro*{language}{%% >>>3 + \ifboolexpr{% + test {\iflistundef{language}}% + or% + test {\iffieldundef{origlanguage}}% + }% + {}% + {% + \printtext{\printlist{language}\addspace\printfield{origlanguage}}% + }% +}%% <<<3 -\renewbibmacro*{related:reprintfrom}[1]{% +\renewbibmacro*{related:reprintfrom}[1]{%% >>>3 \entrydata*{#1}{% \usedriver% {\ifnameundef{savedauthor}% @@ -870,92 +1290,17 @@ {\renewbibmacro*{date+extrayear}{}% \renewbibmacro*{date}{\printdate}}% \renewbibmacro*{pageref}{}}% - {\thefield{entrytype}}}}% - -\newbibmacro*{language}{% - \ifboolexpr{% - test {\iflistundef{language}}% - or% - test {\iffieldundef{origlanguage}}% - }% - {}% - {% - \printtext{\printlist{language}\addspace\printfield{origlanguage}}% - }% -}% - -\newbibmacro{journal+section}{% - \usebibmacro{journal}% - \iffieldundef{section}% - {}% - {\setunit{\addspace\textendash\addspace}% - \printfield{section}}% -}% - -\newbibmacro*{bbx:savehash}{% - \savefield{fullhash}{\bbx@lasthash}}% + {\thefield{entrytype}}}% +}%% <<<3 -\newbibmacro*{bbx:saveorg}{% - \savelist{organization}{\bbx@lastorg}}% +% <<< -\newbibmacro*{bbx:savetitle}{% - \savefield{title}{\bbx@lasttitle}}% +% <<<1 -\newbibmacro*{bbx:savesubtitle}{% - \savefield{subtitle}{\bbx@lastsubtitle}}% -\newtoggle{isdashed}% +% Drivers >>>1 -\newbibmacro*{bbx:dashcheck}[2]{% - \ifboolexpr{% - (% - test {\iffieldequals{fullhash}{\bbx@lasthash}}% - or% - test {\iflistequals{organization}{\bbx@lastorg}}% - )% - and% - not test \iffirstonpage% - and% - not test {\iftoggle{repeatfields}}% - and% - (% - not bool {bbx@inset}% - or% - test {\iffieldequalstr{entrysetcount}{1}}% - )% - }% - {\settoggle{isdashed}{true}#1}% - {\settoggle{isdashed}{false}#2}}% - -\newbibmacro*{bbx:titledashcheck}[2]{% - \iftoggle{isdashed}{% - \ifboolexpr{% - test {\iffieldequals{title}{\bbx@lasttitle}}% - and - (% - test {\iffieldequals{subtitle}{\bbx@lastsubtitle}}% - or% - test {\iffieldundef{subtitle}}% - ) - and% - not test {\iftoggle{repeattitle}} - }% - {#1}% - {#2}% - }{% - #2% - }% -}% - -\renewbibmacro*{begrelated}{% - \booltrue{bbx@inset}}% - - -% ---------- -% Drivers -% ---------- - -\DeclareBibliographyDriver{article}{% +\DeclareBibliographyDriver{article}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/organization}% @@ -987,12 +1332,10 @@ \setunit*{\addcomma\addspace}% \printfield{pagetotal}% \setunit{\addcomma\addspace}% - \usebibmacro{date}% + \usebibmacro{issue+date}% \newunit% \printfield{note}% - \setunit{\addcolon\addspace}% - \usebibmacro{issue}% - \newunit\newblock% + \printunit{\addperiod\addspace}% \iftoggle{bbx:isbn}% {\printfield{issn}}% {}% @@ -1000,23 +1343,24 @@ \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{mvbook}{% +\DeclareBibliographyDriver{book}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others}% \setunit{\labelnamepunct}\newblock% \usebibmacro{title}% \newunit\newblock% - \usebibmacro{inmaintitle}% + \usebibmacro{in:maintitle}% \newunit\newblock% \usebibmacro{byeditor+others}% \newunit\newblock% @@ -1024,9 +1368,12 @@ \newunit\newblock% \usebibmacro{publisher+location+date}% \newunit\newblock% - \printfield{volumes}% - \newunit\newblock% - \usebibmacro{chapter+pages}% + \printfield{volume}% + \printfield{part}% + \setunit{\addcomma\addspace}% + \printfield{chapter}% + \setunit*{\addcomma\addspace}% + \printfield{pages}% \newunit\newblock% \printfield{pagetotal}% \setunit*{\addcomma\addspace}% @@ -1041,7 +1388,7 @@ \usebibmacro{language}% \newunit\newblock% \printfield{note}% - \newunit\newblock% + \printunit{\addperiod\addspace}% \iftoggle{bbx:isbn}% {\printfield{isbn}}% {}% @@ -1049,51 +1396,42 @@ \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{book}{% +\DeclareBibliographyDriver{inbook}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others}% \setunit{\labelnamepunct}\newblock% \usebibmacro{title}% + \newunit% + \usebibmacro{in:bookauthor+others}% \newunit\newblock% - \usebibmacro{inmaintitle}% - \newunit\newblock% + \usebibmacro{maintitle/booktitle}% + \newunit% \usebibmacro{byeditor+others}% \newunit\newblock% \printfield{edition}% \newunit\newblock% \usebibmacro{publisher+location+date}% - \newunit\newblock% + \newunit% \printfield{volume}% \printfield{part}% - \setunit{\addcomma\addspace}% - \printfield{chapter}% \setunit*{\addcomma\addspace}% - \printfield{pages}% - \newunit\newblock% - \printfield{pagetotal}% - \setunit*{\addcomma\addspace}% - \printfield{illustrated}% - \setunit*{\addcomma\addspace}% - \printfield{dimensions}% + \usebibmacro{chapter+pages}% \newunit\newblock% \usebibmacro{series+number}% \newunit\newblock% - \printfield{howpublished}% - \newunit\newblock% - \usebibmacro{language}% - \newunit\newblock% \printfield{note}% - \newunit\newblock% + \printunit{\addperiod\addspace}% \iftoggle{bbx:isbn}% {\printfield{isbn}}% {}% @@ -1101,41 +1439,49 @@ \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{inbook}{% +\DeclareBibliographyDriver{mvbook}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others}% \setunit{\labelnamepunct}\newblock% \usebibmacro{title}% - \newunit% - \usebibmacro{inbookauthor+others}% \newunit\newblock% - \usebibmacro{maintitle/booktitle}% - \newunit% + \usebibmacro{in:maintitle}% + \newunit\newblock% \usebibmacro{byeditor+others}% \newunit\newblock% \printfield{edition}% \newunit\newblock% \usebibmacro{publisher+location+date}% - \newunit% - \printfield{volume}% - \printfield{part}% - \setunit*{\addcomma\addspace}% + \newunit\newblock% + \printfield{volumes}% + \newunit\newblock% \usebibmacro{chapter+pages}% \newunit\newblock% + \printfield{pagetotal}% + \setunit*{\addcomma\addspace}% + \printfield{illustrated}% + \setunit*{\addcomma\addspace}% + \printfield{dimensions}% + \newunit\newblock% \usebibmacro{series+number}% \newunit\newblock% - \printfield{note}% + \printfield{howpublished}% + \newunit\newblock% + \usebibmacro{language}% \newunit\newblock% + \printfield{note}% + \printunit{\addperiod\addspace}% \iftoggle{bbx:isbn}% {\printfield{isbn}}% {}% @@ -1143,47 +1489,44 @@ \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{mvcollection}{% +\DeclareBibliographyDriver{booklet}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{editor+others}% + \usebibmacro{author/editor+others}% \setunit{\labelnamepunct}\newblock% - \usebibmacro{title}% + \usebibmacro{maintitle+title}% + \newunit% + \printlist{language}% \newunit\newblock% - \usebibmacro{inmaintitle}% + \usebibmacro{byauthor}% \newunit\newblock% \usebibmacro{byeditor+others}% \newunit\newblock% \printfield{edition}% \newunit\newblock% - \usebibmacro{publisher+location+date}% - \newunit\newblock% - \printfield{volumes}% - \newunit\newblock% - \usebibmacro{chapter+pages}% - \newunit\newblock% - \printfield{pagetotal}% - \setunit*{\addcomma\addspace}% - \printfield{illustrated}% - \setunit*{\addcomma\addspace}% - \printfield{dimensions}% - \newunit\newblock% \usebibmacro{series+number}% \newunit\newblock% - \printfield{howpublished}% + \printfield{type}% + \newunit% + \printfield{version}% \newunit\newblock% - \usebibmacro{language}% + \usebibmacro{location+date}% \newunit\newblock% + \usebibmacro{chapter+pages}% + \newunit% \printfield{note}% + \newunit% + \printfield{pagetotal}% \newunit\newblock% \iftoggle{bbx:isbn}% {\printfield{isbn}}% @@ -1192,23 +1535,24 @@ \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{collection}{% +\DeclareBibliographyDriver{collection}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{editor+others}% \setunit{\labelnamepunct}\newblock% \usebibmacro{title}% \newunit\newblock% - \usebibmacro{inmaintitle}% + \usebibmacro{in:maintitle}% \newunit\newblock% \usebibmacro{byeditor+others}% \newunit\newblock% @@ -1236,7 +1580,7 @@ \usebibmacro{language}% \newunit\newblock% \printfield{note}% - \newunit\newblock% + \printunit{\addperiod\addspace}% \iftoggle{bbx:isbn}% {\printfield{isbn}}% {}% @@ -1244,16 +1588,17 @@ \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{incollection}{% +\DeclareBibliographyDriver{incollection}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author}% @@ -1276,7 +1621,7 @@ \usebibmacro{series+number}% \newunit\newblock% \printfield{note}% - \newunit\newblock% + \printunit{\addperiod\addspace}% \usebibmacro{chapter+pages}% \newunit\newblock% \iftoggle{bbx:isbn}% @@ -1286,104 +1631,67 @@ \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{periodical}{% +\DeclareBibliographyDriver{mvcollection}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{editor+others/organization}% + \usebibmacro{editor+others}% \setunit{\labelnamepunct}\newblock% \usebibmacro{title}% \newunit\newblock% - \usebibmacro{publisher+location+date}% - \newunit% - \printlist{language}% - \newunit\newblock% - \usebibmacro{byeditor}% + \usebibmacro{in:maintitle}% \newunit\newblock% - \usebibmacro{chapter+pages}% - \setunit*{\addcomma\addspace}% - \printfield{pagetotal}% + \usebibmacro{byeditor+others}% \newunit\newblock% - \printfield{note}% + \printfield{edition}% \newunit\newblock% - \iftoggle{bbx:isbn}% - {\printfield{issn}}% - {}% + \usebibmacro{publisher+location+date}% \newunit\newblock% - \usebibmacro{doi+eprint+url}% + \printfield{volumes}% \newunit\newblock% - \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% - \usebibmacro{pageref}% + \usebibmacro{chapter+pages}% \newunit\newblock% - \iftoggle{bbx:related}% - {\usebibmacro{related:init}% - \usebibmacro{related}}% - {}% - \usebibmacro{finentry}}% - % -\DeclareBibliographyDriver{supperiodical}{% - \usebibmacro{bibindex}% - \usebibmacro{begentry}% - \usebibmacro{author/editor+others}% - \setunit{\labelnamepunct}\newblock% - \usebibmacro{issue}% - \setunit*{\addperiod\addspace}% - \usebibmacro{periodical}% - \setunit*{\addperiod\addspace}% - \usebibmacro{location}% - \setunit*{\addcolon\addspace}% - \usebibmacro{publisher}% - \setunit*{\addcomma\addspace}% - \printfield{volume}% - \setunit*{\addcomma\addspace}% - \printfield{number}% + \printfield{pagetotal}% \setunit*{\addcomma\addspace}% - \printfield{pages}% + \printfield{illustrated}% \setunit*{\addcomma\addspace}% - \usebibmacro{date}% - \newunit% - \printlist{language}% - \newunit\newblock% - \usebibmacro{byauthor}% + \printfield{dimensions}% \newunit\newblock% - \usebibmacro{byeditor+others}% + \usebibmacro{series+number}% \newunit\newblock% \printfield{howpublished}% \newunit\newblock% - \printfield{type}% - \newunit% - \printfield{version}% + \usebibmacro{language}% \newunit\newblock% - \usebibmacro{chapter+pages}% - \setunit*{\addcomma\addspace}% - \printfield{pagetotal}% - \newunit% \printfield{note}% + \printunit{\addperiod\addspace}% + \iftoggle{bbx:isbn}% + {\printfield{isbn}}% + {}% \newunit\newblock% \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -% TODO: For now there is no way to make just part of the% -% organization name uppercase (C.f. 10520-2002:6.3-6) -\DeclareBibliographyDriver{manual}{% +\DeclareBibliographyDriver{manual}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others}% @@ -1411,7 +1719,7 @@ \usebibmacro{series+number}% \newunit% \printfield{note}% - \newunit\newblock% + \printunit{\addperiod\addspace}% \iftoggle{bbx:isbn}% {\printfield{isbn}}% {}% @@ -1419,45 +1727,39 @@ \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{proceedings}{% +\DeclareBibliographyDriver{monography}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{organization/eventtitle}% - \setunit{\addcomma\addspace}% - \printfield{number}% - \setunit*{\adddot\addcomma\addspace}% - \printeventdate% - \setunit{\addcomma\addspace}% - \usebibmacro{venue}% + \usebibmacro{author}% + \setunit{\labelnamepunct}\newblock% + \usebibmacro{title}% \newunit% - \usebibmacro{maintitle+title}% - \newunit\newblock% - \usebibmacro{byeditor+others}% - \newunit\newblock% - \usebibmacro{publisher+location+date}% - \newunit\newblock% - \iffieldundef{maintitle}% - {\printfield{volume}% - \printfield{part}}% - {}% - \newunit\newblock% - \printfield{note}% - \newunit\newblock% - \printlist{organization}% This has to be printed conditionally + \usebibmacro{date}% \newunit\newblock% \usebibmacro{chapter+pages}% \newunit% \printfield{pagetotal}% \newunit\newblock% + \printfield{type}% + \setunit*{\addspace\textendash\addspace}% + \printlist{institution}% + \setunit*{\addcomma\addspace}% + \printlist{location}% + \setunit*{\addcomma\addspace}% + \printeventdate% + \newunit\newblock% + \printfield{note}% + \printunit{\addperiod\addspace}% \iftoggle{bbx:isbn}% {\printfield{isbn}}% {}% @@ -1465,19 +1767,44 @@ \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{inproceedings}{% +\DeclareBibliographyDriver{patent}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author/translator+others}% + \ifnameundef{holder}{% + \iflistundef{organization}{% + \usebibmacro{author/editor+others}% + }{% + \usebibmacro{organization}% + \ifnameundef{author}{% + \printnames[given-family]{editor}% + }{% + \printnames[given-family]{author}% + }% + \newunit\newblock% + \printfield{nameaddon}% + \newunit\newblock% + }% + }{% + \printnames{holder}% + \newunit\newblock% + \printfield{nameaddon}% + \newunit\newblock% + \ifnameundef{author}{% + \printnames[given-family]{editor}% + }{% + \printnames[given-family]{author}% + }% + }% \setunit{\labelnamepunct}\newblock% \usebibmacro{title}% \newunit% @@ -1485,164 +1812,157 @@ \newunit\newblock% \usebibmacro{byauthor}% \newunit\newblock% - \usebibmacro{in:eventtitle/organization/editor}% + \usebibmacro{byeditor+others}% + \newunit\newblock% + \printlist{location}% + \setunit*{\addcomma\addspace}% + \usebibmacro{date}% \setunit*{\addcomma\addspace}% \printfield{number}% - \setunit*{\adddot\addcomma\addspace}% - \printeventdate% \setunit*{\addcomma\addspace}% - \printfield{venue}% - \newunit\newblock% - \usebibmacro{maintitle+booktitle}% - \newunit\newblock% - \usebibmacro{byeditor+others}% - \newunit% - \ifboolexpr{% - test {\iffieldundef{booktitle}}% - and% - test {\iffieldundef{maintitle}}% - }% - {}% - {\usebibmacro{publisher+location+date}}% + \printfield{howpublished}% \newunit\newblock% - \iffieldundef{maintitle}% - {\printfield{volume}% - \printfield{part}}% - {}% + \printfield{type}% \newunit% - \printfield{volumes}% - \newunit\newblock% - \usebibmacro{series+number}% - \newunit\newblock% - \printlist{organization}% - \newunit\newblock% - \usebibmacro{chapter+pages}% + \printfield{version}% \newunit% - \printfield{pagetotal}% - \newunit\newblock% \printfield{note}% - \newunit\newblock% - \iftoggle{bbx:isbn}% - {\printfield{isbn}}% - {}% - \newunit\newblock% + \printunit{\addperiod\addspace}% \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{thesis}{% +\DeclareBibliographyDriver{periodical}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author}% + \usebibmacro{editor+others/organization}% \setunit{\labelnamepunct}\newblock% - \usebibmacro{title}% + \printfield[uppercase]{title}% + \setunit*{\addcolon\addspace}% + \printfield[noformat]{subtitle}% \newunit% - \usebibmacro{date}% + \printfield{titleaddon}% \newunit\newblock% - \usebibmacro{chapter+pages}% + \usebibmacro{publisher+location+issue+date}% \newunit% - \printfield{pagetotal}% + \printlist{language}% \newunit\newblock% - \printfield{type}% - \setunit*{\addspace\textendash\addspace}% - \printlist{institution}% - \setunit*{\addcomma\addspace}% - \printlist{location}% + \usebibmacro{byeditor}% + \newunit\newblock% + \usebibmacro{chapter+pages}% \setunit*{\addcomma\addspace}% - \printeventdate% + \printfield{pagetotal}% \newunit\newblock% \printfield{note}% - \newunit\newblock% + \printunit{\addperiod\addspace}% \iftoggle{bbx:isbn}% - {\printfield{isbn}}% + {\printfield{issn}}% {}% \newunit\newblock% \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{monography}{% +\DeclareBibliographyDriver{supperiodical}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author}% + \usebibmacro{author/editor+others}% \setunit{\labelnamepunct}\newblock% - \usebibmacro{title}% - \newunit% + \usebibmacro{issue}% + \setunit*{\addperiod\addspace}% + \usebibmacro{periodical}% + \setunit*{\addperiod\addspace}% + \usebibmacro{location}% + \setunit*{\addcolon\addspace}% + \usebibmacro{publisher}% + \setunit*{\addcomma\addspace}% + \printfield{volume}% + \setunit*{\addcomma\addspace}% + \printfield{number}% + \setunit*{\addcomma\addspace}% + \printfield{pages}% + \setunit*{\addcomma\addspace}% \usebibmacro{date}% - \newunit\newblock% - \usebibmacro{chapter+pages}% \newunit% - \printfield{pagetotal}% + \printlist{language}% \newunit\newblock% - \printfield{type}% - \setunit*{\addspace\textendash\addspace}% - \printlist{institution}% - \setunit*{\addcomma\addspace}% - \printlist{location}% - \setunit*{\addcomma\addspace}% - \printeventdate% + \usebibmacro{byauthor}% \newunit\newblock% - \printfield{note}% + \usebibmacro{byeditor+others}% \newunit\newblock% - \iftoggle{bbx:isbn}% - {\printfield{isbn}}% - {}% + \printfield{howpublished}% + \newunit\newblock% + \printfield{type}% + \newunit% + \printfield{version}% \newunit\newblock% + \usebibmacro{chapter+pages}% + \setunit*{\addcomma\addspace}% + \printfield{pagetotal}% + \newunit% + \printfield{note}% + \printunit{\addperiod\addspace}% \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{booklet}{% +\DeclareBibliographyDriver{proceedings}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author/editor+others}% - \setunit{\labelnamepunct}\newblock% - \usebibmacro{maintitle+title}% + \usebibmacro{organization/eventtitle}% + \setunit{\addcomma\addspace}% + \printfield{number}% + \setunit*{\adddot\addcomma\addspace}% + \printeventdate% + \setunit{\addcomma\addspace}% + \usebibmacro{venue}% \newunit% - \printlist{language}% - \newunit\newblock% - \usebibmacro{byauthor}% + \usebibmacro{maintitle+title}% \newunit\newblock% \usebibmacro{byeditor+others}% \newunit\newblock% - \printfield{edition}% + \usebibmacro{publisher+location+date}% \newunit\newblock% - \usebibmacro{series+number}% + \iffieldundef{maintitle}% + {\printfield{volume}% + \printfield{part}}% + {}% \newunit\newblock% - \printfield{type}% - \newunit% - \printfield{version}% + \printfield{volumes}% \newunit\newblock% - \usebibmacro{location+date}% + \printfield{note}% + \printunit{\addperiod\addspace}% + \printlist{organization}% % This has to be printed conditionally \newunit\newblock% \usebibmacro{chapter+pages}% \newunit% - \printfield{note}% - \newunit% \printfield{pagetotal}% \newunit\newblock% \iftoggle{bbx:isbn}% @@ -1652,37 +1972,20 @@ \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{patent}{% +\DeclareBibliographyDriver{inproceedings}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% - \ifnameundef{holder}{% - \iflistundef{organization}{% - \usebibmacro{author/editor+others}% - }{% - \usebibmacro{organization} - \ifnameundef{author}{% - \printnames[given-family]{editor}% - }{% - \printnames[given-family]{author} - }% - } - }{% - \printnames{holder} - \ifnameundef{author}{% - \printnames[given-family]{editor}% - }{% - \printnames[given-family]{author} - }% - } + \usebibmacro{author/translator+others}% \setunit{\labelnamepunct}\newblock% \usebibmacro{title}% \newunit% @@ -1690,35 +1993,61 @@ \newunit\newblock% \usebibmacro{byauthor}% \newunit\newblock% - \usebibmacro{byeditor+others}% - \newunit\newblock% - \printlist{location}% - \setunit*{\addcomma\addspace}% - \usebibmacro{date}% + \usebibmacro{in:eventtitle/organization/editor}% \setunit*{\addcomma\addspace}% \printfield{number}% + \setunit*{\adddot\addcomma\addspace}% + \printeventdate% \setunit*{\addcomma\addspace}% - \printfield{howpublished}% + \printfield{venue}% \newunit\newblock% - \printfield{type}% + \usebibmacro{maintitle+booktitle}% + \newunit\newblock% + \usebibmacro{byeditor+others}% \newunit% - \printfield{version}% + \ifboolexpr{% + test {\iffieldundef{booktitle}}% + and% + test {\iffieldundef{maintitle}}% + }% + {}% + {\usebibmacro{publisher+location+date}}% + \newunit\newblock% + \iffieldundef{maintitle}% + {\printfield{volume}% + \printfield{part}}% + {}% \newunit% + \printfield{volumes}% + \newunit\newblock% + \usebibmacro{series+number}% + \newunit\newblock% + \printlist{organization}% + \newunit\newblock% + \usebibmacro{chapter+pages}% + \newunit% + \printfield{pagetotal}% + \newunit\newblock% \printfield{note}% + \printunit{\addperiod\addspace}% + \iftoggle{bbx:isbn}% + {\printfield{isbn}}% + {}% \newunit\newblock% \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{report}{% +\DeclareBibliographyDriver{report}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others}% @@ -1749,7 +2078,47 @@ \usebibmacro{series+number}% \newunit\newblock% \printfield{note}% + \printunit{\addperiod\addspace}% + \iftoggle{bbx:isbn}% + {\printfield{isbn}}% + {}% + \newunit\newblock% + \usebibmacro{doi+eprint+url}% + \newunit\newblock% + \usebibmacro{addendum+pubstate}% + \printunit{\bibpagerefpunct}\newblock% + \usebibmacro{pageref}% + \newunit\newblock% + \iftoggle{bbx:related}% + {\usebibmacro{related:init}% + \usebibmacro{related}}% + {}% + \usebibmacro{finentry}% +}%% <<<2 + +\DeclareBibliographyDriver{thesis}{%% >>>2 + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author}% + \setunit{\labelnamepunct}\newblock% + \usebibmacro{title}% + \newunit% + \usebibmacro{date}% + \newunit\newblock% + \usebibmacro{chapter+pages}% + \newunit% + \printfield{pagetotal}% + \newunit\newblock% + \printfield{type}% + \setunit*{\addspace\textendash\addspace}% + \printlist{institution}% + \setunit*{\addcomma\addspace}% + \printlist{location}% + \setunit*{\addcomma\addspace}% + \printeventdate% \newunit\newblock% + \printfield{note}% + \printunit{\addperiod\addspace}% \iftoggle{bbx:isbn}% {\printfield{isbn}}% {}% @@ -1757,16 +2126,17 @@ \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{misc}{% +\DeclareBibliographyDriver{misc}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others}% @@ -1801,7 +2171,7 @@ \usebibmacro{series+number}% \newunit\newblock% \printfield{note}% - \newunit\newblock% + \printunit{\addperiod\addspace}% \iftoggle{bbx:isbn}% {\printfield{isbn}}% {}% @@ -1809,78 +2179,29 @@ \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -% I copied this from authoryear.bbx for the dashed option. -\DeclareBibliographyDriver{set}{% +\DeclareBibliographyDriver{set}{%% >>>2 \booltrue{bbx@inset}% \entryset{}{}% \newunit\newblock% \usebibmacro{setpageref}% - \finentry}% + \finentry% +}%% <<<2 +% <<<1 -% ---------- -% Helper commands -% ---------- -\long\def\addto#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}}% - -\def\traceparam#1{\def\paramL{}\traceparamA #1\end}% -\def\traceparamA{\futurelet\next\traceparamB}% -\def\traceparamB{% - \let\nexts=\undefined% - \expandafter\ifx\space\next \let\nexts=\traceparamS \fi% - \ifx\bgroup\next \let\nexts=\traceparamD \fi% - \ifx\end\next \let\nexts=\traceparamE \fi% - \ifx\nexts\undefined \let\nexts=\traceparamC\fi% - \nexts% -}% -\def\traceparamS{\addto\paramL{ }\afterassignment\traceparamA \let\next= }% -\def\traceparamC#1{\addto\paramL{#1}\traceparamA}% -\def\traceparamD#1{% - \expandafter\addto\expandafter\paramL\expandafter% - {\expandafter\noexpand\csname ll:\detokenize{#1}\endcsname}% - \expandafter\def\csname ll:\detokenize{#1}\endcsname{\normalfont #1}% - \traceparamA% -}% -\def\traceparamE\end{}% - -\def\smartuppercase#1{% - \bgroup % - \traceparam{#1}% - \MakeUppercase{\paramL}% - \egroup% -}% - -\def\smartlowercase#1{% - \bgroup % - \traceparam{#1}% - \MakeLowercase{\paramL}% - \egroup% -}% - -\def\smartlcsc#1{% - \bgroup % - \traceparam{#1}% - \textsc{\MakeLowercase{\paramL}}% - \egroup% -}% - -\def\smartsc#1{% - \bgroup % - \traceparam{#1}% - \textsc{\paramL}% - \egroup% -}% +\endinput% -\endinput% +% vim: set foldmarker=\ >>>,\ <<< : |