How To Adjust the Default Table of ContentsThis 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

}

2020-09-16_7-58-28.jpg

 

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}

2020-09-16_7-59-19.jpg

 

Font size

Set overall font size

<__math equation=”11″ assign=”font_size”__> – change 11 to your font size

2020-09-16_8-03-25.jpg

 

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”__>

2020-09-16_8-04-17.jpg

 

Indenting

Set space reserved for numbering

\newcommand{\tocitem}[7]{%

\noindent\begin{tabularx}{\textwidth}{b{#1}p{40pt}@{}X b{40pt}} – change bold, underlined number

2020-09-16_8-09-47.jpg

 

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).

2020-09-16_8-04-53.jpg

 

Set indent for each subsequent level

{<__math equation=”l*level” l=40 level=$Documents[ind].LevelNum__>pt}% – – change bold, underlined number

2020-09-16_8-14-17.jpg

 

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

2020-09-16_8-14-53.jpg

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