summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl.cbx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-11-05 03:02:04 +0000
committerNorbert Preining <norbert@preining.info>2020-11-05 03:02:04 +0000
commitb8f26d1a3ca0ba4b66477af6bd2cff2071ddd0fc (patch)
treef4f4a5d17850094c77b0ef61d004cd2532b9ad9e /macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl.cbx
parent07794af1099869d326e5904c42f1224de759fd56 (diff)
CTAN sync 202011050302
Diffstat (limited to 'macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl.cbx')
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl.cbx116
1 files changed, 81 insertions, 35 deletions
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl.cbx
index bb745ef0b8..6e67fb24f4 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl.cbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl.cbx
@@ -130,11 +130,23 @@
\sloppy
\hangindent 6em\rlap
{\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}}}%
\renewcommand*{\bibhypertarget}[2]{##2}%
\hskip 6em \setunit{}\usedriver{}{abbreviations}\par
}
@@ -294,23 +306,50 @@
{\multicitedelim}
{\usebibmacro{cite:postnote}}
-\DeclareCiteCommand{\citeseries}
- {}
+\newrobustcmd*{\Citefullauthor}{%
+ \@ifstar{\bibsentence\citefullauthor*}{\bibsentence\citefullauthor}}
+
+\DeclareCiteCommand{\citefullauthor}
+ {\boolfalse{citetracker}%
+ \boolfalse{pagetracker}%
+ \usebibmacro{prenote}}
+ {\ifciteindex
+ {\indexnames{labelname}}
+ {}%
+ \printnames[given-family]{labelname}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand*{\citefullauthor}
+ {\boolfalse{citetracker}%
+ \boolfalse{pagetracker}%
+ \usebibmacro{prenote}}
+ {\ifciteindex
+ {\indexnames{labelname}}
+ {}%
+ \printnames[given-family][1-1]{labelname}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+% Thanks to @moewe (https://tex.stackexchange.com/a/497548/87678)
+\newcommand*{\DeclareNestableCiteCommand}[2]{%
+ \newcommand*{#1}[1]{%
+ \blx@xsanitizeafter\blx@nocite@do{##1}%
+ \blx@ifdata{##1}
+ {\begingroup
+ \blx@blxinit
+ \entrydata{##1}{#2}%
+ \endgroup}
+ {\abx@missing@entry{##1}}}}
+
+\DeclareNestableCiteCommand{\citeseries}
{\usebibmacro{shortseries}}
- {}
- {}
-\DeclareCiteCommand{\citejournal}
- {}
+\DeclareNestableCiteCommand{\citejournal}
{\usebibmacro{shortjournal}}
- {}
- {}
-\DeclareCiteCommand{\citeshorthand}
- {}
+\DeclareNestableCiteCommand{\citeshorthand}
{\usebibmacro{shorthand}}
- {}
- {}
\newbibmacro*{textcite}{%
\ifnameundef{labelname}
@@ -457,9 +496,9 @@
{\let\ifciteseen\@firstoftwo}%
\usebibmacro{author}%
\newunit
- \usebibmacro{shorttitlenohyperlink}%
\iffieldequalstr{entrysubtype}{churchfather}
- {\setunit{\addspace}%
+ {\usebibmacro{shorttitlenohyperlink}%
+ \setunit{\addspace}%
\printfield{altpostnote}%
\DeclareFieldFormat{related}{\mkbibparens{##1}}%
\renewcommand*{\begrelateddelim}{\addspace}%
@@ -467,7 +506,8 @@
\usebibmacro{related:init}%
\usebibmacro{related}%
\global\toggletrue{relatedseen}}
- {\clearfield{pages}%
+ {\usebibmacro{classictexttitle}%
+ \clearfield{pages}%
\usebibmacro{volume+part+postnote}%
\usebibmacro{classic:translator+series}}%
\usebibmacro{finentry}}
@@ -663,11 +703,13 @@
{\usebibmacro{xrefshortmaintitle}%
\iffieldundef{volume}
{}
- {\setunit{\addspace}%
- \printfield{volume}%
- \setunit*{\addperiod}%
- \printfield{part}%
- \global\booltrue{usevolpostnotedelim}}}
+ {\iffieldpages{postnote}
+ {\setunit{\addspace}%
+ \printfield{volume}%
+ \setunit*{\addperiod}%
+ \printfield{part}%
+ \global\booltrue{usevolpostnotedelim}}
+ {}}}
{\printfield{note}%
\newunit
\usebibmacro{xrefshortmaintitle}%
@@ -743,11 +785,13 @@
{\usebibmacro{xrefshortmaintitle+xrefshortbooktitle}%
\iffieldundef{volume}
{}
- {\setunit{\addspace}%
- \printfield{volume}%
- \setunit*{\addperiod}%
- \printfield{part}%
- \global\booltrue{usevolpostnotedelim}}}
+ {\iffieldpages{postnote}
+ {\setunit{\addspace}%
+ \printfield{volume}%
+ \setunit*{\addperiod}%
+ \printfield{part}%
+ \global\booltrue{usevolpostnotedelim}}
+ {}}}
{\usebibmacro{title}%
\newunit
\printfield{note}%
@@ -773,11 +817,13 @@
{\newunit
\iffieldundef{volume}
{}
- {\newunit
- \global\booltrue{usevolpostnotedelim}%
- \printfield{volume}%
- \setunit*{\addperiod}%
- \printfield{part}}}
+ {\iffieldpages{postnote}
+ {\newunit
+ \global\booltrue{usevolpostnotedelim}%
+ \printfield{volume}%
+ \setunit*{\addperiod}%
+ \printfield{part}}
+ {}}}
{\newunit
\printfield{note}%
\newunit