blob: b5d92b6bcb1674b43c583b5a6330664f1b8bd872 (
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
|
%% LaTeX2e file `etocsnippet-52-B.tex'
%% generated by the `filecontentshere' environment
%% from source `etoc' on 2019/11/17.
%%
\makeatletter
\newcommand*\firstsubname {} \newcommand*\lastsubname {}
\newcommand*\firstsubnumber {} \newcommand*\lastsubnumber {}
\newcommand*\thisspecialstatsaux{}
\newcommand*{\thisspecialstats}{%
\setcounter{mycounti}{0}%
\def\thisspecialstatsaux{%
\let\firstsubname\etocthelinkedname
\let\firstsubnumber\etocthelinkednumber
\def\thisspecialstatsaux{}}
\begingroup
\etocsetstyle{subsection} {} {}
{\thisspecialstatsaux
\stepcounter{mycounti}%
\let\lastsubname\etocthelinkedname
\let\lastsubnumber\etocthelinkednumber }
{Here are some statistics for this section. It contains \arabic{mycounti}
subsections. The name of its first is \emph{\firstsubname{}} and the
corresponding number is {\firstsubnumber}. The name of the last
subsection is \emph{\lastsubname{}} and its number is {\lastsubnumber}.}%
\etocsettocstyle {}{}
\etocinline
\etocsetnexttocdepth {1}%
\localtableofcontents % to be used within a section
\endgroup
}
\makeatother
|