summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/juramisc/jurabase.sty
blob: 2bf61ce3d4fa151a0e98793c192563666d7013c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
% 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
%
% to do         : 
%
% © Axel Sodtalbers

\NeedsTeXFormat{LaTeX2e}
\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.

%========================================
%               
% Erforderliche Pakete
%
%========================================

\RequirePackage{xspace}
\RequirePackage{calc}
\RequirePackage{ifthen}


%========================================
%               
%  Switch indent on and off
%
%========================================

\newlength{\oldparindent}
\setlength{\oldparindent}{\parindent}

\newcommand{\indentoff}{%
  \setlength{\parindent}{0pt}}
  
\newcommand{\resetindent}{%
  \setlength{\parindent}{\oldparindent}}


%========================================
%               
%  enumeration in germin law docs
%
%========================================

\iffalse

  I.
    2.
      c.
        dd.
\fi


\newcommand{\juraenum}{ 
  \renewcommand{\labelenumi}{\Roman{enumi}.}
  \renewcommand{\labelenumii}{\arabic{enumii}.}
  \renewcommand{\labelenumiii}{\alph{enumiii})}
  \renewcommand{\labelenumiv}{\alph{enumiv}\alph{enumiv})}}


%========================================
%               
%  forwardandback environment
%  (maybe needs heavy reworking
%
%========================================

\newcounter{fabdepth}
\setcounter{fabdepth}{-1}

\newif\if@infablist
\@infablistfalse

\newif\if@boldfablabel
\@boldfablabelfalse

\newcommand{\@jfablabel}{}

\newenvironment{@fablist}%
  {\begin{list}%
   {}%
   {\setlength{\leftmargin}{\z@}%
    \setlength{\rightmargin}{\z@}%
    \setlength{\itemindent}{\z@}%
    \setlength{\topsep}{\z@}%
    \setlength{\partopsep}{\z@}%
    \setlength{\parsep}{\z@}%
    \setlength{\itemsep}{\z@}%
   }%
  }
  {\end{list}}
  
\newlength{\fablabelwidth}
\newlength{\fablabelsep}
\setlength{\fablabelsep}{\labelsep/2}
  
\newenvironment{forwardandback}[1][III.\ ]% Begl. 464
  {\setcounter{fabdepth}{\@ne}%
   \settowidth{\fablabelwidth}{#1}%
   \@boldfablabelfalse%
   \@infablisttrue%
   \begin{@fablist}%
   \item %
  }
  {\end{@fablist}%
   \@infablistfalse}

\newenvironment{forwardandback*}[1][III.\ ]
  {\setcounter{fabdepth}{\@ne}%
   \settowidth{\fablabelwidth}{#1}%
   \@boldfablabeltrue%
   \@infablisttrue%
   \begin{@fablist}%
   \item %
  }
  {\end{@fablist}%
  \@infablistfalse}

\iffalse

 je groesser der Wert, durch den \labelsep geteilt wird,
 desto enger rueckt der Text an die Marke heran:
    \setlength{\fablabelsep}{\labelsep/16} 
 ist also 'dichter dran'.
\fi

\newcommand{\@startforwardandbacklist}[1]{%
  \begin{list}%
    {}%
    {\setlength{\labelwidth}{\fablabelwidth}%
     \setlength{\labelsep}{\fablabelsep}%
     \setlength{\leftmargin}{(\labelwidth+\labelsep)*\value{fabdepth}}%
     \setlength{\itemindent}{\z@}%
     \setlength{\rightmargin}{\z@}%
     \setlength{\topsep}{\z@}%
     \setlength{\parsep}{\z@}%
     \if@boldfablabel%
       \renewcommand{\@jfablabel}{{\bfseries #1}}%
     \else%
       \renewcommand{\@jfablabel}{#1}%
     \fi%
     \let\makelabel\@jfablabel%
    }%
    \item %
  }

\newcommand{\jfrw}[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]{%
  \if@infablist
    \end{list}%
    \@startforwardandbacklist{#1}%
  \else%
    \PackageError{jurabase}%
      {\protect\jsme\space used outside forwardandback environment}%
      {Use the forwardandback environment!}%
  \fi%
}
  
\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{\fabreset}{%
  \if@infablist
    \setcounter{fabdepth}{\@ne}
  \else%
    \PackageError{jurabase}%
      {\protect\jreset\space used outside forwardandback environment}%
      {Use the forwardandback environment!}%
  \fi%
}    


%========================================
%               
% Verschiedenes 
%
%========================================

\newcommand{\antrag}[2]{
  #1%
  \begin{list}%
    {}% Standardmarke, Kopka 77
    {\setlength{\topsep}{0pt}}% Listenerklaerung
    \item #2%
  \end{list}} 
  
  
%========================================
% bestimmte Auszeichnungen
%========================================

\newcommand*{\qll}[1]{\emph{#1}}%           fuer Quellen

\newcommand{\code}[1]{\texttt{#1}}%         fuer Computeranweisungen, tags o.ae.

\newcommand*{\marke}[1]{{\scshape #1}}%     Markennamen
% \texttrademark (TM) oder \textregistered (R) ?

\newcommand*{\firma}[1]{{\scshape #1}}%     Unternehmensbezeichnung

\newcommand*{\prdbez}[1]{%                  Produktbezeichnung
  {\scshape #1}%
  \index{#1}%
}

%========================================
% Abkuerzungen
%========================================

\iffalse
 Merke: Am Anfang eines Satzes in der Regel keine Abkuerzung
        'Zum Beispiel hat Goethe gesagt ...'  statt: 'Z.B. hat Goethe'
 (Siehe Duden S. 65; Standop 173) 
 
 Merke: *nachgestelltes* zB wird nicht abgekuerzt! (Standop 173)
\fi

\newcommand*{\abkwarning}%
  {\PackageWarning{jurabase}{Keine Abkuerzungen am Satzanfang! (obsoletes Kommando)}}

\newcommand*{\hM}{% Abkuerzung fuer herrschende Ansicht
h.\,M.\xspace}

\newcommand*{\aF}{% Abkuerzung fuer alte Fassung
a.\,F.\xspace}

\newcommand*{\aA}{% Abkuerzung fuer andere Ansicht
a.\,A.\xspace}

\newcommand*{\AnA}{% Abkuerzung fuer andere Ansicht - die wird zugelassen, weil ueblich!
A.\,A.\xspace}

\newcommand*{\aM}{% Abkuerzung fuer andere(r) Meinung 
a.\,M.\xspace}

\newcommand*{\aaO}{% Abkuerzung fuer am angegebenen Ort
a.\,a.\,O.\xspace}

\newcommand*{\aE}{% Abkuerzung fuer am Ende
a.\,E.\xspace}

\newcommand*{\iVm}{% Abkuerzung fuer in Verbindung mit
i.\,V.\,m.\xspace}

\newcommand*{\iHv}{% Abkuerzung fuer in Hoehe von
i.\,H.\,v.\xspace}

\newcommand*{\zB}{% Abkuerzung fuer z.B.
z.\,B.\xspace}

\newcommand*{\ZB}{%
\abkwarning% 
Zum Beispiel\xspace}

\newcommand*{\iS}{% Abkuerzung fuer i.S.
i.\,S.\xspace}

\newcommand*{\iue}{% Abkuerzung fuer im uebrigen (alte Rechtschreibung)
  \iflanguage{ngerman}%
    {\PackageWarning{jurabase}{I am using 'i."U' instead of 'i."u' (language=ngerman!)}%
     i.\,\"U.\xspace}%
    {i.\,\"u.\xspace}%
}

\newcommand*{\iUe}{% Abkuerzung fuer im Uebrigen (neue Rechtschreibung)
  \iflanguage{german}%
    {\PackageWarning{jurabase}{I am using 'i."u' instead of 'i."U' (language=german!)}%
     i.\,\"u.\xspace}%
    {i.\,\"U.\xspace}%
}

\newcommand*{\ia}{% Abkuerzung fuer im allgemeinen (alte Rechtschreibung)
  \iflanguage{ngerman}%
    {\PackageWarning{jurabase}{I am using 'i.A' instead of 'i.a' (language=ngerman!)}%
     i.\,A.\xspace}%
    {i.\,a.\xspace}%
}

\newcommand*{\iA}{% Abkuerzung fuer im Allgemeinen (neue Rechtschreibung)
  \iflanguage{german}%
    {\PackageWarning{jurabase}{I am using 'i.a' instead of 'i.A' (language=german!)}%
     i.\,a.\xspace}%
    {i.\,A.\xspace}%
}

\newcommand*{\iE}{% Abkuerzung fuer im Ergebnis
i.\,Erg.\xspace}

\newcommand*{\IE}{% Abkuerzung fuer Im Ergebnis
\abkwarning%
Im Ergebnis\xspace}

\newcommand*{\iR}{% Abkuerzung fuer i.R.
i.\,R.\xspace}

\newcommand*{\sa}{% Abkuerzung fuer siehe auch
s.\,a.\xspace}

\newcommand*{\Sa}{% Abkuerzung fuer Siehe auch
\abkwarning%
Siehe auch\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%
Siehe oben\xspace}

\newcommand*{\su}{% Abkuerzung fuer siehe unten
s.\,u.\xspace}

\newcommand*{\Su}{% Abkuerzung fuer Siehe unten
\abkwarning%
Siehe unten\xspace}

\newcommand*{\oae}{% Abkuerzung fuer o.ae.
o.\,\"a.\xspace} %???

\newcommand*{\oa}{% Abkuerzung fuer oben angegeben
o.\,a.\xspace}

\newcommand*{\og}{% Abkuerzung fuer oben genannten
o.\,g.\xspace}

\newcommand*{\mE}{% Abkuerzung fuer meines Erachtens
m.\,E.\xspace}

\newcommand*{\maW}{% Abkuerzung fuer mit anderen Worten
m.\,a.\,W.\xspace}

\newcommand*{\MaW}{% Abkuerzung fuer Mit anderen Worten
\abkwarning%
Mit anderen Worten\xspace}

\newcommand*{\mwN}{% Abkuerzung fuer m.w.N.
m.\,w.\,N.\xspace}

\newcommand*{\nF}{% Abkuerzung fuer neue Fassung
n.\,F.\xspace}

\newcommand*{\usw}{% Abkuerzung fuer u.s.w.
u.\,s.\,w.\xspace}

\newcommand*{\idR}{% Abkuerzung fuer in der Regel
i.\,d.\,R.\xspace}

\newcommand*{\ua}{% Abkuerzung fuer unter anderem
u.\,a.\xspace}

\newcommand*{\uae}{% Abkuerzung fuer u.ae.
u.\,\"a.\xspace} %???

\newcommand*{\uU}{% Abkuerzung fuer unter Umstaenden
u.\,U.\xspace}

\newcommand*{\vAw}{% Abkuerzung fuer von Amts wegen
v.\,A.\,w.\xspace}

\newcommand*{\va}{% Abkuerzung fuer vor allem
v.\,a.\xspace}

\newcommand*{\zT}{% Abkuerzung fuer zum Teil
z.\,T.\xspace}


%========================================
% Pfeile
%========================================

\newcommand*{\arr}{\(\rightarrow\)\space}
\newcommand*{\arrr}{\(\longrightarrow\)\space}
\newcommand*{\Arr}{\(\Rightarrow\)\space}
\newcommand*{\Arrr}{\(\Longrightarrow\)\space}
\newcommand*{\lrarr}{\(\leftrightarrow\)\space}

\newcommand*{\larr}{\(\leftarrow\)}
\newcommand*{\Larr}{\(\Leftarrow\)}

\newcommand*{\darr}{\(\downarrow\)}
\newcommand*{\Darr}{\(\Downarrow\)}

\endinput
% end of jurabase.sty