summaryrefslogtreecommitdiff
path: root/macros/generic/expkv-bundle/preamble-examples.tex
blob: 5a146d9eb6b649729b0c191b296de4102687d3c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
\makeatletter
\newcounter{example}[section]
\newcommand*\example[1]
  {%
    \par\smallskip
    \refstepcounter{example}%
    \addcontentsline{exs}{example}{#1}%
    \noindent\textit{Example:} \ignorespaces
  }
\newcommand*\l@example{\@dottedtocline{0}{1.5em}{2.3em}}
\newcommand\listofexamples
  {%
    \addsec{List of Examples}%
    \@starttoc{exs}%
  }
\makeatother