如何在降低PDF页面高度时删除标题前后的两个空白页

如何在降低PDF页面高度时删除标题前后的两个空白页

我刚刚把PDF页面的高度降低到15cm,但是我发现标题前后自动生成了两个空白页,这两个空白页在添加命令之前是没有的paperheight=15cm,请问如何去掉这两个空白页?

以下是该文件的序言:

\documentclass[20pt,a4paper]{extarticle}
\usepackage[utf8]{inputenc}
\usepackage[margin=1in]{geometry}
\geometry{footskip=12pt, headheight=5pt,top=2.5cm, bottom=2.25cm, paperheight=12cm}
\usepackage[svgnames]{xcolor}
\usepackage{amsmath}
\numberwithin{equation}{subsection}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\renewcommand{\qedsymbol}{\rule{0.5em}{0.5em}}
\usepackage{enumitem}
\interdisplaylinepenalty=100
\usepackage{mathtools}
\DeclareMathOperator{\sgn}{sgn}
\DeclareMathOperator{\supp}{supp}
\usepackage{pgfplots}
\usepackage{tikz}
\usepackage{hyperref}
\hypersetup{
  colorlinks=true,
  linkcolor=blue,
  filecolor=magenta,      
  urlcolor=red,
  citecolor=blue
}
\newcommand*{\at}{@}
\usepackage[nottoc]{tocbibind}
% to decrease the line spacing between the entries of the biblography
\newlength{\bibitemsep}\setlength{\bibitemsep}{.05\baselineskip plus .05\baselineskip 
  minus .05\baselineskip}
\newlength{\bibparskip}\setlength{\bibparskip}{0pt}
\let\oldthebibliography\thebibliography
\renewcommand\thebibliography[1]{%
\oldthebibliography{#1}%
\setlength{\parskip}{\bibitemsep}%
\setlength{\itemsep}{\bibparskip}%
}
\newcommand{\comment}[1]{%
\text{\phantom{(#1)}} \tag{#1} 
} % to tag equations

\usepackage{tocloft}
\setlength{\cftsecnumwidth}{2em}
\setlength{\cftsubsecnumwidth}{3em}
\setlength{\cftsubsubsecnumwidth}{4em}

\usepackage{booktabs}

\newcommand{\overbar}[1]{\mkern 1.5mu\overline{\mkern-1.5mu#1\mkern-1.5mu}\mkern 1.5mu}
\usepackage{verbatim}
\usepackage{mathrsfs}
\usepackage{setspace}
\usepackage{floatpag}
\usepackage{titling}
\renewcommand\maketitlehooka{\null\mbox{}\vfill}
\renewcommand\maketitlehookd{\vfill\null}

\title{{\LARGE \textsc{ \textbf{On a Generalization of Quasi-Injective Modules: $C4$- 
Modules} } }}

\author{\textsc{Hussein Eid}}
\date{}

% doubled space 
\newcommand{\dspace}{\bigskip\bigskip\bigskip}

\newcommand{\bigspace}{\bigskip\bigskip}
\newcommand{\im}{\text{Im\,}}
\newcommand{\soc}{\text{soc\,}}
\newcommand{\e}{\text{ess}}
\newcommand{\s}{\oplus}
\newcommand{\ds}{\leq^{\s}}
\newcommand{\ess}{\leq^{\e}}

\usepackage{tgadventor}
\renewcommand*\familydefault{\sfdefault} 
\usepackage[T1]{fontenc}

% To prvent page numbering for the whole document
\usepackage{nopageno}

% Define the line height (spacing between lines)
\linespread{1.1}

\newcounter{mthm}
\newtheorem{mthmitalic}[mthm]{\mthmname}
\theoremstyle{definition}
\newtheorem{mthmroman}[mthm]{\mthmname}
\newcommand{\mthmname}{}

\newcommand{\varnewtheorem}[3]{%
\newenvironment{#1}[1]{%
\renewcommand{\mthmname}{#2}%
\renewcommand{\themthm}{##1}%
\csname mthm#3\endcsname
}{\csname endmthm#3\endcsname}%
}

\varnewtheorem{theorem}{Theorem}{italic}
\varnewtheorem{corollary}{Corollary}{italic}
\varnewtheorem{definition}{Definition}{roman}
\varnewtheorem{example}{Example}{roman}

\usepackage{etoolbox}
\AtBeginEnvironment{theorem}{\setlist[enumerate,1]{label=\arabic*,font=\upshape}}

\begin{document}
\begin{titlingpage}
\maketitle
\end{titlingpage}
\end{document}

paperheight=15cm顺便说一下,我刚刚添加了序言第四行的部分。

感谢您的帮助。提前致谢。

答案1

没有足够的空间来按照预期排版标题。

我认为罪魁祸首是这两条线,它们不再有足够的空间来完成预期要做的事情,不管那是什么:

\renewcommand\maketitlehooka{\null\mbox{}\vfill}
\renewcommand\maketitlehookd{\vfill\null}

除非你确实有充分的理由,否则就把它们拿出来。

即使这样,也没有足够的空间,但由于您正在加载titling,您可以摆脱通常为日期保留的空间,因为您没有使用它,也可以使用负\droptitle长度将标题提升回需要的位置。在序言中:

\predate{}\postdate{}
\setlength{\droptitle}{-3cm}

我猜你正在尝试制作幻灯片。你考虑过使用投影机而不是从根本上调整不适合幻灯片的文档类别?

相关内容