TransWikia.com

A problem about the top and bottom margins of my chapters?

TeX - LaTeX Asked on July 28, 2021

I have a problem that the top margin of my chapters are large while the bottom margins are very small, here is the code I am using for my chapters:

documentclass{book}
usepackage[utf8]{inputenc}

usepackage[a4paper, margin=1in]{geometry}

usepackage[T1]{fontenc}
usepackage{lmodern}

%usepackage[ngerman]{babel}


usepackage{tikz-cd}

usepackage{mathtools}
usepackage{commath}
usepackage{bbm}
usetikzlibrary{babel}
 usetikzlibrary{shapes.geometric}
usepackage{amsmath,amsfonts,amssymb}
usepackage{graphicx}
usepackage{setspace}
usepackage{lipsum}
usepackage{titlesec}
newtheorem{theorem}{Theorem}
newtheorem{prop}{Proposition}

usepackage[nottoc]{tocbibind} % For adding List of Tables and List of Figures to Table of Contents
usepackage[titles]{tocloft}

makeatletter
defps@headings{%
      def@oddfoot{normalfonthfilthepagehfil}%
      def@evenfoot{normalfonthfilthepagehfil}}
      def@evenhead{hfilslshapeleftmark}%
      def@oddhead{{slshaperightmark}hfil%
      let@mkbothmarkboth
    defchaptermark##1{%
      markboth {MakeUppercase{%
        ifnum c@secnumdepth >m@ne
          if@mainmatter
            @chapapp thechapter.  %
          fi
        fi
        ##1}}{}}%
    defsectionmark##1{%
      markright {MakeUppercase{%
        ifnum c@secnumdepth >z@
          thesection.  %
        fi
        ##1}}}}
makeatother
pagestyle{headings}% apply new definitions
  




begin{document}
   

titleformat{chapter}[display]
  {normalfontLARGEbfseries}
  {titleline{}vspace{5pt}titleline{}vspace{1pt}%
  MakeUppercase{chaptertitlename} thechapter}
  {1pc}
  {titleline{}vspace{0.5pc}}
  

chapter{INTRODUCTION}
section{MOTIVATION} 
end{document}

Is there any advice about that? I guess the problem in my code is in this part:

titleformat{chapter}[display]
  {normalfontLARGEbfseries}
  {titleline{}vspace{5pt}titleline{}vspace{1pt}%
  MakeUppercase{chaptertitlename} thechapter}
  {1pc}
  {titleline{}vspace{0.5pc}}

I need the top margin to be for example 1.5in and the bottom to be 1 in.

One Answer

You want a reduced space between the top margin and the chapter title. In this case you just edit the titleformat command as you mentioned in your question.

titleformat{chapter}[display]
  {normalfontLARGEbfseries}
  {titleline{}vspace{1pt}titleline{}vspace{-0.9in}% The negative value here to move chapter title up
  MakeUppercase{chaptertitlename} thechapter}
  {1pc}
  {titleline{}vspace{0.5pc}}

enter image description here

Correct answer by Mark A. Bromuela on July 28, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP