summaryrefslogtreecommitdiff
path: root/texmf-dist/doc/latex/aeb-minitoc/examples/minitoc-bullets-para.tex
blob: 1a989b6c60cd71d9acae5b3b24671ad6139019e4 (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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
\documentclass{article}

% Use the nameref package to use the \Nameref command
\usepackage{nameref}
% if you use hyperref, nameref is automatically loaded
%\usepackage[linktocpage,colorlinks,bookmarksnumbered]{hyperref}

\usepackage{booktabs}
\usepackage{aeb-minitoc}

\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
\BTMLevel{subsubsection}

\renewcommand*{\thesubsubsection}{$\bullet$}
%\renewcommand*{\thesubsubsection}{\texorpdfstring{$\bullet$}{\textbullet}}
\renewcommand*{\theparagraph}{\protect\P}
\renewcommand*{\thesubparagraph}{\protect\P\protect\P}
% definitions for main toc
\makeatletter
\renewcommand\l@paragraph{\@dottedtocline{\sl@paragraph}{5.0em}{1em}} %{7.0em}{4.1em}}
\renewcommand\l@subparagraph{\@dottedtocline{\sl@paragraph}{6.0em}{1.5em}} %{7.0em}{4.1em}}
\renewcommand\@pnumwidth{.55em}

\renewcommand{\paragraph}{%
    \@startsection{paragraph}{4}{0pt}{6pt}{-3pt}{\bfseries}}
%\renewcommand*\l@paragraph{\@dottedtocline{4}{5.0em}{1em}} %{7.0em}{4.1em}}
\renewcommand{\subparagraph}{%
    \@startsection{subparagraph}{5}{\parindent}{6pt}{-3pt}{\bfseries}}
\def\@seccntformat#1{\csname the#1\endcsname\ }
\makeatother

\begin{minitocfmt}{\fulltocFmt}
\declaretocfmt{subsection}{\@W{1.5em}\@D{1.5em}}
\declaretocfmt{subsubsection}{\@W{1em}\@D{3em}}
\declaretocfmt{paragraph}{\@W{1em}\@D{4em}}
\declaretocfmt{subparagraph}{\@W{1.5em}\@D{5em}}
\end{minitocfmt}

%\TOCLevels{section}{subsubsubsection}
\begin{minitocfmt}{\minitocFmti}
\declaretocfmt{subsection}{\@W{2em}\@D{0em}}
\declaretocfmt{subsubsection}{\@W{1em}\def\@tocrmarg{1.55em\@plus 2em}\leftskip2em
  \rightskip\@tocrmarg {#1},\nobreak{ #2}\enspace\allowbreak}
\end{minitocfmt}


%\TOCLevels{subsubsection}{subparagraph}
\begin{minitocfmt}{\minitocFmtii}
\declaretocfmt{paragraph}{\@W{1em}\@D{0em}}
\declaretocfmt{subparagraph}{\@W{1.5em}\@D{1em}}
\end{minitocfmt}


\newcommand{\insMinitoc}[2][]{%
    \begin{center}#2
    \begin{minipage}[c]{0.8\linewidth}
    \insertminitoc[#1]
    \end{minipage}
    \end{center}
}

\newcommand{\insMinitoctab}[2][]{%
    \begin{center}#2
    \begin{tabular}{c}\toprule
    \begin{minipage}[c]{0.8\linewidth}
    \insertminitoc[#1]
    \end{minipage}\\ \bottomrule
    \end{tabular}
    \end{center}
}


\begin{document}

\fulltocFmt

\tableofcontents

\newpage

\section{First of Many}

Let's introduce a paragraph listing TOC in this section.

\insMinitoc{\TOCLevels{section}{subsubsection}\minitocFmti}

As an exercise in referencing a mini-toc outside its natural scope, we list
the paragraphs and subparagraphs of the section titled \Nameref{ss:fourth}.

\insMinitoctab[ss:fourth]{\TOCLevels{subsubsection}{subparagraph}\minitocFmtii}


\subsection{A subsection}

Content

\subsubsection{A subsubsection}

Content

\subsubsection{Another one, but let us make it a much longer entry}

Content

\subsection{To come to the aid}

Content


\subsubsection{A third subsubsection}

Content

\subsubsection{A fourth subsubsection}\mtoclabel{ss:fourth}

We list the named paragraphs and subparagraphs.


\insMinitoctab{\TOCLevels{subsubsection}{subparagraph}\minitocFmtii}


\paragraph{A paragraph} This is filler sentence, long enough to wrap around to the next line.


\subparagraph{A sub-paragraph}

Content

\subparagraph{A sub-paragraph}

Content

\subsubsection{A fifth subsub}

Content


\paragraph{A paragraph}

Content

\subsection{Of their country}

Content

\newpage

\section{Second to None}

\insMinitoc{\TOCLevels{section}{subsubsection}\minitocFmti}

\noindent
Content

\subsection{Peter Piper}

Content

\subsubsection{A subsubsection on the second page}

\insMinitoctab{\TOCLevels{subsubsection}{subparagraph}\minitocFmtii}

\noindent
Content

\paragraph{A paragraph of second section} \leavevmode\medskip

\noindent
Content

\subparagraph{A sub-paragraph of second section} \leavevmode\medskip

\noindent
Content

\paragraph{A paragraph of second section} \leavevmode\medskip

\noindent
Content

\subsubsection{Another one}

Content

\subsection{Picked a peck}

Content

\subsection{Of pickled peppers}

Content

\subsubsection{A third subsubsection}

Content

\subsubsection{A fourth}

Content

\subsection[How many pecks]{How many pecks of pickled peppers}

Content

\subsection{Did Peter Piper pick?}

Content


\end{document}