2021-03-02 18:29:25 +01:00
|
|
|
\NeedsTeXFormat{LaTeX2e}
|
2021-04-25 23:35:25 +02:00
|
|
|
\ProvidesClass{craftlaw}[CraftLaw for the CraftFuze Legal Project, EU Look]
|
2021-03-02 18:29:25 +01:00
|
|
|
|
|
|
|
\LoadClass[a4paper,8pt,oneside]{article}
|
|
|
|
\RequirePackage[left=1cm, right=1cm, top=2cm]{geometry}
|
|
|
|
\RequirePackage[utf8]{inputenc}
|
|
|
|
\RequirePackage[english]{babel}
|
|
|
|
\RequirePackage{blindtext}
|
|
|
|
\RequirePackage{fancyhdr}
|
|
|
|
\RequirePackage{titling}
|
|
|
|
\RequirePackage[shortlabels]{enumitem}
|
|
|
|
\RequirePackage{needspace}
|
2021-05-01 18:35:07 +02:00
|
|
|
\RequirePackage[document]{ragged2e}
|
|
|
|
\RequirePackage{graphicx}
|
|
|
|
\RequirePackage{anyfontsize}
|
2021-03-02 18:29:25 +01:00
|
|
|
|
|
|
|
% Indent
|
|
|
|
\setlength{\parindent}{0pt}
|
|
|
|
\setlength{\parskip}{0pt}
|
|
|
|
\setlist[enumerate,1]{leftmargin=1.5em,topsep=-1ex,itemsep=-1ex,partopsep=1ex,parsep=1ex,style=sameline}
|
|
|
|
\setlist[enumerate,2]{leftmargin=1.5em,topsep=-1ex,itemsep=-1ex,partopsep=1ex,parsep=1ex,style=sameline}
|
2021-05-01 17:40:46 +02:00
|
|
|
\setenumerate[0]{label=\textbf{\arabic*.}}
|
2021-03-02 18:29:25 +01:00
|
|
|
|
|
|
|
% Header and footer
|
|
|
|
\pagestyle{fancy}
|
|
|
|
\fancyhf{}
|
|
|
|
\fancyfoot[LE,RO]{\thepage}
|
|
|
|
|
|
|
|
% New title layout
|
|
|
|
\newcommand{\settitle}[1]{\def\@lawtitle{#1}}
|
|
|
|
\newcommand{\setdate}[1]{\def\@date{#1}}
|
|
|
|
|
|
|
|
% General Data
|
|
|
|
\newcommand{\setheader}[1]{}
|
|
|
|
|
|
|
|
% Generate header and title
|
|
|
|
\newcommand{\generateHeader}{
|
|
|
|
% Header
|
|
|
|
\fancyhead[LE,LO]{\@date}
|
|
|
|
\fancyhead[CE,CO]{Official Journal of the Crafty Table}
|
|
|
|
\fancyhead[RE,RO]{\@lawtitle}
|
2021-05-01 18:35:07 +02:00
|
|
|
|
2021-03-02 18:29:25 +01:00
|
|
|
% Title
|
2021-05-01 18:35:07 +02:00
|
|
|
\begin{titlepage}
|
|
|
|
\begin{figure}
|
|
|
|
\centering
|
|
|
|
\includegraphics[width=120mm]{smooth}
|
|
|
|
|
|
|
|
\vspace{0.5in}
|
|
|
|
\textsf{\fontsize{70}{90}\fontfamily{cmsy}%
|
|
|
|
\selectfont\@lawtitle}%
|
|
|
|
\end{figure}
|
|
|
|
\end{titlepage}
|
2021-03-02 18:29:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
% Introduction
|
|
|
|
\newcommand{\introduction}[1]{%
|
|
|
|
\bigskip%
|
|
|
|
\vbox{%
|
|
|
|
Preamble:\medskip%
|
|
|
|
|
|
|
|
\noindent{#1}%
|
|
|
|
}%
|
|
|
|
}
|
|
|
|
|
|
|
|
% About Articles
|
2021-03-03 23:53:26 +01:00
|
|
|
\newcounter{TitleCounter}
|
2021-03-03 01:07:19 +01:00
|
|
|
\newcounter{TitleSubCounter}[TitleCounter]
|
2021-03-02 18:29:25 +01:00
|
|
|
\newcounter{ChapterCounter}[TitleCounter]
|
2021-03-03 01:07:19 +01:00
|
|
|
\newcounter{ChapterSubCounter}[ChapterCounter]
|
2021-03-03 23:53:26 +01:00
|
|
|
\newcounter{SectionCounter}[ChapterCounter]
|
|
|
|
\newcounter{SectionSubCounter}[SectionCounter]
|
|
|
|
\newcounter{ParagraphCounter}[SectionCounter]
|
2021-03-02 18:29:25 +01:00
|
|
|
\newcounter{SubParagraphCounter}[ParagraphCounter]
|
2021-03-03 23:53:26 +01:00
|
|
|
\newcounter{ArticleCounter}[TitleSubCounter]
|
2021-03-02 18:29:25 +01:00
|
|
|
\newcounter{ArticleSubCounter}[ArticleCounter]
|
2021-03-03 23:53:26 +01:00
|
|
|
\renewcommand{\title}[1]{%
|
|
|
|
\stepcounter{TitleCounter}%
|
2021-03-02 18:29:25 +01:00
|
|
|
|
|
|
|
\newpage%
|
|
|
|
\bigskip%
|
|
|
|
|
|
|
|
\centering%
|
2021-03-03 23:53:26 +01:00
|
|
|
\noindent{TITLE \Roman{TitleCounter}}%
|
2021-03-02 18:29:25 +01:00
|
|
|
|
|
|
|
\textbf{#1}%
|
|
|
|
}
|
2021-03-03 23:53:26 +01:00
|
|
|
\newcommand{\subtitle}[1]{%
|
|
|
|
\stepcounter{TitleSubCounter}%
|
2021-03-03 01:07:19 +01:00
|
|
|
|
|
|
|
\newpage%
|
|
|
|
\bigskip%
|
|
|
|
|
|
|
|
\centering%
|
2021-03-03 23:53:26 +01:00
|
|
|
\noindent{TITLE \Roman{TitleCounter} \Alph{TitleSubCounter}}%
|
2021-03-03 01:07:19 +01:00
|
|
|
|
|
|
|
\textbf{#1}%
|
|
|
|
}
|
2021-03-03 23:53:26 +01:00
|
|
|
\newcommand{\chapter}[1]{
|
|
|
|
\stepcounter{ChapterCounter}%
|
2021-03-02 18:29:25 +01:00
|
|
|
|
|
|
|
\needspace{20\baselineskip}%
|
|
|
|
\bigskip%
|
|
|
|
|
|
|
|
\centering%
|
2021-03-03 23:53:26 +01:00
|
|
|
\noindent{CHAPTER \Roman{ChapterCounter}}%
|
2021-03-02 18:29:25 +01:00
|
|
|
|
|
|
|
\textbf{#1}%
|
|
|
|
}
|
2021-03-03 23:53:26 +01:00
|
|
|
\newcommand{\subchapter}[1]{
|
|
|
|
\stepcounter{ChapterSubCounter}%
|
2021-03-03 01:07:19 +01:00
|
|
|
|
|
|
|
\needspace{20\baselineskip}%
|
|
|
|
\bigskip%
|
|
|
|
|
|
|
|
\centering%
|
2021-03-03 23:53:26 +01:00
|
|
|
\noindent{CHAPTER \Roman{ChapterCounter} \Alph{ChapterSubCounter}}%
|
2021-03-03 01:07:19 +01:00
|
|
|
|
|
|
|
\textbf{#1}%
|
|
|
|
}
|
2021-03-03 23:53:26 +01:00
|
|
|
\renewcommand{\section}[1]{%
|
|
|
|
\stepcounter{SectionCounter}%
|
2021-03-02 18:29:25 +01:00
|
|
|
|
|
|
|
\needspace{20\baselineskip}%
|
|
|
|
\bigskip%
|
|
|
|
|
|
|
|
\centering%
|
2021-03-03 23:53:26 +01:00
|
|
|
\noindent{SECTION \Roman{SectionCounter}}%
|
2021-03-02 18:29:25 +01:00
|
|
|
|
|
|
|
\textbf{#1}%
|
|
|
|
}
|
2021-03-03 23:53:26 +01:00
|
|
|
\renewcommand{\subsection}[1]{%
|
|
|
|
\stepcounter{SectionSubCounter}%
|
2021-03-03 01:07:19 +01:00
|
|
|
|
|
|
|
\needspace{20\baselineskip}%
|
|
|
|
\bigskip%
|
|
|
|
|
|
|
|
\centering%
|
2021-03-03 23:53:26 +01:00
|
|
|
\noindent{SECTION \Roman{SectionCounter} \Alph{SectionSubCounter}}%
|
2021-03-03 01:07:19 +01:00
|
|
|
|
|
|
|
\textbf{#1}%
|
|
|
|
}
|
2021-03-02 18:29:25 +01:00
|
|
|
\renewcommand{\paragraph}[1]{%
|
|
|
|
\stepcounter{ParagraphCounter}%
|
|
|
|
|
|
|
|
\needspace{20\baselineskip}%
|
|
|
|
\bigskip%
|
|
|
|
|
|
|
|
\centering%
|
|
|
|
\noindent{Paragraph §\arabic{ParagraphCounter}.\arabic{SubParagraphCounter}}%
|
|
|
|
|
|
|
|
\textbf{#1}%
|
|
|
|
}
|
|
|
|
\renewcommand{\subparagraph}[1]{%
|
|
|
|
\stepcounter{SubParagraphCounter}%
|
|
|
|
|
|
|
|
\needspace{20\baselineskip}%
|
|
|
|
\bigskip%
|
|
|
|
|
|
|
|
\centering%
|
|
|
|
\noindent{Paragraph §\arabic{ParagraphCounter}.\arabic{SubParagraphCounter}}%
|
|
|
|
|
|
|
|
\textbf{#1}%
|
|
|
|
}
|
|
|
|
\newcommand{\article}[2]{%
|
|
|
|
% Count 1 up
|
|
|
|
\stepcounter{ArticleCounter}%
|
|
|
|
|
|
|
|
% Demand space and take space
|
|
|
|
\needspace{5\baselineskip}%
|
|
|
|
\bigskip%
|
|
|
|
|
|
|
|
% Center the title and print it
|
|
|
|
\centering%
|
2021-03-03 23:53:26 +01:00
|
|
|
\ifnum\value{TitleCounter}>0
|
|
|
|
\ifnum\value{TitleSubCounter}>0
|
|
|
|
\textit{Article \arabic{TitleCounter}\Alph{TitleSubCounter}:\arabic{ArticleCounter}}%
|
2021-03-03 01:07:19 +01:00
|
|
|
\else
|
2021-03-03 23:53:26 +01:00
|
|
|
\textit{Article \arabic{TitleCounter}:\arabic{ArticleCounter}}%
|
2021-03-03 01:07:19 +01:00
|
|
|
\fi
|
2021-03-02 18:29:25 +01:00
|
|
|
\else
|
|
|
|
\textit{Article \arabic{ArticleCounter}}\newline%
|
|
|
|
\fi
|
|
|
|
|
|
|
|
\textbf{#1}%
|
|
|
|
\justify
|
|
|
|
\par{#2}
|
|
|
|
\bigskip%
|
|
|
|
}
|
|
|
|
\newcommand{\subarticle}[2]{%
|
|
|
|
\stepcounter{ArticleSubCounter}%
|
|
|
|
|
|
|
|
\needspace{5\baselineskip}%
|
|
|
|
\bigskip%
|
|
|
|
|
|
|
|
\centering%
|
2021-03-03 23:53:26 +01:00
|
|
|
\ifnum\value{TitleCounter}>0
|
|
|
|
\ifnum\value{TitleSubCounter}>0
|
|
|
|
\textit{Article \arabic{TitleCounter}\Alph{TitleSubCounter}:\arabic{ArticleCounter}\alph{ArticleSubCounter}}%
|
2021-03-03 01:07:19 +01:00
|
|
|
\else
|
2021-03-03 23:53:26 +01:00
|
|
|
\textit{Article \arabic{TitleCounter}:\arabic{ArticleCounter}\alph{ArticleSubCounter}}%
|
2021-03-03 01:07:19 +01:00
|
|
|
\fi
|
|
|
|
|
2021-03-02 18:29:25 +01:00
|
|
|
\else
|
|
|
|
\textit{Article \arabic{ArticleCounter}\alph{ArticleSubCounter}}%
|
|
|
|
\fi
|
|
|
|
|
|
|
|
\textbf{#1}%
|
|
|
|
\justify
|
|
|
|
\par{#2}%
|
|
|
|
\bigskip%
|
|
|
|
}
|