TransWikia.com

How can I remove text formatting for the title of tableofcontents that is used for chapter titles?

TeX - LaTeX Asked on February 13, 2021

I’m having trouble formatting the table of contents. I would like to change only the first page, but for the other pages it is not working.
Here is the example:enter image description here

Here’s the code

documentclass[oneside]{book}
fontchapterTextFont = Rothdn scaled 4500 relax
defsplitfirstchar#1#2sentinel{
  chapterTextFontuppercase{#1}LARGEuppercase{#2}}
defchapterText#1{splitfirstchar#1sentinel}
usepackage{titlesec}
titleformat{chapter}
  {normalfontLARGEbfseries}{Hugethechapter}{1em}{chapterText}

usepackage{etoolbox}
patchcmd{tableofcontents}
  {chapter*{contentsname}}
  {chapter*{chapterText{Contents}}}
  {}
  {}

patchcmd{listoffigures}
  {chapter*{listfigurename}}
  {chapter*{List of Figures}}
  {}
  {}
patchcmd{listoftables}
  {chapter*{listtablename}}
  {chapter*{List of Tables}}
  {}
  {}

begin{document}
begingroup
letclearpagerelax
renewcommand{contentsname}{expandafterchapterText{Contents}}
tableofcontents
listoftables
listoffigures
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
chapter{Testing title}
endgroup

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