summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/method/method.dtx
blob: 13f6b38ec6e505ea93e27c52bc076d1f68626dca (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
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
% \iffalse Meta-Kommentar
%
% Copyright 1997, 1998, 1998, 1999
% Thomas Leineweber
% Lehrstuhl VI, Fachbereich Informatik,
% Universitaet Dortmund
% (leineweb@ls6.cs.uni-dortmund.de)
%
%        This package is based on work by J. Wahlmann and R. Garmann.
%        I took their package and enhanced it.
%
% Enhancements provided by
%   Jean-Pierre Drucbert
% 
% This is the documented macrocode for the generation and
% documentation of the package `method'.
%
% This file may be distributed under the terms of the LaTeX Project Public
% License, as described in lppl.txt in the base LaTeX distribution.
% Either version 1.0 or, at your option, any later version.
%
% \fi
%
% \CheckSum{787}
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%
% \title{\LaTeX-package for an easy declaration of functions and variables}
% \author{Thomas Leineweber}
% \maketitle
%
% \changes{v1.0}{????/??/??}{First version by J. Wahlmann}
% \changes{v1.1}{1995/10/17}{Facelifting by R. Garmann}
% \changes{v1.1}{1995/10/18}{Facelifting by R. Garmann}
% \changes{v1.1}{1995/10/19}{New environment data for variables}
% \changes{v1.1}{1995/10/19}{init and del for the environment data added}
% \changes{v1.1}{1995/10/25}{Test for the use of the special commands
% outside the environments}
% \changes{v1.2}{1997/06/25}{Change documentation to a dtx-file}
% \changes{v1.3}{1997/06/29}{Documentation changes}
% \changes{v1.6}{1999/01/04}{Documentation changes}
% \changes{v1.7}{1999/01/28}{Documentation changes}
% \changes{v1.7}{1999/01/28}{First parts for internationalization}
% \changes{v1.8}{1999/02/04}{Change standard to english}
% \changes{v2.0}{1999/02/05}{First public version with 
% internationalization and localization for english and german}
% \changes{v2.0b}{1999/03/25}{Change licencse to lppl}
%
% \section{Overview}
% The package method can be used to easily format method- and
% variabledeclarations with \LaTeX.
% It is based on work by J. Wahlmann and Robert Garmann.
% 
%\section{Usage}
% The package is used as usual:
%\begin{quote}
% |\usepackage[<language>]{method}|
%\end{quote}
% It defines two new environments: method and data. Method is used to
% typeset method-declarations, data for variable-declarations.
% At the moment the two options \textsf{english} and \textsf{german}
% are defined. With these options it is possible to select the language
% used to typeset the declarations. In the future some other languages
% will be added.
%
%\section{The environment method}
% \DescribeEnv{method}
% Within the environment
% method the following commands are defined:
%
%\begin{itemize}
%\item \DescribeMacro{\head}
%  \cs{head}\texttt{\{\emph{Header}\}:} The header of the method.
%\item \DescribeMacro{\para}
%  \cs{para}\texttt{\{\emph{Name}\}\{\emph{Description}\}:}
%  Name and description of a parameter.
%\item \DescribeMacro{\precond}
%  \cs{precond}\texttt{\{\emph{Precondition}\}:}
%  Description of a precondition of the method.
%\item \DescribeMacro{\descr}
%  \cs{descr}\texttt{\{\emph{Description}\}:}
%  Description of the method itself.
%\item \DescribeMacro{\postcond}
%  \cs{postcond}\texttt{\{\emph{postcondition}\}:}
%  Description of a postcondition of the method.
%\item \DescribeMacro{\error}
%  \cs{error}\texttt{\{\emph{Exception}\}:} Error and exceptions.
%\item \DescribeMacro{\return}
%  \cs{return}\texttt{\{\emph{Return value}\}:}
%  Description of the data returned by the method.
%\item \DescribeMacro{\see}
%  \cs{see}\texttt{\{\emph{where}\}:} Cross-References.
%\end{itemize}
%
%These commands have the following in common:
%\begin{itemize}
%\item All parameters are simple texts.
%\item The sequence of the commands inside the method-environment is
%  not relevant. The parts are typeset automatically.
%\item Up to 26 \cs{para}-commands are allowed inside a method
%  environment. When there are more, a warning will be issued und the
%  following parameters will be ignored.
%\item The header of the method and the parameters are typeset in a
%typewriter font.
%\item If the header is extremely long, it can be typeset in more
%lines with the following macros (an example is given further down):
%\begin{verbatim}
%       \headtabbed{<functionname>}     Name of the function
%       \headpara{<parametername>}      one or more parameter
%\end{verbatim}
%\end{itemize}
%
%\section{The environment data} \DescribeEnv{data}
% The environment data equals to the environment method. The macros 
% \cs{head}, \cs{descr} and \cs{see} can also be used inside a
% data-environment.
% Further macros inside a data-environment are:
%\begin{itemize}
%\item \DescribeMacro{\init}
%  \cs{init}\texttt{\{\emph{Info}\}:} Information about the generation
%  of the objekt.
%\item \DescribeMacro{\del}
%  \cs{del}\texttt{\{\emph{Info}\}:} Information about the release of
%  the object.
%\end{itemize}
%
%\section{Examples}
%In this section some examples for the usage of the environments
%method and data are shown.
%\begin{verbatim}     
%      \begin{method}
%       \head{int div(int a, int b, double \&c);}
%       \para{a}{dividend}
%       \para{b}{divisor}
%       \para{\&c}{result of the division}
%       \precond{no preconditions}
%       \descr{Divides \texttt{a} by \texttt{b} and gives the result
%       in \texttt{c}}
%       \postcond{no postconditions}
%       \error{no errors}
%       \return{\texttt{-1}, when  \texttt{b==0}, else \texttt{0}}
%       \see{your favourite mathematics book}
%      \end{method}
%
%      \begin{method}
%       \headtabbed{PrimObject(}
%         \headpara{const Matrix transformation,}
%         \headpara{AbstGeometry *geometry = 0,}
%         \headpara{MaterialApplication *material = 0,}
%         \headpara{AbstBumpMap *bumpMap = 0,}
%         \headpara{Distribution *distribution = 0);}
%       \para{transformation}{Transformation matrix}
%       \para{*geometry}{\ldots}
%       \descr{\ldots}
%      \end{method}
%
%      \begin{data}
%       \head{char *name}
%       \descr{Name of the user}
%      \end{data}
%      \begin{data}
%       \head{char *no}
%       \descr{Telephone-number of the user}
%       \see{Telephone Book}
%      \end{data}
%\end{verbatim}
%
% \StopEventually
%
% \section{Identification und documentation}
%
%    This package can only be used with \LaTeXe. Therefore make sure,
%    we use no other \TeX-format.
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
%    \end{macrocode}
%
%    Show the name of the package and its version
%    \begin{macrocode}
%<+method>\ProvidesPackage{method}
%<+method>              [1999/03/25 v2.0b
%<+method>               LaTeX-package for method- and
%<+method>               data-descriptions (TL)]
%    \end{macrocode}
%
%
%    We have a specialized class for the documentation.
%    \begin{macrocode}
%<*driver>
\documentclass[a4paper]{ltxdoc}
%    \end{macrocode}
%    Set the specific options for the documentation of the package.
%    \begin{macrocode}
\DoNotIndex{\",\\,\addtolength,\begin,\CodelineIndex,\CodelineNumbered}
\DoNotIndex{\def,\DocInput,\documentclass,\DoNotIndex,\EnableCrossrefs}
\DoNotIndex{\end,\fbox,\fboxrule,\hfill,\hspace,\ifcase,\or,\fi}
\DoNotIndex{\ifnum,\fi,\item,\itemindent,\labelsep,\labelwidth}
\DoNotIndex{\leftmargin,\listparindent,\NeedsTeXFormat,\newcommand}
\DoNotIndex{\newcount,\newcounter,\newenvironment,\newlength,\sloppy}
\DoNotIndex{\nopagebreak,\PackageError,\parbox,\parindent,\stepcounter}
\DoNotIndex{\PrintChanges,\PrintIndex,\ProvidesPackage,\RecordChanges}
\DoNotIndex{\setcounter,\setlength,\textbf,\texttt,\usepackage,\vspace}
\DoNotIndex{\settowidth,\textwidth,\topsep}
\CodelineNumbered
\CodelineIndex
\EnableCrossrefs
\RecordChanges
\setcounter{StandardModuleDepth}{1}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
%    \end{macrocode}
%    Give all details.
%    \begin{macrocode}
\begin{document}
\DocInput{method.dtx}
\PrintIndex
\PrintChanges
\end{document}
%</driver>
%    \end{macrocode}
%
%
%\section{Package internals}
%
% At the start of a method-environment the actual textwidth is read
% and saved for the layout of the description.
%
% The commands for the parts, namely \cs{head}, \cs{para},
% \cs{precond}, ..., define
% internal commands with the names \cs{meth@head}, \cs{meth@pa},
% \cs{meth@pb}, ..., \cs{meth@pz},
% \cs{meth@precond}, ...  which are defined with the actual
% parameters.
%
% At the end of a method-environment all these internal saved data is
% typeset in a (hopefully) fashionable way.

%
% \section{Helping commands}
% \begin{macro}{\meth@paranum}
% \begin{macro}{\meth@headparanum}
% The counter \cs{meth@paranum} counts the number of
% \cs{para}-commands within a
% method-environment:
%    \begin{macrocode}
\newcounter{meth@paranum}
%    \end{macrocode}
% The counter \cs{meth@headparanum} stores how many 
% \cs{headpara}-commands are given within a method-environment:
%    \begin{macrocode}
\newcounter{meth@headparanum}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
%\begin{macro}{\meth@totwid}
% The header will be typeset inside a framed minipage with a width of
% \cs{@totwid} (= \cs{textwidth} - 6mm):
%    \begin{macrocode}
\newlength{\meth@totwid}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\meth@indent}
%\begin{macro}{\meth@listdecl}
% \changes{v1.3}{1997/06/29}{Minimale Änderung.}
% The descriptions are organized as lists with the following parameters:
%    \begin{macrocode}
\def\meth@indent{3.5cm}
\def\meth@listdecl{\labelwidth3cm \labelsep0.5cm
                   \itemindent0cm \leftmargin\meth@indent
                   \topsep0cm \listparindent0cm}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%
% \begin{macro}{\meth@righttotwid}
% The right part of the list has a width of \cs{meth@righttotwid} 
% (= \cs{meth@totwid} - \cs{meth@indent}):
%    \begin{macrocode}
\newlength{\meth@righttotwid}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\meth@namewid}
%\begin{macro}{\meth@nameindent}
%\begin{macro}{\meth@rightnamewid}
% The following lengths are used for the macro \cs{headtabbed}:
%    \begin{macrocode}
\newlength{\meth@namewid}
\newlength{\meth@nameindent}
\newlength{\meth@rightnamewid}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%
%\section{Options}
%\begin{macro}{\textsee}
%\begin{macro}{\textinit}
%\begin{macro}{\textdel}
%\begin{macro}{\textreturn}
%\begin{macro}{\textprecond}
%\begin{macro}{\textpostcond}
%\begin{macro}{\textdescr}
%\begin{macro}{\texterror}%
% Now we have the option-processing. The option defines the language,
% which will be used to print the textual parts of the
% descriptions. At the moment only the languages english and german
% are defined.
%
% First, define the parts for german descriptions
%    \begin{macrocode}
\DeclareOption{german}{\def\textsee{Siehe auch:}
                       \def\textinit{Erzeugung:}
                       \def\textdel{Freigabe:}
                       \def\textreturn{R\"uckgabewert:}
                       \def\textprecond{Vorbed.:}
                       \def\textpostcond{Nachbed.:}
                       \def\textdescr{Beschreibung:}
                       \def\texterror{Ausnahmebeh.:}}

%    \end{macrocode}
% Now for the english descriptions:
%    \begin{macrocode}
\DeclareOption{english}{\def\textsee{see also:}
                       \def\textinit{initialisation:}
                       \def\textdel{disposal:}
                       \def\textreturn{return value:}
                       \def\textprecond{precondition:}
                       \def\textpostcond{postcondition:}
                       \def\textdescr{description:}
                       \def\texterror{exceptions:}}
%    \end{macrocode}
% \changes{v2.0a}{1999/02/18}{French localization (thanks to
% Jean-Pierre Drucbert)}
% The french descriptions, provided by Jean-Pierre Drucbert:
%    \begin{macrocode}
\DeclareOption{french}{\def\textsee{voir aussi:}
                       \def\textinit{initialisation:}
                       \def\textdel{lib\'eration:}
                       \def\textreturn{valeur de retour:}
                       \def\textprecond{pr\'econdition:}
                       \def\textpostcond{postcondition:}
                       \def\textdescr{description:}
                       \def\texterror{exceptions:}}
%    \end{macrocode}
% Make the english version the default version and process the options.
%    \begin{macrocode}
\ExecuteOptions{english}
\ProcessOptions\relax
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%
%\section{Error-detection}
%\begin{macro}{\meth@where}
%\begin{macro}{\meth@checkdoubleopen}
%\begin{macro}{\meth@checknotopen}
%\changes{v1.3}{1997/06/29}{Show error messages with \cs{PackageError}}
% The macro \cs{head} can be used both in the environments method and
% data. The following value is used to differentiate if method or data
% is active. If none is active, the counter is set to 99. Method sets
% it to 0, data to 1.
%    \begin{macrocode}
\newcount\meth@where  \meth@where=99
%    \end{macrocode}
% Now define the error messages:
%    \begin{macrocode}
\def\meth@checkdoubleopen{
  \ifnum\meth@where<99
     \PackageError{method}%
       {There is an method.sty-environment open!}%
       {}
  \fi
}
\def\meth@checknotopen{
  \ifnum\meth@where=99
     \PackageError{method}%
       {There is no method.sty-environment open!}%
       {}
  \fi
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%
%\section{The environment method}
%\begin{environment}{method}
% Now we define the environment method.
%    \begin{macrocode}
\newenvironment{method}
{
%    \end{macrocode}
% First we check, wether a method or data-environment is open. After
% that we set \cs{meth@where} to 0, which shows, that we are inside a
% method-environment.
%    \begin{macrocode}
  \meth@checkdoubleopen
  \meth@where=0
%    \end{macrocode}
% Define the lengths used for the typesetting of the method.
% \changes{v1.1}{????/??/??}{Abzug von \cs{meth@totwid} von 4~mm auf 6~mm erhhöht}
%    \begin{macrocode}
  \setlength{\meth@totwid}{\textwidth}
  \addtolength{\meth@totwid}{-6mm}
  \setlength{\meth@righttotwid}{\meth@totwid}
  \addtolength{\meth@righttotwid}{-\meth@indent}
%    \end{macrocode}
% The right column is not very wide. Therfore use \cs{sloppy}.
%    \begin{macrocode}
  \sloppy
%    \end{macrocode}
% All parts are defined to nothing.
%\changes{v1.5}{1998/01/19}{extend to 26 parameters}
%    \begin{macrocode}
  \def\meth@head{}
  \def\meth@headtabbed{}
  \setcounter{meth@headparanum}{0}
   \def\meth@hpa{}\def\meth@hpb{}\def\meth@hpc{}\def\meth@hpd{}
   \def\meth@hpe{}\def\meth@hpf{}\def\meth@hpg{}\def\meth@hph{}
   \def\meth@hpi{}\def\meth@hpj{}\def\meth@hpk{}\def\meth@hpl{}
   \def\meth@hpm{}\def\meth@hpn{}\def\meth@hpo{}\def\meth@hpp{}
   \def\meth@hpq{}\def\meth@hpr{}\def\meth@hps{}\def\meth@hpt{}
   \def\meth@hpu{}\def\meth@hpv{}\def\meth@hpw{}\def\meth@hpx{}
   \def\meth@hpy{}\def\meth@hpz{}
  \setcounter{meth@paranum}{0}
   \def\meth@pa{}\def\meth@pb{}\def\meth@pc{}\def\meth@pd{}
   \def\meth@pe{}\def\meth@pf{}\def\meth@pg{}\def\meth@ph{}
   \def\meth@pi{}\def\meth@pj{}\def\meth@pk{}\def\meth@pl{}
   \def\meth@pm{}\def\meth@pn{}\def\meth@po{}\def\meth@pp{}
   \def\meth@pq{}\def\meth@pr{}\def\meth@ps{}\def\meth@pt{}
   \def\meth@pu{}\def\meth@pv{}\def\meth@pw{}\def\meth@px{}
   \def\meth@py{}\def\meth@pz{}
  \def\meth@precond{}
  \def\meth@descr{}
  \def\meth@postcond{}
  \def\meth@error{}
  \def\meth@return{}
  \def\meth@see{}
%    \end{macrocode}
% Now for the end of the environment. The first line in a paragraph
% is not indented and a small space is made above the header.
%    \begin{macrocode}
}{
  \parindent0cm
  \vspace{2mm}
%    \end{macrocode}
% now a sorted list of all given parts inside the environment. The
% user has to see, that only one of 
%  \cs{meth@head} and \cs{meth@headtabbed} is used.
% \changes{v1.3}{1997/06/29}{Minimal change in the format of typesetting}%
% \changes{v1.5}{1998/01/19}{extend to 26 parameters}
%    \begin{macrocode}
  \meth@head\meth@headtabbed
  \nopagebreak[4]
  \meth@pa \meth@pb \meth@pc \meth@pd \meth@pe \meth@pf \meth@pg
  \meth@ph \meth@pi \meth@pj \meth@pk \meth@pl \meth@pm \meth@pn
  \meth@po \meth@pp \meth@pq \meth@pr \meth@ps \meth@pt \meth@pu
  \meth@pv \meth@pw \meth@px \meth@py \meth@pz
  \meth@precond
  \meth@descr
  \meth@postcond
  \meth@error
  \meth@return
  \meth@see
%    \end{macrocode}
% Now set \cs{meth@where} back to 99.
%    \begin{macrocode}
  \meth@where=99
%    \end{macrocode}
% This is the end of the definition of the environment method.
%    \begin{macrocode}
}
%    \end{macrocode}
%\end{environment}
%
%\section{The environment data}
%\begin{environment}{data}
% The environment data is nearly equivalent to the environment method.
% \changes{v1.3}{1997/06/29}{Change \cs{meth@totwid} from 4~mm to 6~mm.}
%    \begin{macrocode}
\newenvironment{data}
{
  \meth@checkdoubleopen
  \meth@where=1
  \setlength{\meth@totwid}{\textwidth}
  \addtolength{\meth@totwid}{-6mm}
  \sloppy
  \def\meth@head{}
  \def\meth@descr{}
  \def\meth@init{}
  \def\meth@del{}  
  \def\meth@see{}
}{
  \parindent0cm
  \vspace{2mm}
  \meth@head
  \nopagebreak
  \meth@descr
  \meth@init
  \meth@del
  \meth@see
  \meth@where=99
}
%    \end{macrocode}
%\end{environment}
%
%\section{Macros for the parts inside the environments}
%
% The definitions for the parts of the environments data and method
% \subsection{\cs{head}}
% \begin{macro}{\head}
% The macro \cs{head} is used to typeset the header of the method or
% the definition of the variable.
%    \begin{macrocode}
\newcommand{\head}[1]{
%    \end{macrocode}
% First check, if the environment is active at the moment.
%    \begin{macrocode}
  \meth@checknotopen
%    \end{macrocode}
% If \cs{meth@where} is set to 0, the environment method is active.
%    \begin{macrocode}
  \ifnum\meth@where=0
    \def\meth@head{
%    \end{macrocode}
% The code to typeset the header.
% \changes{v1.3}{1997/06/29}{\cs{tt} replaced by \cs{texttt}.}
%    \begin{macrocode}
      {\setlength{\fboxrule}{0.2mm}%
       \fbox{\parbox{\meth@indent}{\hfill}
             \begin{minipage}{\meth@righttotwid}
               {\parindent-\meth@indent \texttt{#1}}
             \end{minipage}
            }}
    }
  \fi%
%    \end{macrocode}
% If \cs{meth@where} is set to 1, the environment data is active.
%    \begin{macrocode}
  \ifnum\meth@where=1
    \def\meth@head{
%    \end{macrocode}
% The code to typeset the header.
% \changes{v1.3}{1997/06/29}{\cs{tt} replaced by \cs{texttt}.}
%    \begin{macrocode}
      {\setlength{\fboxrule}{0.1mm}%
       \fbox{\hspace{2mm}\begin{minipage}{\meth@totwid}
         \texttt{#1}
       \end{minipage}}
      }
    }
  \fi%
}
%    \end{macrocode}
% \end{macro}
%
% \subsection{\cs{headtabbed}}
% \begin{macro}{\headtabbed}
% \cs{headtabbed} takes care of the first line, which will be
% formatted in the header of the method and defines the macro
% \cs{meth@headtabbed}, which does the output.
% \changes{v1.3}{1997/06/29}{\cs{tt} replaced by \cs{texttt}.}
%    \begin{macrocode}
\newcommand{\headtabbed}[1]{
  \meth@checknotopen
  \def\meth@headtabbed{
     \setlength{\fboxrule}{0.2mm}%
     \settowidth{\meth@namewid}{\texttt{#1}}%
     \setlength{\meth@rightnamewid}{\meth@totwid}
     \addtolength{\meth@rightnamewid}{-\meth@namewid}
     \setlength{\meth@nameindent}{\meth@namewid}
     \addtolength{\meth@nameindent}{2mm}
     \fbox{\parbox{\meth@nameindent}{\hfill}%
             \begin{minipage}{\meth@rightnamewid}
                \parindent-\meth@namewid
                \texttt{#1\meth@hpa
                  \meth@hpb
                  \meth@hpc
                  \meth@hpd
                  \meth@hpe
                  \meth@hpf
                  \meth@hpg
                  \meth@hph
                  \meth@hpi
                  \meth@hpj
                  \meth@hpk
                  \meth@hpl
                  \meth@hpm
                  \meth@hpn
                  \meth@hpo
                  \meth@hpp
                  \meth@hpq
                  \meth@hpr
                  \meth@hps
                  \meth@hpt
                  \meth@hpu
                  \meth@hpv
                  \meth@hpw
                  \meth@hpx
                  \meth@hpy
                  \meth@hpz}%
             \end{minipage}%
          }
  }
}
%    \end{macrocode}
% \end{macro}
%
% \subsection{\cs{headpara}}
% \begin{macro}{\meth@defheadpara}
% \changes{v1.5}{1997/01/19}{extend to 26 parameters}
% \cs{meth@defheadpara} searches for the first empty macro of
%  \cs{meth@hpa}, \ldots, \cs{meth@hpz}. In this macro the new line can
%  be saved. This macro is used by \cs{headpara}.
%    \begin{macrocode}
\newcommand{\meth@defheadpara}[1]{
  \ifcase\value{meth@headparanum}
    \def\meth@hpa{#1}  \or
    \def\meth@hpb{\\#1}  \or
    \def\meth@hpc{\\#1}  \or
    \def\meth@hpd{\\#1}  \or
    \def\meth@hpe{\\#1}  \or
    \def\meth@hpf{\\#1}  \or
    \def\meth@hpg{\\#1}  \or
    \def\meth@hph{\\#1}  \or
    \def\meth@hpi{\\#1}  \or
    \def\meth@hpj{\\#1}  \or
    \def\meth@hpk{\\#1}  \or
    \def\meth@hpl{\\#1}  \or
    \def\meth@hpm{\\#1}  \or
    \def\meth@hpn{\\#1}  \or
    \def\meth@hpo{\\#1}  \or
    \def\meth@hpp{\\#1}  \or
    \def\meth@hpq{\\#1}  \or
    \def\meth@hpr{\\#1}  \or
    \def\meth@hps{\\#1}  \or
    \def\meth@hpt{\\#1}  \or
    \def\meth@hpu{\\#1}  \or
    \def\meth@hpv{\\#1}  \or
    \def\meth@hpw{\\#1}  \or
    \def\meth@hpx{\\#1}  \or
    \def\meth@hpy{\\#1}  \or
    \def\meth@hpz{\\#1}  \or
    \PackageError{method}%
       {Too many parameters in method-environment !}{}
  \fi
  \stepcounter{meth@headparanum}
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\meth@defheadpara}
% Now for the definition of the macro \cs{headpara}. Check first, if
% the correspondent environment is open. Then use the macro
% \cs{meth@defheadpara}.
%    \begin{macrocode}
\newcommand{\headpara}[1]{
  \meth@checknotopen
  \meth@defheadpara{#1}
}
%    \end{macrocode}
% \end{macro}
%
% \subsection{\cs{para}}
% \begin{macro}{\meth@defpara}
%    \begin{macrocode}
\newcommand{\meth@defpara}[1]{
  \ifcase\value{meth@paranum}
    \def\meth@pa{#1}  \or
    \def\meth@pb{#1}  \or
    \def\meth@pc{#1}  \or
    \def\meth@pd{#1}  \or
    \def\meth@pe{#1}  \or
    \def\meth@pf{#1}  \or
    \def\meth@pg{#1}  \or
    \def\meth@ph{#1}  \or
    \def\meth@pi{#1}  \or
    \def\meth@pj{#1}  \or
    \def\meth@pk{#1}  \or
    \def\meth@pl{#1}  \or
    \def\meth@pm{#1}  \or
    \def\meth@pn{#1}  \or
    \def\meth@po{#1}  \or
    \def\meth@pp{#1}  \or
    \def\meth@pq{#1}  \or
    \def\meth@pr{#1}  \or
    \def\meth@ps{#1}  \or
    \def\meth@pt{#1}  \or
    \def\meth@pu{#1}  \or
    \def\meth@pv{#1}  \or
    \def\meth@pw{#1}  \or
    \def\meth@px{#1}  \or
    \def\meth@py{#1}  \or
    \def\meth@pz{#1}  \or
    \PackageError{method}%
    {Too many parameters in method.sty-environment !}
  \fi
  \stepcounter{meth@paranum}
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\para}
% Here the definition for \cs{para}:
% \changes{v1.3}{1997/06/29}{\cs{tt} replaced by \cs{texttt}.}
% \changes{v1.4}{1997/06/29}{insert braces, which were missing before}
%    \begin{macrocode}
\newcommand{\para}[2]{
  \meth@checknotopen
  \meth@defpara{\begin{list}{\texttt{#1}}{\meth@listdecl}
    \item #2    
    \end{list}}
}
%    \end{macrocode}
% \end{macro}
%
% \subsection{The other macros}
% \begin{macro}{\precond}
% The other macros are very simple. The create a list-environment and
% put their data inside of this list.
% \changes{v1.3}{1997/06/29}{\cs{bf} replaced by \cs{textbf}.}
% \changes{v1.4}{1997/06/29}{insert missing braces.}
%    \begin{macrocode}
\newcommand{\precond}[1]{
  \meth@checknotopen
  \def\meth@precond{\begin{list}{\textbf{\textprecond}}{\meth@listdecl}
    \item #1
    \end{list}}
}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\postcond}
% \changes{v1.3}{1997/06/29}{\cs{bf} replaced by \cs{textbf}.}
% \changes{v1.4}{1997/06/29}{insert missing braces.}
%    \begin{macrocode}
\newcommand{\postcond}[1]{
  \meth@checknotopen
  \def\meth@postcond{\begin{list}{\textbf{\textpostcond}}{\meth@listdecl}
      \item #1
    \end{list}}
}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\descr}
% \changes{v1.3}{1997/06/29}{\cs{bf} replaced by \cs{textbf}.}
% \changes{v1.4}{1997/06/29}{insert missing braces.}
%    \begin{macrocode}
\newcommand{\descr}[1]{
  \meth@checknotopen
  \def\meth@descr{\begin{list}{\textbf{\textdescr}}{\meth@listdecl}
      \item #1
    \end{list}}
}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\error}
% \changes{v1.3}{1997/06/29}{\cs{bf} replaced by \cs{textbf}.}
% \changes{v1.4}{1997/06/29}{insert missing braces.}
%    \begin{macrocode}
\newcommand{\error}[1]{
  \meth@checknotopen
  \def\meth@error{\begin{list}{\textbf{\texterror}}{\meth@listdecl}
      \item #1
    \end{list}}
}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\return}
% \changes{v1.3}{1997/06/29}{\cs{bf} replaced by \cs{textbf}.}
% \changes{v1.4}{1997/06/29}{insert missing braces.}
%    \begin{macrocode}
\newcommand{\return}[1]{
  \meth@checknotopen
  \def\meth@return{\begin{list}{\textbf{\textreturn}}{\meth@listdecl}
    \item #1
    \end{list}}
}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\see}
% \changes{v1.3}{1997/06/29}{\cs{bf} replaced by \cs{textbf}.}
% \changes{v1.4}{1997/06/29}{insert missing braces.}
%    \begin{macrocode}
\newcommand{\see}[1]{
  \meth@checknotopen
  \def\meth@see{\begin{list}{\textbf{\textsee}}{\meth@listdecl}
    \item #1
    \end{list}}
}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\init}
% \changes{v1.3}{1997/06/29}{\cs{bf} replaced by \cs{textbf}.}
% \changes{v1.4}{1997/06/29}{insert missing braces.}
%    \begin{macrocode}
\newcommand{\init}[1]{
  \meth@checknotopen
  \def\meth@init{\begin{list}{\textbf{\textinit}}{\meth@listdecl}
    \item #1
    \end{list}}
}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\del}
% \changes{v1.3}{1997/06/29}{\cs{bf} replaced by \cs{textbf}.}
% \changes{v1.4}{1997/06/29}{insert missing braces.}
%    \begin{macrocode}
\newcommand{\del}[1]{
  \meth@checknotopen
  \def\meth@del{\begin{list}{\textbf{\textdel}}{\meth@listdecl}
    \item #1
    \end{list}}
}
%    \end{macrocode}
%\end{macro}
% \Finale
%
\endinput
%
%
% \Finale
%
\endinput