summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/eplain/base/test/contents.tex
blob: 6c3159da81022ba3fd203fbb607122bea134abf8 (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
% This file is public domain.
%
\input eplain

\newcount\subsectionno

\def\tocsubsectionentry#1#2#3{\leftline{Subsection #2.~#1\dotfill#3}}
\let\tocentry = \tocsubsectionentry

\readtocfile

\subsectionno = 13

\writetocentry{chapter}{beginning}
\writetocentry{section}{subbeginning $\sin$}

\advance\subsectionno by 1
\writenumberedtocentry{subsection}{Subsection $\cos$ \#14}
  {\the\subsectionno}

\advance\subsectionno by 1
\writenumberedtocentry{subsection}{Subsection \#15}{\the\subsectionno}

% This doesn't expand \the\subsectionno -- only the first token gets
% expanded. Its output line starts with \tocentry.
\writenumberedtocentry{}{A toc entry}{1{\the\subsectionno}}

%\loggingall

\bye