TransWikia.com

How I align my toc to the left when the chapter name is too big

TeX - LaTeX Asked by Gabriel Felipe Silva on June 24, 2021

This is my toc, I want to align the page number

enter image description here

documentclass{book}
usepackage[utf8]{inputenc}
usepackage{titletoc}




titlecontents{chapter}[5.3em]{vspace{0.1cm}}
{hfillthecontentslabel}
{}
{ |contentspage}[smallskip] 

titlecontents{part}[5.3em]{vspace{1cm}}
{hfillLargethecontentslabel}
{}
{Large  |contentspage}[vspace{1cm}]

begin{document}
tableofcontents

part{Primeira parte}

chapter{Um capitulo curto}
chapter{Um capitulo mais longo apara se ver como acontece com a tableofcontents. lorem ipsum lorem ipsum}
end{document}

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP