summaryrefslogtreecommitdiff
path: root/texmf-dist/doc/latex/aeb-minitoc/examples/minitoc-art-star.tex
blob: ce1dd3217b9c6b81c1559a4e3d4b0cc708e1a1cf (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
\documentclass{article}

%\usepackage{xcolor}
\usepackage[linktocpage,colorlinks]{hyperref}
\usepackage{booktabs}
\usepackage[!nominitocs]{aeb-minitoc}

\setcounter{secnumdepth}{3}

\begin{minitocfmt}{\minitocFmt}
\declaretocfmt{subsection}{\@W{1.55em}\@D{0em}\@F{\bfseries}}
\declaretocfmt{subsection*}{\@W{0em}\@D{1.55em}\@F{\bfseries}}
\declaretocfmt{subsubsection}{\@W{2.5em}\@D{1.55em}\@P{\color{red}}\@F{\color{blue}}}
\declaretocfmt{subsubsection*}{\@W{0em}\@D{4.05em}\@F{\color{blue}}}
%\declaretocfmt{subsubsection*}{\@W{0em}\@D{4.05em}\@P{\color{red}}\@F{\color{blue}}}
\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}

\tableofcontents

\newpage


\section{First of Many}

The topic headings of this section are listed below.

\insMinitoctab{\minitocFmt}

For long section headings, for them to wrap around, we need to take the hyperref option
\texttt{linktocpage}, unless pdflatex or xelatex are used.

\subsection{Now is the time for all good men to come to the aid  of their country, so it has been said}

\addtocontents{toc}{\protect\vspace{1em}\hfill
    Vertical Space\hfill\protect\vspace{1em}}

\subsection{For all good men}

Content

\subsubsection{A subsubsection, let's make it a long subsection to wrap around}

Content

\subsubsection{Another one}

Content

\subsection{To come to the aid}

Content

\subsubsection{A third subsubsection}

Content

\subsubsection{A fourth}

Content

\subsection{Of their country}

Content


\addcontentsline{toc}{subsection}{Hello world! (subsection*)} %\protect\numberline{}
\subsection*{Hello world! (section*)}

\addcontentsline{toc}{subsubsection}{Hello world! (subsubsection*)} %\protect\numberline{}
\subsubsection*{Hello world! (subsubsection*)}


\newpage

\section{Second to None}

\insMinitoctab{\minitocFmt}


Content

\subsection{Peter Piper}

Content

\subsubsection{A subsubsection}

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}