summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-sbl/biblatex-sbl.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-sbl/biblatex-sbl.def')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-sbl/biblatex-sbl.def1284
1 files changed, 947 insertions, 337 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-sbl/biblatex-sbl.def b/Master/texmf-dist/tex/latex/biblatex-sbl/biblatex-sbl.def
index acee0035a08..37be504b237 100644
--- a/Master/texmf-dist/tex/latex/biblatex-sbl/biblatex-sbl.def
+++ b/Master/texmf-dist/tex/latex/biblatex-sbl/biblatex-sbl.def
@@ -15,8 +15,8 @@
% VERSION STRINGS
% ------------------------------------------------------------------
-\def\sbl@abx@date{2016/10/11}
-\def\sbl@abx@version{0.7}
+\def\sbl@abx@date{2017/01/15}
+\def\sbl@abx@version{0.8.1}
\def\sbl@abx@bbxid{\sbl@abx@date\space v\sbl@abx@version\space biblatex-sbl bibliography style}
\def\sbl@abx@cbxid{\sbl@abx@date\space v\sbl@abx@version\space biblatex-sbl citation style}
\def\sbl@abx@lbxid{\sbl@abx@date\space v\sbl@abx@version\space biblatex-sbl localization}
@@ -48,7 +48,10 @@
\def\cbx@opt@citepages@sbl{%
\renewbibmacro*{pages}{%
\iffieldundef{pages}
- {}
+ {\ifbool{bbx@inset}
+ {}
+ {\printfield{postnote}%
+ \global\booltrue{suppresspostnote}}}
{\printfield{pages}%
\ifboolexpr{
test {\iffieldundef{postnote}}
@@ -74,7 +77,10 @@
\def\cbx@opt@citepages@permit{%
\renewbibmacro*{pages}{%
\iffieldundef{pages}
- {}
+ {\ifbool{bbx@inset}
+ {}
+ {\printfield{postnote}%
+ \global\booltrue{suppresspostnote}}}
{\printfield{pages}%
\ifboolexpr{
test {\iffieldundef{postnote}}
@@ -99,7 +105,10 @@
\def\cbx@opt@citepages@omit{%
\renewbibmacro*{pages}{%
\iffieldundef{pages}
- {}
+ {\ifbool{bbx@inset}
+ {}
+ {\printfield{postnote}%
+ \global\booltrue{suppresspostnote}}}
{\ifboolexpr{
test {\iffieldundef{postnote}}
or
@@ -126,7 +135,10 @@
\def\cbx@opt@citepages@separate{%
\renewbibmacro*{pages}{%
\iffieldundef{pages}
- {}
+ {\ifool{bx@inset}
+ {}
+ {\printfield{postnote}%
+ \global\booltrue{suppresspostnote}}}
{\printfield{pages}%
\ifboolexpr{
test {\iffieldundef{postnote}}
@@ -157,7 +169,6 @@
{}%
\printfield{postnote}}}}}}}
-
% ------------------------------------------------------------------
% IDEM MACROS
% ------------------------------------------------------------------
@@ -180,7 +191,6 @@
\@firstoftwo}
{\@secondoftwo}}
-
% ------------------------------------------------------------------
% COMMENTARY OPTIONS
% ------------------------------------------------------------------
@@ -192,7 +202,6 @@
{\toggletrue{fullbibrefs}}
{\togglefalse{fullbibrefs}}}
-
% ------------------------------------------------------------------
% ENTRY OPTIONS
% ------------------------------------------------------------------
@@ -201,7 +210,10 @@
\newtoggle{blx@skipbiblistshorthand}
\newtoggle{blx@usefullcite}
\newtoggle{blx@usevolume}
+\newtoggle{blx@useseries}
\newtoggle{blx@useshorttitle}
+\newtoggle{blx@accessdate}
+\def\blx@shorthand{}
\DeclareTypeOption{skipbiblistseries}[true]{%
\settoggle{blx@skipbiblistseries}{#1}}
@@ -234,11 +246,27 @@
\DeclareEntryOption{usevolume}[true]{%
\settoggle{blx@usevolume}{#1}}
-\def\blx@shorthand{}
+\DeclareBibliographyOption{useseries}[true]{%
+ \settoggle{blx@useseries}{#1}}
+\DeclareTypeOption{useseries}[true]{%
+ \settoggle{blx@useseries}{#1}}
+\DeclareEntryOption{useseries}[true]{%
+ \settoggle{blx@useseries}{#1}}
+
+\DeclareBibliographyOption{accessdate}[true]{%
+ \settoggle{blx@accessdate}{#1}}
+\DeclareTypeOption{accessdate}[true]{%
+ \settoggle{blx@accessdate}{#1}}
+\DeclareEntryOption{accessdate}[true]{%
+ \settoggle{blx@accessdate}{#1}}
+
+\DeclareBibliographyOption[string]{shorthand}[true]{%
+ \def\blx@shorthand{#1}}
+\DeclareTypeOption[string]{shorthand}[true]{%
+ \def\blx@shorthand{#1}}
\DeclareEntryOption[string]{shorthand}[true]{%
\def\blx@shorthand{#1}}
-
% ------------------------------------------------------------------
% STYLE OPTIONS
% ------------------------------------------------------------------
@@ -268,7 +296,7 @@
citetracker,
punctfont,
alldates=comp,
- releasedate=comp,
+ eprintdate=comp,
dateabbrev=false,
autocite=footnote,
url,
@@ -284,7 +312,10 @@
sblfootnotes,
usefullcite,
useshorttitle,
- usevolume
+ usevolume,
+ useseries,
+ accessdate=false,
+ shorthand=true
}
\ExecuteBibliographyOptions[classictext,ancienttext]{%
@@ -303,12 +334,14 @@
\do\ {\Url@space}\do\%{\Url@percent}\do\^^M{\Url@space}%
\Url@force@Tilde}% package option may force faked text-ascii-tilde
+\NewBibliographyString{by}
\NewBibliographyString{to}
\NewBibliographyString{of}
\NewBibliographyString{with}
\NewBibliographyString{withassistance}
\NewBibliographyString{withpreface}
\NewBibliographyString{paperpresented}
+\NewBibliographyString{patentfiled}
\NewBibliographyString{released}
\DeclareLanguageMapping{english}{sbl-american}
@@ -339,6 +372,8 @@
{eprint}
{\thefield{eprinttype}}%
\newunitpunct
+ \usebibmacro{eprintdate}%
+ \newunitpunct
\ifhyperref
{\url{#1}}
{\nolinkurl{#1}}%
@@ -346,6 +381,8 @@
{}
{\addspace\mkbibparens{\thefield{eprintclass}}}}
\DeclareFieldFormat{eprint:arxiv}{%
+ \usebibmacro{eprintdate}%
+ \newunitpunct
arXiv\addcolon\space
\ifhyperref
{\href{http://arxiv.org/\abx@arxivpath/#1}{%
@@ -358,6 +395,8 @@
{}
{\addspace\mkbibbrackets{\thefield{eprintclass}}}}}
\DeclareFieldFormat{eprint:hethiter}{%
+ \usebibmacro{eprintdate}%
+ \newunitpunct
\printtext{doi}\addcolon
\ifhyperref
{\href{http://hethiter.net/:\%20#1}{%
@@ -385,10 +424,20 @@
\DeclareFieldFormat{shortbooktitle}{\mkbibemph{#1}}
\DeclareFieldFormat{shortmaintitle}{\mkbibemph{#1}}
\DeclareFieldFormat{shortjournal}{\mkbibemph{#1}}
+\DeclareFieldFormat{journalsubtitle}{\mkbibemph{#1}}
\DeclareFieldFormat{seriesseries}{#1}
-
+\DeclareFieldFormat[article,periodical,review]{series}{% series of a journal
+ \ifinteger{#1}
+ {\mkbibordseries{#1}~\bibstring{jourser}}
+ {\ifbibstring{#1}{\bibstring{#1}}{#1}}}
+\DeclareFieldFormat{isbn}{ISBN\addcolon\space #1}
+\DeclareFieldFormat{isrn}{ISRN\addcolon\space #1}
+\DeclareFieldFormat{issn}{ISSN\addcolon\space #1}
\DeclareFieldFormat{pages}{\mkcomprange{#1}}
+\DeclareFieldFormat{pagepages}{\mkcomprange[\mkpageprefix]{#1}}
\DeclareFieldFormat{pagesin}{\mkcomprange[\mkpageprefix]{#1} \usebibmacro{in}}
+\DeclareFieldFormat{chapter}{\bibsstring{chapter}~#1}
+\DeclareFieldFormat{chapterin}{\bibsstring{chapter}~#1 \usebibmacro{in}}
\DeclareFieldFormat{volume}{#1}
\DeclareFieldFormat{vol}{\bibsstring{volume}~#1}
\DeclareFieldFormat{volumeof}{\bibsstring{volume}~#1 \bibstring{of}}
@@ -396,8 +445,8 @@
\DeclareFieldFormat{partof}{\bibstring{part}~#1 \bibstring{of}}
\DeclareFieldFormat{no}{\bibsstring{number}~#1}
\DeclareFieldFormat{url}{\url{#1}}
-\DeclareFieldFormat{urldate}{}
-\DeclareFieldFormat{releasedate}{\bibstring{released}\space#1}
+\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}
+\DeclareFieldFormat{eprintdate}{\bibstring{released}\space#1}
\DeclareFieldFormat{editortype}{\ifcapital{\MakeCapital{#1}}{#1}}
\DeclareFieldFormat{withauthortype}{#1}
@@ -427,7 +476,12 @@
\DeclareFieldFormat[incommentary,inreference,inlexicon,online,review,seminarpaper,conferencepaper]{title}{\mkbibquote{#1}}
\DeclareFieldFormat[incommentary,inreference,inlexicon,online,review,seminarpaper,conferencepaper]{shorttitle}{\mkbibquote{#1}}
+\DeclareFieldFormat[suppperiodical]{title}{\mkbibquote{#1}}
+\DeclareFieldFormat{issuetitle}{\mkbibquote{#1}}
+\DeclareFieldFormat{issuesubtitle}{\mkbibquote{#1}}
+\DeclareFieldFormat{shortissuetitle}{\mkbibquote{#1}}
\DeclareFieldFormat{howpublished}{\ifbibstring{#1}{\bibstring{#1}}{#1}}
+\DeclareFieldFormat[patent]{title}{#1}
\DeclareFieldFormat[ancienttext]{title}{%
\ifboolexpr{
test {\iffieldequalstr{entrysubtype}{inscription}}
@@ -438,6 +492,37 @@
{\iffieldequalstr{entrysubtype}{churchfather}
{\mkbibemph{#1}}
{\mkbibquote{#1}}}}
+\DeclareFieldFormat[ancienttext]{shorttitle}{%
+ \ifboolexpr{
+ test {\iffieldequalstr{entrysubtype}{inscription}}
+ or
+ test {\iffieldequalstr{entrysubtype}{chronicle}}
+ }
+ {#1}
+ {\iffieldequalstr{entrysubtype}{churchfather}
+ {\mkbibemph{#1}}
+ {\mkbibquote{#1}}}}
+\DeclareFieldFormat[series]{title}{#1}
+\DeclareFieldFormat[series]{shorttitle}{#1}
+\DeclareFieldFormat[suppbook,suppcollection]
+{type}{%
+ \ifbibstring{#1}%
+ {\bibstring{#1}}%
+ {\ifcapital%
+ {\MakeCapital{#1\isdot}}%
+ {#1\isdot}}}
+\DeclareFieldFormat[suppbook,suppcollection]{title}{%
+ \iffieldundef{type}
+ {#1}
+ {\mkbibemph{#1}}}
+\DeclareFieldFormat[suppbook,suppcollection]{subtitle}{%
+ \iffieldundef{type}
+ {#1}
+ {\mkbibemph{#1}}}
+\DeclareFieldFormat[suppbook,suppcollection]{shorttitle}{%
+ \iffieldundef{type}
+ {#1}
+ {\mkbibemph{#1}}}
\DeclareBibliographyAlias{cite:mvbook}{cite:book}
\DeclareBibliographyAlias{cite:mvcollection}{cite:collection}
@@ -457,6 +542,8 @@
\DeclareBibliographyAlias{commentary}{book}
\DeclareBibliographyAlias{mvcommentary}{book}
\DeclareBibliographyAlias{cite:mvcommentary}{cite:mvbook}
+\DeclareBibliographyAlias{seminarpaper}{incollection}
+\DeclareBibliographyAlias{cite:seminarpaper}{cite:incollection}
\DeclareBibliographyAlias{cite:online}{cite:article}
\DeclareBibliographyAlias{online}{article}
\DeclareBibliographyAlias{cite:manual}{cite:book}
@@ -469,9 +556,21 @@
\DeclareBibliographyAlias{cite:proceedings}{cite:collection}
\DeclareBibliographyAlias{cite:mvproceedings}{cite:mvcollection}
\DeclareBibliographyAlias{cite:inproceedings}{cite:incollection}
+\DeclareBibliographyAlias{bookinbook}{incollection}
+\DeclareBibliographyAlias{cite:bookinbook}{cite:incollection}
+\DeclareBibliographyAlias{series}{mvcollection}
+\DeclareBibliographyAlias{cite:series}{cite:mvcollection}
+\DeclareBibliographyAlias{cite:booklet}{cite:book}
+\DeclareBibliographyAlias{booklet}{book}
+\DeclareBibliographyAlias{cite:suppcollection}{cite:suppbook}
+\DeclareBibliographyAlias{suppcollection}{suppbook}
+\DeclareBibliographyAlias{cite:report}{cite:book}
+\DeclareBibliographyAlias{report}{book}
+\DeclareBibliographyAlias{cite:suppperiodical}{cite:article}
+\DeclareBibliographyAlias{suppperiodical}{article}
\DeclareLabeldate{%
- \field{releasedate}
+ \field{eprintdate}
}
\renewcommand*{\newunitpunct}{\addcomma\space}
@@ -504,7 +603,6 @@
\ifdefvoid{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}%
\ifdefvoid{#4}{}{\revsdnamepunct\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}}
-
% ------------------------------------------------------------------
% BIBLIOGRAPHY
% ------------------------------------------------------------------
@@ -535,7 +633,6 @@
{}}%
\expandafter\g@addto@macro\expandafter\blx@includeentries\expandafter{\X}}
-
% ------------------------------------------------------------------
% LIST OF ABBREVIATIONS
% ------------------------------------------------------------------
@@ -580,7 +677,11 @@
\iffieldundef{shortjournal}
{}
{\bibhypertarget{\strfield{shortjournal}}{}%
- \printfield{journaltitle}}%
+ \printfield{journaltitle}%
+ \iffieldundef{journalsubtitle}
+ {}
+ {\setunit{\subtitlepunct}%
+ \printfield{journalsubtitle}}}%
\iffieldundef{shorthand}
{\iffieldundef{shortseries}
{}
@@ -649,14 +750,65 @@
\step[fieldset=shorttitle, fieldvalue={$1}]
}
\map{
+ \step[fieldsource=journaltitle, match=\regexp{(.*?):}, final]
+ \step[fieldset=shortjournal, fieldvalue={$1}]
+ }
+ \map{
\step[fieldsource=revdtitle, match=\regexp{(.*?):}, final]
\step[fieldset=revdshorttitle, fieldvalue={$1}]
}
\map{
+ \pertype{suppbook}
+ \pertype{suppcollection}
+ \step[fieldsource=type, final]
+ \step[fieldsource=title, final]
+ \step[fieldset=booktitle, origfieldval]
+ }
+ \map{
+ \pertype{suppbook}
+ \pertype{suppcollection}
+ \step[fieldsource=type, final]
+ \step[fieldsource=subtitle, final]
+ \step[fieldset=subbooktitle, origfieldval]
+ }
+ \map{
+ \pertype{suppbook}
+ \pertype{suppcollection}
+ \step[fieldsource=type, final]
+ \step[fieldsource=titleaddon, final]
+ \step[fieldset=booktitleaddon, origfieldval]
+ }
+ \map{
+ \pertype{periodical}
+ \step[fieldsource=title, final]
+ \step[fieldset=journaltitle, origfieldval]
+ }
+ \map{
+ \pertype{periodical}
+ \step[fieldsource=subtitle, final]
+ \step[fieldset=journalsubtitle, origfieldval]
+ }
+ \map{
+ \pertype{periodical}
+ \step[fieldsource=shorttitle, final]
+ \step[fieldset=shortjournal, origfieldval]
+ }
+ \map{
+ \step[fieldsource=journalsubtitle, final]
+ \step[fieldsource=journaltitle, final]
+ \step[fieldset=shortjournal, origfieldval]
+ }
+ \map{
\step[fieldsource=entrysubtype, match=\regexp{ANRW}, final]
\step[fieldset=options, fieldvalue={skipbib=false}]
}
\map[overwrite]{
+ \pertype{series}
+ \step[fieldsource=options, match=\regexp{(.*)}]
+ \step[fieldset=options, fieldvalue={useauthor=false,useeditor=false,}]
+ \step[fieldset=options, fieldvalue={$1}, append]
+ }
+ \map[overwrite]{
\pertype{ancienttext}
\pertype{classictext}
\step[fieldsource=related, final]
@@ -684,24 +836,32 @@
% DATA INHERITANCE
% ------------------------------------------------------------------
-\DeclareDataInheritance{mvbook,mvcollection,mvreference,mvlexicon,mvcommentary}
- {book,inbook,collection,incollection,reference,inreference,bookinbook,
- lexicon,commentary,inlexicon,incommentary,classictext}{%
+\DeclareDataInheritance{mvbook,mvcollection,mvreference,mvlexicon,mvcommentary,
+ mvproceedings,series}
+ {book,inbook,bookinbook,suppbook,collection,incollection,suppcollection,
+ reference,inreference,lexicon,inlexicon,commentary,incommentary,proceedings,
+ inproceedings,classictext}{%
\inherit{title}{maintitle}
\inherit{subtitle}{mainsubtitle}
\inherit{titleaddon}{maintitleaddon}
\inherit{shorttitle}{shortmaintitle}
\inherit{editor}{maineditor}
\inherit{translator}{maintranslator}
+ \inherit{withauthor}{withmainauthor}
+ \inherit{witheditor}{withmaineditor}
+ \inherit{withtranslator}{withmaintranslator}
+ \inherit{withauthortype}{withmainauthortype}
+ \inherit{witheditortype}{withmaineditortype}
+ \inherit{withtranslatortype}{withmaintranslatortype}
\noinherit{sorttitle}
\noinherit{indextitle}
\noinherit{indexsorttitle}
\noinherit{endyear}
}
-\DeclareDataInheritance{book,collection,reference,lexicon,commentary}
- {inbook,incollection,inreference, inlexicon,incommentary,
- bookinbook,classictext}{%
+\DeclareDataInheritance{book,collection,reference,lexicon,commentary,proceedings}
+ {inbook,bookinbook,suppbook,incollection,suppcollection,inreference,inlexicon,
+ incommentary,inproceedings,classictext}{%
\inherit{title}{booktitle}
\inherit{subtitle}{booksubtitle}
\inherit{titleaddon}{booktitleaddon}
@@ -709,12 +869,21 @@
\inherit{author}{bookauthor}
\inherit{editor}{bookeditor}
\inherit{translator}{booktranslator}
+ \inherit{withauthor}{withbookauthor}
+ \inherit{witheditor}{withbookeditor}
+ \inherit{withtranslator}{withbooktranslator}
+ \inherit{withauthortype}{withbookauthortype}
+ \inherit{witheditortype}{withbookeditortype}
+ \inherit{withtranslatortype}{withbooktranslatortype}
\noinherit{sorttitle}
\noinherit{indextitle}
\noinherit{indexsorttitle}
\noinherit{endyear}
}
+\DeclareDataInheritance{periodical}{article,suppperiodical}{%
+ \inherit{shorttitle}{shortjournal}
+}
% ------------------------------------------------------------------
% LANGUAGE
@@ -732,14 +901,34 @@
\renewcommand*{\lbx@sfromlang}{%
\iffieldundef{origlanguage}
{\unspace}
- {\ifbibstring{from\thefield{origlanguage}}
+ {\ifbibxstring{from\abx@field@origlanguage}
{\bibsstring{from\thefield{origlanguage}}}
{from \printfield{origlanguage}}}}
+\newbibmacro*{language}{%
+ \iflistundef{language}
+ {}
+ {\setunit{\addspace}%
+ \printtext[brackets]{%
+ \usebibmacro{in}%
+ \printlist{language}}}}
+
% ------------------------------------------------------------------
% SET UP DELIMITER MACROS
% ------------------------------------------------------------------
+\newbibmacro*{ifneedsetpostnotedelim}[2]{%
+ \ifboolexpr{
+ test {\ifentrytype{ancienttext}}
+ or
+ test {\ifentrytype{classictext}}
+ }
+ {\def\blx@shorthand{true}}
+ {}%
+ \usebibmacro{ifuseshorthand}
+ {#1}
+ {#2}}
+
\ExplSyntaxOn
\cs_new_protected:Nn \sbl_ifinstringt:nnn {
\tl_if_in:nnT {#2}{#1}{#3}}
@@ -748,6 +937,9 @@
\ExplSyntaxOff
\newbibmacro*{setpostnotedelim}{%
+ \iftoggle{cbx:involcite}
+ {\renewcommand*{\postnotedelim}{\addspace}}
+ {}%
\iffieldundef{postnote}
{}
{\IfInStringT{.}{\abx@field@postnote}
@@ -800,6 +992,62 @@
\setunit{\addspace}}
% ------------------------------------------------------------------
+% SHORTHAND MACROS
+% ------------------------------------------------------------------
+
+\newbibmacro*{ifuseshorthand}[2]{%
+ \ifboolexpr{
+ not test {\iffieldundef{shorthand}}
+ and
+ (
+ test {\ifcsstring{blx@shorthand}{true}}
+ or
+ (
+ test {\ifcsstring{blx@shorthand}{short}}
+ and
+ test {\ifciteseen}
+ )
+ or
+ (
+ test {\ifcsstring{blx@shorthand}{intro}}
+ and
+ test {\ifciteseen}
+ )
+ )
+ }
+ {#1}
+ {#2}}
+
+\newbibmacro*{ifciteuseshorthand}[2]{%
+ \ifboolexpr{
+ test {\ifentrytype{ancienttext}}
+ or
+ test {\ifentrytype{classictext}}
+ }
+ {\def\blx@shorthand{true}}
+ {}%
+ \usebibmacro{ifuseshorthand}
+ {#1}
+ {#2}}
+
+\newbibmacro*{shorthand}{%
+ \iffieldsequal{shorthand}{shorttitle}
+ {\printtext{\mkbibemph{\printtext{%
+ \bibhyperlink{\strfield{shorthand}}{\thefield{shorthand}}}}}}
+ {\printtext{\bibhyperlink{\strfield{shorthand}}{\thefield{shorthand}}}}}
+
+\renewbibmacro*{shorthandintro}{%
+ \iffieldundef{shorthandintro}
+ {\iffieldundef{shorthand}
+ {}
+ {\setunit{\addspace}%
+ \printtext[parens]{%
+ \bibstring{citedas}\space
+ \usebibmacro{shorthand}}}}
+ {\setunit{\addspace}%
+ \printtext[parens]{\printfield{shorthandintro}}}}
+
+% ------------------------------------------------------------------
% TITLE MACROS
% ------------------------------------------------------------------
@@ -808,10 +1056,16 @@
{\iffieldundef{shorttitle}
{\iffieldundef{title}
{}
+ {\ifbool{bbx@inset}
+ {\printtext{\bibhyperlink{\strfield{setkey}}
+ {\printtext[title]{\printfield[titlecase]{title}}}}}
+ {\printtext[bibhyperlink]{%
+ \printtext[title]{\printfield[titlecase]{title}}}}}}
+ {\ifbool{bbx@inset}
+ {\printtext{\bibhyperlink{\strfield{setkey}}
+ {\printtext[title]{\printfield[titlecase]{shorttitle}}}}}
{\printtext[bibhyperlink]{%
- \printtext[title]{\printfield[titlecase]{title}}}}}
- {\printtext[bibhyperlink]{%
- \printtext[title]{\printfield[titlecase]{shorttitle}}}}%
+ \printtext[title]{\printfield[titlecase]{shorttitle}}}}}%
\newunit}
{}}
@@ -821,8 +1075,7 @@
{\iffieldundef{title}
{}
{\printtext[title]{\printfield[titlecase]{title}}}}
- {\printtext[title]{\printfield[titlecase]{shorttitle}}}%
- \newunit}
+ {\printtext[title]{\printfield[titlecase]{shorttitle}}}}
{}}
\newbibmacro*{shortbooktitle}{%
@@ -843,57 +1096,40 @@
\renewbibmacro*{title}{%
\ifciteseen
- {\ifboolexpr{
- test {\ifnameundef{author}}
- and
- not test {\ifnameundef{editor}}
- }
- {}
- {\usebibmacro{shorttitle}}}
- {\ifboolexpr{
- test {\iffieldundef{title}}
- and
- test {\iffieldundef{subtitle}}
- }
+ {\usebibmacro{shorttitle}}
+ {\iffieldundef{title}
{}
{\printtext[title]{%
\printfield[titlecase]{title}%
\setunit{\subtitlepunct}%
\printfield[titlecase]{subtitle}}%
- \newunit}%
- \printfield{titleaddon}}}
+ \newunit
+ \printfield{titleaddon}%
+ \usebibmacro{language}}}}
\renewbibmacro*{booktitle}{%
\ifciteseen
{\usebibmacro{shortbooktitle}}
- {\ifboolexpr{
- test {\iffieldundef{booktitle}}
- and
- test {\iffieldundef{booksubtitle}}
- }
+ {\iffieldundef{booktitle}
{}
{\printtext[booktitle]{%
\printfield[titlecase]{booktitle}%
\setunit{\subtitlepunct}%
\printfield[titlecase]{booksubtitle}}%
- \newunit}%
- \printfield{booktitleaddon}}}
+ \newunit
+ \printfield{booktitleaddon}}}}
\renewbibmacro*{maintitle}{%
\ifciteseen
{\usebibmacro{shortmaintitle}}
- {\ifboolexpr{
- test {\iffieldundef{maintitle}}
- and
- test {\iffieldundef{mainsubtitle}}
- }
+ {\iffieldundef{maintitle}
{}
{\printtext[maintitle]{%
\printfield[titlecase]{maintitle}%
\setunit{\subtitlepunct}%
\printfield[titlecase]{mainsubtitle}}%
- \newunit}%
- \printfield{maintitleaddon}}}
+ \newunit
+ \printfield{maintitleaddon}}}}
\newbibmacro*{booktitle+maintitle}{%
\iffieldundef{booktitle}
@@ -910,13 +1146,13 @@
\clearfield{bootitleaddon}%
\newunit}}
-\newbibmacro*{shortbooktitle+shortmaintitle}{%
- \iffieldundef{booktitle}
- {\iffieldundef{maintitle}
+\newbibmacro*{shortmaintitle+shortbooktitle}{%
+ \iffieldundef{maintitle}
+ {\iffieldundef{booktitle}
{}
- {\usebibmacro{shortmaintitle}
+ {\usebibmacro{shortbooktitle}
\newunit}}
- {\usebibmacro{shortbooktitle}%
+ {\usebibmacro{shortmaintitle}%
\newunit}}
\newbibmacro*{revdshorttitle}{%
@@ -932,11 +1168,7 @@
\newbibmacro*{revdtitle}{%
\ifciteseen
{\usebibmacro{revdshorttitle}}
- {\ifboolexpr{
- test {\iffieldundef{revdtitle}}
- and
- test {\iffieldundef{revdsubtitle}}
- }
+ {\iffieldundef{revdtitle}
{}
{\printtext[revdtitle]{%
\printfield[titlecase]{revdtitle}%
@@ -945,9 +1177,9 @@
\newunit}%
\printfield{revdtitleaddon}}}
-\newbibmacro*{xrefshortbooktitle+xrefshortmaintitle}{%
+\newbibmacro*{xrefshortmaintitle+xrefshortbooktitle}{%
\iffieldundef{xref}
- {\usebibmacro{shortbooktitle+shortmaintitle}}
+ {\usebibmacro{shortmaintitle+shortbooktitle}}
{\entrydata{\thefield{xref}}{%
\iffieldundef{shorttitle}
{\usebibmacro{shorttitle}}
@@ -969,13 +1201,25 @@
{\printtext[shortjournal]{%
\bibhyperlink{\strfield{shortjournal}}{\thefield{shortjournal}}}}}
-\newbibmacro*{shortjournal+issuetitle}{%
+\newbibmacro*{shortjournal+issue}{%
\usebibmacro{shortjournal}%
- \iffieldundef{series}
- {}
+ \setunit{\addspace}%
+ \usebibmacro{series+volume+number+eid}%
+ \ifboolexpr{
+ not test {\ifnameundef{editor}}
+ or
+ not test {\ifnameundef{editora}}
+ or
+ not test {\ifnameundef{editorb}}
+ or
+ not test {\ifnameundef{editorc}}
+ or
+ not test {\iffieldundef{series}}
+ }
{\newunit
- \printfield{series}}%
- \usebibmacro{volume+number+eid}%
+ \usebibmacro{byeditor+others}%
+ \newunit}
+ {\setunit{\addspace}}%
\usebibmacro{issue+date}%
\ifboolexpr{
test {
@@ -1005,7 +1249,9 @@
}
{}
{\iffieldundef{volume}
- {\setunit{\addcomma\space}%
+ {\iffieldundef{journaltitle}
+ {\newunit}
+ {\setunit{\addcomma\space}}%
\iffieldundef{issue}
{\usebibmacro{date}}
{\printfield{issue}%
@@ -1021,39 +1267,44 @@
\usebibmacro{date}}}%
\setunit{\addcolon\space}}}}
-\renewbibmacro*{volume+number+eid}{%
- \setunit*{\addspace}%
+\newbibmacro*{series+volume+number+eid}{%
+ \iffieldundef{series}
+ {}
+ {\newunit
+ \printfield{series}%
+ \newunit}%
\printfield{volume}%
\setunit*{\addperiod}%
\printfield{number}%
\setunit{\addcomma\space}%
\printfield{eid}}
-\newbibmacro*{volume+part}{%
- \iffieldundef{volume}
+\newbibmacro{inissuetitle}{%
+ \iffieldundef{issuetitle}
{}
- {\iffieldundef{part}
- {\usebibmacro{volumeof}}
- {\printfield[vol]{volume}%
- \setunit{\addcomma\addspace}%
- \iffieldundef{maintitle}
- {\printfield[pt]{part}%
- \newunit}
- {\printfield[partof]{part}
- \setunit{\addspace}}}}}
+ {\usebibmacro{in}%
+ \printtext[issuetitle]{%
+ \printfield[titlecase]{issuetitle}%
+ \setunit*{\subtitlepunct}%
+ \printfield[titlecase]{issuesubtitle}}}}
+
+\newbibmacro*{shortissuetitle}{%
+ \iffieldundef{shortissuetitle}
+ {\iffieldundef{issuetitle}
+ {}
+ {\printtext[issuetitle]{\printfield[titlecase]{issuetitle}}}}
+ {\printtext[issuetitle]{\printfield[titlecase]{shortissuetitle}}}%
+ \newunit}
-\newbibmacro*{involume+part}{%
- \ifboolexpr{
- test {\iffieldundef{booktitle}}
- and
- not test {\iffieldundef{volume}}
- and
- test {\iffieldundef{pages}}
- }
- {\bibstring{in}%
- \setunit{\space}}
- {}%
- \usebibmacro{volume+part}}
+\newbibmacro{issuetitle}{%
+ \iffieldundef{issuetitle}
+ {}
+ {\ifciteseen
+ {\usebibmacro{shortissuetitle}}
+ {\printtext[issuetitle]{%
+ \printfield[titlecase]{issuetitle}%
+ \setunit*{\subtitlepunct}%
+ \printfield[titlecase]{issuesubtitle}}}}}
% ------------------------------------------------------------------
% NAME MACROS
@@ -1070,7 +1321,7 @@
{\ifbibxstring{\thefield{with#1type}}
{\bibstring{\thefield{with#1type}}}
{\printtext[with#1type]{\thefield{with#1type}}}}}%
- \setunit{\space}%
+ \setunit{\addspace}%
\printnames{with#1}%
\clearname{with#1}}}
@@ -1191,10 +1442,16 @@
\usebibmacro{ifidemused}
{}
{\printnames[labelname]{author}}%
- }{%
+ }{\renewcommand*{\namedashpunct}{\adddot\space}%
\iffieldundef{authortype}
- {\renewcommand*{\namedashpunct}{\adddot\space}}
+ {}
{\renewcommand*{\namedashpunct}{\addcomma\space}}%
+ \ifnameundef{withauthor}
+ {}
+ {\renewcommand*{\namedashpunct}{\addcomma\space}}%
+ \ifnameundef{holder}
+ {}
+ {\renewcommand*{\namedashpunct}{\addspace}}%
\usebibmacro{dashcheck}
{\bibnamedash}
{\usebibmacro{ifidemused}
@@ -1208,19 +1465,15 @@
\usebibmacro{withname}{author}}}
{\global\undef\bbx@lasthash}}
-\renewbibmacro*{bybookauthor}{%
- \ifboolexpr{
- test {\ifnameundef{bookauthor}}
- or
- test {\ifnamesequal{author}{bookauthor}}
- }
+\newbibmacro*{author+holder}{%
+ \usebibmacro{author}%
+ \ifciteseen
{}
- {\usebibmacro{bytypestrg}{author}{author}%
- \setunit{\addspace}%
- \printnames[byauthor]{bookauthor}%
- \usebibmacro{withname}{author}}%
-}
-
+ {\ifnameundef{holder}
+ {}
+ {\setunit{\addspace}%
+ \printtext[parens]{\printnames{holder}}}}}
+
\renewbibmacro*{editor+others}{%
\ifboolexpr{
test \ifuseeditor
@@ -1231,8 +1484,7 @@
\usebibmacro{ifidemused}
{}
{\printnames[labelname]{editor}}%
- }{%
- \renewcommand*{\namedashpunct}{\addcomma\space}%
+ }{\renewcommand*{\namedashpunct}{\addcomma\space}%
\usebibmacro{dashcheck}
{\bibnamedash}
{\usebibmacro{ifidemused}
@@ -1271,15 +1523,64 @@
\clearname{translator}}
{}}
+\renewbibmacro*{byauthor}{%
+ \ifboolexpr{
+ test {\ifuseauthor}
+ or
+ test {\iffieldundef{title}}
+ or
+ test {\ifnameundef{author}}
+ }
+ {}
+ {\setunit{\addcomma\space}%
+ \usebibmacro{bytypestrg}{author}{author}%
+ \setunit{\addspace}%
+ \printnames[byauthor]{author}%
+ \usebibmacro{withname}{author}}}%
+
+\renewbibmacro*{bybookauthor}{%
+ \ifboolexpr{
+ test {\iffieldundef{booktitle}}
+ or
+ test {\ifnameundef{bookauthor}}
+ or
+ test {\ifnamesequal{author}{bookauthor}}
+ }
+ {}
+ {\setunit{\addcomma\space}%
+ \usebibmacro{bytypestrg}{author}{author}%
+ \setunit{\addspace}%
+ \printnames[byauthor]{bookauthor}%
+ \usebibmacro{withname}{bookauthor}}%
+}
+
+\newbibmacro*{bymainauthor}{%
+ \ifboolexpr{
+ test {\iffieldundef{maintitle}}
+ or
+ test {\ifnameundef{mainauthor}}
+ or
+ test {\ifnamesequal{author}{mainauthor}}
+ or
+ test {\ifnamesequal{bookauthor}{mainauthor}}
+ }
+ {}
+ {\setunit{\addcomma\space}%
+ \usebibmacro{bytypestrg}{author}{author}%
+ \setunit{\addspace}%
+ \printnames[byauthor]{mainauthor}%
+ \usebibmacro{withname}{mainauthor}}%
+}
+
\renewbibmacro*{byeditor}{%
\ifnameundef{editor}
{}
{\usebibmacro{bytypestrg}{editor}{editor}%
\setunit{\addspace}%
\printnames[byeditor]{editor}%
+ \clearname{editor}%
\usebibmacro{withname}{editor}%
- \newunit}%
- \usebibmacro{byeditorx}}
+ \newunit}}
\renewbibmacro*{byeditor+others}{%
\ifnameundef{editor}
@@ -1290,8 +1591,30 @@
\clearname{editor}%
\usebibmacro{withname}{editor}%
\newunit}%
- \usebibmacro{byeditorx}%
- \usebibmacro{bytranslator+others}}
+ \usebibmacro{byeditorx}}
+
+\renewbibmacro*{byeditorx}{%
+ \ifnameundef{editora}
+ {}
+ {\usebibmacro{bytypestrg}{editora}{editor}%
+ \setunit{\addspace}%
+ \printnames[byeditora]{editora}%
+ \clearname{editora}%
+ \newunit}%
+ \ifnameundef{editorb}
+ {}
+ {\usebibmacro{bytypestrg}{editorb}{editor}%
+ \setunit{\addspace}%
+ \printnames[byeditorb]{editorb}%
+ \clearname{editorb}%
+ \newunit}%
+ \ifnameundef{editorc}
+ {}
+ {\usebibmacro{bytypestrg}{editorc}{editor}%
+ \setunit{\addspace}%
+ \printnames[byeditorc]{editorc}%
+ \clearname{editorc}%
+ \newunit}}
\renewbibmacro*{bytranslator}{%
\ifnameundef{translator}
@@ -1299,6 +1622,7 @@
{\bibstring{bytranslator}%
\setunit{\addspace}%
\printnames[bytranslator]{translator}%
+ \clearname{translator}%
\usebibmacro{withname}{translator}}}
\renewbibmacro*{bytranslator+others}{%
@@ -1312,127 +1636,203 @@
\newunit}%
\usebibmacro{withothers}}
-\newbibmacro*{bybookeditor+others}{%
- \ifnameundef{editor}
+\newbibmacro*{byeditor/bytranslator}{%
+ \ifboolexpr{
+ (
+ not test {\ifnameundef{bookeditor}}
+ and
+ not test {\ifnameundef{maineditor}}
+ )
+ or
+ (
+ not test {\ifnameundef{maineditor}}
+ and
+ test {\iffieldundef{booktitle}}
+ )
+ }
+ {\usebibmacro{byeditor}}
{}
- {\usebibmacro{byeditor+othersstrg}%
- \setunit{\addspace}%
- \printnames[byeditor]{editor}%
- \clearname{editor}%
- \usebibmacro{withname}{editor}%
- \newunit}%
+ \newunit
+ \ifboolexpr{
+ (
+ not test {\ifnameundef{booktranslator}}
+ and
+ not test {\ifnameundef{maintranslator}}
+ )
+ or
+ (
+ not test {\ifnameundef{maintranslator}}
+ and
+ test {\iffieldundef{booktitle}}
+ )
+ }
+ {\usebibmacro{bytranslator}}
+ {}}
+
+\newbibmacro*{byauthor/byeditor+others/bytranslator+others}{%
+ \iffieldundef{title}
+ {}
+ {\usebibmacro{byauthor}%
+ \newunit
+ \usebibmacro{ifbooktitleormaintitle}
+ {\usebibmacro{byeditor/bytranslator}}
+ {\usebibmacro{byeditor+others}%
+ \newunit
+ \usebibmacro{bytranslator+others}}}}
+
+\newbibmacro*{bybookeditor}{%
\ifnameundef{bookeditor}
{}
{\usebibmacro{byeditor+othersstrg}%
\setunit{\addspace}%
\printnames[byeditor]{bookeditor}%
\clearname{bookeditor}%
- \usebibmacro{withname}{bookeditor}%
- \newunit}%
- \usebibmacro{byeditorx}%
- \usebibmacro{bybooktranslator+others}}
+ \usebibmacro{withname}{bookeditor}}}
-\newbibmacro*{bymaineditor+others}{%
- \ifnameundef{editor}
- {}
- {\usebibmacro{byeditor+othersstrg}%
- \setunit{\addspace}%
- \printnames[byeditor]{editor}%
- \clearname{editor}%
- \usebibmacro{withname}{editor}%
- \newunit}%
- \ifnameundef{maineditor}
- {}
- {\usebibmacro{byeditor+othersstrg}%
- \setunit{\addspace}%
- \printnames[byeditor]{maineditor}%
- \clearname{maineditor}%
- \usebibmacro{withname}{maineditor}%
- \newunit}%
- \usebibmacro{byeditorx}%
- \usebibmacro{bymaintranslator+others}}
+\newbibmacro*{bybookeditor+others}{%
+ \ifboolexpr{
+ (
+ not test {\ifnameundef{maineditor}}
+ and
+ test {\ifnameundef{bookeditor}}
+ )
+ or
+ (
+ test {\iffieldundef{maintitle}}
+ and
+ test {\ifnameundef{bookeditor}}
+ )
+ }
+ {\usebibmacro{byeditor}}
+ {\usebibmacro{bybookeditor}}%
+ \newunit
+ \usebibmacro{byeditorx}}
-\newbibmacro*{bybooktranslator+others}{%
- \ifnameundef{translator}
- {}
- {\usebibmacro{bytranslator+othersstrg}%
- \setunit{\addspace}%
- \printnames[bytranslator]{translator}%
- \clearname{translator}%
- \usebibmacro{withname}{translator}%
- \newunit}%
+\newbibmacro*{bybooktranslator}{%
\ifnameundef{booktranslator}
{}
{\usebibmacro{bytranslator+othersstrg}%
\setunit{\addspace}%
\printnames[bytranslator]{booktranslator}%
\clearname{booktranslator}%
- \usebibmacro{withname}{booktranslator}%
- \newunit}%
+ \usebibmacro{withname}{booktranslator}}}
+
+\newbibmacro*{bybooktranslator+others}{%
+ \ifboolexpr{
+ (
+ not test {\ifnameundef{maintranslator}}
+ and
+ test {\ifnameundef{booktranslator}}
+ )
+ or
+ (
+ test {\iffieldundef{maintitle}}
+ and
+ test {\ifnameundef{booktranslator}}
+ )
+ }
+ {\usebibmacro{bytranslator}}
+ {\usebibmacro{bybooktranslator}}%
+ \newunit
\usebibmacro{withothers}}
-\newbibmacro*{bymaintranslator+others}{%
- \ifnameundef{translator}
+\newbibmacro*{bybookeditor/bybooktranslator}{%
+ \ifboolexpr{
+ (
+ not test {\ifnameundef{maineditor}}
+ and
+ test {\ifnameundef{bookeditor}}
+ )
+ or
+ (
+ test {\iffieldundef{maintitle}}
+ and
+ test {\ifnameundef{bookeditor}}
+ )
+ }
+ {\usebibmacro{byeditor}}
+ {\usebibmacro{bybookeditor}}%
+ \newunit
+ \ifboolexpr{
+ (
+ not test {\ifnameundef{maintranslator}}
+ and
+ test {\ifnameundef{booktranslator}}
+ )
+ or
+ (
+ test {\iffieldundef{maintitle}}
+ and
+ test {\ifnameundef{booktranslator}}
+ )
+ }
+ {\usebibmacro{bytranslator}}
+ {\usebibmacro{bybooktranslator}}}
+
+\newbibmacro*{bybookauthor/bybookeditor+others/bybooktranslator+others}{%
+ \iffieldundef{booktitle}
{}
- {\usebibmacro{bytranslator+othersstrg}%
+ {\usebibmacro{bybookauthor}%
+ \newunit
+ \iffieldundef{maintitle}
+ {\usebibmacro{bybookeditor+others}%
+ \newunit
+ \usebibmacro{bybooktranslator+others}}
+ {\usebibmacro{bybookeditor/bybooktranslator}}}}
+
+\newbibmacro*{bymaineditor+others}{%
+ \ifnameundef{maineditor}
+ {\usebibmacro{byeditor+others}}
+ {\usebibmacro{byeditor+othersstrg}%
\setunit{\addspace}%
- \printnames[bytranslator]{translator}%
- \clearname{translator}%
- \usebibmacro{withname}{translator}%
- \newunit}%
+ \printnames[byeditor]{maineditor}%
+ \clearname{maineditor}%
+ \usebibmacro{withname}{maineditor}%
+ \newunit
+ \usebibmacro{byeditorx}}}
+
+\newbibmacro*{bymaintranslator+others}{%
\ifnameundef{maintranslator}
- {}
+ {\usebibmacro{bytranslator+others}}
{\usebibmacro{bytranslator+othersstrg}%
\setunit{\addspace}%
\printnames[bytranslator]{maintranslator}%
\clearname{maintranslator}%
\usebibmacro{withname}{maintranslator}%
- \newunit}%
- \usebibmacro{withothers}}
+ \newunit
+ \usebibmacro{withothers}}}
+
+\newbibmacro*{bymainauthor/bymaineditor+others/bymaintranslator+others}{%
+ \iffieldundef{maintitle}
+ {}
+ {\usebibmacro{bymainauthor}%
+ \newunit
+ \usebibmacro{bymaineditor+others}%
+ \newunit
+ \usebibmacro{bymaintranslator+others}}}
\newbibmacro*{revdauthor}{%
- \ifboolexpr{
- test \ifuseauthor
- and
- not test {\ifnameundef{revdauthor}}
- }
+ \ifnameundef{revdauthor}
+ {}
{\bibstring{byauthor}%
\setunit{\addspace}%
- \ifciteseen{%
- \printnames[labelname]{revdauthor}%
- }{%
- \printnames{revdauthor}%
- \iffieldundef{authortype}
- {}
- {\setunit{\addcomma\space}%
- \usebibmacro{authorstrg}}}}
- {}}
+ \ifciteseen
+ {\printnames[labelname]{revdauthor}}
+ {\printnames{revdauthor}}}}
\newbibmacro*{revdeditor}{%
- \ifboolexpr{
- test \ifuseeditor
- and
- not test {\ifnameundef{revdeditor}}
- }
+ \ifnameundef{revdeditor}
+ {}
{\bibsstring{byeditor}%
\setunit{\addspace}%
- \ifciteseen{%
- \printnames[labelname]{revdeditor}%
- }{%
- \printnames{revdeditor}%
- }%
- \clearname{revdeditor}}
- {}}
+ \ifciteseen
+ {\printnames[labelname]{revdeditor}}
+ {\printnames{revdeditor}}}}
\newbibmacro*{revdauthor/revdeditor}{%
- \ifboolexpr{
- test \ifuseauthor
- and
- not test {\ifnameundef{revdauthor}}
- }
- {\usebibmacro{revdauthor}}
- {\usebibmacro{revdeditor}}}
-
+ \usebibmacro{revdauthor}%
+ \setunit{\addcomma\space}%
+ \usebibmacro{revdeditor}}
\newbibmacro*{revdauthor/revdeditor+revdtitle}{%
\biblstring{reviewof}%
@@ -1443,6 +1843,10 @@
{\setunit{\addcomma\space}%
\usebibmacro{revdtitle}}}
+% ------------------------------------------------------------------
+% SERIES MACROS
+% ------------------------------------------------------------------
+
\newbibmacro*{shortseries}{%
\iffieldundef{shortseries}
{\printfield{series}}
@@ -1460,6 +1864,32 @@
\printfield{number}%
\newunit}
+% ------------------------------------------------------------------
+% EVENT MACROS
+% ------------------------------------------------------------------
+
+\renewbibmacro*{event+venue+date}{%
+ \iffieldundef{eventtitle}
+ {}
+ {\printfield{eventtitle}%
+ \newunit
+ \printfield{eventtitleaddon}}%
+ \ifboolexpr{
+ test {\iffieldundef{venue}}
+ and
+ test {\iffieldundef{eventyear}}
+ }
+ {}
+ {\setunit{\addspace}%
+ \printtext[parens]{%
+ \printfield{venue}%
+ \setunit*{\addcomma\space}%
+ \printeventdate}}%
+ \newunit
+ \clearfield{eventtitle}%
+ \clearfield{venue}%
+ \clearfield{eventyear}}
+
\newbibmacro*{eventtitle}{%
\iffieldundef{eventtitle}
{}
@@ -1468,7 +1898,9 @@
{\midsentence}%
\bibstring{paperpresented}%
\setunit{\addspace}%
- \printfield{eventtitle}}}
+ \printfield{eventtitle}%
+ \newunit
+ \printfield{eventtitleaddon}}}
\newbibmacro*{venue+eventdate}{%
\iffieldundef{venue}
@@ -1479,22 +1911,40 @@
{\printdate}
{\printeventdate}}
+% ------------------------------------------------------------------
+% PUBLISHER MACROS
+% ------------------------------------------------------------------
+
\newbibmacro*{parens+publisher+location+date}{%
- \setunit{\space}%
- \printtext[parens]{%
- \usebibmacro{publisher+location+date}%
- \iffieldequalstr{relatedtype}{reprint}
- {\renewcommand*{\newunitpunct}{\addsemicolon\space}%
- \newunit
- \usebibmacro{related:init}%
- \usebibmacro{related}%
- \global\toggletrue{relatedseen}}
- {}}}
+ \ifboolexpr{
+ test {\iflistundef{publisher}}
+ and
+ test {\iflistundef{location}}
+ and
+ test {\iffieldundef{howpublished}}
+ and
+ test {\iffieldundef{year}}
+ }
+ {}
+ {\setunit{\addspace}%
+ \printtext[parens]{%
+ \usebibmacro{publisher+location+date}%
+ \iffieldequalstr{relatedtype}{reprint}
+ {\renewcommand*{\newunitpunct}{\addsemicolon\space}%
+ \newunit
+ \usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \global\toggletrue{relatedseen}}
+ {}}}}
\newcounter{currentpublisher}
\newcounter{currentlocation}
+\newcounter{currentorganization}
+\newcounter{currentinstitution}
\newcounter{publishertotal}
\newcounter{locationtotal}
+\newcounter{organizationtotal}
+\newcounter{institutiontotal}
\DeclareListFormat{publisher}{%
\setcounter{publishertotal}{\value{listtotal}}%
@@ -1504,6 +1954,22 @@
{\setcounter{currentpublisher}{0}}
{\addtocounter{currentpublisher}{1}}}
+\DeclareListFormat{organization}{%
+ \setcounter{organizationtotal}{\value{listtotal}}%
+ \usebibmacro{list:delim}{#1}%
+ #1\isdot
+ \ifnumequal{\value{currentorganization}}{\value{listtotal}}
+ {\setcounter{currentorganization}{0}}
+ {\addtocounter{currentorganization}{1}}}
+
+\DeclareListFormat{institution}{%
+ \setcounter{institutiontotal}{\value{listtotal}}%
+ \usebibmacro{list:delim}{#1}%
+ #1\isdot
+ \ifnumequal{\value{currentinstitution}}{\value{listtotal}}
+ {\setcounter{currentinstitution}{0}}
+ {\addtocounter{currentinstitution}{1}}}
+
\DeclareListFormat{location}{%
\setcounter{locationtotal}{\value{listtotal}}%
\usebibmacro{list:delim}{#1}%
@@ -1517,6 +1983,14 @@
{}
{\printlist[][\value{currentlocation}-\value{currentlocation}]{location}%
\setunit*{\addcolon\space}}%
+ \ifnumequal{\value{currentorganization}}{0}
+ {}
+ {\printlist[][\value{currentorganization}-\value{currentorganization}]{organization}%
+ \setunit*{\addcomma\space}}%
+ \ifnumequal{\value{currentinstitution}}{0}
+ {}
+ {\printlist[][\value{currentinstitution}-\value{currentinstitution}]{institution}%
+ \setunit*{\addcomma\space}}%
\ifnumequal{\value{currentpublisher}}{0}
{}
{\printlist[][\value{currentpublisher}-\value{currentpublisher}]{publisher}}%
@@ -1524,11 +1998,19 @@
\ifboolexpr{
test {\ifnumgreater{\value{locationtotal}}{1}}
and
+ test {\ifnumgreater{\value{currentlocation}}{\value{organizationtotal}}}
+ and
+ test {\ifnumgreater{\value{currentlocation}}{\value{institutiontotal}}}
+ and
test {\ifnumgreater{\value{currentlocation}}{\value{publishertotal}}}
}
{\setcounter{currentlocation}{0}}
{}%
\ifboolexpr{
+ test {\ifnumgreater{\value{currentorganization}}{0}}
+ or
+ test {\ifnumgreater{\value{currentinstitution}}{0}}
+ or
test {\ifnumgreater{\value{currentpublisher}}{0}}
or
test {\ifnumgreater{\value{currentlocation}}{0}}
@@ -1537,9 +2019,19 @@
{}}
\newbibmacro*{init:location+publisher}{%
+ \setcounter{locationtotal}{0}%
+ \setcounter{organizationtotal}{0}%
+ \setcounter{institutiontotal}{0}%
+ \setcounter{publishertotal}{0}%
\iflistundef{location}
{\setcounter{currentlocation}{0}}
{\setcounter{currentlocation}{1}}%
+ \iflistundef{organization}
+ {\setcounter{currentorganization}{0}}
+ {\setcounter{currentorganization}{1}}%
+ \iflistundef{institution}
+ {\setcounter{currentinstitution}{0}}
+ {\setcounter{currentinstitution}{1}}%
\iflistundef{publisher}
{\setcounter{currentpublisher}{0}}
{\setcounter{currentpublisher}{1}}}
@@ -1548,7 +2040,19 @@
\usebibmacro{reprint}%
\usebibmacro{init:location+publisher}%
\usebibmacro{loop:location+publisher}%
- \setunit{\addcomma\space}%
+ \iffieldundef{howpublished}
+ {}
+ {\ifboolexpr{
+ test {\iflistundef{organization}}
+ and
+ test {\iflistundef{institution}}
+ and
+ test {\iflistundef{publisher}}
+ }
+ {\setunit*{\addcolon\space}}
+ {\setunit*{\addcomma\space}}%
+ \printfield{howpublished}}%
+ \setunit*{\addcomma\space}%
\usebibmacro{date}%
\newunit}
@@ -1562,6 +2066,10 @@
\usebibmacro{origdate}%
\newunit}
+% ------------------------------------------------------------------
+% CHAPTER, PAGES, VOLUME, PART MACROS
+% ------------------------------------------------------------------
+
\newbibmacro*{volume}{%
\iffieldundef{volume}
{}
@@ -1570,45 +2078,141 @@
\printfield{volume}%
\newunit}}
-\newbibmacro*{volumeof}{%
- \iffieldundef{volume}
- {}
+\newbibmacro*{ifbooktitleormaintitle}[2]{%
+ \ifboolexpr{
+ not test {\iffieldundef{booktitle}}
+ or
+ not test {\iffieldundef{maintitle}}
+ }
+ {#1}
+ {#2}}
+
+\newbibmacro*{ifneedstitlein}[2]{%
+ \usebibmacro{ifbooktitleormaintitle}
+ {\ifboolexpr{
+ togl {inentrytype}
+ or
+ not test {\usebibmacro{ifusevolumeandpart}}
+ }
+ {#1}
+ {#2}}
+ {#2}}
+
+\newbibmacro{pagesin}{%
+ \usebibmacro{ifbooktitleormaintitle}
+ {\iffieldundef{pages}
+ {}
+ {\printfield[pagesin]{pages}%
+ \setunit*{\addspace}}}
+ {\printfield[pagepages]{pages}%
+ \newunit}}
+
+\newbibmacro*{chapterin}{%
+ \ifboolexpr{
+ test {\usebibmacro{ifbooktitleormaintitle}}
+ or
+ not test {\iffieldundef{volume}}
+ or
+ not test {\iffieldundef{part}}
+ }
+ {\iffieldundef{chapter}
+ {\usebibmacro{ifneedstitlein}
+ {\usebibmacro{in}}
+ {}}%
+ {\printfield[chapterin]{chapter}%
+ \setunit*{\addspace}}}
+ {\printfield{chapter}%
+ \setunit*{\addcomma\space}}}
+
+\newbibmacro*{chapter+pagesin}{%
+ \iffieldundef{pages}
+ {\usebibmacro{chapterin}}
+ {\ifbibliography
+ {\printfield{chapter}%
+ \setunit*{\addcomma\space}%
+ \ifboolexpr{
+ test {\usebibmacro{ifbooktitleormaintitle}}
+ or
+ not test {\iffieldundef{volume}}
+ or
+ not test {\iffieldundef{part}}
+ }
+ {\printfield[pagesin]{pages}%
+ \setunit*{\addspace}}
+ {\printfield[pagepages]{pages}%
+ \newunit}}
+ {\usebibmacro{chapterin}}}}
+
+\newbibmacro*{ifusevolumeandpart}[2]{%
+ \ifboolexpr{
+ test {\ifbibliography}% always if in bibliography
+ or
+ not test {\iffieldundef{chapter}}% always if chapter is defined
+ or
+ (% always if volume defined, part not defined, and usevolume=true
+ not test {\iffieldundef{volume}}
+ and
+ test {\iffieldundef{part}}
+ and
+ togl {blx@usevolume}%
+ )
+ or
+ (% always if part defined and volume not defined
+ not test {\iffieldundef{part}}
+ and
+ test {\iffieldundef{volume}}
+ )
+ or
+ (% always if neither volume nor part are defined
+ test {\iffieldundef{volume}}
+ and
+ test {\iffieldundef{part}}
+ )
+ }
+ {#1}
+ {#2}}
+
+\newbibmacro*{volume+partof}{%
+ \usebibmacro{ifusevolumeandpart}
{\iffieldundef{part}
- {\iffieldundef{maintitle}
- {\ifboolexpr{
- test {\iftoggle{blx@usevolume}}
- or
- test {\ifbibliography}
- }
- {\printfield[vol]{volume}%
- \newunit}
- {}}
- {\printfield[volumeof]{volume}%
- \setunit{\addspace}}}
- {}}}%
+ {\iffieldundef{maintitle}
+ {\printfield[vol]{volume}%
+ \newunit}
+ {\iffieldundef{volume}
+ {}
+ {\printfield[volumeof]{volume}%
+ \setunit*{\addspace}}}}
+ {\printfield[vol]{volume}%
+ \setunit*{\addcomma\space}%
+ \iffieldundef{maintitle}
+ {\printfield[pt]{part}%
+ \newunit}
+ {\printfield[partof]{part}
+ \setunit*{\addspace}}}}
+ {}}
\newbibmacro*{volume+pages}{%
\iffieldundef{volume}
{}
{\setunit{\addspace}%
\printfield{volume}%
- \setunit{\volpostnotedelim}}
+ \setunit*{\addperiod}%
+ \printfield{part}%
+ \setunit{\volpostnotedelim}%
+ \global\booltrue{usevolpostnotedelim}}
\usebibmacro{pages}}
\newbibmacro*{volume+part+pages}{%
- \ifboolexpr{
- test {\iffieldundef{volume}}
- or
- test {\iffieldundef{part}}
- }
+ \usebibmacro{ifusevolumeandpart}
{}
{\printfield{volume}%
- \setunit{\addperiod}%
+ \setunit*{\addperiod}%
\printfield{part}%
- \setunit{\volpostnotedelim}}
+ \setunit{\volpostnotedelim}%
+ \global\booltrue{usevolpostnotedelim}}%
\usebibmacro{pages}}
-\newbibmacro*{volume+part+nomaintitle}{%
+\newbibmacro*{volume+part}{%
\iffieldundef{volume}
{}
{\iftoggle{blx@usevolume}
@@ -1618,17 +2222,12 @@
\printfield{part}%
\global\booltrue{usevolpostnotedelim}}}}
-\renewbibmacro*{url+urldate}{%
- \iffieldundef{urlyear}
- {}
- {\printurldate}%
- \newunit
- \printfield{url}}
-
-\newbibmacro*{ebookedition}{%
- \iffieldundef{ebookedition}
- {}
- {\printfield{ebookedition}}}
+\renewbibmacro*{urldate}{%
+ \iftoggle{blx@accessdate}
+ {\iffieldundef{urlyear}
+ {}
+ {\printurldate}}
+ {}}
\newbibmacro*{reprint}{%
\ifboolexpr{
@@ -1646,6 +2245,10 @@
\setunit{\addcomma\addspace}}
{}}
+% ------------------------------------------------------------------
+% DATE MACROS
+% ------------------------------------------------------------------
+
\renewbibmacro*{date}{%
\printdate
\setunit{\addcomma\addspace}%
@@ -1653,8 +2256,54 @@
\newbibmacro*{origdate}{\printorigdate}
-\newbibmacro*{releasedate}{\printreleasedate}
+\newbibmacro*{eprintdate}{\printeprintdate}
+\newbibmacro*{patentdate}{%
+ \iffieldundef{year}
+ {}
+ {\bibstring{patentfiled}%
+ \setunit{\addspace}%
+ \printdate
+ \setunit{\addcomma\addspace}}%
+ \printfield{pubstate}}
+
+\renewbibmacro*{doi+eprint+url}{%
+ \iftoggle{bbx:eprint}
+ {\usebibmacro{eprint}}
+ {}%
+ \newunit\newblock
+ \usebibmacro{urldate}%
+ \newunit
+ \iftoggle{bbx:doi}
+ {\printfield{doi}}
+ {}%
+ \newunit
+ \iftoggle{bbx:url}
+ {\printfield{url}}
+ {}}
+
+\newbibmacro*{ebook}{%
+ \iftoggle{bbx:eprint}
+ {\iffieldequalstr{eprinttype}{ebook}
+ {\usebibmacro{eprint}%
+ \clearfield{eprint}}
+ {}}
+ {}}
+
+\newbibmacro*{isbn}{%
+ \iftoggle{bbx:isbn}
+ {\printfield{isbn}}
+ {}}
+
+\newbibmacro*{isrn}{%
+ \iftoggle{bbx:isbn}
+ {\printfield{isrn}}
+ {}}
+
+\newbibmacro*{issn}{%
+ \iftoggle{bbx:isbn}
+ {\printfield{issn}}
+ {}}
% ------------------------------------------------------------------
% RELATED MACROS
@@ -1665,7 +2314,7 @@
\csundef{abx@ffd@*@related:origpubas}
\csundef{abx@ffd@*@relatedstring:reprintfrom}
\csundef{abx@macro@related:multivolume}
-\csundef{abx@macro@related:bytranslator}
+%\csundef{abx@macro@related:bytranslator}
\csundef{abx@macro@related:origpubas}
\csundef{abx@macro@related:origpubin}
\csundef{abx@macro@related:reprintfrom}
@@ -1736,18 +2385,6 @@
{\global\toggletrue{blx@testpostnotedelim}}
{}}}}
-\newbibmacro*{ifuseshorthand}{%
- \iffieldundef{shorthand}
- {\@secondoftwo}
- {\ifcsstring{blx@shorthand}{false}
- {\@secondoftwo}
- {\ifciteseen
- {\@firstoftwo}
- {\ifcsstring{blx@shorthand}{short}
- {\@secondoftwo}
- {\@firstoftwo}}}}}
-
-
% ------------------------------------------------------------------
% ANCIENT AND CLASSIC TEXT MACROS
% ------------------------------------------------------------------
@@ -1768,48 +2405,55 @@
\global\booltrue{suppresspostnote}}
\newbibmacro*{classic:translator+series}{%
- \ifboolexpr{
- not test {\ifnameundef{translator}}
- or
- not test {\iffieldundef{series}}
- }
+ \ifnameundef{translator}
+ {}
{\setunit{\addspace}%
\printtext[parens]{%
\printnames[labelname]{translator}%
- \newunit
- \usebibmacro{shortseries+number}}}
- {}}
-
+ \iftoggle{blx@useseries}
+ {\newunit
+ \usebibmacro{shortseries}}
+ {}}}}
% ------------------------------------------------------------------
% ALTERNATE POSTNOTE MACROS
% ------------------------------------------------------------------
\ExplSyntaxOn
-\cs_generate_variant:Nn \__xparse_split_argument:nnn { nno }
-\cs_new_eq:NN \eSplitArgument \__xparse_split_argument:nno
-\DeclareDocumentCommand \splitpostnote
-{ > { \eSplitArgument { 1 } { | } } m }
-{ \savepostnotes #1 }
-\DeclareDocumentCommand{\savepostnotes}{mm}{%
- \IfNoValueTF{#2}
- {\gdef\postnotelast{#1}}
- {\tl_if_empty:nF {#1}
- {\gdef\postnotefirst{#1}}%
- \tl_if_empty:nF {#2}
- {\gdef\postnotelast{#2}}}}
+\DeclareDocumentCommand{\savepostnotes}{d() u{++}}{
+ \IfValueT {#1} { \gdef\postnotefirst{#1} }
+ \tl_if_empty:nF {#2} { \gdef\postnotelast{#2} }
+}
+\cs_new:Npn \_biblatexsbl_splitpostnote:n #1 { \savepostnotes #1++ }
+\cs_generate_variant:Nn \_biblatexsbl_splitpostnote:n { o }
+\cs_new_eq:NN \splitpostnote \_biblatexsbl_splitpostnote:o
\ExplSyntaxOff
+\newrobustcmd*{\volsplitpostnote}[2]{%
+ \gdef\volvol{#1}%
+ \gdef\abx@field@volpostnote{#2}%
+ \iffieldundef{volpostnote}
+ {}
+ {\splitpostnote{\abx@field@volpostnote}}}
+
\def\setuppostnotes{%
\global\undef\postnotefirst
\global\undef\postnotelast
- \splitpostnote{\abx@field@postnote}}
+ \iftoggle{cbx:involcite}
+ {\expandafter\volsplitpostnote\abx@field@postnote}%
+ {\splitpostnote{\abx@field@postnote}}}
\renewbibmacro*{prenote}{%
\iffieldundef{postnote}
{}
{\setuppostnotes
- \restorefield{postnote}{\postnotelast}%
+ \iftoggle{cbx:involcite}
+ {\ifdefined\postnotelast
+ \def\abx@field@postnote{{\volvol}{\postnotelast}}%
+ \else
+ \def\abx@field@postnote{{\volvol}{}}%
+ \fi}
+ {\restorefield{postnote}{\postnotelast}}%
\restorefield{altpostnote}{\postnotefirst}}%
\iffieldundef{prenote}
{}
@@ -1853,7 +2497,7 @@
% ENTRY SET MACROS
% ------------------------------------------------------------------
-\def\cbx@entryset#1{%
+\def\blx@entryset#1{%
\blx@ifdata{#1}
{\begingroup
\blx@imc@clearlist{pageref}%
@@ -1861,47 +2505,15 @@
\blx@setoptions@type\abx@field@entrytype
\def\abx@field@entrysetcount{1}%
\blx@entryset@precode
- \blx@driver{cite:\blx@imc@thefield{entrytype}}%
- \blx@entryset@postcode
- \endgroup}
- {}%
- \let\do\cbx@entryset@i}
-
-\def\cbx@entryset@i#1{%
- \blx@ifdata{#1}
- {\begingroup
- \blx@resetdata
- \blx@getdata{#1}%
- \blx@entrysetcount
- \blx@setoptions@type\abx@field@entrytype
- \blx@setoptions@entry
- \addtocounter{instcount}\@ne
- \blx@execute
- \blx@beglangbib
- \blx@begunit
- \blx@entryset@precode
- \blx@driver{cite:\blx@imc@thefield{entrytype}}
- \blx@entryset@postcode
- \blx@endunit
- \blx@endlangbib
- \endgroup}
- {\blx@nounit}}
-
-\def\bbx@entryset#1{%
- \blx@ifdata{#1}
- {\begingroup
- \blx@imc@clearlist{pageref}%
- \blx@getdata{#1}%
- \blx@setoptions@type\abx@field@entrytype
- \def\abx@field@entrysetcount{1}%
- \blx@entryset@precode
- \blx@driver{\blx@imc@thefield{entrytype}}%
+ \ifbibliography
+ {\blx@driver{\blx@imc@thefield{entrytype}}}
+ {\blx@driver{cite:\blx@imc@thefield{entrytype}}}%
\blx@entryset@postcode
\endgroup}
{}%
- \let\do\bbx@entryset@i}
+ \let\do\blx@entryset@i}
-\def\bbx@entryset@i#1{%
+\def\blx@entryset@i#1{%
\blx@ifdata{#1}
{\begingroup
\blx@resetdata
@@ -1914,17 +2526,15 @@
\blx@beglangbib
\blx@begunit
\blx@entryset@precode
- \blx@driver{\blx@imc@thefield{entrytype}}
+ \ifbibliography
+ {\blx@driver{\blx@imc@thefield{entrytype}}}
+ {\blx@driver{cite:\blx@imc@thefield{entrytype}}}%
\blx@entryset@postcode
\blx@endunit
\blx@endlangbib
\endgroup}
{\blx@nounit}}
-
-\def\blx@entryset#1{\cbx@entryset{#1}}
-\def\blx@entryset@i#1{\cbx@entryset@i{#1}}
-
% ------------------------------------------------------------------
% INDEXING MACROS
% ------------------------------------------------------------------