防止标题中的换行符显示在页眉中

防止标题中的换行符显示在页眉中

我正在写一个文档,文档标题中包含一个“&”符号,我不想删除它,因此我插入了一个换行符,只是为了让文档看起来更美观一些。但是,现在每个奇数页都会将换行符显示为一个大空白区域。有什么方法可以删除它吗?

\documentclass[11pt]{amsart}
\usepackage[margin=1in]{geometry}             

\title{This is the first part of my title \&\\ This is the second}
\author{Author}

\begin{document}
\maketitle

This is my document page 1. 

\newpage

This is my document page 2. 

\newpage

This is my document page 3. 

\end{document}  

答案1

\title命令接受可选参数来设置要在标题中显示的标题文本:

\documentclass[11pt]{amsart}
\usepackage[margin=1in]{geometry}             

\title[This is the first part of my title \& This is the second]
        {This is the first part of my title \&\\ This is the second}

\author{Author}

\begin{document}
\maketitle

This is my document page 1. 

\newpage

This is my document page 2. 

\newpage

This is my document page 3. 

\end{document}

在此处输入图片描述

相关内容