0

I am creating a custom chapter style using the memoir class. It is defined by the following:

\makechapterstyle{balloon}{%
    \renewcommand{\chapterheadstart}{\vspace*{\beforechapskip}}
    \renewcommand{\printchaptername}{\begin{center} \chapnamefont \chaptername}
    \renewcommand{\chapternamenum}{\space}
    \renewcommand{\printchapternum}{\chapnumfont \thechapter \end{center}}
    \renewcommand{\afterchapternum}{\par\vskip \midchapskip }
    \renewcommand{\printchaptertitle}[1]{\chaptitlefont %
        \begin{center}%
            \MakeUppercase{##1}%
        \end{center}}
    \renewcommand{\afterchaptertitle}{\par\vskip \afterchapskip}%

    \renewcommand{\chapnamefont}{\normalfont\Large}
    \renewcommand{\chapnumfont}{\normalfont\Large}
    \renewcommand{\chaptitlefont}{\normalfont\scriptsize}%

    \setlength{\beforechapskip}{-25pt}
    \setlength{\midchapskip}{10pt} % <-- Value in question.
    \setlength{\afterchapskip}{7pt}
}
\chapterstyle{balloon}
......
\chapter{The End of a much-applauded Speech -- The Presentation of Dr. Samuel Ferguson -- Excelsior -- Full-length Portrait of the Doctor -- A Fatalist convinced -- A Dinner at the Travellers’ Club -- Several Toasts for the Occasion}

I realize some of the the declarations within \makechapterstyle are redundant, and they will be removed when I'm done working on the style.

The problem I'm facing is that changing the value of \midchapskip has inconsistent effects on the format of the heading. This value should control the spacing between the chapter text (e.g. "Chapter 1"), and the chapter title (e.g. "The End of a much-applauded Speech...").

Negative values of \midchapskip have no effect at all on the spacing, and positive values have sporadic effects. For example, there is a 10pt difference in the actual spacing when \midchapskip is set to 20pt and 10pt, but no actual difference between a value of 10pt and 0pt. Why is this and how can I accurately adjust this spacing?

TL;DR: Why isn't \midchapskip having the intended effect in my chapter style?

0

You have used the center environment in your redefinition of \printchaptertitle --- use \centering instead. So, less any typos

\renewcommand{\printchaptertitle}[1]{\chaptitlefont%
  {\centering \MakeUppercase{##1} \par}}

The following shows the result of the change to \printchaptertitle together with \setlength{\midchapskip}{-75pt}, thus negative \midchapskip values do have an effect, just as any other value will.

enter image description here

Perhaps someone else can explain the difference in spacing of \begin{center} versus \centering.

EDIT

Here's an MWE with four different `\midchapskip` values to show their effects.

% balloonprob.tex  SE 598175
\documentclass[openany]{memoir}
\usepackage{lipsum}

\makechapterstyle{balloon}{%
    \renewcommand{\chapterheadstart}{\vspace*{\beforechapskip}}
    \renewcommand{\printchaptername}{\begin{center} \chapnamefont \chaptername}
    \renewcommand{\chapternamenum}{\space}
    \renewcommand{\printchapternum}{\chapnumfont \thechapter \end{center}}
    \renewcommand{\afterchapternum}{\par\vskip \midchapskip }
    \renewcommand{\afterchapternum}{\par\nobreak\vskip \midchapskip }
    \renewcommand{\printchaptertitle}[1]{\chaptitlefont %
%        \begin{center}%
%            \MakeUppercase{##1}%
%        \end{center}}
    {\centering
      \MakeUppercase{##1} \par}}
    \renewcommand{\afterchaptertitle}{\par\vskip \afterchapskip}%

    \renewcommand{\chapnamefont}{\normalfont\Large}
    \renewcommand{\chapnumfont}{\normalfont\Large}
    \renewcommand{\chaptitlefont}{\normalfont\scriptsize}%

    \setlength{\beforechapskip}{-25pt}
    \setlength{\midchapskip}{20pt} % <-- The default
    \setlength{\midchapskip}{10pt} % <-- Value in question.
    \setlength{\midchapskip}{5pt} % <-- Value in question.
%    \setlength{\midchapskip}{50pt} % <-- Value in question.
    \setlength{\midchapskip}{0pt} % <-- Value in question.
    \setlength{\midchapskip}{-75pt} % <-- Value in question.
    \setlength{\afterchapskip}{7pt}
}
\chapterstyle{balloon}

\begin{document}

\mainmatter

\chapter{The End of a much-applauded Speech -- The Presentation of Dr. 
Samuel Ferguson -- Excelsior -- Full-length Portrait of the Doctor -- 
A Fatalist convinced -- A Dinner at the Travellers’ Club -- 
Several Toasts for the Occasion}

%\lipsum[1]
\setlength{\midchapskip}{-10pt}
\chapter{The End of a much-applauded Speech -- The Presentation of Dr. 
Samuel Ferguson -- Excelsior -- Full-length Portrait of the Doctor -- 
A Fatalist convinced -- A Dinner at the Travellers’ Club -- 
Several Toasts for the Occasion}

\setlength{\midchapskip}{0pt}
\chapter{The End of a much-applauded Speech -- The Presentation of Dr. 
Samuel Ferguson -- Excelsior -- Full-length Portrait of the Doctor -- 
A Fatalist convinced -- A Dinner at the Travellers’ Club -- 
Several Toasts for the Occasion}

\setlength{\midchapskip}{10pt}
\chapter{The End of a much-applauded Speech -- The Presentation of Dr. 
Samuel Ferguson -- Excelsior -- Full-length Portrait of the Doctor -- 
A Fatalist convinced -- A Dinner at the Travellers’ Club -- 
Several Toasts for the Occasion}


\end{document}
2
  • Using centering was helpful, and allows some negative values to work, but there is still no difference between values like -10pt, 0pt, and 10pt. May 22 at 21:14
  • I tried three identical \chapter commands but put \setlength{\midchapskip}{P}, where P` was -5pt, 0pt and 5pt, before the \chapter so that the space between the chapter heading and the title text could be compared in one document. The spaces were different. Trying with -10pt, 0pt and 10pt produced bigger differences. I have no idea what you have done. May 23 at 17:13

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.