封面中的标题超出了页面边界

封面中的标题超出了页面边界

我在与主代码不同的文件中使用以下代码来布局我的论文封面:

\noindent\rule{\linewidth}{1mm}\\[1.4em]
{\noindent\Huge\sffamily
 \begin{tabular*}{\linewidth}{@{}c@{}}
   \thetitle\\[.5em]
   {\huge\theauthor}\\
 \noindent\rule{\linewidth}{1mm}\end{tabular*}}

但是,结果标题超出了页面范围(见附图)。有人知道如何解决这个问题吗?

标题页输出

以下是主文档的代码。将出现上述问题的文件插入到\include{cover}代码中的第 行。

\documentclass[c5paper,titlepage,11.5pt]{book}%{report}
\usepackage{libertine}
\usepackage[T1]{fontenc}
\usepackage[intoc]{nomencl}
\usepackage[titletoc,toc,title]{appendix}
\usepackage{braket}
\usepackage[utf8]{inputenc}
\pagenumbering{arabic}
\usepackage[english]{babel}
\usepackage{notoccite}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{hyperref}
\usepackage{setspace}
\usepackage{booktabs}
\usepackage{geometry}
\usepackage{tocbibind}
\usepackage{tabulary}
\usepackage{multirow}
\usepackage[font={footnotesize,it}]{caption}
\usepackage[labelfont=bf]{caption}
\usepackage{subcaption}
\usepackage{graphicx,wrapfig,lipsum}
\let\oldcaption\caption
\renewcommand{\caption}[2]{
    \oldcaption[#1]{\textbf{#1:} #2}
}
\usepackage{floatrow}
\usepackage{adjustbox}
\usepackage{afterpage}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpagefi}{}{}{}
\makeatother
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\onehalfspacing
\geometry{c5paper,top=2.5cm,bottom=2.5cm,left=1.93cm,right=2.1cm}
\makenomenclature
\usepackage[final]{pdfpages}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[EL]{\nouppercase\leftmark}
\fancyhead[OR]{\nouppercase\rightmark}
\fancyhead[ER,OL]{\thepage}
\usepackage{titling}
\title{Investigating the Chemistry of the Universe at the Atomic Level}
\author{Arabel Snorkeling}
\date{\today}

\begin{document}

\pagenumbering{roman} 

\includepdf[]{front.pdf}
\include{cover}

\frontmatter
\include{frontmatter}

\cleardoublepage

\addtocontents{toc}{\protect\setcounter{tocdepth}{-1}}
\tableofcontents

\addtocontents{toc}{\protect\setcounter{tocdepth}{3}}
\setcounter{secnumdepth}{3}
\cleardoublepage

\mainmatter

\pagenumbering{arabic}
\listoffigures 
\listoftables
\renewcommand{\nomname}{List of Abbreviations}\index{List of Abbreviations}
\printnomenclature
\part{The main part}
\chapter{Background}

\end{document}

答案1

一个可能的(简单)解决方案是将标题页直接作为主文档的一部分。例如:

\documentclass[c5paper,titlepage,11.5pt]{book}%{report}
\usepackage{geometry}
\geometry{c5paper,top=2.5cm,bottom=2.5cm,left=1.93cm,right=2.1cm}
\usepackage{libertine}
\usepackage[T1]{fontenc}
\usepackage{setspace}
\usepackage{array}      % <---
\usepackage{booktabs}
\onehalfspacing
\usepackage{hyperref}

\begin{document}

\frontmatter
\thispagestyle{empty}
\mbox{}
\vfill
    \begin{center}
\begin{tabular*}{\linewidth}{ >{\centering\arraybackslash\sffamily\Huge}p{\linewidth} }
    \toprule[1mm]
    \medskip
Investigating the Chemistry of the Universe at the Atomic Level
                    \\
                    \\[3em]
\huge
Arabel Snorkeling   \\[1em]
    \bottomrule[1mm]
\end{tabular*}

\vfill
\today
\vfil\mbox{}
    \end{center}

\cleardoublepage

\addtocontents{toc}{\protect\setcounter{tocdepth}{-1}}
\tableofcontents
\listoffigures
\listoftables

\addtocontents{toc}{\protect\setcounter{tocdepth}{3}}
\setcounter{secnumdepth}{3}
\cleardoublepage

\mainmatter
\part{The main part}
\chapter{Background}

\end{document}

(从序言中我删除了所有与标题页不相关的包。

在此处输入图片描述

注意:软件包hyperref应在前言中最后加载。同时删除所有加载两次的软件包。

相关内容