Using book
class, is it possible (if I'm not wrong, not with tocloft
) to put page numbers in the left side? It would be something as
5 Introduction
19 I Title first chapter
54 II Title second chapter
107 III Title third chapter
I considered the following tread: Page number before Chapter title in the Table of Contents with memoir, which however is only for memoir
class, and the following one: Formatting the title of the TOC, which however is a mixed question about index and particular format. I need "only" to produce the above format for a classical ToC.
=====================================================
Addendum
Here a working code, but only for chapter
, not for section
:
\documentclass[a4paper]{book} \usepackage{fontspec} \usepackage{polyglossia} \setmainlanguage{english} \usepackage{titletoc} \contentsmargin{0pt} \titlecontents{chapter}[4pc] {\contentsmargin{0pt}\makebox[0pt][r]{\thecontentspage \quad\makebox[30pt][r]{\textsc{\romannumeral \thecontentslabel\quad}}}} {} {} {} \begin{document} \tableofcontents \chapter{Some text some text some text some text some text } \chapter{Some text some text some text some text some text } \chapter{Some text some text some text some text some text } \end{document}
=====================================================
ADDENDUM 2
Consider this code, whose realization I'm strongly interested in
\documentclass[a4paper]{report} \usepackage{fontspec} \usepackage{polyglossia} \setmainlanguage{english}%{italian} %\PolyglossiaSetup{italian}{indentfirst=false} \usepackage{titlesec} \renewcommand{\thechapter}{\scshape\roman{chapter}} \titleformat{\chapter}[display] {\normalfont\fontsize{10pt}{12pt}\selectfont}{\scshape\thechapter}{0pt}{} %%{\normalfont\fontsize{10pt}{12pt}\selectfont}{\chaptertitlename\space \thechapter}{11pt}{} \renewcommand{\thesection}{\arabic{section}} \titleformat{\section} {\normalfont\fontsize{10pt}{12pt}\selectfont}{\thesection}{0pt}{} \titleformat{\subsection} {\normalfont\fontsize{10pt}{12pt}\selectfont\itshape}{}{0pt}{} \titlespacing{\chapter}{0pt}{0pt}{3cm} \usepackage{titletoc} \contentsmargin{0pt} \titlecontents{chapter}[4pc] {\contentsmargin{0pt}\makebox[0pt][r]{\thecontentspage} \quad\makebox[30pt][r]{\textsc{\romannumeral \thecontentslabel.\quad}}}} {} {} {} \usepackage{titletoc} \contentsmargin{0pt} \titlecontents{section}[4pc] {\contentsmargin{0pt}\makebox[0pt][r]{\thecontentspage} \quad\makebox[30pt][r]{\textsc{\romannumeral \thecontentslabel.\quad}}}} {} {} {} \begin{document} \tableofcontents \chapter{Some title 1} Some text some text some text some text some text %\section{Some text title a} %Some text some text some text some text some text \chapter{Some title 2} Some text some text some text some text some text \chapter{Some title 3} Some text some text some text some text some text \end{document}There is a bad interference between titlesec and titletoc, but I'm not able to solve with a correct interaction between these two packages…
Best Answer
Here's a solution that uses the
titletoc
package; the important part of the code isHere's a complete MWE to play with.