I believe that using packages for solving of all problems in my document makes it compiling time too long and loading many packages cause some unexpected errors. So, I don't want to use unnecessary packages.
Q1: I want to add vertical space before Section titles that started on new page. what is the solution?
Q2: Also How to reduce space between
TOC
items in preamble without any package again?
Here is my MWE:
\documentclass[14pt,a4paper]{extbook}
\usepackage[left=1in, right=1.2in, top=1.35in, bottom=1.2in, headsep=.25in, footskip=.3in,
showframe]{geometry}
\usepackage{lipsum}
\renewcommand\baselinestretch{1.2}
\makeatletter
\setlength\parskip{7.2\p@ \@plus \p@}
\makeatother
\begin{document}
\tableofcontents
\chapter{First chapter}
\section{First section}
\subsection{First subsection}
\lipsum[1]
\section{Second section}
\subsection{Second subsection}
\lipsum[1-2]
\chapter{second chapter}
\section{First section}
\subsection{First subsection}
\lipsum[1]
\section{Second section}
\subsection{Second subsection}
\lipsum[1-2]
\end{document}
Do you recommend the following trick? (\vspace*{-15pt}
)
\makeatletter
\renewcommand\section{\vspace*{-15pt}\@startsection {section}{1}{\z@}%
{-3.5ex \@plus-1ex \@minus-.2ex}%
{1ex \@plus.2ex}%
{\normalfont\fontsize{16}{19.2}\selectfont\bfseries}}
\makeatother
titlesec
to hack into section title and ToC formatting will definitely make you waste precious milliseconds of life;-)