1

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? enter image description here 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
0

A simple solution is as follows:

\newcommand{\mysection}[1]{\vspace*{20pt}\section{#1}}

and use \mysection instead of \section inside the document.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy