summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/cweb/src/test/section.w
blob: 13159e2fc6a149e3cf512ad56e4603c5b6dcd419 (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
% $Id: section.w,v 1.6 1995/11/07 14:14:25 schrod Exp $
%----------------------------------------------------------------------

% tests section levels and references.

\documentclass{cweb}

\begin{document}

\tableofcontents

\newpage

@** s title.
\label{main-sec}

Some text.

@* e title.

Some text.
And some references: Part~\ref{main-sec} and section~\ref{normal-sec}.

@*0 0 title.

Some text.

@*1 1 title.

Some text.

@*2 2 title.

Some text.

@*1 1 title.

Reset counter.

@*2 2 title.

Some text.

@ \label{normal-sec}
Doc.

@d def foo
@f def int

@c
for ( int i=1; i<10; i++ )
    @< do something @>

@
\end{document}