-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathetocsnippet-19.txt
72 lines (64 loc) · 1.92 KB
/
etocsnippet-19.txt
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
%% -*- mode: latex -*-
%% LaTeX2e file `etocsnippet-19.tex'
%% generated by the `filecontentsdef' environment
%% from source `etoc' on 2024/01/12.
%% EDITED: added chapter style!
\begingroup
\etocglobaldefs % necessary for \etocname etc... to survive &
\makeatletter
% hack into longtable \hline to avoid annoying (here) stray lines at top
\def\LT@@hline{%
\ifx\@let@token\hline
\global\let\@gtempa\@gobble
\global\let\@gtempb\@firstofone %%% ADDED
\gdef\LT@sep{\penalty-\@medpenalty\vskip\doublerulesep}%
\else
\global\let\@gtempa\@empty
\global\let\@gtempb\@gobble %%% ADDED
\gdef\LT@sep{\penalty-\@lowpenalty\vskip-\arrayrulewidth}%
\fi
\ifnum0=`{\fi}%
\multispan\LT@cols
\unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr
\@gtempb{% %%% ADDED
\noalign{\LT@sep}%
\multispan\LT@cols
\unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr
\noalign{\penalty\@M}%
}% %%% ADDED
\@gtempa}
\makeatother
% observe the locations of the \\
\etocsetlinestyle{part}
{}
{}
{\\\hline\multicolumn{3}{c}{\bfseries\vrule height6ex depth3ex width0pt
\makebox[0pt]{\etocifnumbered{\etocnumber. }{}\etocname}}}
{}
\etocsetlinestyle{chapter}
{}
{\\\hline\hline}
{\multicolumn{3}{|c|}{\etocname}}
{}
\etocsetlinestyle{section}
{}
{\etociffirst{\\\hline}{\\}}
{\etocnumber&\etocname &\etocpage }
{}
\etocsetlinestyle{subsection}
{}
{\\}
{&\makebox[1cm][c]{\etocnumber}%
\parbox[t]{\dimexpr6cm-\tabcolsep\relax}{\sloppy\itshape\etocname\strut}%
&\itshape\etocpage }
{}
\etocsettocstyle
{\hypersetup{hidelinks}%
\begin{longtable}{|>{\bfseries}c|p{7cm}|r|}
\hline
\multicolumn{3}{|c|}{\Large\bfseries\strut\strut TABLE OF CONTENTS}%
}
{\\\hline\end{longtable}}
\etocsetnexttocdepth {subsection}
\tableofcontents
\endgroup