# How to change font size of sections in a partial TOC without changing it in TOC

My thesis board wants my work to be formatted in quite a bizarre fashion; in particular, it asks for “continuous” minitoc at the beginning of each chapter: I had quite an hard time doing that in LaTex and I asked for help with this question that helped me solve most of them.

Two main problems are left:

1. Inside each mini-TOC (one for each chapter), I'd like sections and subsections to appear with the same font size

1. I don't want the settings I use in these mini-TOCs to reflect inside the main TOC (for example, I don't want the chapter name to be centered)

What follows is a MWE (I left all the packages I'm using in case that's relevant):

\documentclass[a4paper,12pt,oneside]{report}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage[top=3cm, bottom=3cm, left=3.5cm, right=3cm]{geometry}
\usepackage{fancyhdr}
\usepackage{lmodern}
\usepackage{sectsty}
\usepackage{titlesec}
\usepackage{titletoc}
\usepackage{secdot}
\usepackage{hyperref}
\usepackage[bottom]{footmisc}

\renewcommand{\thechapter}{\Roman{chapter}}

\renewcommand*\thesection{\arabic{section}}

\makeatletter
\renewcommand{\p@section}{\thechapter.}
\makeatother

\newcommand\partialtocname{\large Summary:\space}

\newif\ifchapterwithtoc
\chapterwithtocfalse

\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}{\centering\chaptertitlename\ \thechapter}{0pt}{\contentsmargin{0pt}}
[\ifchapterwithtoc
\vspace{3cm}
\startcontents
\printcontents{l}{1}{\setcounter{tocdepth}{2}}
\else\fi%
]

\titlecontents*{lsection}[0pt]
{\partialtocname \normalfont\small}{\thecontentslabel.\space}{}
{}[\space---\space]
\titlecontents*{lsubsection}[0pt]
{\normalfont\small}{\space---\space\thecontentslabel\space}{\normalfont\normalsize}
{}[\space]

\begin{document}

\tableofcontents

\chapter*{Introduction}

\chapterwithtoctrue

\chapter{\centerline{\Large{Chapter One}}}

\section{\large{Chapter One Section One}}
\subsection{Chapter One Section One Subsection One}
\section{\large{Chapter One Section Two}}
\section{\large{Chapter One Section Three}}
\subsection{Chapter One Section Three Subsection One}
\subsection{Chapter One Section Three Subsection Two}
\section{\large{Chapter One Section Four}}
\section{\large{Chapter One Section Five}}

\end{document}


Any help solving these two problems would be much appreciated, thanks in advance!

• You should really avoid specifying font changes within the sectional titles. That should ideally be done as part of your \titleformat declaration. – Werner Mar 23 '17 at 18:09
• You mean avoiding the \section{\Large{}}? If so, I'll try to avoid that and thanks very much for your suggestion! Any idea on how I could edit the code to solve those two problems? – lucia de finetti Mar 23 '17 at 18:19
• Yup. Note how you use \normalfont\huge\bfseries within \titleformat for \chapter. You should do similar things for \section and other sectional units that you want formatted. – Werner Mar 23 '17 at 18:23