summaryrefslogtreecommitdiff
path: root/macros/latex209/contrib/misc/voorbeelden.sty
blob: 8b59082b123580e661f6b9bd3c4482d57d1aa5e6 (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
%>I have  been using  LaTeX  for few   months and  I have problems  with
%>writing  linguistics examples.   I would like  them  to  be  numbered,
%>labelled, and displayed as follow:

%>(1) a. Bla, bla, bla...
%>    b. Bla, bla, bla...
%>    c. Bla, bla, bla...

%I wrote the following for someone wanting the same sort of thing.
%It is called `voorbeelden' (Dutch for examples), but the name
%could be changed. Use it as

%\begin{voorbeelden}
%\item \begin{voorbeelden} \item Bla, bla, bla ... 
%                          \item Bla, bla, bla ...
%                          \item Bla, bla, bla ...
%       \end{voorbeelden}
%\item More bla bla
%\end{voorbeelden}

%--------------------------------------------------------------------
%Werenfried Spit                            
%   R.J. v.d. Graafflaboratorium            +31-(0)30-53-2330                   
%   Postbus 80.000                          
%   3508 TA  Utrecht                        spit@fys.ruu.nl      
%   The Netherlands                         spit@hutruu51.bitnet    
%--------------------------------------------------------------------




                    
%%%%%%%%%cut here %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 

%%%%%%%%%%% voorbeeldomgeving %%%%%%%%
%% (C) Werenfried Spit 08-01-90
%%




\newenvironment{voorbeelden}{\thevoorbeelden}{\endthevoorbeelden}
\newcount\@vbdepth \@vbdepth = 0
\@definecounter{vbcounti}
\@definecounter{vbcountii}
\@definecounter{vbcountiii}
\@definecounter{vbcountiv}
\@addtoreset{vbcounti}{section}


\def\thevoorbeelden{\ifnum \@vbdepth >3 \@toodeep\else
      \advance\@vbdepth \@ne 
      \edef\@vbctr{vbcount\romannumeral\the\@vbdepth}\list
      {\csname label\@vbctr\endcsname}{\ifnum  \@vbdepth >1 \usecounter
        {\@vbctr}\else
      \@nmbrlisttrue\def
      \@listctr{vbcounti}\fi\def\makelabel##1{\hss\llap{##1}}}\fi}

\let\endthevoorbeelden =\endlist

\def\labelvbcounti{\bf\arabic{vbcounti}}
\def\thevbcounti{\arabic{vbcounti}}
\def\p@vbcountii{\thevbcounti}
\def\labelvbcountii{\bf\alph{vbcountii}}
\def\thevbcountii{\alph{vbcountii}}

\def\labelvbcountiii{\roman{vbcountiii}}
\def\thevbcountiii{\roman{vbcountiii}}
\def\p@vbcountiii{\thevbcounti(\thevbcountii)}
\def\labelvbcountiv{\alph{vbcountiv}}
\def\thevbcountiv{\alph{vbcountiv}}
\def\p@vbcountiv{\p@vbcountiii\thevbcountiii}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%cut here %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%