Page LayoutSpace under chapter title

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
goltoof
Posts: 15
Joined: Wed Feb 04, 2015 8:08 pm

Space under chapter title

Post by goltoof »

I just want to decrease the amount of space between the chapter title and where the section starts in memoir.

Code: Select all

\documentclass[11pt,letter,oldfontcommands,oneside]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{microtype}
\usepackage[dvips]{graphicx}
\usepackage{xcolor}
% footer reset for fancyhdr
\let\footruleskip\undefined
\usepackage{fancyhdr}
\usepackage{times}
% \usepackage{titlesec}
\usepackage[section]{placeins}
\usepackage[breaklinks=true,colorlinks=true,
%linkcolor=blue,urlcolor=blue,citecolor=blue,% PDF VIEW
linkcolor=black,urlcolor=black,citecolor=black,% PRINT
bookmarks=true,bookmarksopenlevel=2]{hyperref}
%\usepackage{indentfirst}
\usepackage{geometry}
% PDF VIEW
% \geometry{total={210mm,297mm},
% left=25mm,right=25mm,%
% bindingoffset=0mm, top=25mm,bottom=25mm}
% PRINT
\geometry{total={210mm,297mm},left=20mm,right=20mm,bindingoffset=10mm, top=25mm,bottom=25mm,}
\graphicspath{ {images/} }
\OnehalfSpacing
%\linespread{1.3}
% table caption align
\usepackage[
% singlelinecheck=false
]{caption}
\captionsetup[table]{labelfont=bf}
\captionsetup[figure]{labelfont=bf}
\renewcommand{\afterchaptertitle}{\par\nobreak\vskip0.5\midchapskip}
%%% CHAPTER'S STYLE
\chapterstyle{verville}
% rename Chapter Title
\renewcommand{\chaptername}{Section}
%%% STYLE OF SECTIONS, SUBSECTIONS, AND SUBSUBSECTIONS
\setsecheadstyle{\Large\bfseries\sffamily\raggedright}
\setsubsecheadstyle{\large\bfseries\sffamily\raggedright}
\setsubsubsecheadstyle{\bfseries\sffamily\raggedright}
%%% PAGE STYLES
%NUMBERING
%\pagestyle{companion}\nouppercaseheads 
\pagestyle{fancy}
%\pagestyle{Ruled}
%\pagestyle{plain}
\makepagestyle{plain}
\makeevenfoot{plain}{\thepage}{}{}
\makeoddfoot{plain}{}{}{\thepage}
\makeevenhead{plain}{}{}{}
\makeoddhead{plain}{}{}{}
\maxsecnumdepth{subsection}
\maxtocdepth{subsection} 
% FORMATTING
% Item line spacing - global
\usepackage{paralist}
  \let\itemize\compactitem
  \let\enditemize\endcompactitem
  \let\enumerate\compactenum
  \let\endenumerate\endcompactenum
  \let\description\compactdesc
  \let\enddescription\endcompactdesc
  \pltopsep=\medskipamount
  \plitemsep=1pt
  \plparsep=1pt
% Disable indent
\setlength{\parindent}{0pt}
% Paragraph break
\setlength{\parskip}{20pt}
% TABLE STYLES
\usepackage{booktabs}
\renewcommand{\arraystretch}{1.2} %more space between edges
\begin{document}
% TITLEPAGE
\input{titlepage.tex}
\cleardoublepage
% TOC
\tableofcontents*
\clearpage
\chapter{Foo}
	\input{foo.tex}
\chapter{Bar}
	\input{bar.tex}
\chapter{Foobar}
	\input{foobar.t}
	
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Space under chapter title

Post by Johannes_B »

Hi and welcome,

you are actually on the right track redefining afterchaptertitle, but later you are using another chapterstyle, which sets that back.

There are a few other oddities in you code. You are loading package fancyhdr, but never use it---which is a good thing as memoir has its own mechanism that you are using correctly.
You are loading option dvips, which was ok a decade back, but these days, it doesn't give any benefits and might even make harm.
You are loading package hyperref quite early, rule of thumb is to load it last. It does some stuff and should not be disturbed in its doings.
You are setting some lengths in TeX-syntax, that is bad style, but does no harm. Just to mention it.
You request as a global option to make the old/obsolete font commands available, but never use them (good thing). You could drop it. Those old font commands went obsolete 20 years ago, no need to unburry the dead.

Little hint: Posting a minimal example is great, but it should be compilable on other machines as well. Please always test an MWE in a separate folder. After Posting, you can click on »open in writelatex« (which is now called overleaf) and see the output in an online compiler, which is quite handy ;-)

Code: Select all

\documentclass[11pt,%letter,%This option is unknown
%oldfontcommands,%keep the dead burried
oneside]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\renewcommand{\chaptername}{Section}
\usepackage{blindtext}
\chapterstyle{verville}
\renewcommand{\afterchaptertitle}{\par\nobreak\vskip0.5\baselineskip}%
%Adjust the value till you are satisfied
\begin{document}
%	      \input{titlepage.tex}%don't have this
%\cleardoublepage
\tableofcontents*
%	      \clearpage%This is not neaded
\chapter{Foo}
\section{a duck section}
\blindtext
\chapter{Bar}
\chapter{Foobar}

\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
goltoof
Posts: 15
Joined: Wed Feb 04, 2015 8:08 pm

Re: Space under chapter title

Post by goltoof »

That seems to have cut it back some, thanks!

Off topic, but is there any chance you can see what's happening with the page numbering behavior based on what I posted? The numbering toggles from right to center depending on if the page begins with a chapter a float. It's really odd and it's not obvious what to change without messing with the document class.

This is the reason I used fancyhdr. Without it the page numbers are up top which I don't want. With it they're on the bottom and I get a more detailed header (including the section and chapter name) which looks much better. I just need the page number at the bottom to behave (center,oneside or twoside).
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Space under chapter title

Post by Johannes_B »

Meomoir sets the headers/footers in a verbose but unique way. There are 3 fields in the head and three in the foot. Pages on which a chapter starts use plain (or rather chapter) page style. You need to tell which field should contain what.
Same for other pages, which i just called goltoof for a lack of creativity and knowing the original name. \leftmark and \rightmark are standard LaTeX commands that are mentioned in every good introduction.


The documentation of memoir (memman and memdesign) is very very detailed. You can learn a lot there, about book typesetting and design as well.

Code: Select all

\documentclass{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{blindtext}
\makepagestyle{plain}
\makeevenfoot{plain}{}{\thepage}{}%Always centered
\makeoddfoot{plain}{}{\thepage}{}%
\makeevenhead{plain}{}{}{}
\makeoddhead{plain}{}{}{}
\makepagestyle{goltoof}
\makeevenhead{goltoof}{\leftmark}{}{}
\makeoddhead{goltoof}{}{}{\rightmark}
\makeevenfoot{goltoof}{}{\thepage}{}
\makeoddfoot{goltoof}{}{\thepage}{}
\pagestyle{goltoof}
\begin{document}
\tableofcontents*
\blinddocument

\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply