jurafoo/jurafoo.sty

136 lines
3.6 KiB
TeX
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{jurafoo}[2023-03-04 JMU presets for KOMA-Script and biblatex-jura2]
% Sections
\RedeclareSectionCommand[
afterskip=0pt,
%beforeskip=0pt,
font=\normalsize,
prefixfont=\normalsize,
]{part}
\RedeclareSectionCommand[
runin=false,
afterskip=0pt,
beforeskip=0pt,
font=,
tocindent=0cm,
tocnumwidth=2em,
counterwithin=part,
]{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}{}