TransWikia.com

Latex. tableofcontents with titlesec package, add extra mark after list of content

TeX - LaTeX Asked by Musulmon Lolayev on April 12, 2021

documentclass[a4paper,14pt,twoside]{extreport}

begin{document}
    tableofcontents
    chapter{First chapter}
    section{First section}
    section{Second section}
    chapter{Second chapter}
    section{First section}
    section{Second section}
end{document}

The result of tableofcontents of standard latex command creates contents like this:
enter image description here

But I like add some extra words (marks) which are in circle before (after) like this:

enter image description here

One Answer

One possible approach using the tocloft package:

documentclass[a4paper,14pt,twoside]{extreport}

usepackage{tocloft}
renewcommand*{cftsecpresnum}{S}


begin{document}
    tableofcontents
    chapter{First chapter}
    section{First section}
    section{Second section}
    chapter{Second chapter}
    section{First section}
    section{Second section}
end{document}

enter image description here

Correct answer by samcarter_is_at_topanswers.xyz on April 12, 2021

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