标题未完全显示

标题未完全显示

我制作了以下带有小页面的书籍文档。我发现一个问题,页眉没有完全显示。我该怎么办?

\documentclass[a4paper,12pt]{book}

\ExplSyntaxOn

\usepackage{geometry}

\NewDocumentCommand \wvPage {}
  %% 31x21 cm Page Size
  {
    \geometry{ paperwidth=13cm, paperheight=21cm,
               textwidth=12cm,  textheight=20cm,
               left=8mm, right=8mm, top=8mm, bottom=8mm}
  }

\wvPage

\ExplSyntaxOff

\title{Sections and Chapters}
\author{Ramanujan}
\date{\today}

\begin{document}
\maketitle
\tableofcontents

\chapter {This is an introduction to some topic}

\section{Test}

Some text

\subsection{A Subsection}

More text here

\subsubsection{A Subsubection}

And more text

\end{document}

答案1

你应该插入命令includehead

\documentclass[a4paper,12pt]{book}

\ExplSyntaxOn

\usepackage{geometry}

\NewDocumentCommand \wvPage {}
%% 31x21 cm Page Size
{
    \geometry{ paperwidth=13cm, paperheight=21cm,
        textwidth=12cm,  textheight=20cm,
        left=8mm, right=8mm, top=8mm, bottom=8mm, includehead}
}

\wvPage

\ExplSyntaxOff

\title{Sections and Chapters}
\author{Ramanujan}
\date{\today}

\begin{document}
    \maketitle
    \tableofcontents
    
    \chapter {This is an introduction to some topic}
    
    \section{Test}
    
    Some text
    
    \subsection{A Subsection}
    
    More text here
    
    \subsubsection{A Subsubection}
    
    And more text
    
\end{document}

相关内容