\NeedsTeXFormat{LaTeX2e} \ProvidesClass{craftofficial}[CraftLaw for the CraftFuze Legal Project, Official Look] \LoadClass[a4paper,8pt,oneside]{article} \RequirePackage[left=2cm, right=2cm, top=2cm]{geometry} \RequirePackage[utf8]{inputenc} \RequirePackage[english]{babel} \RequirePackage{blindtext} \RequirePackage{titling} \RequirePackage{fancyhdr} \RequirePackage{tikz} \RequirePackage[shortlabels]{enumitem} \RequirePackage{needspace} \RequirePackage[document]{ragged2e} % Indent \setlength{\parindent}{0pt} \setlength{\parskip}{0pt} \newcommand{\articleindent}{\leavevmode{\parindent=3em\indent}} \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} \setenumerate[0]{label=\arabic*.} % 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}} \newcommand{\generateHeader}{ % Header \fancyhead[LE,LO]{\@date} \fancyhead[CE,CO]{Official Journal of the Crafty Table} \fancyhead[RE,RO]{\@lawtitle} % Title \noindent% \begin{figure} \centering \includegraphics[width=30mm]{smooth} \end{figure} \centering% \textbf{\large\fontfamily{phv}\fontseries{b}% \selectfont \@lawtitle}% \medskip% } % Introduction \newcommand{\introduction}[1]{% \bigskip% \vbox{% PREAMBLE\medskip% \begin{flushleft} \noindent{#1}% \end{flushleft} }% } % About Articles \newcounter{BookCounter} \newcounter{BookSubCounter}[BookCounter] \newcounter{TitleCounter}[BookCounter] \newcounter{ChapterCounter}[TitleCounter] \newcounter{ParagraphCounter}[ChapterCounter] \newcounter{SubParagraphCounter}[ParagraphCounter] \newcounter{ArticleCounter}[BookCounter] \newcounter{ArticleSubCounter}[ArticleCounter] \newcommand{\book}[1]{% \newpage% \bigskip% \stepcounter{BookCounter}% \centering% \noindent{BOOK \Roman{BookCounter}}\newline\medskip% \textbf{#1}% } \renewcommand{\title}[1]{ \bigskip% \stepcounter{TitleCounter}% \needspace{15\baselineskip}% \centering% \noindent{TITLE \Roman{TitleCounter}}\newline\medskip% \textbf{#1}% } \newcommand{\chapter}[1]{% \bigskip% \stepcounter{ChapterCounter}% \needspace{10\baselineskip}% \centering% \noindent{CHAPTER \Roman{ChapterCounter}}\newline\medskip% \textbf{#1}% } \renewcommand{\paragraph}[1]{% \bigskip% \stepcounter{ParagraphCounter}% \needspace{10\baselineskip}% \noindent{Paragraph §\arabic{ParagraphCounter}.\arabic{SubParagraphCounter}}\newline\medskip% \textbf{#1}% } \renewcommand{\subparagraph}[1]{% \bigskip% \stepcounter{SubParagraphCounter}% \needspace{10\baselineskip}% \noindent{Paragraph §\arabic{ParagraphCounter}.\arabic{SubParagraphCounter}}\newline\medskip% \textbf{#1}% } \newcommand{\article}[2]{% \bigskip% \stepcounter{ArticleCounter}% \needspace{5\baselineskip}% \centering% \ifnum\value{BookCounter}>0 \textit{Article \arabic{BookCounter}:\arabic{ArticleCounter}}\newline\medskip% \else \textit{Article \arabic{ArticleCounter}}\newline\medskip% \fi \textbf{#1}\newline\smallskip% \begin{flushleft} \par{#2}% \end{flushleft} } \newcommand{\subarticle}[2]{% \bigskip% \stepcounter{ArticleSubCounter}% \needspace{5\baselineskip}% \centering% \ifnum\value{BookCounter}>0 \textit{Article \arabic{BookCounter}:\arabic{ArticleCounter}\alph{ArticleSubCounter}}\newline\medskip% \else \textit{Article \arabic{ArticleCounter}\alph{ArticleSubCounter}}\newline\medskip% \fi \textbf{#1}\newline\smallskip% \begin{flushleft} \par{#2}% \end{flushleft} }