How to get ToC widther? 1a. How to get ToC higher? [more space under the chapter, before a next chapter]
How to add dots next to the chapters?
How to put on odd sides name of current chapter but without a chapter -- just number of the chapter and name of it on the right side [on left -- page number], and on the even side title of a book [on right -- page number]. Both with \MakeUppercase but with a smaller font.
\documentclass[openany, 10pt]{book} \usepackage{xcolor} \usepackage[explicit]{titlesec} \usepackage[dotinlabels]{titletoc} \newlength\BoxWd \setlength\BoxWd{1cm} \newlength\Aux % chapter tiltes formatting \titleformat{\chapter}[display] {\normalfont\sffamily\bfseries\LARGE} {\renewcommand{\thechapter}{\Roman{chapter}}% \settowidth\Aux{\textcolor{white}{\Huge\thechapter}} \ifnum\Aux>\BoxWd \setlength\BoxWd{\Aux} \else\fi \hspace*{0.5em}\colorbox{black}{% \parbox[c][1.2cm][c]{\BoxWd}{% \centering\textcolor{white}{\Huge\thechapter}}}} {-1ex} {\titlerule\vspace{.7ex}\filleft\MakeUppercase{#1}} [\vspace{.2ex}\titlerule] % chapter tiltes spacing \titlespacing*{\chapter}{0pt}{50pt}{80pt} % section tiltes formatting \titleformat{\section} {\normalfont\Large\bfseries}{\MySecSquare\ \thesection}{1em}{#1} % formatting for chapter entries in ToC \titlecontents{chapter} [1.5em]{} {\sffamily\bfseries\contentslabel{1.5em}} {\hspace*{-1.5em}} {\hfill\sffamily\bfseries\contentspage} % formatting for section entries in ToC \titlecontents{section} [3.8em]{} {\sffamily\contentslabel{2.3em}} {\hspace*{-2.3em}} {\titlerule*[1pc]{.}\sffamily\contentspage} % Square to be used in itemize \newcommand\MySquare{% \leavevmode\hbox to 1.2ex{\hss\vrule height .9ex width .7ex depth -.2ex\hss}} % Square to be used in section titles \newcommand\MySecSquare{% \leavevmode\hbox to 1.2ex{\hss\vrule height 1.3ex width 1.1ex depth -.2ex\hss}} % First level of itemize uses a square \renewcommand\labelitemi{\MySquare} \begin{document} \tableofcontents \chapter{Test Chapter 1} \section{Test Section 1} \section{Test Section 2} \section*{Test Section 3} \chapter{Test Chapter 2} \chapter{Test Chapter 3} \chapter{Test Chapter 4} \chapter{Test Chapter 5} \chapter{Test Chapter 6} \chapter{Test Chapter 7} \chapter{Test Chapter 8} \chapter{Test Chapter 9} \end{document}
This is a follow-up question: Book layout Contents, Chapter, Section,


