3

I use gsm packages from AMS to write my book. Overall, the package is beautiful and works well. There is only one problem, that is the vertical space between the header and the chapter title & the chapter title and the following text is too large.

Here is a MWE

  \documentclass{gsm-l}
  \usepackage[papersize={160mm,240mm},inner=20mm, outer=15mm, vmargin=15mm]{geometry}
  \geometry{includeheadfoot}
  \usepackage{fouriernc}
  \usepackage{esvect}
  \usepackage{amsmath,enumitem}
  \usepackage{remreset}
  \usepackage{pgf,tikz}
  \usetikzlibrary{arrows}
  \begin{document}
  \chapter*{Preface}
  The vertical space is too large sometimes. 
  \end{document}

Here is the output Output

So how can I customize it? I want to change it locally, not globally.

Please help me.

Thanks.

4

You can correct the spacings with etoolbox:

\documentclass{gsm-l}
\usepackage[papersize={160mm,240mm},inner=20mm, outer=15mm, vmargin=15mm]{geometry}
\geometry{includeheadfoot}
\usepackage{fouriernc}
\usepackage{esvect}
\usepackage{amsmath,enumitem}
\usepackage{remreset}
\usepackage{etoolbox}
\usepackage{pgf,tikz}
\usetikzlibrary{arrows}

\makeatletter
% Uncomment the following for reducing the space above the title
%\patchcmd{\@makechapterhead}
%  {\top@space{11pc}}% old value
%  {\top@space{5pc}}%  new value
%  {}{}
\patchcmd{\@makechapterhead}
  {\@dropfolio\bb@space{7.5pc}}% old value
  {\@dropfolio\bb@space{3pc}}%   new value
  {}{}
\makeatother

\begin{document}
\chapter*{Preface}
The vertical space is too large sometimes.

\chapter{Test}

Some text.

\end{document}

I've also shown the code for changing the space above the title.

enter image description here

If you want a “local” change, this is my suggestion:

\documentclass{gsm-l}
\usepackage[papersize={160mm,240mm},inner=20mm, outer=15mm, vmargin=15mm]{geometry}
\geometry{includeheadfoot}
\usepackage{fouriernc}
\usepackage{esvect}
\usepackage{amsmath,enumitem}
\usepackage{remreset}
\usepackage{etoolbox}
\usepackage{pgf,tikz}
\usetikzlibrary{arrows}

\makeatletter
\newlength{\pretitlelen}
\newlength{\posttitlelen}
\setlength{\pretitlelen}{11pc}
\setlength{\posttitlelen}{7.5pc}
% Uncomment the following for reducing the space above the title
\patchcmd{\@makechapterhead}
  {\top@space{11pc}}
  {\top@space{\pretitlelen}}
  {}{}
\patchcmd{\@makechapterhead}
  {\@dropfolio\bb@space{7.5pc}}
  {\@dropfolio\bb@space{\posttitlelen}}
  {}{}
\makeatother

\begin{document}
\setlength{\posttitlelen}{3pc}
\chapter*{Preface}
\setlength{\posttitlelen}{7.5pc}
The vertical space is too large sometimes.

\chapter{Test}

Some text.

\end{document}

Doing the setting of \posttitlelen in a group is not correct, because of \@afterheading.

3
  • Thank you very much, it worked for me. I have another question, that is the space in the table of content is too large too, but it appeared with \tableofcontents command. How can I customize it? Please help me. Thanks! May 26 '15 at 8:58
  • 1
    @Knumber10 It should be just the same: the two \setlength commands should surround \tableofcontents.
    – egreg
    May 26 '15 at 9:03
  • @egreg -- it seems to me that the objection is to the spacing for \chapter*, not the numbered chapters, unfortunately, \@makeschapterhead just calls \@makeshapterhead, which doesn't give the requisite flexibility, the way it's written. the patches you make do address that in a useful way; i'm taking this under advisement as a suggestion for a future update. Nov 13 '15 at 17:45

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.