From 173ab802b9d9145f823dbda41a1c6db4213a835a Mon Sep 17 00:00:00 2001 From: erichhasl Date: Thu, 9 Nov 2017 19:36:28 +0100 Subject: [PATCH] add new description of article option --- texed/sasbase.cls | 35 +++++++++++++++++++++++++++++++++-- texed/test.tex | 11 ++++++++++- texed/verfassung.pdf | Bin 144528 -> 144528 bytes texed/verfassung.tex | 5 +++++ 4 files changed, 48 insertions(+), 3 deletions(-) diff --git a/texed/sasbase.cls b/texed/sasbase.cls index 0b00d19..d4524d6 100644 --- a/texed/sasbase.cls +++ b/texed/sasbase.cls @@ -17,6 +17,7 @@ \RequirePackage{fancyhdr} \RequirePackage{bm} \RequirePackage{roboto} +\RequirePackage{varwidth} % SET PAGE GEOMETRY \geometry{ @@ -85,7 +86,14 @@ \titleformat {\subsection} {\centering\normalfont\bf} - {\thesection} + {\thesubsection} + {1em} + {} + +\titleformat + {\subsubsection} + {\normalfont\bf} + {\thesubsubsection} {1em} {} @@ -172,21 +180,44 @@ % DEFINITION OF USEFUL MACROS % --------------------------- +% OPTION TO ENABLE SQUARE BRACKETS OR ADDITIONS TO THE ARTICLES NAME +\newif\ifsquare\squarefalse + +\newcommand{\squarestyle}{\squaretrue} +\newcommand{\parensstyle}{\squarefalse} + % ARTICLE COUNTER \newcounter{articleno} \setcounter{articleno}{1} +\makeatletter % AN ARTICLE (LAW) ENVIRONMENT \newenvironment{article}[1][nil]{ \def\val{#1} \def\null{nil} - \subsubsection{Artikel {\thearticleno} {\ifx\val\null\else(#1)\fi}} + \ifsquare + \subsubsection{Artikel {\thearticleno}} + \ifx\val\null + \else + \vspace*{-2mm} + \noindent\bracketed{\textbf{#1}} + \fi + \else + \subsubsection{Artikel {\thearticleno} \ifx\val\null\else(#1)\fi} + \fi \stepcounter{articleno} \begin{enumerate}[(1)] } { \end{enumerate} } +\makeatother % JUST TO MAKE CLEAR WHICH LEVEL TO USE \newcommand{\segmentoflaw}[1]{\subsection{#1}} + +% TEXT IN SQUARE BRACKETS +\newcommand{\bracketed}[1]{$\left[\varwidth{\linewidth}#1\endvarwidth\right]$} + +% INCREASE HEIGHT OF BRACKETS +\setlength\delimitershortfall{-2pt} diff --git a/texed/test.tex b/texed/test.tex index a152b39..6447779 100644 --- a/texed/test.tex +++ b/texed/test.tex @@ -11,13 +11,22 @@ \mytitle + \section{Grundgesetz für die Bundesrepublik Deutschland vom 23. Mai 1949} \lipsum[1] \subsection{Das erste Gesetz} -\begin{article}{1} +\squarestyle +\begin{article}[Hallo] + \item Die Würde des Menschen ist unantastbar. blablabl + blabla + \item toll +\end{article} + +\parensstyle +\begin{article}[Hallo] \item Die Würde des Menschen ist unantastbar. blablabl blabla \item toll diff --git a/texed/verfassung.pdf b/texed/verfassung.pdf index cef46318aa2e6af7a6c6886b34521fc300787705..450e7847c583f633e75f972f6b424d3d4cf5eff4 100644 GIT binary patch delta 113 zcmbR6l4HV4j)oS-ElkHX*ewk$Of5`Jr=Qbcl7Vryf7D<~;c_-|G&DAFG%`0dFfg+) ha4|D6H8n9ZaH9{~6<9c=&r delta 113 zcmbR6l4HV4j)oS-ElkHX*ewhUjLnRUr=Qbcl7Vryf7D<~;c_;2b~QCNFtl*8Fn4k^ hGBGr;GH9{>iJ9q9l7 diff --git a/texed/verfassung.tex b/texed/verfassung.tex index d46e337..fe8b35f 100644 --- a/texed/verfassung.tex +++ b/texed/verfassung.tex @@ -12,6 +12,11 @@ \mytitle +% OPTIONAL +%\squarestyle +% OR +\parensstyle + \section{Verfassung von Goethopia} \segmentoflaw{Präambel}