introduce paragraphs and a law command

This commit is contained in:
erichhasl
2017-11-10 13:15:12 +01:00
parent 88978627e8
commit c0c97ca9c3
3 changed files with 37 additions and 6 deletions
+28 -3
View File
@@ -191,19 +191,38 @@
\setcounter{articleno}{1}
\makeatletter
% AN ARTICLE (LAW) ENVIRONMENT
\newenvironment{article}[1][nil]{
\begin{@paraorarticle}{#1}{Artikel}
}
{
\end{@paraorarticle}
}
\makeatother
\makeatletter
\newenvironment{lawparagraph}[1][nil]{
\begin{@paraorarticle}{#1}{§}
}
{
\end{@paraorarticle}
}
\makeatother
\makeatletter
% A GENERAL ARTICLE, PARAGRAPH, etc. ENVIRONMENT
\newenvironment{@paraorarticle}[2]{
\def\val{#1}
\def\null{nil}
\ifsquare
\subsubsection{Artikel {\thearticleno}}
\subsubsection{#2 {\thearticleno}}
\ifx\val\null
\else
\vspace*{-2mm}
\noindent\bracketed{\textbf{#1}}
\fi
\else
\subsubsection{Artikel {\thearticleno} \ifx\val\null\else(#1)\fi}
\subsubsection{#2 {\thearticleno} \ifx\val\null\else(#1)\fi}
\fi
\stepcounter{articleno}
\begin{enumerate}[(1)]
@@ -213,6 +232,12 @@
}
\makeatother
% LAW COMMAND
\newcommand{\law}[1]{
\section{#1}
\setcounter{articleno}{1}
}
% JUST TO MAKE CLEAR WHICH LEVEL TO USE
\newcommand{\segmentoflaw}[1]{\subsection{#1}}
+9 -3
View File
@@ -14,11 +14,11 @@
\mytitle
\section{Grundgesetz für die Bundesrepublik Deutschland vom 23. Mai 1949}
\law{Grundgesetz für die Bundesrepublik Deutschland vom 23. Mai 1949}
\lipsum[1]
\subsection{Das erste Gesetz}
\segmentoflaw{Das erste Gesetz}
\squarestyle
\begin{article}[Menschenwürde]
@@ -29,10 +29,16 @@
\end{article}
\parensstyle
\begin{article}[Menschenwürde]
\begin{lawparagraph}[Menschenwürde]
\item Die Würde des Menschen ist unantastbar. blablabl
blabla
\item Demokratie ist toll! Das ist Artikel \thearticleno
\end{lawparagraph}
\law{Weiteres Gesetz}
\begin{article}[Meinungsfreiheit]
\item Nur richtige Meinungen sind zulässig!
\end{article}
\section{Politische Bildung}
Binary file not shown.