This is an updated article on how to adjust and customize the Table of Contents so that you can meet whatever specifications your EPC customers desire for every project.
As we’ll see below, you can customize the Table right down to the font size you use.
The LaTeX template can be adjusted by changing some of the values in the template.
Sections
Add vertical space before and after each section
\newcommand{\bolditem}[7]{%
\\[10pt] – before section
\tocitem{#1}{#2}{#3}{\textbf{#4}}{\textbf{#5}}{\textbf{#6}}{\textbf{#7}}
\\[5pt] – after section
}
Remove bolding from section names
remove {\textbf} in following part:
\newcommand{\bolditem}[7]{%
\\[10pt]
\tocitem{#1}{#2}{#3}{\textbf{#4}}{\textbf{#5}}{\textbf{#6}}{\textbf{#7}}
\\[5pt]
}
REPLACE EXACTLY:
\tocitem{#1}{#2}{#3}{\textbf{#4}}{\textbf{#5}}{\textbf{#6}}{\textbf{#7}}
WITH:
\tocitem{#1}{#2}{#3}{#4}{#5}{#6}{#7}
Font size
Set overall font size
<__math equation=”11″ assign=”font_size”__> – change 11 to your font size
Decrease font size for each subsequent level:
<__math equation=”11″ assign=”font_size”__> – change to
<__math equation=”11-x” x=$Documents[ind].LevelNum assign=”font_size”__>
Indenting
Set space reserved for numbering
\newcommand{\tocitem}[7]{%
\noindent\begin{tabularx}{\textwidth}{b{#1}p{40pt}@{}X b{40pt}} – change bold, underlined number
Warning:
Make sure that the indent is large enough to contain all numbers at the deepest level.
If there is not enough space for the entire number, the layout will become distorted. See below – the space allocated for the indent (section name is “section”) is not sufficient for the 4 digits. As a result, the numbering shows BELOW the section name (no room beside it).
Set indent for each subsequent level
{<__math equation=”l*level” l=40 level=$Documents[ind].LevelNum__>pt}% – – change bold, underlined number
Match the indent to the previous header
This is just a matter of having the same value for the previous 2 settings: Change the spacing reserved for numbering and Change the indent for each subsequent level
Can’t find the settings?
If you can’t find the setting mentioned below, reach out to support. You may not have the most recent version of the default TOC tempalte.
Please also consider checking out this helpful article on configuring TOCs: Configuring The Table of Contents In DocBoss