Дальнейшая настройка titlesec/etoc

Дальнейшая настройка titlesec/etoc

У меня есть следующий код:

\documentclass[a4paper,11pt]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage{titlesec}
\usepackage{etoc}

\renewcommand{\thechapter}{\scshape\roman{chapter}}
\renewcommand\thesection{\arabic{section}}

\titleformat{\chapter}[display]
  {\normalfont\fontsize{11}{12}\selectfont}
  {\scshape\thechapter}
  {0pt}
  {}
\titleformat{\section}
  {\normalfont\fontsize{11}{12}\selectfont}
  {\thesection}
  {1em}
  {}
\titleformat{\subsection}
  {\normalfont\fontsize{11}{12}\selectfont\itshape}
  {}
  {1em}
  {}

\titlespacing{\chapter}
  {0pt}{0pt}{3cm}

\etocsetstyle{chapter}
{}
  {\leavevmode\leftskip 0cm\relax}
  {\llap{\parbox[t]{1.5cm}{\mdseries\hfill\etocpage}\hspace{.5cm}}%
    \normalsize\parbox[t]{1cm}{\quad\etocnumber\hfill}%
  \parbox[t]{\dimexpr\linewidth-1cm-15pt\relax}{\etocname\par}\hfill\par
  }
  {}
\etocsetstyle{section}
  {}
  {\leavevmode\leftskip 0cm\relax}
  {\llap{\parbox[t]{1.5cm}{\mdseries\hfill\etocpage}\hspace{.5cm}}%
    \normalsize\parbox[t]{1cm}{\quad\etocnumber.\hfill}%
  \parbox[t]{\dimexpr\linewidth-1cm-15pt\relax}{\etocname\par}\hfill\par
  }
  {}


\begin{document}

\tableofcontents

\chapter{Chapter One}
\section{Section One}
\section{Section Two}
\section{Section Three}
\section{Section Four}

\chapter{Chapter Two}
\section{Section One}
\section{Section Two}
\section{Section Three}
\section{Section Four}
\section{Section Five}

\chapter{Chapter Three}
\section{Section One}
\section{Section Two}
\section{Section Three}

\end{document}

Однако я хотел бы внести два изменения:

1) номера страниц и номера глав/разделов выравниваются по правому краю, а не по левому краю, как в настоящем кодексе

2) немного vspaceперед каждой строкой главы в Оглавлении.

Как можно получить такие результаты? Всегда в коде etoc? Спасибо

ДОПОЛНЕНИЕ Результат, который я хотел бы получить, показан на следующем рисунке:

введите описание изображения здесь

решение1

Модификации

\etocsetstyle{chapter}
{}
  {\addvspace{2ex}\leavevmode\leftskip 0cm\relax}
  {\llap{\makebox[1.5cm][r]{\mdseries\etocpage}\hspace{.5cm}}%
    \normalsize\makebox[1cm][r]{\etocnumber\phantom{.}}\hspace{10pt}%
  \parbox[t]{\dimexpr\linewidth-1cm-27pt\relax}{\etocname\par}\hfill\par
  }
  {}
\etocsetstyle{section}
  {}
  {\leavevmode\leftskip 0cm\relax}
  {\llap{\makebox[1.5cm][r]{\mdseries\etocpage}\hspace{.5cm}}%
    \normalsize\makebox[1cm][r]{\etocnumber.}\hspace{10pt}%
  \parbox[t]{\dimexpr\linewidth-1cm-27pt\relax}{\etocname\par}\hfill\par
  }
  {}

По сути, я изменил \parboxes на \makeboxes с rвыравниванием по правому краю и добавил удобный вертикальный пропуск ( 2exв моем примере, но используйте любое значение, которое подходит вам) в третьем обязательном аргументе для \etocsetstyleглав.

Полный код:

\documentclass[a4paper,11pt]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage{titlesec}
\usepackage{etoc}

\renewcommand{\thechapter}{\scshape\roman{chapter}}
\renewcommand\thesection{\arabic{section}}

\titleformat{\chapter}[display]
  {\normalfont\fontsize{11}{12}\selectfont}
  {\scshape\thechapter}
  {0pt}
  {}
\titleformat{\section}
  {\normalfont\fontsize{11}{12}\selectfont}
  {\thesection}
  {1em}
  {}
\titleformat{\subsection}
  {\normalfont\fontsize{11}{12}\selectfont\itshape}
  {}
  {1em}
  {}

\titlespacing{\chapter}
  {0pt}{0pt}{3cm}

\etocsetstyle{chapter}
{}
  {\addvspace{2ex}\leavevmode\leftskip 0cm\relax}
  {\llap{\makebox[1.5cm][r]{\mdseries\etocpage}\hspace{.5cm}}%
    \normalsize\makebox[1cm][r]{\etocnumber\phantom{.}}\hspace{10pt}%
  \parbox[t]{\dimexpr\linewidth-1cm-27pt\relax}{\etocname\par}\hfill\par
  }
  {}
\etocsetstyle{section}
  {}
  {\leavevmode\leftskip 0cm\relax}
  {\llap{\makebox[1.5cm][r]{\mdseries\etocpage}\hspace{.5cm}}%
    \normalsize\makebox[1cm][r]{\etocnumber.}\hspace{10pt}%
  \parbox[t]{\dimexpr\linewidth-1cm-27pt\relax}{\etocname\par}\hfill\par
  }
  {}


\begin{document}

\tableofcontents

\chapter{Chapter One}
\section{Section One}
\section{Section Two}
\section{Section Three}
\section{Section Four}

\chapter{Chapter Two}
\section{Section One}
\section{Section Two}
\section{Section Three}
\section{Section Four}
\section{Section Five}

\setcounter{page}{99}% just for the example

\chapter{Chapter Three}
\section{Section One}
\section{Section Two}
\section{Section Three}

\end{document}

Результат:

введите описание изображения здесь

Связанный контент