summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-sbl/sbl.cbx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-sbl/sbl.cbx')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-sbl/sbl.cbx614
1 files changed, 614 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-sbl/sbl.cbx b/Master/texmf-dist/tex/latex/biblatex-sbl/sbl.cbx
new file mode 100644
index 00000000000..5520ab65e0a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-sbl/sbl.cbx
@@ -0,0 +1,614 @@
+\blx@inputonce{biblatex-sbl.def}{biblatex-sbl definitions and macros}{}{}{}{}
+
+\ProvidesFile{sbl.cbx}[\sbl@abx@cbxid]
+
+\newbool{suppresspostnote}
+\newbool{usevolpostnotedelim}
+
+\newtoggle{cbx:loccit}
+\newtoggle{usingibid}
+\newtoggle{relatedseen}
+
+\newbibmacro*{cite}{%
+ \boolfalse{suppresspostnote}%
+ \boolfalse{usevolpostnotedelim}%
+ \global\togglefalse{usingibid}%
+ \ifciteseen
+ {\global\toggletrue{relatedseen}}
+ {\global\togglefalse{relatedseen}}%
+ \ifciteseen{}{\iffieldundef{pages}{}{\booltrue{suppresspostnote}}}%
+ \iffieldundef{shorthand}
+ {\ifciteseen{}{\bibhypertarget{\strfield{entrykey}}{}}}
+ {}%
+ \printtext{%
+ \ifboolexpr{%
+ test {\ifciteibid}
+ and
+ not test {\iffirstonpage}}
+ {\usebibmacro{cite:ibid}}
+ {\usebibmacro{ifuseshorthand}
+ {\usebibmacro{cite:shorthand}}
+ {\usedriver{}{cite:\thefield{entrytype}}}}}}
+
+% redefine default loccit tracker so that citations with no postnote also match
+\def\blx@loccit@tracker#1{%
+ \global\csundef{blx@lastnote@#1@\abx@field@entrykey}%
+ \blx@imc@iffieldundef{postnote}
+ {\global\cslet{blx@lastnote@#1@\abx@field@entrykey}\abx@field@entrykey}
+ {\global\cslet{blx@lastnote@#1@\abx@field@entrykey}\abx@field@postnote}%
+ \xifinlistcs\abx@field@entrykey{blx@trackkeys@#1}
+ {}
+ {\listcsxadd{blx@trackkeys@#1}\abx@field@entrykey}}
+
+\def\blx@loccit@check#1{%
+ \blx@imc@iffieldundef{postnote}
+ {\blx@imc@iffieldequalcs{entrykey}{blx@lastnote@#1@\abx@field@entrykey}}
+ {\blx@imc@iffieldequalcs{postnote}{blx@lastnote@#1@\abx@field@entrykey}}}
+
+\newbibmacro*{cite:ibid}{%
+ \usebibmacro{citeindex}%
+ \global\toggletrue{usingibid}%
+ \printtext[bibhyperlink]{\bibstring[\mkibid]{ibidem}}%
+ \ifloccit
+ {\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}%
+ \usebibmacro{shorthand}%
+ \iffieldequalstr{entrysubtype}{RIMA}
+ {\restorefield{volume}{\abx@field@number}}
+ {}%
+ \ifboolexpr{
+ test {\ifentrytype{ancienttext}}
+ and
+ not test {\iffieldundef{related}}
+ }
+ {\usebibmacro{setaltpostnotedelim}%
+ \setunit{\postnotedelim}%
+ \printfield{altpostnote}%
+ \setunit{\addspace}%
+ \printtext[parens]{%
+ \usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \usebibmacro{volume+part+postnote}}}
+ {}}
+
+\newbibmacro*{bibentrycite}{%
+ \citereset
+ \global\togglefalse{relatedseen}%
+ \toggletrue{blx@bibliography}%
+ \def\abx@str{abx@lstr}%
+ \renewcommand*{\revsdnamedelim}{\addcomma}%
+ \setcounter{maxnames}{100}%
+ \setcounter{maxitems}{100}%
+ \DeclareNameAlias{author}{sortname}%
+ \DeclareNameAlias{editor}{sortname}%
+ \DeclareNameAlias{translator}{sortname}%
+ \renewcommand*{\newunitpunct}{\addperiod\space}%
+ \sloppy
+ \printtext{\usedriver{}{\thefield{entrytype}}}}
+
+\newbibmacro*{biblistcite}{%
+ \sloppy
+ \hangindent 6em\rlap
+ {\printfield[shorthandwidth]{shortjournal}%
+ \iffieldundef{shorthand}
+ {\printfield[shorthandwidth]{shortseries}}
+ {\iffieldsequal{shorthand}{shorttitle}
+ {\printtext{\mkbibemph{\printfield[shorthandwidth]{shorthand}}}}
+ {\printfield[shorthandwidth]{shorthand}}}}%
+ \renewcommand*{\bibhypertarget}[2]{##2}%
+ \hskip 6em \setunit{}\usedriver{}{abbreviations}\par
+}
+
+\newbibmacro*{cite:postnote}{%
+ \iffieldundef{shorthand}
+ {}
+ {\iftoggle{usingibid}
+ {}
+ {\usebibmacro{setpostnotedelim}}}%
+ \ifbool{suppresspostnote}{}{%
+ \ifboolexpr{%
+ not test {\iffieldundef{postnote}}
+ or
+ not test {\iffieldundef{pages}}
+ }
+ {\ifbool{usevolpostnotedelim}
+ {\setunit{\volpostnotedelim}}
+ {\setunit{\postnotedelim}}%
+ \usebibmacro{postnote}}
+ {}}%
+ \iftoggle{relatedseen}
+ {}
+ {\iffieldundef{related}
+ {}
+ {\setunit{\addsemicolon\space}%
+ \usebibmacro{related:init}%
+ \usebibmacro{related}}}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\cite}
+ {\usebibmacro{prenote}}
+ {\usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\bibentrycite}
+ {}
+ {\usebibmacro{bibentrycite}}
+ {\multicitedelim}
+ {}
+
+\DeclareCiteCommand{\biblistcite}
+ {}
+ {\usebibmacro{biblistcite}}
+ {}
+ {}
+
+\DeclareCiteCommand{\parencite}[\mkbibparens]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\citeseries}
+ {}
+ {\usebibmacro{shortseries}}
+ {}
+ {}
+
+\DeclareCiteCommand{\citejournal}
+ {}
+ {\usebibmacro{shortjournal}}
+ {}
+ {}
+
+\DeclareCiteCommand{\citeshorthand}
+ {}
+ {\usebibmacro{shorthand}}
+ {}
+ {}
+
+
+% ------------------------------------------------------------------
+% CITE DRIVERS
+% ------------------------------------------------------------------
+
+\DeclareBibliographyDriver{cite:set}{%
+ \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}}}
+
+\DeclareBibliographyDriver{cite:ancienttext}{%
+ \usebibmacro{citeindex}%
+ \togglefalse{blx@citeindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author}%
+ \newunit
+ \usebibmacro{title}%
+ \newunit
+ \printfield{altpostnote}%
+ \newunit
+ \ifciteseen
+ {}
+ {\usebibmacro{byeditor+others}}%
+ \ifboolexpr{
+ test {\iffieldequalstr{entrysubtype}{ANRW}}
+ or
+ test {\ifboolexpr{
+ test {\ifciteseen}
+ and
+ test {\iffieldequalstr{entrysubtype}{COS}}
+ }}
+ }
+ {\newunit
+ \usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \usebibmacro{volume+part+postnote}}
+ {\setunit{\addspace}%
+ \printtext[parens]{%
+ \usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \usebibmacro{volume+part+postnote}}}%
+ \global\toggletrue{relatedseen}
+ \usebibmacro{finentry}}
+
+\DeclareBibliographyDriver{cite:classictext}{%
+ \usebibmacro{citeindex}%
+ \togglefalse{blx@citeindex}%
+ \usebibmacro{begentry}%
+ \iftoggle{blx@usefullcite}
+ {}
+ {\let\ifciteseen\@firstoftwo}%
+ \usebibmacro{author}%
+ \newunit
+ \usebibmacro{shorttitlenohyperlink}%
+ \iffieldequalstr{entrysubtype}{churchfather}
+ {\setunit{\addspace}%
+ \printfield{altpostnote}%
+ \setunit{\addspace}%
+ \printtext[parens]{%
+ \usebibmacro{related:init}%
+ \usebibmacro{related}%
+ \usebibmacro{volume+part+postnote}}%
+ \global\toggletrue{relatedseen}}
+ {\usebibmacro{volume+part+postnote}%
+ \usebibmacro{classic:translator+series}}%
+ \usebibmacro{finentry}}
+
+\DeclareBibliographyDriver{cite:article}{%
+ \usebibmacro{citeindex}%
+ \usebibmacro{begentry}%
+ \iftoggle{blx@usefullcite}
+ {}
+ {\let\ifciteseen\@firtoftwo}%
+ \usebibmacro{author/editor+others/translator+others}%
+ \newunit
+ \usebibmacro{title}%
+ \ifciteseen
+ {}
+ {\usebibmacro{shortjournal+issuetitle}%
+ \usebibmacro{pages}%
+ \newunit
+ \usebibmacro{releasedate}%
+ \newunit
+ \usebibmacro{doi+eprint+url}}%
+ \usebibmacro{finentry}}
+
+\DeclareBibliographyDriver{cite:book}{%
+ \usebibmacro{citeindex}%
+ \usebibmacro{begentry}%
+ \iftoggle{blx@usefullcite}
+ {}
+ {\let\ifciteseen\@firstoftwo}%
+ \usebibmacro{author/editor+others/translator+others}%
+ \newunit
+ \usebibmacro{title}%
+ \ifciteseen
+ {}
+ {\newunit
+ \usebibmacro{byauthor}%
+ \newunit
+ \usebibmacro{volumeof}%
+ \usebibmacro{maintitle}%
+ \newunit
+ \usebibmacro{bymaineditor+others}%
+ \newunit
+ \printfield{volumes}%
+ \newunit
+ \printfield{edition}%
+ \newunit
+ \usebibmacro{shortseries+number}%
+ \usebibmacro{parens+publisher+location+date}%
+ \newunit
+ \usebibmacro{doi+eprint+url}}%
+ \usebibmacro{volume+part+nomaintitle}%
+ \usebibmacro{finentry}}
+
+\DeclareBibliographyDriver{cite:suppbook}{%
+ \usebibmacro{citeindex}%
+ \usebibmacro{begentry}%
+ \iftoggle{blx@usefullcite}
+ {}
+ {\let\ifciteseen\@firstoftwo}%
+ \usebibmacro{author/editor+others/translator+others}%
+ \newunit
+ \ifciteseen
+ {\printfield{type}}
+ {\printfield{type}%
+ \setunit{\addspace}%
+ \usebibmacro{to}%
+ \usebibmacro{booktitle}%
+ \setunit*{\newunitpunct}%
+ \usebibmacro{bybookauthor}%
+ \setunit*{\newunitpunct}%
+ \usebibmacro{bybookeditor+others}%
+ \setunit*{\newunitpunct}%
+ \usebibmacro{volumeof}%
+ \usebibmacro{maintitle}%
+ \newunit
+ \usebibmacro{bymaineditor+others}%
+ \newunit
+ \printfield{volumes}%
+ \newunit
+ \printfield{edition}%
+ \newunit
+ \usebibmacro{shortseries+number}%
+ \usebibmacro{parens+publisher+location+date}%
+ \newunit
+ \usebibmacro{pages}%
+ \newunit
+ \usebibmacro{doi+eprint+url}}%
+ \usebibmacro{finentry}}
+
+\DeclareBibliographyDriver{cite:commentary}{%
+ \usebibmacro{citeindex}%
+ \usebibmacro{begentry}%
+ \iftoggle{blx@usefullcite}
+ {}
+ {\let\ifciteseen\@firstoftwo}%
+ \usebibmacro{author/editor+others/translator+others}%
+ \newunit
+ \usebibmacro{title}%
+ \ifciteseen
+ {}
+ {\printfield{volumes}%
+ \newunit
+ \printfield{edition}%
+ \newunit
+ \usebibmacro{shortseries+number}%
+ \usebibmacro{parens+publisher+location+date}%
+ \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}}}%
+ \cbx@opt@citepages@omit
+ \global\booltrue{suppresspostnote}%
+ \usebibmacro{author/translator+others}%
+ \newunit
+ \usebibmacro{xrefshortmaintitle}%
+ \newunit
+ \usebibmacro{volume+pages}%
+ \newunit
+ \usebibmacro{doi+eprint+url}%
+ \usebibmacro{finentry}}}
+
+\DeclareBibliographyDriver{cite:incollection}{%
+ \usebibmacro{citeindex}%
+ \usebibmacro{begentry}%
+ \iftoggle{blx@usefullcite}
+ {}
+ {\let\ifciteseen\@firstoftwo}%
+ \usebibmacro{author/editor+others/translator+others}%
+ \newunit
+ \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}%
+ \newunit
+ \printfield{volumes}%
+ \newunit
+ \printfield{edition}%
+ \newunit
+ \usebibmacro{shortseries+number}%
+ \usebibmacro{parens+publisher+location+date}%
+ \newunit
+ \usebibmacro{volume+part+pages}%
+ \newunit
+ \usebibmacro{doi+eprint+url}}%
+ \usebibmacro{finentry}}
+
+\DeclareBibliographyDriver{cite:inlexicon}{%
+ \usebibmacro{citeindex}%
+ \usebibmacro{begentry}%
+ \iftoggle{blx@usefullcite}
+ {}
+ {\let\ifciteseen\@firstoftwo}%
+ \usebibmacro{author/translator+others}%
+ \newunit
+ \ifciteseen
+ {\usebibmacro{xrefshortbooktitle+xrefshortmaintitle}%
+ \usebibmacro{volume}}
+ {\usebibmacro{title}%
+ \usebibmacro{xrefshortbooktitle+xrefshortmaintitle}%
+ \newunit
+ \usebibmacro{volume+pages}%
+ \newunit
+ \usebibmacro{doi+eprint+url}}%
+ \usebibmacro{finentry}}
+
+\DeclareBibliographyDriver{cite:inreference}{%
+ \usebibmacro{citeindex}%
+ \usebibmacro{begentry}%
+ \iftoggle{blx@usefullcite}
+ {}
+ {\let\ifciteseen\@firstoftwo}%
+ \iffieldundef{xref}{}{\addskipentry{\thefield{xref}}}%
+ \usebibmacro{author/translator+others}%
+ \newunit
+ \usebibmacro{title}%
+ \ifciteseen
+ {\newunit
+ \iffieldundef{volume}
+ {}
+ {\newunit
+ \global\booltrue{usevolpostnotedelim}%
+ \printfield{volume}}}
+ {\usebibmacro{xrefshortbooktitle+xrefshortmaintitle}%
+ \newunit
+ \usebibmacro{volume+pages}%
+ \newunit
+ \usebibmacro{doi+eprint+url}}%
+ \usebibmacro{finentry}}
+
+\DeclareBibliographyDriver{cite:review}{%
+ \usebibmacro{citeindex}%
+ \usebibmacro{begentry}%
+ \iftoggle{blx@usefullcite}
+ {}
+ {\let\ifciteseen\@firstoftwo}%
+ \usebibmacro{author/translator+others}%
+ \newunit
+ \usebibmacro{title}%
+ \newunit
+ \usebibmacro{revdtitle}%
+ \newunit
+ \ifciteseen
+ {\setunit{\addspace}%
+ \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}%
+ \newunit
+ \usebibmacro{volumeof}%
+ \usebibmacro{maintitle}%
+ \newunit
+ \usebibmacro{bymaineditor+others}%
+ \newunit
+ \printfield{volumes}%
+ \newunit
+ \printfield{edition}%
+ \newunit
+ \usebibmacro{shortseries+number}%
+ \usebibmacro{parens+publisher+location+date}%
+ \newunit
+ \usebibmacro{volume+part+pages}%
+ \newunit
+ \usebibmacro{doi+eprint+url}}%
+ \usebibmacro{finentry}}
+
+\DeclareBibliographyDriver{cite:thesis}{%
+ \usebibmacro{citeindex}%
+ \usebibmacro{begentry}%
+ \iftoggle{blx@usefullcite}
+ {}
+ {\let\ifciteseen\@firstoftwo}%
+ \usebibmacro{author}%
+ \newunit
+ \usebibmacro{title}%
+ \ifciteseen
+ {}
+ {\setunit{\addspace}%
+ \printtext[parens]{%
+ \renewcommand*{\newunitpunct}{\addsemicolon\space}%
+ \printfield{type}%
+ \setunit{\addcomma\addspace}%
+ \usebibmacro{institution+location+date}}%
+ \newunit
+ \usebibmacro{doi+eprint+url}}%
+ \usebibmacro{finentry}}
+
+\DeclareBibliographyDriver{cite:misc}{%
+ \usebibmacro{citeindex}%
+ \usebibmacro{begentry}%
+ \iftoggle{blx@usefullcite}
+ {}
+ {\let\ifciteseen\@firstoftwo}%
+ \usebibmacro{author/editor+others/translator+others}%
+ \newunit
+ \usebibmacro{title}%
+ \ifciteseen
+ {}
+ {\printfield{note}%
+ \newunit
+ \usebibmacro{byauthor}%
+ \newunit
+ \usebibmacro{byeditor+others}%
+ \newunit
+ \printfield{howpublished}%
+ \newunit
+ \usebibmacro{shortseries+number}%
+ \newunit
+ \iffieldundef{journaltitle}
+ {\setunit{\addspace}%
+ \printtext[parens]{%
+ \usebibmacro{publisher+location+date}}}
+ {\usebibmacro{shortjournal+issuetitle}%
+ \usebibmacro{pages}}%
+ \newunit
+ \usebibmacro{doi+eprint+url}}%
+ \usebibmacro{finentry}}
+
+\DeclareBibliographyDriver{cite:conferencepaper}{%
+ \usebibmacro{citeindex}%
+ \usebibmacro{begentry}%
+ \iftoggle{blx@usefullcite}
+ {}
+ {\let\ifciteseen\@firstoftwo}%
+ \usebibmacro{author}%
+ \newunit
+ \usebibmacro{title}%
+ \ifciteseen
+ {}
+ {\setunit{\addspace}%
+ \printtext[parens]{%
+ \usebibmacro{eventtitle}%
+ \newunit
+ \printfield{note}%
+ \newunit
+ \printfield{organization}%
+ \newunit
+ \usebibmacro{venue+eventdate}}%
+ \newunit
+ \usebibmacro{doi+eprint+url}}%
+ \usebibmacro{finentry}}
+
+\endinput