| 1 |
\usepackage{microtype} |
| 2 |
\usepackage{parskip} |
| 3 |
\usepackage{xcolor} |
| 4 |
\usepackage{fancyvrb,fvextra} |
| 5 |
\usepackage{enverb} |
| 6 |
\usepackage{tocloft} |
| 7 |
\setlength{\cftbeforesecskip}{2pt plus 0.5pt} |
| 8 |
\setcounter{tocdepth}{1} |
| 9 |
\RecustomVerbatimEnvironment{verbatim}{Verbatim}{backgroundcolor=black!15,fontsize=\small} |
| 10 |
\setcounter{secnumdepth}{0} |
| 11 |
\usepackage{fontspec} |
| 12 |
\usepackage[bidi=basic]{babel} |
| 13 |
\babelprovide[import, language=Default, main]{american} |
| 14 |
\babelprovide[import, language=Default, onchar=ids]{polytonicgreek} |
| 15 |
\babelprovide[import, language=Default, onchar=ids]{russian} |
| 16 |
\babelprovide[import, onchar=ids fonts]{armenian} |
| 17 |
\babelprovide[import, onchar=ids fonts]{hebrew} |
| 18 |
\babelprovide[import, onchar=ids fonts]{syriac} |
| 19 |
\IfFontExistsTF{Brill} |
| 20 |
{\babelfont{rm}{Brill}} |
| 21 |
{\babelfont{rm}[Numbers=OldStyle]{Alegreya}} |
| 22 |
\babelfont{sf}[Scale=MatchLowercase]{Latin Modern Sans} |
| 23 |
\babelfont{tt}[Scale=MatchLowercase]{DejaVu Sans Mono} |
| 24 |
\IfFontExistsTF{Noto Serif Armenian} |
| 25 |
{\babelfont[armenian]{rm}[Scale=0.85]{Noto Serif Armenian}} |
| 26 |
{\babelfont[armenian]{rm}[Scale=0.85]{DejaVu Serif}} |
| 27 |
\IfFontExistsTF{SBL Hebrew} |
| 28 |
{\babelfont[hebrew]{rm}[Scale=MatchLowercase]{SBL Hebrew}} |
| 29 |
{\IfFontExistsTF{SBL BibLit} |
| 30 |
{\babelfont[hebrew]{rm}[Scale=MatchLowercase]{SBL BibLit}} |
| 31 |
{\babelfont[hebrew]{rm}[Scale=MatchLowercase]{Frank Ruehl CLM}}} |
| 32 |
\IfFontExistsTF{Estrangelo Edessa} |
| 33 |
{\babelfont[syriac]{rm}[Scale=MatchLowercase]{Estrangelo Edessa}} |
| 34 |
{\babelfont[syriac]{rm}[Scale=MatchLowercase]{Free Sans}} |
| 35 |
\IfFontExistsTF{Miriam Libre Medium} |
| 36 |
{\babelfont[hebrew]{tt}[Scale=MatchLowercase]{Miriam Libre Medium}} |
| 37 |
{\babelfont[hebrew]{tt}[Scale=MatchLowercase]{Miriam Mono CLM}} |
| 38 |
\IfFontExistsTF{Noto Sans Syriac} |
| 39 |
{\babelfont[syriac]{tt}[Scale=0.85]{Noto Sans Syriac}} |
| 40 |
{\babelfont[syriac]{rm}[Scale=MatchLowercase]{Free Sans}} |
| 41 |
\usepackage{realscripts} |
| 42 |
\usepackage{csquotes} |
| 43 |
\makeatletter |
| 44 |
\@ifpackageloaded{hyperref} |
| 45 |
{} |
| 46 |
{\usepackage[colorlinks]{hyperref}} |
| 47 |
\makeatother |
| 48 |
\usepackage[style=sbl, refsection=subsection+, locallabelwidth, citetracker=true]{biblatex} |
| 49 |
\addbibresource{biblatex-sbl.bib} |
| 50 |
|
| 51 |
\makeatletter |
| 52 |
|
| 53 |
\colorlet{cmdcolour}{black!65} |
| 54 |
|
| 55 |
\providecommand*{\pkg}[1]{\textsf{#1}} |
| 56 |
|
| 57 |
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% |
| 58 |
{-3.25ex\@plus -1ex \@minus -.2ex}% |
| 59 |
{1.5ex \@plus .2ex}% |
| 60 |
{\normalfont\normalsize\scshape}} |
| 61 |
|
| 62 |
\ExplSyntaxOn |
| 63 |
% Thanks to https://tex.stackexchange.com/a/44444/87678 |
| 64 |
\cs_new_protected:Npn \sblhsblog_verb_print:n #1 |
| 65 |
{ |
| 66 |
\tl_set:Nn \l_tmpa_tl {#1} |
| 67 |
\regex_replace_all:nnN { . } { \c{ string } \0 } \l_tmpa_tl |
| 68 |
\tl_set:Nx \l_tmpb_tl { \l_tmpa_tl } |
| 69 |
\tl_use:N \l_tmpb_tl |
| 70 |
} |
| 71 |
\cs_set_eq:NN \verbprint \sblhsblog_verb_print:n |
| 72 |
\ExplSyntaxOff |
| 73 |
|
| 74 |
% hack to include a space after a control sequence that would normally be |
| 75 |
% removed by \verbprint above |
| 76 |
\usepackage{newunicodechar} |
| 77 |
\newunicodechar{ }{\relax}% this is U+00A0 |
| 78 |
|
| 79 |
% redefine hyperlink anchors to be independent of \iffootnote |
| 80 |
\DeclareFieldFormat{bibhyperlink}{% |
| 81 |
\bibhyperlink{\cbx@resetcount:\thefield{entrykey}}{#1}} |
| 82 |
\DeclareFieldFormat{bibhypertarget}{% |
| 83 |
\ifboolexpr{ |
| 84 |
not test {\iffieldundef{crossref}} |
| 85 |
and |
| 86 |
not test {\ifcrossrefseen} |
| 87 |
} |
| 88 |
{\bibhypertarget{\cbx@resetcount:\thefield{crossref}}{}} |
| 89 |
{}% |
| 90 |
\bibhypertarget{\cbx@resetcount:\thefield{entrykey}}{#1}} |
| 91 |
\DeclareFieldFormat{shorttitlelink}{% |
| 92 |
\bibhyperlink{\cbx@resetcount:\thefield{entrykey}}{#1}} |
| 93 |
|
| 94 |
% Redefine \smartcite so autocite prints inline with a period. |
| 95 |
\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\bibfootnotewrapper] |
| 96 |
{\usebibmacro{prenote}} |
| 97 |
{\usebibmacro{cite}} |
| 98 |
{\multicitedelim} |
| 99 |
{\usebibmacro{cite:postnote}} |
| 100 |
|
| 101 |
\DeclareCiteCommand*{\smartcite}[\iffootnote\mkbibparens\bibfootnotewrapper] |
| 102 |
{\usebibmacro{prenote}} |
| 103 |
{\usebibmacro{cite:star}% |
| 104 |
\usebibmacro{cite}} |
| 105 |
{\multicitedelim} |
| 106 |
{\usebibmacro{cite:postnote}} |
| 107 |
|
| 108 |
\NewDocumentCommand{\examplenobreak}{}{% |
| 109 |
\par |
| 110 |
\@afterheading |
| 111 |
} |
| 112 |
|
| 113 |
\NewDocumentCommand{\exampleciteauthor}{m}{% |
| 114 |
\par |
| 115 |
\textcolor{cmdcolour}{\texttt{\textbackslash citeauthor\{#1\}}}\par |
| 116 |
\@afterheading |
| 117 |
\citeauthor{#1}% |
| 118 |
} |
| 119 |
|
| 120 |
% \examplecite[<citetype>](<footnote number>)[<prenote>][<postnote>]{entryid} |
| 121 |
% \examplecite*[<citetype>](<footnote number>)[<prenote>][<postnote>]{entryid} |
| 122 |
\NewDocumentCommand{\examplecite}{sO{auto}d()oom}{% |
| 123 |
\par |
| 124 |
\textcolor{cmdcolour}{% |
| 125 |
\texttt{% |
| 126 |
\textbackslash #2cite% |
| 127 |
\IfBooleanT{#1}{*}% |
| 128 |
\IfNoValueF{#4}{[\verbprint{#4}]}% |
| 129 |
\IfNoValueF{#5}{[\verbprint{#5}]}% |
| 130 |
\{#6\}}}\par |
| 131 |
\@afterheading |
| 132 |
\IfNoValueF{#3}{\quad #3.\space\strut}% |
| 133 |
\IfBooleanTF{#1} |
| 134 |
{\printexamplecite*{#2cite}{#4}{#5}{#6}} |
| 135 |
{\printexamplecite{#2cite}{#4}{#5}{#6}}} |
| 136 |
|
| 137 |
% \examplevolcite[<citetype>](<footnote number>)[<prenote>]{<volume>}[<postnote>]{entryid} |
| 138 |
% \examplevolcite*[<citetype>](<footnote number>)[<prenote>]{<volume>}[<postnote>]{entryid} |
| 139 |
\NewDocumentCommand{\examplevolcite}{sO{a}d()omom}{% |
| 140 |
\par |
| 141 |
\textcolor{cmdcolour}{% |
| 142 |
\texttt{% |
| 143 |
\textbackslash #2volcite% |
| 144 |
\IfBooleanT{#1}{*}% |
| 145 |
\IfNoValueF{#4}{[\verbprint{#4}]}% |
| 146 |
\{#5\}% |
| 147 |
\IfNoValueF{#6}{[\verbprint{#6}]}% |
| 148 |
\{#7\}}}\par |
| 149 |
\@afterheading |
| 150 |
\IfNoValueF{#3}{\quad #3.\space\strut}% |
| 151 |
\IfBooleanTF{#1} |
| 152 |
{\printexamplevolcite*{#2volcite}{#4}{#5}{#6}{#7}} |
| 153 |
{\printexamplevolcite{#2volcite}{#4}{#5}{#6}{#7}}} |
| 154 |
|
| 155 |
\NewDocumentCommand{\printexamplecite}{smmmm}{% |
| 156 |
\IfNoValueTF{#4} |
| 157 |
{\IfNoValueTF{#3} |
| 158 |
{\IfBooleanTF{#1} |
| 159 |
{\csname #2\endcsname*{#5}} |
| 160 |
{\csname #2\endcsname{#5}}} |
| 161 |
{\IfBooleanTF{#1} |
| 162 |
{\csname #2\endcsname*[#3]{#5}} |
| 163 |
{\csname #2\endcsname[#3]{#5}}}} |
| 164 |
{\IfNoValueTF{#3} |
| 165 |
{\IfBooleanTF{#1} |
| 166 |
{\csname #2\endcsname*[#3][]{#5}} |
| 167 |
{\csname #2\endcsname[#3][]{#5}}} |
| 168 |
{\IfBooleanTF{#1} |
| 169 |
{\csname #2\endcsname*[#3][#4]{#5}} |
| 170 |
{\csname #2\endcsname[#3][#4]{#5}}}}} |
| 171 |
|
| 172 |
\NewDocumentCommand{\printexamplevolcite}{smmmmm}{% |
| 173 |
\IfNoValueTF{#3} |
| 174 |
{\IfNoValueTF{#5} |
| 175 |
{\IfBooleanTF{#1} |
| 176 |
{\csname #2\endcsname*{#4}{#6}} |
| 177 |
{\csname #2\endcsname{#4}{#6}}} |
| 178 |
{\IfBooleanTF{#1} |
| 179 |
{\csname #2\endcsname*{#4}[#5]{#6}} |
| 180 |
{\csname #2\endcsname{#4}[#5]{#6}}}} |
| 181 |
{\IfNoValueTF{#5} |
| 182 |
{\IfBooleanTF{#1} |
| 183 |
{\csname #2\endcsname*[#3]{#4}{#6}} |
| 184 |
{\csname #2\endcsname[#3]{#4}{#6}}} |
| 185 |
{\IfBooleanTF{#1} |
| 186 |
{\csname #2\endcsname*[#3]{#4}[#5]{#6}} |
| 187 |
{\csname #2\endcsname[#3]{#4}[#5]{#6}}}}} |
| 188 |
|
| 189 |
\NewDocumentEnvironment{verbcite}{}{% |
| 190 |
\enverb{}% |
| 191 |
}{% |
| 192 |
\par |
| 193 |
\color{cmdcolour}% |
| 194 |
\enverbListing{Verbatim}{}% |
| 195 |
\par |
| 196 |
\@afterheading |
| 197 |
\normalcolor |
| 198 |
\enverbExecute |
| 199 |
} |
| 200 |
|
| 201 |
\NewDocumentEnvironment{fverbcite}{m}{% |
| 202 |
\enverb{}% |
| 203 |
}{% |
| 204 |
\par |
| 205 |
\color{cmdcolour}% |
| 206 |
\enverbListing{Verbatim}{}% |
| 207 |
\par |
| 208 |
\@afterheading |
| 209 |
\normalcolor |
| 210 |
\renewcommand\footnote[1]{\toggletrue{blx@footnote}##1}% |
| 211 |
\quad #1.\space\strut\enverbExecute |
| 212 |
} |
| 213 |
|
| 214 |
\NewDocumentEnvironment{verbtext}{}{% |
| 215 |
\enverb{}% |
| 216 |
}{% |
| 217 |
\par |
| 218 |
\color{cmdcolour}% |
| 219 |
\enverbListing{Verbatim}{}% |
| 220 |
\normalcolor |
| 221 |
\par |
| 222 |
} |
| 223 |
|
| 224 |
\NewDocumentCommand{\exampleabbreviations}{}{% |
| 225 |
\par |
| 226 |
\textcolor{cmdcolour}{\texttt{\textbackslash printbiblist\{abbreviations\}}} |
| 227 |
\@afterheading |
| 228 |
\printbiblist[heading=none]{abbreviations}} |
| 229 |
|
| 230 |
\NewDocumentCommand{\exampleancientsources}{}{% |
| 231 |
\par |
| 232 |
\textcolor{cmdcolour}{% |
| 233 |
\texttt{\textbackslash printbiblist[heading=subbibliography, title=Ancient Sources,\\ |
| 234 |
\strut\quad type=ancienttext]\{abbreviations\}}} |
| 235 |
\@afterheading |
| 236 |
\printbiblist[heading=subbibliography, title=Ancient Sources, |
| 237 |
type=ancienttext]{abbreviations}} |
| 238 |
|
| 239 |
\NewDocumentCommand{\examplesecondarysources}{}{% |
| 240 |
\par |
| 241 |
\textcolor{cmdcolour}{% |
| 242 |
\texttt{\textbackslash printbiblist[heading=subbibliography, title=Secondary Sources,\\ |
| 243 |
\strut\quad nottype=ancienttext, nottype=abbreviation]\{abbreviations\}}} |
| 244 |
\@afterheading |
| 245 |
\printbiblist[heading=subbibliography, title=Secondary Sources, |
| 246 |
nottype=ancienttext, nottype=abbreviation]{abbreviations}} |
| 247 |
|
| 248 |
\NewDocumentCommand{\examplesigla}{}{% |
| 249 |
\par |
| 250 |
\textcolor{cmdcolour}{% |
| 251 |
\texttt{\textbackslash printbiblist[heading=subbibliography, title=Sigla |
| 252 |
and Grammatical \\ |
| 253 |
\strut\quad Abbreviations, type=abbreviation]\{abbreviations\}}} |
| 254 |
\@afterheading |
| 255 |
\printbiblist[heading=subbibliography, title=Sigla and Grammatical |
| 256 |
Abbreviations, type=abbreviation]{abbreviations}} |
| 257 |
|
| 258 |
\NewDocumentCommand{\examplebibliography}{}{% |
| 259 |
\par |
| 260 |
\textcolor{cmdcolour}{\texttt{\textbackslash printbibliography}} |
| 261 |
\@afterheading |
| 262 |
\printbibliography[heading=none]} |
| 263 |
|
| 264 |
\NewDocumentCommand{\examplereferences}{m}{% |
| 265 |
\subsection*{References} |
| 266 |
\url{#1}} |
| 267 |
\makeatother |