jurafoo/jurafoo.sty

210 lines
5.0 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
2023-04-02 16:29:54 +02:00
% Part: On one line
\renewcommand*{\partformat}{\partname~\thepart:~}
2023-03-25 12:40:36 +01:00
\RedeclareSectionCommand[
2023-04-02 16:29:54 +02:00
runin=false,
2023-03-25 12:40:36 +01:00
afterskip=0pt,
2023-04-02 16:29:54 +02:00
beforeskip=0pt,
2023-03-25 12:40:36 +01:00
font=\normalsize,
afterindent=false,
2023-04-02 16:29:54 +02:00
style=section,
2023-03-25 12:40:36 +01:00
]{part}
2023-03-24 15:49:31 +01:00
\RedeclareSectionCommand[
runin=false,
afterskip=0pt,
beforeskip=0pt,
font=,
tocindent=0cm,
tocnumwidth=2em,
2023-03-25 12:40:36 +01:00
counterwithin=part,
afterindent=false,
2023-03-24 15:49:31 +01:00
]{section}
\RedeclareSectionCommand[
runin=false,
afterskip=0pt,
beforeskip=0pt,
font=,
tocindent=0.5cm,
tocnumwidth=2em,
afterindent=false,
2023-03-24 15:49:31 +01:00
]{subsection}
\RedeclareSectionCommand[
runin=false,
afterskip=0pt,
beforeskip=0pt,
font=,
tocindent=1cm,
tocnumwidth=2em,
afterindent=false,
2023-03-24 15:49:31 +01:00
]{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})}
2023-03-25 13:01:35 +01:00
% Add command to add fake section.
% Adding a real section was not that easy.
\newcommand*{\frage}[1]{\addcontentsline{toc}{section}{Frage #1}%
2023-03-29 09:30:57 +02:00
\noindent\textbf{Frage #1}}
2023-03-25 13:01:35 +01:00
2023-03-24 15:49:31 +01:00
% 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}
% Global: Do not use biblatex-jura2s sorting template
\DeclareSortingTemplate{nty}{
\sort{
\field{presort}
}
\sort[final]{
\field{sortkey}
}
\sort{
\field{sortname}
\field{author}
\field{editor}
\field{translator}
\field{sorttitle}
\field{title}
}
\sort{
\field{sorttitle}
\field{title}
}
\sort{
\field{sortyear}
\field{year}
}
\sort{
\field{volume}
\literal{0}
}
}
2023-03-24 15:49:31 +01:00
% 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}}}
2023-03-24 15:49:31 +01:00
% Article: Show p./pp. before pages, do not use paranthesis for postnote
%\DeclareFieldFormat[article]{postnote}{#1}
%\DeclareFieldFormat[article]{pages}{\mkpageprefix[bookpagination][\mknormrange]{#1}}
2023-03-24 15:49:31 +01:00
% 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}{}
2023-09-22 14:10:48 +02:00
\renewbibmacro{fshowcited}{%
\iftoggle{tnbcbx@fshowcited}
{\iffieldundef{shorttitle}
{}
{\setunit{\addspace}%
\printtext[parens]{%
\bibstring{zitiertals}%
\setunit{\space}%
\printnames[labelname]{author}%
\setunit{\addcomma\space}%
\printfield{shorttitle}%
}}}%
{}}%
\renewbibmacro{finentry}{%
\ifentrytype{commentary}{%
\usebibmacro{howcited}\newunit\newblock}%
{}%
\ifentrytype{book}{%
\usebibmacro{fshowcited}\newunit\newblock}%
{}%
\ifentrytype{incollection}{%
\usebibmacro{fshowcited}\newunit\newblock}%
{}%
\ifentrytype{online}{%
\usebibmacro{fshowcited}\newunit\newblock}%
{}%
\finentry}%
\DefineBibliographyStrings{ngerman}{
kommentarin = {in:},
}