diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/juramisc/jurabase.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/juramisc/jurabase.sty | 124 |
1 files changed, 88 insertions, 36 deletions
diff --git a/Master/texmf-dist/tex/latex/juramisc/jurabase.sty b/Master/texmf-dist/tex/latex/juramisc/jurabase.sty index 6e7507ac3f9..2bf61ce3d4f 100644 --- a/Master/texmf-dist/tex/latex/juramisc/jurabase.sty +++ b/Master/texmf-dist/tex/latex/juramisc/jurabase.sty @@ -1,5 +1,5 @@ -% last change : 05.06.05 14:04 -% status : 0.16 beta +% last change : 15.11.2007 18:13:18 +% status : 0.17 beta % created : 2001/06/28 17:49:53 % % subject : jurabase package - basic jura commands @@ -9,9 +9,11 @@ % © Axel Sodtalbers \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{jurabase}[2005/06/05 V0.16 basic jura commands (AS)] - +\ProvidesPackage{jurabase}[2007/11/15 V0.17 basic jura commands (AS)] +% - some reworking of forwardandback environment code +% - patched code of \so (= \sob) command for proper function +% when soul package is used. %======================================== % @@ -42,7 +44,7 @@ %======================================== % -% Aufzaehlung gem. Juristerei +% enumeration in germin law docs % %======================================== @@ -64,14 +66,19 @@ %======================================== % -% forwardandback Umgebung +% forwardandback environment +% (maybe needs heavy reworking % %======================================== \newcounter{fabdepth} \setcounter{fabdepth}{-1} -\newboolean{boldfablabel} +\newif\if@infablist +\@infablistfalse + +\newif\if@boldfablabel +\@boldfablabelfalse \newcommand{\@jfablabel}{} @@ -94,22 +101,26 @@ \setlength{\fablabelsep}{\labelsep/2} \newenvironment{forwardandback}[1][III.\ ]% Begl. 464 - {\setcounter{fabdepth}{\z@}% + {\setcounter{fabdepth}{\@ne}% \settowidth{\fablabelwidth}{#1}% - \setboolean{boldfablabel}{false}% + \@boldfablabelfalse% + \@infablisttrue% \begin{@fablist}% \item % } - {\end{@fablist}} + {\end{@fablist}% + \@infablistfalse} \newenvironment{forwardandback*}[1][III.\ ] - {\setcounter{fabdepth}{\z@}% + {\setcounter{fabdepth}{\@ne}% \settowidth{\fablabelwidth}{#1}% - \setboolean{boldfablabel}{true}% + \@boldfablabeltrue% + \@infablisttrue% \begin{@fablist}% \item % } - {\end{@fablist}} + {\end{@fablist}% + \@infablistfalse} \iffalse @@ -129,36 +140,66 @@ \setlength{\rightmargin}{\z@}% \setlength{\topsep}{\z@}% \setlength{\parsep}{\z@}% - \ifthenelse{\boolean{boldfablabel}}% - {\renewcommand{\@jfablabel}{{\bfseries #1}}% - }% - % else - {\renewcommand{\@jfablabel}{#1}% - }% + \if@boldfablabel% + \renewcommand{\@jfablabel}{{\bfseries #1}}% + \else% + \renewcommand{\@jfablabel}{#1}% + \fi% \let\makelabel\@jfablabel% }% \item % } - + \newcommand{\jfrw}[1]{% - \end{list}% - \addtocounter{fabdepth}{\@ne}% - \@startforwardandbacklist{#1}% - } + \if@infablist + \end{list}% + \addtocounter{fabdepth}{\@ne}% + \@startforwardandbacklist{#1}% + \else% + \PackageError{jurabase}% + {\protect\jfrw\space used outside forwardandback environment}% + {Use the forwardandback environment!}% + \fi% +} \newcommand{\jsme}[1]{% - \end{list}% - \@startforwardandbacklist{#1}% - } + \if@infablist + \end{list}% + \@startforwardandbacklist{#1}% + \else% + \PackageError{jurabase}% + {\protect\jsme\space used outside forwardandback environment}% + {Use the forwardandback environment!}% + \fi% +} -\newcommand{\jbck}[1]{% - \end{list}% - \addtocounter{fabdepth}{\m@ne}% - \@startforwardandbacklist{#1}% - } +\newcommand{\jbck}[2][1]{% + \if@infablist + \end{list}% + \addtocounter{fabdepth}{-#1}% + \ifthenelse{\value{fabdepth}>0}% + {\@startforwardandbacklist{#2}}% + {\PackageError{jurabase}% + {You are on the lowest level, \MessageBreak + you cannot go back with \protect\jbck\space here.}% + {Use \protect\jsme\space or rearrange your forwardandback environment!}% + } + \else% + \PackageError{jurabase}% + {\protect\jbck\space used outside forwardandback environment}% + {Use the forwardandback environment!}% + \fi% +} -\newcommand{\jgoback}{\addtocounter{fabdepth}{\m@ne}} % check<0 ??? -\newcommand{\fabreset}{\setcounter{fabdepth}{\z@}} +\newcommand{\fabreset}{% + \if@infablist + \setcounter{fabdepth}{\@ne} + \else% + \PackageError{jurabase}% + {\protect\jreset\space used outside forwardandback environment}% + {Use the forwardandback environment!}% + \fi% +} %======================================== @@ -291,8 +332,19 @@ s.\,a.\xspace} \abkwarning% Siehe auch\xspace} -\newcommand*{\so}{% Abkuerzung fuer siehe oben -s.\,o.\xspace} +\AtBeginDocument{ + \@ifundefined{so}% Abkuerzung fuer siehe oben + {\newcommand*{\so}{s.\,o.\xspace}% + \let\sob\so% + }% + {\PackageWarning{jurabase}% + {Command \protect\so\space is already defined (maybe because you\MessageBreak + are using the 'soul' package).\MessageBreak + Please use the command \protect\sob\space to typeset\MessageBreak + the abbreviation 'siehe oben'!}% + \newcommand*{\sob}{s.\,o.\xspace}% + } +} \newcommand*{\So}{% Abkuerzung fuer Siehe oben \abkwarning% |