0

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

Please how can I do it ?

enter image description here

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,    
    bottom=25mm,headheight=20mm]{geometry} 
    \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
       \input{Portada.tex}
       \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} 

         \addto\captionsspanish{
         \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{}

            \fancyhead[R]{\bfseries{page \thepage \hspace{1pt} of 
            \pageref{LastPage}}}
            \fancyfoot[C]{\thepage}
            \renewcommand{\headrulewidth}{0pt}
            \renewcommand{\footrulewidth}{0.4pt}


             \fancypagestyle{plain}{%
             \fancyhf{}




            \fancyhead[R]{\bfseries{page \thepage \hspace{1pt} of 
           \pageref{LastPage}}}
           \fancyfoot[C]{\thepage}
          \renewcommand{\headrulewidth}{0pt}
          \renewcommand{\footrulewidth}{0.4pt}
          }

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

        
5
  • Could you please post a small complete code reproducing your problem? We don't even know which document class you're using.
    – Bernard
    Apr 17 at 14:09
  • I add the code please help
    – youssef115
    Apr 17 at 14:19
  • 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?
    – Bernard
    Apr 17 at 14:37
  • I add the Configuration.tex, and sorry for not add it from the beginning
    – youssef115
    Apr 17 at 15:12
1

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

enter image description here

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

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.