From caa95c11d20fa882a04b0a0c8580e0015b840374 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 16 Jan 2017 23:12:25 +0000 Subject: biblatex-sbl (15jan17) git-svn-id: svn://tug.org/texlive/trunk@42972 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/biblatex-sbl/biblatex-sbl.def | 1284 +++++++++++++++----- .../tex/latex/biblatex-sbl/sbl-american.lbx | 16 +- .../tex/latex/biblatex-sbl/sbl-english.lbx | 12 +- .../tex/latex/biblatex-sbl/sbl-german.lbx | 22 +- .../tex/latex/biblatex-sbl/sbl-paper.sty | 95 +- .../tex/latex/biblatex-sbl/sbl-spanish.lbx | 13 +- Master/texmf-dist/tex/latex/biblatex-sbl/sbl.bbx | 379 ++++-- Master/texmf-dist/tex/latex/biblatex-sbl/sbl.cbx | 559 +++++++-- Master/texmf-dist/tex/latex/biblatex-sbl/sbl.dbx | 10 +- 9 files changed, 1768 insertions(+), 622 deletions(-) (limited to 'Master/texmf-dist/tex/latex/biblatex-sbl') 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} {} @@ -648,14 +749,65 @@ \step[fieldsource=title, match=\regexp{(.*?):}, final] \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} @@ -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} @@ -799,6 +991,62 @@ \printtext{\bibstring{of}}% \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,41 +2497,7 @@ % ENTRY SET MACROS % ------------------------------------------------------------------ -\def\cbx@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{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{% +\def\blx@entryset#1{% \blx@ifdata{#1} {\begingroup \blx@imc@clearlist{pageref}% @@ -1895,13 +2505,15 @@ \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 % ------------------------------------------------------------------ diff --git a/Master/texmf-dist/tex/latex/biblatex-sbl/sbl-american.lbx b/Master/texmf-dist/tex/latex/biblatex-sbl/sbl-american.lbx index ed119ba987f..4add7d40525 100644 --- a/Master/texmf-dist/tex/latex/biblatex-sbl/sbl-american.lbx +++ b/Master/texmf-dist/tex/latex/biblatex-sbl/sbl-american.lbx @@ -2,19 +2,27 @@ \InheritBibliographyStrings{sbl-english} -\InheritBibliographyExtras{american} - \DeclareBibliographyExtras{% \DeclarePunctuationPairs{colon}{*}% \uspunctuation + \protected\def\mkdaterangecomp{% + \mkdaterangetrunc{long}}% + \protected\def\mkdaterangeterse{% + \mkdaterangetrunc{short}}% + \protected\def\mkdaterangecompextra{% + \mkdaterangetruncextra{long}}% + \protected\def\mkdaterangeterseextra{% + \mkdaterangetruncextra{short}}% \protected\def\mkbibdatelong#1#2#3{% \iffieldundef{#3} {} - {\stripzeros{\thefield{#3}}% + {\thefield{#3}% \iffieldundef{#2}{}{\nobreakspace}}% \iffieldundef{#2} {} {\mkbibmonth{\thefield{#2}}% \iffieldundef{#1}{}{\space}}% - \iffieldbibstring{#1}{\bibstring{\thefield{#1}}}{\stripzeros{\thefield{#1}}}}% + \iffieldbibstring{#1} + {\bibstring{\thefield{#1}}} + {\dateeraprintpre{#1}\stripzeros{\thefield{#1}}}}% } diff --git a/Master/texmf-dist/tex/latex/biblatex-sbl/sbl-english.lbx b/Master/texmf-dist/tex/latex/biblatex-sbl/sbl-english.lbx index a0b8d672543..4a239ee8da2 100644 --- a/Master/texmf-dist/tex/latex/biblatex-sbl/sbl-english.lbx +++ b/Master/texmf-dist/tex/latex/biblatex-sbl/sbl-english.lbx @@ -2,6 +2,7 @@ \DeclareBibliographyStrings{% inherit = {english}, + by = {{by}{by}}, to = {{to}{to}}, of = {{of}{of}}, with = {{with}{with}}, @@ -10,15 +11,18 @@ withpreface = {{with preface by}{with preface by}}, introduction = {{introduction}{introduction}}, foreword = {{foreword}{foreword}}, + mathesis = {{master's thesis}{master's thesis}}, reprint = {{repr\adddot}{repr\adddot}}, paperpresented = {{paper presented at}{paper presented at}}, + patentfiled = {{filed}{filed}}, phdthesis = {{PhD diss\adddot}{PhD diss\adddot}}, released = {{released}{released}}, withassistance = {{with assistance from}{with assistance from}}, byeditortr = {{translated \lbx@lfromlang\isdot\space and edited by}% {trans\adddotspace \lbx@sfromlang\isdot\space and ed\adddot}}, - byeditorco = {{commented and edited by}% - {comm\adddotspace and ed\adddot}}, - byeditoran = {{annotated and edited by}% - {annot\adddotspace and ed\adddot}} + urlseen = {{accessed}{accessed}}, + commonera = {{CE}{CE}}, + beforecommonera = {{BCE}{BCE}}, + annodomini = {{AD}{AD}}, + beforechrist = {{BC}{BC}} } diff --git a/Master/texmf-dist/tex/latex/biblatex-sbl/sbl-german.lbx b/Master/texmf-dist/tex/latex/biblatex-sbl/sbl-german.lbx index 6ef01191854..055b51f15ad 100644 --- a/Master/texmf-dist/tex/latex/biblatex-sbl/sbl-german.lbx +++ b/Master/texmf-dist/tex/latex/biblatex-sbl/sbl-german.lbx @@ -2,25 +2,27 @@ \DeclareBibliographyStrings{% inherit = {german}, + by = {{von}{von}}, to = {{zu}{zu}}, of = {{von}{von}}, with = {{mit}{mit}}, - byeditor = {{herausgegeben von}{hg.\addotspace v\adddot}}, - bytranslator = {{übersetzt \lbx@lfromlang\ by}{übers\adddot}}, + byeditor = {{herausgegeben von}{hg.\adddotspace v\adddot}}, + bytranslator = {{\"ubersetzt \lbx@lfromlang\isdot\space von}{\"ubers\adddot}}, withpreface = {{mit einem Geleitwort von}{mit einem Geleitwort von}}, introduction = {{Einleitung}{Einleitung}}, foreword = {{Vorwort}{Vorwort}}, reprint = {{Ndr\adddot}{Ndr\adddot}}, paperpresented = {{paper presented at}{paper presented at}}, + patentfiled = {{eingereicht}{eingereicht}}, phdthesis = {{Diss\adddot}{Diss\adddot}}, - released = {{veröffentlicht}{veröffentlicht}}, - withassistance = {{mit Unterstützung von}{mit Unterstützung von}}, - byeditortr = {{übersetzt \lbx@lfromlang\isdot\space und herausgegeben von}% - {übers\adddotspace \lbx@sfromlang\isdot\space und hg\adddotspace v\adddot}}, - byeditorco = {{kommentiert und herausgegeben von}% - {komm\adddotspace und hg\adddotspace v\adddot}}, - byeditoran = {{kommentiert und herausgegeben von}% - {komm\adddotspace und hg\adddotspace v\adddot}} + released = {{ver\"offentlicht}{ver\"offentlicht}}, + withassistance = {{mit Unterst\"utzung von}{mit Unterst\"utzung von}}, + byeditortr = {{\"bersetzt \lbx@lfromlang\isdot\space und herausgegeben von}% + {\"bers\adddotspace \lbx@sfromlang\isdot\space und hg\adddotspace v\adddot}}, + commonera = {{u\adddotspace Z\adddot}{u\adddotspace Z\adddot}}, + beforecommonera = {{v\adddotspace u\adddotspace Z\adddot}{v\adddotspace u\adddotspace Z\adddot}}, + annodomini = {{n\adddotspace Chr\adddot}{n\adddotspace Chr\adddot}}, + beforechrist = {{v\adddotspace Chr\adddot}{v\adddotspace Chr\adddot}}, } \InheritBibliographyExtras{german} diff --git a/Master/texmf-dist/tex/latex/biblatex-sbl/sbl-paper.sty b/Master/texmf-dist/tex/latex/biblatex-sbl/sbl-paper.sty index 44a55ee7468..0f826ee745e 100644 --- a/Master/texmf-dist/tex/latex/biblatex-sbl/sbl-paper.sty +++ b/Master/texmf-dist/tex/latex/biblatex-sbl/sbl-paper.sty @@ -13,17 +13,40 @@ %The Current Maintainer of this work is David Purton. \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{sbl-paper} - [2016/10/11 Society of Bibilical Literature Paper Style] + [2017/01/15 Society of Bibilical Literature Paper Style] + + +% xetex/luatex engine test set up + +\RequirePackage{ifxetex} +\RequirePackage{ifluatex} +\newif\ifxetexorluatex +\ifxetex + \xetexorluatextrue +\else + \ifluatex + \xetexorluatextrue + \else + \xetexorluatexfalse + \fi +\fi % Load required packages -\RequirePackage{textcase} -\RequirePackage{fontspec} -\RequirePackage{ragged2e} -\RequirePackage{polyglossia} +\ifxetexorluatex + \RequirePackage{fontspec} + \RequirePackage{polyglossia} +\else + \RequirePackage[T1]{fontenc} + \RequirePackage[utf8]{inputenc} + \RequirePackage[base]{babel} +\fi + \RequirePackage{csquotes} +\RequirePackage{ragged2e} \RequirePackage[headheight=14.5pt,margin=1in]{geometry} +\RequirePackage{textcase} \RequirePackage{setspace} \RequirePackage{titlesec} \RequirePackage{titletoc} @@ -37,12 +60,15 @@ % work around bidi redefining theindex -\let\imakeidxtheindex\theindex -\let\imakeidxendtheindex\endtheindex -\AtBeginDocument{% - \let\theindex\imakeidxtheindex - \let\endtheindex\imakeidxendtheindex -} +\ifxetex + \let\imakeidxtheindex\theindex + \let\imakeidxendtheindex\endtheindex + \AtBeginDocument{% + \let\theindex\imakeidxtheindex + \let\endtheindex\imakeidxendtheindex + } +\fi + % patch index commands so contents is in all caps \patchcmd{\imki@putindexsplit} @@ -60,29 +86,30 @@ \fi -% Set up Languages - -\setdefaultlanguage[variant=american]{english} -\setotherlanguage[variant=ancient]{greek} -\setotherlanguage{hebrew} - -\renewenvironment{hebrew}[1][]{% - \par - \raggedleft - \begin{otherlanguage}[#1]{hebrew}}% - {\end{otherlanguage}\par} - -\@Latintrue % work around for bidi bug; see http://tex.stackexchange.com/questions/312874/polyglossia-or-bidi-bug-d-gets-inverted-to-d - - -% Set up fonts - -\newfontfamily\greekfont - [Script=Greek,Contextuals=Alternate,Ligatures=Required] - {SBL BibLit} -\newfontfamily\hebrewfont - [Script=Hebrew,Contextuals=Alternate,Ligatures=Required,Scale=1.2] - {SBL BibLit} +% Set up languages + +\ifxetexorluatex + \setdefaultlanguage[variant=american]{english} + \setotherlanguage[variant=ancient]{greek} + \setotherlanguage{hebrew} + \ifxetex + \renewenvironment{hebrew}[1][]{% + \par + \raggedleft % add to right align paragraphs + \begin{otherlanguage}[#1]{hebrew}}% + {\end{otherlanguage}\par} + \else % luatex + \let\luatexpardir\pardir % luabidi needs this + \let\luatextextdir\textdir % luabidi needs this + % text direction gets stuffed up without these workarounds + \let\luatextextgreek\textgreek + \let\luatextextenglish\textenglish + \AtBeginDocument{% + \renewcommand{\textgreek}[1]{\bgroup\luatextextgreek{#1}\egroup} + \renewcommand{\textenglish}[1]{\bgroup\setLTR\luatextextenglish{#1}\egroup} + } + \fi +\fi % Set up document spacing diff --git a/Master/texmf-dist/tex/latex/biblatex-sbl/sbl-spanish.lbx b/Master/texmf-dist/tex/latex/biblatex-sbl/sbl-spanish.lbx index 20d49d58335..7b2a13dd310 100644 --- a/Master/texmf-dist/tex/latex/biblatex-sbl/sbl-spanish.lbx +++ b/Master/texmf-dist/tex/latex/biblatex-sbl/sbl-spanish.lbx @@ -2,25 +2,28 @@ \DeclareBibliographyStrings{% inherit = {spanish}, + by = {{por}{por}}, to = {{a}{a}}, of = {{de}{de}}, with = {{con}{con}}, byeditor = {{editado por}{ed\adddotspace por}}, - bytranslator = {{traducido \lbx@lfromlang\ por}{trad\adddot}}, + bytranslator = {{traducido \lbx@lfromlang\isdot\space por}% + {trad\adddotspace}}, withpreface = {{con un prefacio por}{con un prefacio por}}, introduction = {{Introducci{\'o}n}{Introducci{\'o}n}}, foreword = {{Presentaci{\'o}n}{Presentaci{\'o}n}}, reprint = {{reimp\adddot}{reimp\adddot}}, paperpresented = {{documento presentado a}{documento presentado a}}, + patentfiled = {{filed}{filed}}, % FIXME: missing phdthesis = {{Tesis}{Tesis}}, released = {{publicado}{publicado}}, withassistance = {{con la asistencia de}{con la asistencia de}}, byeditortr = {{Traducido \lbx@lfromlang\isdot\space y editado por}% {trad\adddotspace \lbx@sfromlang\isdot\space y ed\adddotspace por}}, - byeditorco = {{comentario y editado por}% - {com\adddotspace y ed\adddotspace por}}, - byeditoran = {{anotado y editado por}% - {anot\adddotspace y ed\adddotspace por}} + commonera = {{e\adddotspace c\adddot}{e\adddotspace c\adddot}}, + beforecommonera = {{a\adddotspace e\adddotspace c\adddot}{a\adddotspace e\adddotspace c\adddot}}, + annodomini = {{d\adddotspace C\adddot}{d\adddotspace C\adddot}}, + beforechrist = {{a\adddotspace C\adddot}{a\adddotspace C\adddot}} } \InheritBibliographyExtras{spanish} diff --git a/Master/texmf-dist/tex/latex/biblatex-sbl/sbl.bbx b/Master/texmf-dist/tex/latex/biblatex-sbl/sbl.bbx index 496bb634416..e496901a84c 100644 --- a/Master/texmf-dist/tex/latex/biblatex-sbl/sbl.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-sbl/sbl.bbx @@ -6,8 +6,6 @@ \citereset \global\undef\bbx@lasthash \def\abx@str{abx@lstr}% - \def\blx@entryset#1{\bbx@entryset{#1}} - \def\blx@entryset@i#1{\bbx@entryset@i{#1}} \renewcommand*{\relateddelim}{\addperiod\space} \renewcommand*{\revsdnamedelim}{\addcomma}% \DeclareNameAlias{author}{sortname}% @@ -20,7 +18,13 @@ } \AtEveryBibitem{% - \global\togglefalse{relatedseen}}% + \global\togglefalse{relatedseen}% + \global\togglefalse{inentrytype}}% + +\DeclareBibliographyDriver{set}{% + \booltrue{bbx@inset}% + \entryset{}{}% + \finentry} \DeclareBibliographyDriver{classictext}{% \usebibmacro{begentry}% @@ -42,14 +46,22 @@ \printtext[title]{% \bibhyperlink{\strfield{shorthand}}{\thefield{shorthand}}}}% \setunit{\addspace}% - \usebibmacro{volume+part+pages}% + \printfield{volume}% + \setunit*{\addperiod}% + \printfield{part}% + \setunit{\volpostnotedelim}% + \usebibmacro{pages}% \newunit \entrydata{\thefield{related}}{\printfield{titleaddon}}% - \clearfield{pages}% \setunit{\addcomma\addspace}% - \usebibmacro{volume+part+pages}% + \printfield{volume}% + \setunit*{\addperiod}% + \printfield{part}% \newunit - \entrydata{\thefield{related}}{\usebibmacro{bymaineditor+others}}% + \entrydata{\thefield{related}} + {\usebibmacro{bymaineditor+others}% + \newunit + \usebibmacro{bymaintranslator+others}}% \usebibmacro{publisher+location+date}% \newunit} {\DeclareFieldFormat[ancienttext]{title}{\mkbibemph{##1}}% @@ -65,14 +77,30 @@ \newunit \usebibmacro{title}% \newunit - \usebibmacro{shortjournal+issuetitle}% - \printfield[plainpages]{pages}% + \usebibmacro{bytranslator+others}% + \newunit + \usebibmacro{inissuetitle}% + \newunit + \printfield{version}% \newunit - \usebibmacro{releasedate}% + \printlist{organization}% + \newunit + \printfield{note}% + \newunit + \usebibmacro{shortjournal+issue}% + \usebibmacro{pages}% + \newunit + \printfield{addendum}% + \newunit + \usebibmacro{issn}% \newunit \usebibmacro{doi+eprint+url}% \newunit - \iftoggle{relatedseen} + \ifboolexpr{ + togl {relatedseen} + or + not togl {bbx:related} + } {} {\usebibmacro{related:init}% \usebibmacro{related}}% @@ -80,6 +108,7 @@ } \DeclareBibliographyDriver{book}{% + \clearfield{booktitle}% \usebibmacro{bibindex}% \usebibmacro{begentry}% \iftoggle{blx@abbrevcite} @@ -88,26 +117,52 @@ \printnames[default]{author}} {\usebibmacro{author/editor+others/translator+others}% \newunit - \usebibmacro{title}% - \newunit - \usebibmacro{byauthor}}% + \usebibmacro{title}}% + \newunit + \usebibmacro{byauthor/byeditor+others/bytranslator+others}% \newunit - \usebibmacro{volume+part}% + \usebibmacro{chapter+pagesin}% + \usebibmacro{volume+partof}% \usebibmacro{maintitle}% \newunit - \usebibmacro{bymaineditor+others}% + \usebibmacro{event+venue+date}% + \newunit + \usebibmacro{bymainauthor/bymaineditor+others/bymaintranslator+others}% \newunit \printfield{edition}% \newunit \printfield{volumes}% \newunit - \usebibmacro{shortseries+number}% + \ifentrytype{report} + {\printfield{type}% + \clearfield{type}% + \setunit*{\addspace}% + \printfield{number}} + {\usebibmacro{shortseries+number}}% + \newunit + \printfield{type}% + \newunit + \printfield{version}% + \newunit + \printfield{note}% \newunit \usebibmacro{publisher+location+date}% \newunit + \usebibmacro{ebook}% + \newunit + \printfield{addendum}% + \newunit + \usebibmacro{isbn}% + \newunit + \usebibmacro{isrn}% + \newunit \usebibmacro{doi+eprint+url}% \newunit - \iftoggle{relatedseen} + \ifboolexpr{ + togl {relatedseen} + or + not togl {bbx:related} + } {} {\usebibmacro{related:init}% \usebibmacro{related}}% @@ -119,25 +174,47 @@ \usebibmacro{begentry}% \usebibmacro{author/editor+others/translator+others}% \newunit - \printfield{type}% - \setunit{\addspace}% - \usebibmacro{to}% - \usebibmacro{booktitle+maintitle}% - \setunit{\addcomma\addspace}% - \usebibmacro{bybookauthor}% + \iffieldundef{type} + {\toggletrue{inentrytype}% + \usebibmacro{title}% + \setunit{\addspace}% + \usebibmacro{in}} + {\printfield{type}% + \usebibmacro{language}% + \setunit{\addspace}% + \usebibmacro{to}}% + \usebibmacro{booktitle}% + \usebibmacro{bybookauthor/bybookeditor+others/bybooktranslator+others}% + \clearfield{booktitle}% \newunit - \usebibmacro{byeditor+others}% + \usebibmacro{chapter+pagesin}% + \usebibmacro{volume+partof}% + \usebibmacro{maintitle}% + \newunit + \usebibmacro{bymainauthor/bymaineditor+others/bymaintranslator+others}% \newunit \printfield{edition}% \newunit \printfield{volumes}% \newunit \usebibmacro{shortseries+number}% + \newunit + \printfield{note}% \newunit% \usebibmacro{publisher+location+date}% \newunit + \usebibmacro{ebook}% + \newunit + \printfield{addendum}% + \newunit + \usebibmacro{isbn}% + \newunit \usebibmacro{doi+eprint+url}% - \iftoggle{relatedseen} + \ifboolexpr{ + togl {relatedseen} + or + not togl {bbx:related} + } {} {\usebibmacro{related:init}% \usebibmacro{related}}% @@ -145,6 +222,7 @@ } \DeclareBibliographyDriver{incommentary}{% + \usebibmacro{bibindex}% \usebibmacro{begentry}% \iffieldundef{volume} {\usedriver{}{incollection}} @@ -157,17 +235,33 @@ \DeclareBibliographyDriver{incommentary:short}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author/editor+others/translator+others}% + \usebibmacro{author/translator+others}% \newunit \usebibmacro{title}% \newunit + \usebibmacro{byauthor}% + \newunit + \usebibmacro{bytranslator+others}% + \newunit + \printfield{note}% + \newunit \usebibmacro{xrefshortmaintitle}% \newunit \usebibmacro{volume+pages}% \newunit + \usebibmacro{ebook}% + \newunit + \printfield{addendum}% + \newunit + \usebibmacro{isbn}% + \newunit \usebibmacro{doi+eprint+url}% \newunit - \iftoggle{relatedseen} + \ifboolexpr{ + togl {relatedseen} + or + not togl {bbx:related} + } {} {\usebibmacro{related:init}% \usebibmacro{related}}% @@ -175,29 +269,36 @@ } \DeclareBibliographyDriver{incollection}{% + \toggletrue{inentrytype}% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others/translator+others}% \newunit \usebibmacro{title}% - \ifentrytype{bookinbook} - {\newunit - \usebibmacro{byeditor+others}} - {}% \newunit - \printfield[pagesin]{pages}% + \ifentrytype{classictext} + {\usebibmacro{byauthor}% + \newunit + \usebibmacro{bytranslator+others}} + {\usebibmacro{byauthor/byeditor+others/bytranslator+others}}% + \newunit + \usebibmacro{chapter+pagesin}% \iffieldundef{booktitle} {} {\usebibmacro{booktitle}% \newunit - \usebibmacro{bybookauthor}% + \usebibmacro{event+venue+date}% \newunit - \usebibmacro{bybookeditor+others}% - \newunit} - \usebibmacro{involume+part}% - \usebibmacro{maintitle}% - \newunit - \usebibmacro{bymaineditor+others}% + \usebibmacro{bybookauthor/bybookeditor+others/bybooktranslator+others}% + \newunit}% + \usebibmacro{volume+partof}% + \iffieldundef{maintitle} + {} + {\usebibmacro{maintitle}% + \newunit + \usebibmacro{event+venue+date}% + \newunit + \usebibmacro{bymainauthor/bymaineditor+others/bymaintranslator+others}}% \newunit \printfield{edition}% \newunit @@ -205,10 +306,22 @@ \newunit \usebibmacro{shortseries+number}% \newunit + \printfield{note}% + \newunit \usebibmacro{publisher+location+date}% \newunit + \usebibmacro{ebook}% + \newunit + \printfield{addendum}% + \newunit + \usebibmacro{isbn}% + \newunit \usebibmacro{doi+eprint+url}% - \iftoggle{relatedseen} + \ifboolexpr{ + togl {relatedseen} + or + not togl {bbx:related} + } {} {\usebibmacro{related:init}% \usebibmacro{related}}% @@ -221,6 +334,7 @@ } \DeclareBibliographyDriver{inreference}{% + \usebibmacro{bibindex}% \usebibmacro{begentry}% \iffieldundef{volume} {\usedriver{}{incollection}} @@ -237,13 +351,29 @@ \newunit \usebibmacro{title}% \newunit - \usebibmacro{xrefshortbooktitle+xrefshortmaintitle}% + \usebibmacro{byauthor}% + \newunit + \usebibmacro{bytranslator+others}% + \newunit + \printfield{note}% + \newunit + \usebibmacro{xrefshortmaintitle+xrefshortbooktitle}% \newunit \usebibmacro{volume+pages}% \newunit + \usebibmacro{ebook}% + \newunit + \printfield{addendum}% + \newunit + \usebibmacro{isbn}% + \newunit \usebibmacro{doi+eprint+url}% \newunit - \iftoggle{relatedseen} + \ifboolexpr{ + togl {relatedseen} + or + not togl {bbx:related} + } {} {\usebibmacro{related:init}% \usebibmacro{related}}% @@ -255,135 +385,206 @@ \usebibmacro{begentry}% \usebibmacro{author/translator+others}% \newunit - \usebibmacro{title}% \iffieldundef{title} {\newunit} - {\setunit{\addcomma\addspace}}% + {\usebibmacro{title}% + \newunit + \usebibmacro{byauthor}% + \newunit + \usebibmacro{bytranslator+others}% + \setunit{\addcomma\addspace}}% \usebibmacro{revdtitle}% \setunit{\addcomma\addspace}% \usebibmacro{revdauthor/revdeditor}% \newunit - \usebibmacro{shortjournal+issuetitle}% - \printfield[plainpages]{pages}% + \usebibmacro{inissuetitle}% + \newunit + \printfield{version}% + \newunit + \printlist{organization}% + \newunit + \printfield{note}% + \newunit + \usebibmacro{shortjournal+issue}% + \usebibmacro{pages}% + \newunit + \printfield{addendum}% + \newunit + \usebibmacro{issn}% \newunit \usebibmacro{doi+eprint+url}% \newunit - \iftoggle{relatedseen} + \ifboolexpr{ + togl {relatedseen} + or + not togl {bbx:related} + } {} {\usebibmacro{related:init}% \usebibmacro{related}}% \usebibmacro{finentry}% } -\DeclareBibliographyDriver{seminarpaper}{% +\DeclareBibliographyDriver{thesis}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author/editor+others/translator+others}% + \usebibmacro{author}% \newunit \usebibmacro{title}% \newunit - \printfield[pagesin]{pages}% - \iffieldundef{booktitle} - {} - {\usebibmacro{booktitle}% - \newunit - \usebibmacro{bybookeditor+others}% - \newunit} - \usebibmacro{involume+part}% - \usebibmacro{maintitle}% + \usebibmacro{pagesin}% \newunit - \usebibmacro{bymaineditor+others}% + \printfield{note}% \newunit - \printfield{edition}% + \printfield{type}% + \setunit{\addcomma\addspace}% + \usebibmacro{publisher+location+date}% \newunit - \printfield{volumes}% + \usebibmacro{ebook}% \newunit - \usebibmacro{shortseries+number}% + \printfield{addendum}% \newunit - \usebibmacro{publisher+location+date}% + \printfield{isbn}% \newunit \usebibmacro{doi+eprint+url}% \newunit - \iftoggle{relatedseen} + \ifboolexpr{ + togl {relatedseen} + or + not togl {bbx:related} + } {} {\usebibmacro{related:init}% \usebibmacro{related}}% \usebibmacro{finentry}% } -\DeclareBibliographyDriver{thesis}{% +\DeclareBibliographyDriver{misc}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author}% + \usebibmacro{author/editor+others/translator+others}% \newunit \usebibmacro{title}% + \usebibmacro{byauthor/byeditor+others/bytranslator+others}% \newunit \printfield{type}% - \setunit{\addcomma\addspace}% - \usebibmacro{institution+location+date}% + \newunit + \printfield{version}% + \newunit + \printfield{note}% + \newunit + \usebibmacro{publisher+location+date}% + \newunit + \usebibmacro{ebook}% + \newunit + \printfield{addendum}% \newunit \usebibmacro{doi+eprint+url}% \newunit - \iftoggle{relatedseen} + \ifboolexpr{ + togl {relatedseen} + or + not togl {bbx:related} + } {} {\usebibmacro{related:init}% \usebibmacro{related}}% \usebibmacro{finentry}% } -\DeclareBibliographyDriver{misc}{% +\DeclareBibliographyDriver{conferencepaper}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author/editor+others/translator+others}% + \usebibmacro{author}% \newunit \usebibmacro{title}% \newunit \printfield{note}% \newunit - \usebibmacro{byauthor}% + \usebibmacro{eventtitle}% \newunit - \usebibmacro{byeditor+others}% + \printfield{organization}% \newunit - \printfield{howpublished}% + \usebibmacro{venue+eventdate}% \newunit - \usebibmacro{shortseries+number}% + \printfield{addendum}% \newunit - \iffieldundef{journaltitle} - {\usebibmacro{publisher+location+date}} - {\usebibmacro{shortjournal+issuetitle}% - \printfield[plainpages]{pages}}% + \usebibmacro{doi+eprint+url}% + \newunit + \ifboolexpr{ + togl {relatedseen} + or + not togl {bbx:related} + } + {} + {\usebibmacro{related:init}% + \usebibmacro{related}}% + \usebibmacro{finentry}% +} + +\DeclareBibliographyDriver{periodical}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{editor+others}% + \newunit + \usebibmacro{issuetitle}% + \usebibmacro{language}% + \newunit + \printfield{note}% + \newunit + \usebibmacro{shortjournal+issue}% + \usebibmacro{pages}% + \newunit + \printfield{addendum}% + \newunit + \usebibmacro{issn}% \newunit \usebibmacro{doi+eprint+url}% \newunit - \iftoggle{relatedseen} + \ifboolexpr{ + togl {relatedseen} + or + not togl {bbx:related} + } {} {\usebibmacro{related:init}% \usebibmacro{related}}% \usebibmacro{finentry}% } -\DeclareBibliographyDriver{conferencepaper}{% +\DeclareBibliographyDriver{patent}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author}% + \usebibmacro{author+holder}% \newunit \usebibmacro{title}% \newunit - \usebibmacro{eventtitle}% - \newunit \printfield{note}% \newunit - \printfield{organization}% + \printfield{type}% + \setunit*{\addspace}% + \printfield{number}% + \iflistundef{location} + {} + {\setunit*{\addspace}% + \printtext[parens]{\printlist{location}}}% + \setunit{\addcomma\space}% + \printfield{version}% + \setunit{\addcomma\space}% + \usebibmacro{patentdate}% \newunit - \usebibmacro{venue+eventdate}% + \printfield{addendum}% \newunit \usebibmacro{doi+eprint+url}% \newunit - \iftoggle{relatedseen} + \ifboolexpr{ + togl {relatedseen} + or + not togl {bbx:related} + } {} {\usebibmacro{related:init}% \usebibmacro{related}}% \usebibmacro{finentry}% } - \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex-sbl/sbl.cbx b/Master/texmf-dist/tex/latex/biblatex-sbl/sbl.cbx index 5520ab65e0a..786d77030bd 100644 --- a/Master/texmf-dist/tex/latex/biblatex-sbl/sbl.cbx +++ b/Master/texmf-dist/tex/latex/biblatex-sbl/sbl.cbx @@ -8,11 +8,15 @@ \newtoggle{cbx:loccit} \newtoggle{usingibid} \newtoggle{relatedseen} +\newtoggle{inentrytype} +\newtoggle{cbx:involcite} \newbibmacro*{cite}{% \boolfalse{suppresspostnote}% \boolfalse{usevolpostnotedelim}% \global\togglefalse{usingibid}% + \global\togglefalse{inentrytype}% + \global\toggletrue{blx@testpostnotedelim}% \ifciteseen {\global\toggletrue{relatedseen}} {\global\togglefalse{relatedseen}}% @@ -24,11 +28,15 @@ \ifboolexpr{% test {\ifciteibid} and - not test {\iffirstonpage}} + not test {\iffirstonpage} + } {\usebibmacro{cite:ibid}} - {\usebibmacro{ifuseshorthand} + {\usebibmacro{ifciteuseshorthand} {\usebibmacro{cite:shorthand}} - {\usedriver{}{cite:\thefield{entrytype}}}}}} + {\usedriver{}{cite:\thefield{entrytype}}% + \ifcsstring{blx@shorthand}{intro} + {\usebibmacro{shorthandintro}} + {}}}}} % redefine default loccit tracker so that citations with no postnote also match \def\blx@loccit@tracker#1{% @@ -53,12 +61,6 @@ {\global\booltrue{suppresspostnote}} {}} -\newbibmacro{shorthand}{% - \iffieldsequal{shorthand}{shorttitle} - {\printtext{\mkbibemph{\printtext{% - \bibhyperlink{\strfield{shorthand}}{\thefield{shorthand}}}}}} - {\printtext{\bibhyperlink{\strfield{shorthand}}{\thefield{shorthand}}}}} - \newbibmacro*{cite:shorthand}{% \togglefalse{blx@citeindex}% \global\toggletrue{relatedseen}% @@ -79,7 +81,10 @@ \usebibmacro{related:init}% \usebibmacro{related}% \usebibmacro{volume+part+postnote}}} - {}} + {\ifciteseen + {} + {\newunit + \printfield{pages}}}} \newbibmacro*{bibentrycite}{% \citereset @@ -109,12 +114,28 @@ \hskip 6em \setunit{}\usedriver{}{abbreviations}\par } +\renewrobustcmd*{\volcitecmd}{% + \AtNextCite{% + \toggletrue{cbx:involcite}% + \DeclareFieldAlias{postnote}{volcitenote}}% + \begingroup\let\blx@citeargs\blx@volciteargs} + +\renewrobustcmd*{\multivolcitecmd}{% + \AtNextCite{% + \toggletrue{cbx:involcite}% + \DeclareFieldAlias{postnote}{volcitenote}}% + \def\blx@hook@mcite@before{% + \global\undef\blx@hook@mcite@before + \let\blx@citeargs\blx@volmciteargs}} + \newbibmacro*{cite:postnote}{% \iffieldundef{shorthand} {} {\iftoggle{usingibid} {} - {\usebibmacro{setpostnotedelim}}}% + {\usebibmacro{ifneedsetpostnotedelim} + {\usebibmacro{setpostnotedelim}} + {}}}% \ifbool{suppresspostnote}{}{% \ifboolexpr{% not test {\iffieldundef{postnote}} @@ -126,13 +147,17 @@ {\setunit{\postnotedelim}}% \usebibmacro{postnote}} {}}% - \iftoggle{relatedseen} + \ifboolexpr{ + togl {relatedseen} + or + not togl {bbx:related} + or + test {\iffieldundef{related}} + } {} - {\iffieldundef{related} - {} - {\setunit{\addsemicolon\space}% - \usebibmacro{related:init}% - \usebibmacro{related}}}} + {\setunit{\addsemicolon\space}% + \usebibmacro{related:init}% + \usebibmacro{related}}} \DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote] {\usebibmacro{prenote}} @@ -176,6 +201,22 @@ {\multicitedelim} {\usebibmacro{cite:postnote}} +\DeclareCiteCommand{\fullcite} + {\usebibmacro{prenote}} + {\def\blx@shorthand{false}% + \let\ifciteseen\@secondoftwo + \usebibmacro{cite}} + {\multicitedelim} + {\usebibmacro{cite:postnote}} + +\DeclareCiteCommand{\footfullcite}[\mkbibfootnote] + {\usebibmacro{prenote}} + {\def\blx@shorthand{false}% + \let\ifciteseen\@secondoftwo + \usebibmacro{cite}} + {\multicitedelim} + {\usebibmacro{cite:postnote}} + \DeclareCiteCommand{\citeseries} {} {\usebibmacro{shortseries}} @@ -194,26 +235,107 @@ {} {} +\newbibmacro*{textcite}{% + \ifnameundef{labelname} + {\printfield[citetitle]{labeltitle}} + {\printnames{labelname}}} + +\newbibmacro*{textcite:init}{% + \citetrackerfalse% + \pagetrackerfalse% + \iffirstcitekey + {\global\undef\cbx@lasthash} + {}} + +\newbibmacro*{textcite:count}{% + \stepcounter{textcitetotal}% + \ifnumgreater{\value{uniquelist}}{\value{maxnames}} + {\ifnumgreater{\value{uniquelist}}{\value{textcitemaxnames}} + {\setcounter{textcitemaxnames}{\value{uniquelist}}} + {}} + {\ifnumless{\value{labelname}}{\value{maxnames}} + {\ifnumgreater{\value{labelname}}{\value{textcitemaxnames}} + {\setcounter{textcitemaxnames}{\value{labelname}}} + {}} + {\ifnumgreater{\value{maxnames}}{\value{textcitemaxnames}} + {\setcounter{textcitemaxnames}{\value{maxnames}}} + {}}}} + +\DeclareCiteCommand{\cbx@textcite} + {\usebibmacro{textcite:init}} + {\iffieldequals{namehash}{\cbx@lasthash} + {} + {\iffirstcitekey + {} + {\textcitedelim}% + \stepcounter{textcitecount}% + \usebibmacro{textcite}% + \savefield{namehash}{\cbx@lasthash}}} + {} + {} + +\DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite\footcite] + {\usebibmacro{textcite:init}% + \gdef\cbx@savedkeys{}% + \DeferNextCitekeyHook} + {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0} + {\protected@xappto\cbx@footcite@args{% + (\thefield{multiprenote})(\thefield{multipostnote})}} + {}% + \xappto\cbx@savedkeys{\thefield{entrykey},}% + \iffieldequals{namehash}{\cbx@lasthash} + {} + {\usebibmacro{textcite:count}% + \savefield{namehash}{\cbx@lasthash}}% + \ifnumequal{\value{citecount}}{\value{citetotal}} + {\protected@xappto\cbx@textcite@args{{\cbx@savedkeys}}% + \protected@xappto\cbx@footcite@args{% + [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}% + \iflastcitekey + {\protected@xappto\cbx@textcite@args{\thefield{postpunct}}% + \protected@xappto\cbx@footcite@args{\nopunct}} + {}} + {}} + {} + {} + +% textcite has nested \DeclareCiteCommand definitions for textcite and we want to use +% the normal textcite context +\DeclareDelimcontextAlias{cbx@textcite}{textcite} + +\newrobustcmd{\cbx@textcite@init}[3]{% + \setcounter{textcitetotal}{0}% + \setcounter{textcitecount}{0}% + \setcounter{textcitemaxnames}{0}% + \def\cbx@textcite@args{#1}\def\cbx@footcite@args{#2}#3% + \cbx@textcite@args\empty\cbx@footcite@args\empty} + +\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{} +\DeclareMultiCiteCommand{\textcites} + [\cbx@textcites@init\cbx@textcites\footcites]{\textcite}{} + +\let\cbx@textcites@init\cbx@textcite@init +\pretocmd{\cbx@textcites@init}{% + \UseNextMultiCiteHook% + \AtNextMultiCite{% + \renewbibmacro{multiprenote}{}% + \renewbibmacro{multipostnote}{}}}{}{} % ------------------------------------------------------------------ % CITE DRIVERS % ------------------------------------------------------------------ \DeclareBibliographyDriver{cite:set}{% + \booltrue{bbx@inset}% \ifciteseen - {% - \printnames{labelname}% - \newunit% - \printtext[bibhyperlink]{% - \iffieldundef{shorttitle} - {\printfield[citetitle]{title}} - {\printfield[citetitle]{shorttitle}}}} - {\booltrue{bbx@inset}% - \entryset{}{}% - \newunit\newblock - \usebibmacro{setpageref}% - \finentry - \global\boolfalse{suppresspostnote}}} + {\let\abx@field@setkey\abx@field@entrykey + \let\ifciteseen\@firstoftwo} + {}% + \entryset{}{}% + \newunit\newblock + \printfield{postnote}% + \finentry + \global\booltrue{suppresspostnote}} \DeclareBibliographyDriver{cite:ancienttext}{% \usebibmacro{citeindex}% @@ -227,7 +349,7 @@ \newunit \ifciteseen {} - {\usebibmacro{byeditor+others}}% + {\usebibmacro{byauthor/byeditor+others/bytranslator+others}}% \ifboolexpr{ test {\iffieldequalstr{entrysubtype}{ANRW}} or @@ -283,15 +405,31 @@ \usebibmacro{title}% \ifciteseen {} - {\usebibmacro{shortjournal+issuetitle}% + {\newunit + \usebibmacro{byauthor}% + \newunit + \usebibmacro{bytranslator+others}% + \newunit + \usebibmacro{inissuetitle}% + \newunit + \printfield{version}% + \newunit + \printlist{organization}% + \newunit + \printfield{note}% + \newunit + \usebibmacro{shortjournal+issue}% \usebibmacro{pages}% \newunit - \usebibmacro{releasedate}% + \printfield{addendum}% + \newunit + \usebibmacro{issn}% \newunit \usebibmacro{doi+eprint+url}}% \usebibmacro{finentry}} \DeclareBibliographyDriver{cite:book}{% + \clearfield{booktitle}% \usebibmacro{citeindex}% \usebibmacro{begentry}% \iftoggle{blx@usefullcite} @@ -301,24 +439,50 @@ \newunit \usebibmacro{title}% \ifciteseen - {} {\newunit - \usebibmacro{byauthor}% + \usebibmacro{volume+part}} + {\usebibmacro{byauthor/byeditor+others/bytranslator+others}% \newunit - \usebibmacro{volumeof}% + \usebibmacro{chapter+pagesin}% + \usebibmacro{volume+partof}% \usebibmacro{maintitle}% \newunit - \usebibmacro{bymaineditor+others}% + \usebibmacro{event+venue+date}% \newunit - \printfield{volumes}% + \usebibmacro{bymainauthor/bymaineditor+others/bymaintranslator+others}% \newunit \printfield{edition}% \newunit - \usebibmacro{shortseries+number}% - \usebibmacro{parens+publisher+location+date}% + \printfield{volumes}% + \newunit + \ifentrytype{report} + {\printfield{type}% + \clearfield{type}% + \setunit*{\addspace}% + \printfield{number}} + {\usebibmacro{shortseries+number}}% + \newunit + \printfield{type}% + \newunit + \printfield{version}% + \newunit + \printfield{note}% + \iflistundef{institution} + {\usebibmacro{parens+publisher+location+date}} + {\setunit{\addspace}% + \printtext[parens]{\usebibmacro{institution+location+date}}}% + \newunit + \usebibmacro{ebook}% + \newunit + \printfield{addendum}% + \newunit + \usebibmacro{volume+part+pages}% + \newunit + \usebibmacro{isbn}% + \newunit + \usebibmacro{isrn}% \newunit \usebibmacro{doi+eprint+url}}% - \usebibmacro{volume+part+nomaintitle}% \usebibmacro{finentry}} \DeclareBibliographyDriver{cite:suppbook}{% @@ -330,30 +494,45 @@ \usebibmacro{author/editor+others/translator+others}% \newunit \ifciteseen - {\printfield{type}} - {\printfield{type}% - \setunit{\addspace}% - \usebibmacro{to}% + {\iffieldundef{type} + {\usebibmacro{title}} + {\printfield{type}}} + {\iffieldundef{type} + {\toggletrue{inentrytype}% + \usebibmacro{title}% + \setunit{\addspace}% + \usebibmacro{in}} + {\printfield{type}% + \usebibmacro{language}% + \setunit{\addspace}% + \usebibmacro{to}}% \usebibmacro{booktitle}% - \setunit*{\newunitpunct}% - \usebibmacro{bybookauthor}% - \setunit*{\newunitpunct}% - \usebibmacro{bybookeditor+others}% - \setunit*{\newunitpunct}% - \usebibmacro{volumeof}% - \usebibmacro{maintitle}% + \usebibmacro{bybookauthor/bybookeditor+others/bybooktranslator+others}% + \clearfield{booktitle}% \newunit - \usebibmacro{bymaineditor+others}% + \usebibmacro{chapterin}% + \usebibmacro{volume+partof}% + \usebibmacro{maintitle}% \newunit - \printfield{volumes}% + \usebibmacro{bymainauthor/bymaineditor+others/bymaintranslator+others}% \newunit \printfield{edition}% \newunit + \printfield{volumes}% + \newunit \usebibmacro{shortseries+number}% + \newunit + \printfield{note}% \usebibmacro{parens+publisher+location+date}% \newunit + \usebibmacro{ebook}% + \newunit + \printfield{addendum}% + \newunit \usebibmacro{pages}% \newunit + \usebibmacro{isbn}% + \newunit \usebibmacro{doi+eprint+url}}% \usebibmacro{finentry}} @@ -368,37 +547,62 @@ \usebibmacro{title}% \ifciteseen {} - {\printfield{volumes}% + {\usebibmacro{byauthor/byeditor+others/bytranslator+others}% \newunit \printfield{edition}% \newunit + \printfield{volumes}% + \newunit \usebibmacro{shortseries+number}% + \newunit + \printfield{note}% \usebibmacro{parens+publisher+location+date}% \newunit + \usebibmacro{ebook}% + \newunit + \printfield{addendum}% + \newunit + \usebibmacro{pages}% + \newunit + \usebibmacro{isbn}% + \newunit \usebibmacro{doi+eprint+url}}% \usebibmacro{finentry}} \DeclareBibliographyDriver{cite:incommentary}{% - \usebibmacro{citeindex}% - \usebibmacro{begentry}% - \iftoggle{blx@usefullcite} - {} - {\let\ifciteseen\@firstoftwo}% \iffieldundef{volume} {\usedriver{}{cite:incollection}} - {\iffieldundef{xref}{}{\addskipentry{\thefield{xref}}}% + {\usebibmacro{citeindex}% + \usebibmacro{begentry}% + \iftoggle{blx@usefullcite} + {} + {\let\ifciteseen\@firstoftwo}% + \iffieldundef{xref}{}{\addskipentry{\thefield{xref}}}% \cbx@opt@citepages@omit - \global\booltrue{suppresspostnote}% \usebibmacro{author/translator+others}% \newunit - \usebibmacro{xrefshortmaintitle}% - \newunit - \usebibmacro{volume+pages}% - \newunit - \usebibmacro{doi+eprint+url}% + \ifciteseen + {\usebibmacro{xrefshortmaintitle}% + \iffieldundef{volume} + {} + {\setunit{\addspace}% + \printfield{volume}% + \setunit*{\addperiod}% + \printfield{part}% + \global\booltrue{usevolpostnotedelim}}} + {\printfield{note}% + \newunit + \usebibmacro{xrefshortmaintitle}% + \newunit + \usebibmacro{volume+pages}% + \newunit + \printfield{addendum}}% \usebibmacro{finentry}}} \DeclareBibliographyDriver{cite:incollection}{% + \ifentrytype{seminarpaper} + {} + {\toggletrue{inentrytype}}% \usebibmacro{citeindex}% \usebibmacro{begentry}% \iftoggle{blx@usefullcite} @@ -409,31 +613,43 @@ \usebibmacro{title}% \ifciteseen {} - {\ifentrytype{bookinbook} - {\newunit - \usebibmacro{byeditor+others}} - {}% - \usebibmacro{in}% - \usebibmacro{booktitle}% - \setunit*{\newunitpunct}% - \usebibmacro{bybookauthor}% - \setunit*{\newunitpunct}% - \usebibmacro{bybookeditor+others}% - \setunit*{\newunitpunct}% - \usebibmacro{volumeof}% - \usebibmacro{maintitle}% - \newunit - \usebibmacro{bymaineditor+others}% + {\usebibmacro{byauthor/byeditor+others/bytranslator+others}% \newunit - \printfield{volumes}% + \usebibmacro{chapter+pagesin}% + \iffieldundef{booktitle} + {} + {\usebibmacro{booktitle}% + \newunit + \usebibmacro{event+venue+date}% + \newunit + \usebibmacro{bybookauthor/bybookeditor+others/bybooktranslator+others}% + \newunit}% + \usebibmacro{volume+partof}% + \iffieldundef{maintitle} + {} + {\usebibmacro{maintitle}% + \newunit + \usebibmacro{event+venue+date}% + \newunit + \usebibmacro{bymainauthor/bymaineditor+others/bymaintranslator+others}}% \newunit \printfield{edition}% \newunit + \printfield{volumes}% + \newunit \usebibmacro{shortseries+number}% + \newunit + \printfield{note}% \usebibmacro{parens+publisher+location+date}% \newunit + \usebibmacro{ebook}% + \newunit + \printfield{addendum}% + \newunit \usebibmacro{volume+part+pages}% \newunit + \usebibmacro{isbn}% + \newunit \usebibmacro{doi+eprint+url}}% \usebibmacro{finentry}} @@ -446,14 +662,23 @@ \usebibmacro{author/translator+others}% \newunit \ifciteseen - {\usebibmacro{xrefshortbooktitle+xrefshortmaintitle}% - \usebibmacro{volume}} + {\usebibmacro{xrefshortmaintitle+xrefshortbooktitle}% + \iffieldundef{volume} + {} + {\setunit{\addspace}% + \printfield{volume}% + \setunit*{\addperiod}% + \printfield{part}% + \global\booltrue{usevolpostnotedelim}}} {\usebibmacro{title}% - \usebibmacro{xrefshortbooktitle+xrefshortmaintitle}% + \newunit + \printfield{note}% + \newunit + \usebibmacro{xrefshortmaintitle+xrefshortbooktitle}% \newunit \usebibmacro{volume+pages}% \newunit - \usebibmacro{doi+eprint+url}}% + \printfield{addendum}}% \usebibmacro{finentry}} \DeclareBibliographyDriver{cite:inreference}{% @@ -472,12 +697,17 @@ {} {\newunit \global\booltrue{usevolpostnotedelim}% - \printfield{volume}}} - {\usebibmacro{xrefshortbooktitle+xrefshortmaintitle}% + \printfield{volume}% + \setunit*{\addperiod}% + \printfield{part}}} + {\newunit + \printfield{note}% + \newunit + \usebibmacro{xrefshortmaintitle+xrefshortbooktitle}% \newunit \usebibmacro{volume+pages}% \newunit - \usebibmacro{doi+eprint+url}}% + \printfield{addendum}}% \usebibmacro{finentry}} \DeclareBibliographyDriver{cite:review}{% @@ -488,8 +718,16 @@ {\let\ifciteseen\@firstoftwo}% \usebibmacro{author/translator+others}% \newunit - \usebibmacro{title}% - \newunit + \iffieldundef{title} + {} + {\usebibmacro{title}% + \newunit + \ifciteseen + {} + {\usebibmacro{byauthor}% + \newunit + \usebibmacro{bytranslator+others}% + \newunit}}% \usebibmacro{revdtitle}% \newunit \ifciteseen @@ -497,40 +735,20 @@ \printtext[parens]{\usebibmacro{revdauthor/revdeditor}}} {\usebibmacro{revdauthor/revdeditor}% \newunit - \usebibmacro{shortjournal+issuetitle}% - \usebibmacro{pages}% - \renewcommand*{\newunitpunct}{\addperiod\space}% - \usebibmacro{doi+eprint+url}}% - \usebibmacro{finentry}} - -\DeclareBibliographyDriver{cite:seminarpaper}{% - \usebibmacro{citeindex}% - \usebibmacro{begentry}% - \iftoggle{blx@usefullcite} - {} - {\let\ifciteseen\@firstoftwo}% - \usebibmacro{author/editor+others/translator+others}% - \newunit - \usebibmacro{title}% - \ifciteseen - {} - {\usebibmacro{booktitle}% - \newunit - \usebibmacro{bybookeditor+others}% + \usebibmacro{inissuetitle}% \newunit - \usebibmacro{volumeof}% - \usebibmacro{maintitle}% + \printfield{version}% \newunit - \usebibmacro{bymaineditor+others}% + \printlist{organization}% \newunit - \printfield{volumes}% + \printfield{note}% \newunit - \printfield{edition}% + \usebibmacro{shortjournal+issue}% + \usebibmacro{pages}% \newunit - \usebibmacro{shortseries+number}% - \usebibmacro{parens+publisher+location+date}% + \printfield{addendum}% \newunit - \usebibmacro{volume+part+pages}% + \usebibmacro{issn}% \newunit \usebibmacro{doi+eprint+url}}% \usebibmacro{finentry}} @@ -546,13 +764,25 @@ \usebibmacro{title}% \ifciteseen {} - {\setunit{\addspace}% + {\newunit + \printfield{chapter}% + \newunit + \printfield{note}% + \setunit{\addspace}% \printtext[parens]{% \renewcommand*{\newunitpunct}{\addsemicolon\space}% \printfield{type}% \setunit{\addcomma\addspace}% \usebibmacro{institution+location+date}}% \newunit + \usebibmacro{ebook}% + \newunit + \printfield{addendum}% + \newunit + \usebibmacro{pages}% + \newunit + \printfield{isbn}% + \newunit \usebibmacro{doi+eprint+url}}% \usebibmacro{finentry}} @@ -567,22 +797,22 @@ \usebibmacro{title}% \ifciteseen {} - {\printfield{note}% + {\usebibmacro{byauthor/byeditor+others/bytranslator+others}% \newunit - \usebibmacro{byauthor}% + \printfield{type}% + \newunit + \printfield{version}% \newunit - \usebibmacro{byeditor+others}% + \printfield{note}% + \setunit{\addspace}% + \printtext[parens]{% + \usebibmacro{publisher+location+date}}% \newunit - \printfield{howpublished}% + \usebibmacro{ebook}% \newunit - \usebibmacro{shortseries+number}% + \printfield{addendum}% \newunit - \iffieldundef{journaltitle} - {\setunit{\addspace}% - \printtext[parens]{% - \usebibmacro{publisher+location+date}}} - {\usebibmacro{shortjournal+issuetitle}% - \usebibmacro{pages}}% + \usebibmacro{pages}% \newunit \usebibmacro{doi+eprint+url}}% \usebibmacro{finentry}} @@ -598,16 +828,75 @@ \usebibmacro{title}% \ifciteseen {} - {\setunit{\addspace}% + {\newunit + \printfield{note}% + \setunit{\addspace}% \printtext[parens]{% \usebibmacro{eventtitle}% \newunit - \printfield{note}% - \newunit \printfield{organization}% \newunit \usebibmacro{venue+eventdate}}% \newunit + \printfield{addendum}% + \newunit + \usebibmacro{doi+eprint+url}}% + \usebibmacro{finentry}} + +\DeclareBibliographyDriver{cite:periodical}{% + \usebibmacro{citeindex}% + \usebibmacro{begentry}% + \iftoggle{blx@usefullcite} + {} + {\let\ifciteseen\@firtoftwo}% + \usebibmacro{editor+others}% + \newunit + \ifciteseen + {\usebibmacro{shorttitle}} + {\usebibmacro{issuetitle}% + \usebibmacro{language}% + \newunit + \printfield{note}% + \newunit + \usebibmacro{shortjournal+issue}% + \usebibmacro{pages}% + \newunit + \printfield{addendum}% + \newunit + \usebibmacro{issn}% + \newunit + \usebibmacro{doi+eprint+url}}% + \usebibmacro{finentry}} + +\DeclareBibliographyDriver{cite:patent}{% + \usebibmacro{citeindex}% + \usebibmacro{begentry}% + \iftoggle{blx@usefullcite} + {} + {\let\ifciteseen\@firtoftwo}% + \usebibmacro{author+holder}% + \newunit + \usebibmacro{title}% + \ifciteseen + {} + {\newunit + \printfield{note}% + \setunit{\addspace}% + \printtext[parens]{% + \printfield{type}% + \setunit*{\addspace}% + \printfield{number}% + \iflistundef{location} + {} + {\setunit*{\addspace}% + \printtext[parens]{\printlist{location}}}% + \newunit + \printfield{version}% + \newunit + \usebibmacro{patentdate}% + \newunit + \printfield{addendum}}% + \newunit \usebibmacro{doi+eprint+url}}% \usebibmacro{finentry}} diff --git a/Master/texmf-dist/tex/latex/biblatex-sbl/sbl.dbx b/Master/texmf-dist/tex/latex/biblatex-sbl/sbl.dbx index 6cda9897097..02f0b2ed216 100644 --- a/Master/texmf-dist/tex/latex/biblatex-sbl/sbl.dbx +++ b/Master/texmf-dist/tex/latex/biblatex-sbl/sbl.dbx @@ -15,6 +15,7 @@ revdsubtitle, revdtitleaddon, shortbooktitle, + shortissuetitle, shortmaintitle, withauthortype, witheditortype, @@ -29,6 +30,7 @@ \DeclareDatamodelFields[type=list, datatype=name]{ bookeditor, booktranslator, + mainauthor, maineditor, maintranslator, revdauthor, @@ -44,10 +46,10 @@ withmaintranslator} \DeclareDatamodelFields[type=field, datatype=date]{ - releasedate} + eprintdate} \DeclareDatamodelFields[type=field, datatype=datepart]{ - releaseday, - releasemonth, - releaseyear} + eprintday, + eprintmonth, + eprintyear} -- cgit v1.2.3