jurafoo/jurafoo.sty

129 lines
3.4 KiB
Plaintext
Raw Normal View History

2023-03-24 15:49:31 +01:00
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{jurafoo}[2023-03-04 JMU presets for KOMA-Script and biblatex-jura2]
% Sections
\RedeclareSectionCommand[
runin=false,
afterskip=0pt,
beforeskip=0pt,
font=,
tocindent=0cm,
tocnumwidth=2em,
]{section}
\RedeclareSectionCommand[
runin=false,
afterskip=0pt,
beforeskip=0pt,
font=,
tocindent=0.5cm,
tocnumwidth=2em,
]{subsection}
\RedeclareSectionCommand[
runin=false,
afterskip=0pt,
beforeskip=0pt,
font=,
tocindent=1cm,
tocnumwidth=2em,
]{subsubsection}
\DeclareSectionCommand[
afterskip=0pt,
beforeskip=0pt,
font=,
tocstyle=subsection,
style=section,
level=3,
indent=0pt,
afterindent=false,
runin=false,
tocindent=1.5cm,
tocnumwidth=2em,
counterwithin=subsubsection
]{subsectionthree}
\DeclareSectionCommand[
afterskip=0pt,
beforeskip=0pt,
font=,
tocstyle=subsection,
style=section,
level=4,
indent=0pt,
afterindent=false,
runin=false,
tocindent=2cm,
tocnumwidth=2em,
counterwithin=subsectionthree
]{subsectionfour}
\DeclareSectionCommand[
afterskip=0pt,
beforeskip=0pt,
font=,
tocstyle=subsection,
style=section,
level=5,
indent=0pt,
afterindent=false,
runin=false,
tocindent=2.5cm,
tocnumwidth=2em,
counterwithin=subsectionfour
]{subsectionfive}
\DeclareSectionCommand[
afterskip=0pt,
beforeskip=0pt,
font=,
tocstyle=subsection,
style=section,
level=6,
indent=0pt,
afterindent=false,
runin=false,
tocindent=3cm,
tocnumwidth=2em,
counterwithin=subsectionfive
]{subsectionsix}
\setcounter{secnumdepth}{6}
\setcounter{tocdepth}{6}
\renewcommand*\thesection{\Alph{section}.}
\renewcommand*\thesubsection{\Roman{subsection}.}
\renewcommand*\thesubsubsection{\arabic{subsubsection}.}
\renewcommand*\thesubsectionthree{\alph{subsectionthree})}
\renewcommand*\thesubsectionfour{\alph{subsectionfour}\alph{subsectionfour})}
\renewcommand*\thesubsectionfive{(\arabic{subsectionfive})}
\renewcommand*\thesubsectionsix{\greek{subsectionsix})}
% Bibliography style overrides for biblatex-jura2
% Global: Use commas for everything
\DeclareDelimFormat[bib]{nametitledelim}{\addcomma\space}
\renewcommand*{\newunitpunct}{\addcomma\space}
% Global: Print all names in reverse order
\DeclareNameAlias{default}{sortname}
% Commentary (citedbytitle): Dont print title in italic (upstream doesnt know themselves?)
\DeclareFieldFormat[commentary]{maintitle}{\normalfont{#1}}
\DeclareFieldFormat[commentary]{title}{\normalfont{#1}}
\DeclareFieldFormat[commentary]{author}{\mkbibemph{#1}}
% Commentary (citedbytitle): Print author in italic
\renewcommand*{\mkbibnamefamily}[1]{\mkbibemph{#1}}
\renewcommand*{\mkbibnamegiven}[1]{\mkbibemph{#1}}
\renewcommand*{\mkbibnameprefix}[1]{\mkbibemph{#1}}
\renewcommand*{\mkbibnamesuffix}[1]{\mkbibemph{#1}}
% Commentary (citedbytitle) and incollection: Print names separated by /
\renewcommand*{\multinamedelim}{\addslash}
\renewcommand*{\finalnamedelim}{\addslash}
% Article: Do not print in: before journal name
\renewbibmacro{in:}{\ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}
% Article: Show p./pp. before pages, do not use paranthesis for postnote
\DeclareFieldFormat[article]{postnote}{#1}
\DeclareFieldFormat[article]{pages}{\mkpageprefix[bookpagination][\mknormrange]{#1}}
% Article/Jurisdiction: Place comma before postnote (modified from jura2.cbx)
\renewcommand*{\postnotedelim}{\ifentrytype{commentary}{}{\addcomma\addspace}}
% Incollection: No shorttitle in footnote, caveat: Makes footnote no longer clickable
\newbibmacro*{cite:title:incollection}{}