commit 9e4e448486f257a749c9cd97d106978f3621f4ae Author: Simon Bruder Date: Fri Mar 24 15:49:31 2023 +0100 Init diff --git a/README.md b/README.md new file mode 100644 index 0000000..8fee1e5 --- /dev/null +++ b/README.md @@ -0,0 +1,53 @@ +# jurafoo + +A simple and not very customisable package +for implementing peculiar formatting requirements for legal homework +of the Julius-Maximilians-Universität (JMU) Würzburg, +based on KOMA-Script. + +## A word of caution + +I made this for someone else and don’t know much about the legal side, +to be honst not even about the TeX side, +so please think it through, before you use this. +This is also the reason, why this is not published on CTAN +or included in any TeX distribution. + +## Features + +It implements a seven-level sectioning scheme. +The first three levels are modified versions of the regular +`section`, +`subsection`, +and `subsubsection` +commands. +The following levels are called +`subsectionthree`, +`subsectionfour`, +`subsectionfive`, +and `subsectionsix`. +The ordinal appended is relative to `subsection[one]`, not to `section`. + +For the bibliography part, +it heavily makes use of the nice `biblatex-jura2` package, +which already implements a large amount of the questionable requirements. +However, there are minute differences, +which this package strives to implement. + +## License + +Copyright 2023 Simon Bruder + +This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either version 1.3 +of this license or (at your option) any later version. +The latest version of this license is in + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2005/12/01 or later. + +This work has the LPPL maintenance status “maintained”. + +The Current Maintainer of this work is Simon Bruder. + +This work consists of the file `jurafoo.sty`. diff --git a/jurafoo.sty b/jurafoo.sty new file mode 100644 index 0000000..3b6cf97 --- /dev/null +++ b/jurafoo.sty @@ -0,0 +1,128 @@ +\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): Don’t print title in italic (upstream doesn’t 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}{}