# how to add margin to a element (chapter)

I try to add some margin top to my page but is not working :

Please how can I do it ?

here the code :

\documentclass[12pt, twoside, openany]{book}

\usepackage{mathptmx}

\usepackage[spanish, es-tabla]{babel}
\usepackage[utf8]{inputenc}

\usepackage{graphicx}
\graphicspath{ {images/} }
\usepackage[a4paper,top=30mm,left=30mm,right=25mm,
\usepackage{titlesec}
\usepackage{setspace}
\usepackage{ragged2e}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{stackengine}
\usepackage{array}
\usepackage{url}
\usepackage{float}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{pdfpages}
\usepackage{lipsum}
\input{Configuracion.tex}
\begin{document}
\rmfamily % Fuente tipo Romana
\newpage
\large\hspace{-18pt}Chairman of the jury :\\
\hspace{30pt}protractor:\\
framing:\\
\begin{center}
\centering \large Academic year 2020 / 2021
\end{center}
\makeatletter

%\topmargin=100pt
introduction
\chapter*{Introduction}
\thispagestyle{plain}
%\thispagestyle{empty}
\rfoot{}
\newpage
\end{document}


here the configuration

       \definecolor{gris}{RGB}{220,220,220}

\setcounter{secnumdepth}{3}

\renewcommand{\contentsname}{Índice de contenido}
\renewcommand{\listfigurename}{Índice de figuras}
\renewcommand{\listtablename}{Índice de tablas}
}

\titleformat{\chapter}[block]
{\normalfont\Huge\bfseries\singlespacing}{\thechapter.}{1em}{\Huge}
\titlespacing*{\chapter}{0pt}{-62pt}{0pt}

\titleformat{\section}[block]
{\normalfont\large\bfseries}{\thesection.-}{4pt}{\large}
\titlespacing*{\section}{0pt}{\baselineskip}{0pt}

\titleformat{\subsection}[block]
{\normalfont\normalsize\bfseries}{\thesubsection.-}{4pt}
{\normalsize}
\titlespacing*{\subsection}{0pt}{0pt}{0pt}

\titleformat{\subsubsection}[block]
{\normalfont\normalsize\bfseries}{\thesubsubsection.-}{4pt}
{\normalsize}
\titlespacing*{\subsubsection}{0pt}{0pt}{0pt}

\def\tablename{Tabla}

\fancyhf{}

\pageref{LastPage}}}
\fancyfoot[C]{\thepage}
\renewcommand{\footrulewidth}{0.4pt}

\fancypagestyle{plain}{%
\fancyhf{}

\pageref{LastPage}}}
\fancyfoot[C]{\thepage}
\renewcommand{\footrulewidth}{0.4pt}
}

\pagestyle{fancy}
\pagestyle{plain}
\restylefloat{table}


• Could you please post a small complete code reproducing your problem? We don't even know which document class you're using. Apr 17 at 14:09
• If using the book class, this looks more like a section heading than a chapter heading. But you may have changed things with the file Configuracion.tex, which you don't show. The code provided doesn't produce the output you've shown. Apr 17 at 14:36
• I can't compile without commenting the \input{…} (I don't have the files). Could you explain at what distance from the topmargin the chapter heading should be placed, and whether it should be the same for all chapters? Apr 17 at 14:37
• I add the Configuration.tex, and sorry for not add it from the beginning Apr 17 at 15:12

Use for example \titlespacing*{\chapter}{0pt}{150pt}{0pt}%Spacing above = 150pt to add a positive space above. Now you are using \titlespacing*{\chapter}{0pt}{-62pt}{0pt} in Configuracion.tex

• Exactly like I want, thank you friend for the help Apr 17 at 15:26