summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-sbl/biblatex-sbl.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-sbl/biblatex-sbl.def')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-sbl/biblatex-sbl.def525
1 files changed, 356 insertions, 169 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-sbl/biblatex-sbl.def b/Master/texmf-dist/tex/latex/biblatex-sbl/biblatex-sbl.def
index aa7301d2801..0f8ece1b0da 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{2018/12/13}
-\def\sbl@abx@version{0.11}
+\def\sbl@abx@date{2020/11/04}
+\def\sbl@abx@version{0.12}
\def\sbl@abx@bbxid{\sbl@abx@date\space v\sbl@abx@version\space biblatex-sbl bibliography style (DCP)}
\def\sbl@abx@cbxid{\sbl@abx@date\space v\sbl@abx@version\space biblatex-sbl citation style (DCP)}
\def\sbl@abx@lbxid{\sbl@abx@date\space v\sbl@abx@version\space biblatex-sbl localization (DCP)}
@@ -52,7 +52,12 @@
\NumCheckSetup{\def\mkbibparens#1{#1}}
-\renewbibmacro*{postnote}{}
+\renewbibmacro*{postnote}{%
+ \iftoggle{blx@unit}
+ {}
+ {\newunit}%
+ \printfield{postnote}}
+
\newbibmacro*{pages}{}
\DeclareBibliographyOption[string]{citepages}[permit]{%
@@ -62,7 +67,6 @@
{Invalid option 'citepages=#1'}
{Valid values are 'sbl', 'permit', 'omit', 'separate'.}}}
-\providebibmacro*{postnote}{}
\providebibmacro*{pages}{}
\def\cbx@opt@citepages@sbl{%
@@ -82,17 +86,7 @@
{\iffieldpages{postnote}
{}
{\setunit{\addspace}%
- \printtext[parens]{\printfield{postnote}}}}}}%
- \renewbibmacro*{postnote}{%
- \iffieldundef{postnote}
- {\printfield{pages}}
- {\iffieldpages{postnote}
- {\printfield{postnote}}
- {\iffieldundef{pages}
- {\printfield{postnote}}
- {\printfield{pages}%
- \setunit{\addspace}%
- \printtext[parens]{\printfield{postnote}}}}}}}
+ \printtext[parens]{\printfield{postnote}}}}}}}
\def\cbx@opt@citepages@permit{%
\renewbibmacro*{pages}{%
@@ -109,18 +103,7 @@
}
{}
{\setunit{\addspace}%
- \printtext[parens]{\printfield{postnote}}}}}%
- \renewbibmacro*{postnote}{%
- \iffieldundef{postnote}
- {\printfield{pages}}
- {\iffieldpages{postnote}
- {\printfield{postnote}}
- {\iffieldundef{pages}
- {\newunit
- \printfield{postnote}}
- {\printfield{pages}%
- \setunit*{\addspace}%
- \printtext[parens]{\printfield{postnote}}}}}}}
+ \printtext[parens]{\printfield{postnote}}}}}}
\def\cbx@opt@citepages@omit{%
\renewbibmacro*{pages}{%
@@ -139,23 +122,12 @@
{\printfield{postnote}}
{\printfield{pages}%
\setunit*{\addspace}%
- \printtext[parens]{\printfield{postnote}}}}}}%
- \renewbibmacro*{postnote}{%
- \iffieldundef{postnote}
- {\printfield{pages}}
- {\iffieldpages{postnote}
- {\printfield{postnote}}
- {\iffieldundef{pages}
- {\newunit
- \printfield{postnote}}
- {\printfield{pages}%
- \setunit*{\addspace}%
\printtext[parens]{\printfield{postnote}}}}}}}
\def\cbx@opt@citepages@separate{%
\renewbibmacro*{pages}{%
\iffieldundef{pages}
- {\ifool{bx@inset}
+ {\ifbool{bbx@inset}
{}
{\printfield{postnote}%
\global\booltrue{suppresspostnote}}}
@@ -172,34 +144,57 @@
{\bibstring{thiscite}%
\setunit{\addspace}}
{}%
- \printfield{postnote}}}}}%
- \renewbibmacro*{postnote}{%
- \iffieldundef{postnote}
- {\printfield{pages}}
- {\iffieldpages{postnote}
- {\printfield{postnote}}
- {\iffieldundef{pages}
- {\printfield{postnote}}
- {\printfield{pages}%
- \setunit*{\addspace}%
- \printtext[parens]{%
- \iffieldpages{postnote}
- {\bibstring{thiscite}%
- \setunit{\addspace}}
- {}%
- \printfield{postnote}}}}}}}
+ \printfield{postnote}}}}}}
% ------------------------------------------------------------------
% IDEM MACROS
% ------------------------------------------------------------------
+\def\blx@opt@idemtracker@citation{%
+ \let\blx@imc@ifciteidem\blx@ifciteidem@citation
+ \let\blx@idemtracker\blx@idemtracker@constrict
+ \let\blx@idemreset\blx@idemreset@context
+ \booltrue{citetracker}}
+
+\def\blx@opt@idemtracker@sbl{%
+ \let\blx@imc@ifciteidem\blx@ifciteidem@sbl
+ \let\blx@idemtracker\blx@idemtracker@constrict
+ \let\blx@idemreset\blx@idemreset@context
+ \booltrue{citetracker}}
+
+\def\blx@ifciteidem@citation{%
+ \ifbool{citetracker}
+ {\iftoggle{blx@footnote}
+ {\blx@ifmpfncheckidem
+ {\blx@imc@iffieldequals{fullhash}\blx@lasthash@foot}
+ {\@secondoftwo}}
+ {\iffirstcitekey
+ {\@secondoftwo}
+ {\blx@imc@iffieldequals{fullhash}\blx@lasthash@text}}}
+ {\@secondoftwo}}
+
+\def\blx@ifciteidem@sbl{%
+ \blx@ifciteidem@citation}
+
+\def\blx@ifmpfncheckidem{%
+ \ifnum\numexpr\value\@mpfn-\blx@lastmpfn<\@ne
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}
+
+\def\ifciteidemsbl{%
+ \ifdefequal{\blx@imc@ifciteidem}{\blx@ifciteidem@sbl}}
+
\newbibmacro*{ifidemused}{%
\ifboolexpr{
test {\ifciteidem}
and
not test {\iffirstonpage}
}
- {\bibstring[\mkibid]{idem\thefield{gender}}%
+ {\ifciteidemsbl
+ {\printnames{labelname}}
+ {\bibstring[\mkibid]{idem\thefield{gender}}}%
\@firstoftwo}
{\@secondoftwo}}
@@ -310,7 +305,6 @@
\ExecuteBibliographyOptions{%
citetracker,
- punctfont,
alldates=comp,
eprintdate=comp,
dateabbrev=false,
@@ -320,9 +314,9 @@
minxrefs=1,
isbn=false,
pagetracker,
- idemtracker=constrict,
- ibidtracker=constrict,
- ibidpage=false,
+ idemtracker=sbl,
+ ibidtracker=false,
+ ibidpage=true,
maxbibnames=99,
maxcitenames=3,
citepages=sbl,
@@ -363,6 +357,7 @@
\NewBibliographyString{paperpresented}
\NewBibliographyString{patentfiled}
\NewBibliographyString{released}
+\NewBibliographyString{article}
\DeclareLanguageMappingSuffix{-sbl}
@@ -404,6 +399,7 @@
\ifinteger{#1}
{\mkbibordedition{#1}~\bibsstring{edition}}
{\ifcapital{\MakeCapital{#1}}{#1}\isdot}}
+\DeclareFieldFormat{eid}{\bibsstring{article}~#1}
\DeclareFieldFormat{eprint:ebook}{#1 \biblstring{edition}}
\DeclareFieldFormat{eprint}{%
\iffieldundef{eprinttype}
@@ -453,7 +449,10 @@
\DeclareFieldFormat{volcitepages}{\mkcomprange{#1}}
\DeclareFieldFormat{part}{#1}
\DeclareFieldFormat{pt}{\bibstring{part}~#1}
-\DeclareFieldFormat{postnote}{\mkcomprange{#1}}
+\DeclareFieldFormat{postnote}{%
+ \iffieldundef{eid}
+ {\mkcomprange{#1}}
+ {\mkpageprefix[pagination][\mkcomprange]{#1}}}
\DeclareFieldFormat{multipostnote}{#1}
\DeclareFieldFormat{byauthor}{\bibstring{byauthor} #1}
\DeclareFieldFormat{revdtitle}{\biblstring{reviewof} \mkbibemph{#1}}
@@ -472,8 +471,8 @@
\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{pagepages}{\mkpageprefix[pagination][\mkcomprange]{#1}}
+\DeclareFieldFormat{pagesin}{\mkpageprefix[pagination][\mkcomprange]{#1} \usebibmacro{in}}
\DeclareFieldFormat{chapter}{\bibsstring{chapter}~#1}
\DeclareFieldFormat{chapterin}{\bibsstring{chapter}~#1 \usebibmacro{in}}
\DeclareFieldFormat{volume}{#1}
@@ -515,13 +514,15 @@
\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{issuetitle}{\mkbibemph{#1}}
+\DeclareFieldFormat{issuesubtitle}{\mkbibemph{#1}}
+\DeclareFieldFormat{shortissuetitle}{\mkbibemph{#1}}
\DeclareFieldFormat{howpublished}{\ifbibstring{#1}{\bibstring{#1}}{#1}}
\DeclareFieldFormat[patent]{title}{#1}
\DeclareFieldFormat[ancienttext]{title}{%
\ifboolexpr{
+ test {\iffieldequalstr{entrysubtype}{primarysource}}
+ or
test {\iffieldequalstr{entrysubtype}{inscription}}
or
test {\iffieldequalstr{entrysubtype}{chronicle}}
@@ -532,6 +533,8 @@
{\mkbibquote{#1}}}}
\DeclareFieldFormat[ancienttext]{shorttitle}{%
\ifboolexpr{
+ test {\iffieldequalstr{entrysubtype}{primarysource}}
+ or
test {\iffieldequalstr{entrysubtype}{inscription}}
or
test {\iffieldequalstr{entrysubtype}{chronicle}}
@@ -561,6 +564,18 @@
\iffieldundef{type}
{#1}
{\mkbibemph{#1}}}
+\DeclareFieldFormat[classictext]{title}{%
+ \ifnameundef{author}
+ {#1}
+ {\mkbibemph{#1}}}
+\DeclareFieldFormat[classictext]{subtitle}{%
+ \ifnameundef{author}
+ {#1}
+ {\mkbibemph{#1}}}
+\DeclareFieldFormat[classictext]{shorttitle}{%
+ \ifnameundef{author}
+ {#1}
+ {\mkbibemph{#1}}}
\DeclareBibliographyAlias{cite:mvbook}{cite:book}
\DeclareBibliographyAlias{cite:mvcollection}{cite:collection}
@@ -675,6 +690,13 @@
% LIST OF ABBREVIATIONS
% ------------------------------------------------------------------
+\DeclareFieldFormat{shorttitlewidth}{%
+ \ifentrytype{classictext}
+ {\iffieldequalstr{entrysubtype}{churchfather}
+ {}
+ {\mkbibemph{#1}}}
+ {}}
+
\newtoggle{blx@abbrevcite}
\newlength{\abbrevwidth}
@@ -686,16 +708,30 @@
}
\defbibenvironment{abbreviations}
- {\list
+ {\setlength{\abbrevwidth}{0pt}%
+ \list
{\printfield[shorthandwidth]{shortjournal}%
- \iffieldundef{shorthand}
- {\printfield[shorthandwidth]{shortseries}}
- {\iffieldsequal{shorthand}{shorttitle}
- {\printtext{\mkbibemph{\printfield[shorthandwidth]{shorthand}}}}
- {\printfield[shorthandwidth]{shorthand}}}}
+ \iffieldsequal{shorthand}{shorttitle}
+ {\printtext{\mkbibemph{\printfield[shorthandwidth]{shorthand}}}}
+ {\printfield[shorthandwidth]{shorthand}}%
+ \ifentrytype{classictext}
+ {\printfield{shorttitle}}
+ {}%
+ \ifboolexpr{
+ not test {\iffieldundef{shorthand}}
+ or
+ (
+ test {\ifentrytype{classictext}}
+ and
+ not test {\iffieldundef{shorttitle}}
+ )
+ }
+ {}
+ {\printfield{shortseries}}}
{\setmaxlength{\abbrevwidth}{\shorthandwidth}%
\setmaxlength{\abbrevwidth}{\shortserieswidth}%
\setmaxlength{\abbrevwidth}{\shortjournalwidth}%
+ \setmaxlength{\abbrevwidth}{\shorttitlewidth}%
\addtolength{\abbrevwidth}{\biblabelsep}%
\setlength{\labelwidth}{\abbrevwidth}%
\setlength{\leftmargin}{\labelwidth}%
@@ -721,15 +757,38 @@
{\setunit{\subtitlepunct}%
\printfield{journalsubtitle}}}%
\iffieldundef{shorthand}
- {\iffieldundef{shortseries}
- {}
- {\bibhypertarget{\strfield{shortseries}}{}%
- \printfield{series}}}
+ {}
{\bibhypertarget{\strfield{shorthand}}{}%
\iffieldsequal{shorthand}{shorttitle}
{\toggletrue{blx@abbrevcite}}
{}%
\usebibmacro{bibentrycite}}%
+ \ifentrytype{classictext}
+ {\iffieldundef{shorttitle}
+ {}
+ {\bibhypertarget{\strfield{shorttitle}\strname{author}}{}%
+ \ifnameundef{author}
+ {}
+ {\usebibmacro{author}%
+ \newunit}%
+ \printfield{title}%
+ \setunit*{\subtitlepunct}%
+ \printfield{subtitle}}}
+ {}%
+ \ifboolexpr{
+ not test {\iffieldundef{shorthand}}
+ or
+ (
+ test {\ifentrytype{classictext}}
+ and
+ not test {\iffieldundef{shorttitle}}
+ )
+ }
+ {}
+ {\iffieldundef{shortseries}
+ {}
+ {\bibhypertarget{\strfield{shortseries}}{}%
+ \printfield{series}}}%
\usebibmacro{finentry}}
\DeclareBiblistFilter{abbreviations}{
@@ -737,6 +796,26 @@
\filter[type=field,filter=shorthand]
\filter[type=field,filter=shortjournal]
\filter[type=field,filter=shortseries]
+ \filter[type=field,filter=shorttitle]
+ }
+}
+
+\DeclareBiblistFilter{primary}{
+ \filteror{
+ \filter[type=subtype,filter=primarysource]
+ \filter[type=type,filter=classictext]
+ }
+ \filteror{
+ \filter[type=field,filter=shorthand]
+ \filter[type=field,filter=shorttitle]
+ }
+}
+
+\DeclareBiblistFilter{secondary}{
+ \filteror{
+ \filter[type=field,filter=shorthand]
+ \filter[type=field,filter=shortjournal]
+ \filter[type=field,filter=shortseries]
}
}
@@ -752,25 +831,65 @@
{}
{\iffieldundef{shortjournal}
{}
- {\ifcsdef{sbl\therefsection\strfield{shortjournal}=\strfield{journaltitle}}
+ {\ifcsdef{\therefsection-\strfield{shortjournal}=\strfield{journaltitle}}
{\skipentry}
- {\savefieldcs{journaltitle}{sbl\therefsection\strfield{shortjournal}=\strfield{journaltitle}}}}%
+ {\savefieldcs{journaltitle}{\therefsection-\strfield{shortjournal}=\strfield{journaltitle}}}}%
\iffieldundef{shorthand}
- {\iffieldundef{shortseries}
+ {}
+ {\ifcsdef{\therefsection-\strfield{shorthand}=\strfield{shorttitle}}
+ {\skipentry}
+ {\savefieldcs{shorthand}{\therefsection-\strfield{shorthand}=\strfield{shorttitle}}}}%
+ \ifentrytype{classictext}
+ {\iffieldundef{shorttitle}
{}
- {\ifcsdef{sbl\therefsection\strfield{shortseries}=\strfield{series}}
+ {\ifcsdef{\therefsection-\strfield{shorttitle}=\strname{author}\strfield{title}}
{\skipentry}
- {\savefieldcs{series}{sbl\therefsection\strfield{shortseries}=\strfield{series}}}}}
- {\ifcsdef{sbl\therefsection\strfield{shorthand}=\strfield{title}}
+ {\savefieldcs{shorttitle}{\therefsection-\strfield{shorttitle}=\strname{author}\strfield{title}}}}}
+ {}%
+ \ifboolexpr{
+ not test {\iffieldundef{shorthand}}
+ or
+ (
+ test {\ifentrytype{classictext}}
+ and
+ not test {\iffieldundef{shorttitle}}
+ )
+ }
+ {}
+ {\ifcsdef{\therefsection-\strfield{shortseries}=\strfield{series}}
{\skipentry}
- {\savefieldcs{shorthand}{sbl\therefsection\strfield{shorthand}=\strfield{title}}}}}}
-
-\DeclareSortingTemplate{abbreviations}{%
- \sort{%
- \field{shorthand}%
- \field{shortjournal}%
- \field{shortseries}%
- }%
+ {\savefieldcs{series}{\therefsection-\strfield{shortseries}=\strfield{series}}}}%
+ \iffieldequalstr{entrysubtype}{churchfather}
+ {\skipentry}
+ {}%
+ \ifboolexpr{
+ not test {\ifentrytype{classictext}}
+ and
+ not test {\iffieldundef{shorttitle}}
+ and
+ test {\iffieldundef{shortjournal}}
+ and
+ test {\iffieldundef{shorthand}}
+ and
+ test {\iffieldundef{shortseries}}
+ }
+ {\skipentry}
+ {}}}
+
+\DeclareSortingTemplate{abbreviations}{
+ \sort{
+ \field{sortshorthand}
+ \field{shorthand}
+ \field{shortjournal}
+ \field{shortseries}
+ \field{shorttitle}
+ }
+ \sort{
+ \field{journaltitle}
+ \field{author}
+ \field{title}
+ \field{series}
+ }
}
% ------------------------------------------------------------------
@@ -787,13 +906,14 @@
\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[overwrite=true]{
+ \step[notfield=sorttitle, final]
+ \step[fieldsource=title, match=\regexp{^(A|An|The)\s+(.+)}, final]
+ \step[fieldset=sorttitle, fieldvalue={$2}]
+ }
\map{
\pertype{suppbook}
\pertype{suppcollection}
@@ -826,16 +946,6 @@
\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}]
}
@@ -857,17 +967,32 @@
\pertype{ancienttext}
\pertype{classictext}
\step[fieldsource=related, final]
- \step[fieldset=relatedtype, fieldvalue=ancienttext]
\step[fieldsource=relatedoptions, match=\regexp{(.*)}]
\step[fieldset=relatedoptions, fieldvalue={skipbib=false,skipbiblist=false,}]
\step[fieldset=relatedoptions, fieldvalue={$1}, append]
+ \step[notfield=relatedtype, final]
+ \step[fieldset=relatedtype, fieldvalue=ancienttext]
}
\map[overwrite]{
\step[fieldsource=shortseries, final]
\step[fieldsource=shorthand, final]
\step[fieldsource=entrykey, match=\regexp{(.*)}]
\step[fieldset=xref, fieldvalue=series-$1]
- \step[entrynew=series-$1, entrynewtype=misc]
+ \step[entrynew=series-$1, entrynewtype=series]
+ \step[fieldsource=shortseries]
+ \step[fieldset=shortseries, origfieldval, entrytarget=series-$1]
+ \step[fieldsource=series]
+ \step[fieldset=series, origfieldval, entrytarget=series-$1]
+ \step[fieldset=options, fieldvalue={skipbib}, entrytarget=series-$1]
+ }
+ \map[overwrite]{
+ \pertype{classictext}
+ \step[fieldsource=shortseries, final]
+ \step[fieldsource=shorttitle, final]
+ \step[fieldset=sortshorthand, origfieldval]
+ \step[fieldsource=entrykey, match=\regexp{(.*)}]
+ \step[fieldset=xref, fieldvalue=series-$1]
+ \step[entrynew=series-$1, entrynewtype=series]
\step[fieldsource=shortseries]
\step[fieldset=shortseries, origfieldval, entrytarget=series-$1]
\step[fieldsource=series]
@@ -959,10 +1084,28 @@
{#2}}
\ExplSyntaxOn
-\cs_new_protected:Nn \sbl_ifinstringt:nnn {
- \tl_if_in:nnT {#2}{#1}{#3}}
-\cs_generate_variant:Nn \sbl_ifinstringt:nnn { non }
-\cs_new_eq:NN \IfInStringT \sbl_ifinstringt:non
+\cs_new_protected:Nn \sbl_ifinstringtf:nnnn {
+ \tl_if_in:nnTF {#2}{#1}{#3}{#4}}
+\cs_generate_variant:Nn \sbl_ifinstringtf:nnnn { nonn }
+\cs_new_eq:NN \IfInStringTF \sbl_ifinstringtf:nonn
+
+\DeclareExpandableDocumentCommand \iffirstcharsec { m m m }
+ {
+ \exp_args:Nnf \IfInStringTF { § } { \tl_use:N \tl_head:f { #1 } }
+ { #2 }
+ {
+ \exp_args:Nnf \IfInStringTF { \textsection } { \tl_use:N \tl_head:f { #1 } }
+ { #2 }
+ { #3 }
+ }
+ }
+
+\DeclareExpandableDocumentCommand \iffirstcharnum { m m m }
+ {
+ \exp_args:Nf \ifnumeral { \tl_use:N \tl_head:f { #1 } }
+ { #2 }
+ { #3 }
+ }
\ExplSyntaxOff
\newbibmacro*{setpostnotedelim}{%
@@ -971,38 +1114,52 @@
{}%
\iffieldundef{postnote}
{}
- {\IfInStringT{.}{\abx@field@postnote}
- {\renewcommand*{\postnotedelim}{\addspace}}%
- \IfInStringT{:}{\abx@field@postnote}
- {\renewcommand*{\postnotedelim}{\addspace}}%
- \IfInStringT{§}{\abx@field@postnote}
- {\renewcommand*{\postnotedelim}{\addspace}}%
- \IfInStringT{\textsection}{\abx@field@postnote}
- {\renewcommand*{\postnotedelim}{\addspace}}}}
+ {\iffirstcharnum{\abx@field@postnote}
+ {\ifboolexpr{
+ test {\ifentrytype{ancienttext}}
+ and
+ test {\usebibmacro{ifuseshorthand}}
+ }
+ {\renewcommand*{\postnotedelim}{\addspace}}
+ {}%
+ \ifboolexpr{
+ test {\ifentrytype{classictext}}
+ and
+ not test {\iffieldundef{shorttitle}}
+ }
+ {\renewcommand*{\postnotedelim}{\addspace}}
+ {}%
+ \IfInStringTF{.}{\abx@field@postnote}
+ {\renewcommand*{\postnotedelim}{\addspace}}{}%
+ \IfInStringTF{:}{\abx@field@postnote}
+ {\renewcommand*{\postnotedelim}{\addspace}}{}}
+ {\iffirstcharsec{\abx@field@postnote}
+ {\renewcommand*{\postnotedelim}{\addspace}}
+ {}}}}
\newbibmacro*{setaltpostnotedelim}{%
\iffieldundef{altpostnote}
{}
- {\IfInStringT{.}{\abx@field@altpostnote}
- {\renewcommand*{\postnotedelim}{\addspace}}%
- \IfInStringT{:}{\abx@field@altpostnote}
- {\renewcommand*{\postnotedelim}{\addspace}}%
- \IfInStringT{§}{\abx@field@altpostnote}
- {\renewcommand*{\postnotedelim}{\addspace}}%
- \IfInStringT{\textsection}{\abx@field@altpostnote}
- {\renewcommand*{\postnotedelim}{\addspace}}}}
+ {\IfInStringTF{.}{\abx@field@altpostnote}
+ {\renewcommand*{\postnotedelim}{\addspace}}{}%
+ \IfInStringTF{:}{\abx@field@altpostnote}
+ {\renewcommand*{\postnotedelim}{\addspace}}{}%
+ \IfInStringTF{§}{\abx@field@altpostnote}
+ {\renewcommand*{\postnotedelim}{\addspace}}{}%
+ \IfInStringTF{\textsection}{\abx@field@altpostnote}
+ {\renewcommand*{\postnotedelim}{\addspace}}{}}}
\newbibmacro*{setpagesdelim}{%
\iffieldundef{pages}
{}
- {\IfInStringT{.}{\abx@field@pages}
- {\setunit{\addspace}}%
- \IfInStringT{:}{\abx@field@pages}
- {\setunit{\addspace}}%
- \IfInStringT{§}{\abx@field@pages}
- {\setunit{\addspace}}%
- \IfInStringT{\textsection}{\abx@field@pages}
- {\setunit{\addspace}}}}
+ {\IfInStringTF{.}{\abx@field@pages}
+ {\setunit{\addspace}}{}%
+ \IfInStringTF{:}{\abx@field@pages}
+ {\setunit{\addspace}}{}%
+ \IfInStringTF{§}{\abx@field@pages}
+ {\setunit{\addspace}}{}%
+ \IfInStringTF{\textsection}{\abx@field@pages}
+ {\setunit{\addspace}}{}}}
% ------------------------------------------------------------------
% JOINING WORD MACROS
@@ -1123,6 +1280,24 @@
{\printtext[maintitle]{\printfield[titlecase]{shortmaintitle}}}%
\newunit}
+\newbibmacro*{classictexttitle}{%
+ \ifboolexpr{%
+ not togl {blx@useshorttitle}
+ or
+ test {\iffieldundef{shorttitle}}
+ }
+ {\iffieldundef{title}
+ {}
+ {\printtext[title]{%
+ \printfield[titlecase]{title}%
+ \setunit{\subtitlepunct}%
+ \printfield[titlecase]{subtitle}}%
+ \newunit
+ \printfield{titleaddon}%
+ \usebibmacro{language}}}
+ {\printtext[shorttitle]{%
+ \bibhyperlink{\strfield{shorttitle}\strname{author}}{\thefield{shorttitle}}}}}
+
\renewbibmacro*{title}{%
\ifciteseen
{\usebibmacro{shorttitle}}
@@ -1226,14 +1401,17 @@
\newbibmacro*{shortjournal}{%
\iffieldundef{shortjournal}
- {\printfield{journaltitle}}
+ {\printtext[journaltitle]{%
+ \printfield[titlecase]{journaltitle}%
+ \setunit*{\subtitlepunct}%
+ \printfield[titlecase]{journalsubtitle}}}
{\printtext[shortjournal]{%
\bibhyperlink{\strfield{shortjournal}}{\thefield{shortjournal}}}}}
\newbibmacro*{shortjournal+issue}{%
\usebibmacro{shortjournal}%
\setunit{\addspace}%
- \usebibmacro{series+volume+number+eid}%
+ \usebibmacro{series+volume+number}%
\ifboolexpr{
not test {\ifnameundef{editor}}
or
@@ -1262,7 +1440,8 @@
test {\iffieldundef{date}}
}
{\usebibmacro{setpagesdelim}}
- {}}
+ {}%
+ \usebibmacro{eid}}
\renewbibmacro*{issue+date}{%
\ifboolexpr{
@@ -1296,7 +1475,7 @@
\usebibmacro{date}}}%
\setunit{\addcolon\space}}}}
-\newbibmacro*{series+volume+number+eid}{%
+\newbibmacro*{series+volume+number}{%
\iffieldundef{series}
{}
{\newunit
@@ -1304,9 +1483,7 @@
\newunit}%
\printfield{volume}%
\setunit*{\addperiod}%
- \printfield{number}%
- \setunit{\addcomma\space}%
- \printfield{eid}}
+ \printfield{number}}
\newbibmacro{inissuetitle}{%
\iffieldundef{issuetitle}
@@ -1325,7 +1502,7 @@
{\printtext[issuetitle]{\printfield[titlecase]{shortissuetitle}}}%
\newunit}
-\newbibmacro{issuetitle}{%
+\newbibmacro*{issuetitle}{%
\iffieldundef{issuetitle}
{}
{\ifciteseen
@@ -1335,6 +1512,10 @@
\setunit*{\subtitlepunct}%
\printfield[titlecase]{issuesubtitle}}}}}
+\newbibmacro*{eid}{%
+ \printfield{eid}%
+ \setunit*{\addcomma\space}}
+
% ------------------------------------------------------------------
% NAME MACROS
% ------------------------------------------------------------------
@@ -1699,15 +1880,13 @@
{}}
\newbibmacro*{byauthor/byeditor+others/bytranslator+others}{%
- \iffieldundef{title}
- {}
- {\usebibmacro{byauthor}%
+ \usebibmacro{byauthor}%
+ \newunit
+ \usebibmacro{ifbooktitleormaintitle}
+ {\usebibmacro{byeditor/bytranslator}}
+ {\usebibmacro{byeditor+others}%
\newunit
- \usebibmacro{ifbooktitleormaintitle}
- {\usebibmacro{byeditor/bytranslator}}
- {\usebibmacro{byeditor+others}%
- \newunit
- \usebibmacro{bytranslator+others}}}}
+ \usebibmacro{bytranslator+others}}}
\newbibmacro*{bybookeditor}{%
\ifnameundef{bookeditor}
@@ -2386,10 +2565,11 @@
\usedriver
{\renewbibmacro*{related:init}{}%
\ifbibliography
- {\renewbibmacro*{parens+publisher+location+date}{%
- \newunit
- \usebibmacro{publisher+location+date}}}
- {}}
+ {}
+ {\renewcommand*{\newunitpunct}{\addsemicolon\space}}%
+ \renewbibmacro*{parens+publisher+location+date}{%
+ \newunit
+ \usebibmacro{publisher+location+date}}}
{\ifbibliography
{\thefield{entrytype}}
{cite:\thefield{entrytype}}}}}
@@ -2421,23 +2601,27 @@
\newtoggle{blx@testpostnotedelim}
\newbibmacro*{volume+part+postnote}{%
- \usebibmacro{volume}%
- \iffieldundef{part}
- {}
- {\setunit{\addperiod}%
- \printfield{part}}%
- \iftoggle{blx@testpostnotedelim}{\usebibmacro{setpostnotedelim}}{}%
- \ifbool{usevolpostnotedelim}
- {\setunit{\volpostnotedelim}}
- {\setunit{\postnotedelim}}%
\ifboolexpr{
test {\ifciteseen}
- or
- test {\iffieldundef{pages}}
+ and
+ test {\iffieldundef{postnote}}
}
- {\printfield{postnote}}
- {\usebibmacro{pages}}%
- \global\booltrue{suppresspostnote}}
+ {}
+ {\usebibmacro{volume}%
+ \iffieldundef{part}
+ {}
+ {\setunit{\addperiod}%
+ \printfield{part}}%
+ \iftoggle{blx@testpostnotedelim}{\usebibmacro{setpostnotedelim}}{}%
+ \ifbool{usevolpostnotedelim}
+ {\setunit{\volpostnotedelim}}
+ {\setunit{\postnotedelim}}%
+ \ifciteseen
+ {\printfield{postnote}}
+ {\iffieldundef{pages}
+ {\printfield{postnote}}
+ {\usebibmacro{pages}}}%
+ \global\booltrue{suppresspostnote}}}
\newbibmacro*{classic:translator+series}{%
\ifnameundef{translator}
@@ -2448,7 +2632,10 @@
\iftoggle{blx@useseries}
{\newunit
\usebibmacro{shortseries}}
- {}}}}
+ {}%
+ \usebibmacro{setaltpostnotedelim}%
+ \setunit{\postnotedelim}%
+ \printfield{altpostnote}}}}
% ------------------------------------------------------------------
% ALTERNATE POSTNOTE MACROS