我创建了一个自定义标题,除了标题和正文之间有一些不必要的垂直间距外,它非常完美。目前间距约为 14 毫米,我想将其减小到 7 毫米左右。我尝试过的所有方法都无法减小间距:我尝试过vspace{-7mm}
各种方法,也尝试过调整小页面的高度,但都无济于事。我的代码如下,并附有输出图片。
\documentclass[12pt,letterpaper]{article}
\usepackage{titling}
\usepackage{graphicx,xcolor}
\usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm,headheight=50pt,headsep=0pt]{geometry}
\usepackage{amsmath,amsthm,amsfonts,amssymb,amscd,mathrsfs}
\usepackage{lastpage, enumerate, fancyhdr}
\usepackage{hyperref}
\usepackage{csquotes}
\allowdisplaybreaks
\setlength\parindent{0pt}
\raggedbottom
%\usepackage{showframe}
\renewcommand\maketitlehooka{%
\vspace{-10cm}
\begin{minipage}[t][10cm][b]{\textwidth}
\begin{minipage}{.35\textwidth}
Calculus II --- Quiz 8 \\ November 24, 2019
\end{minipage}%
\begin{minipage}{.65\textwidth}
\raggedleft
\vspace{5mm} Full Name: \underline{\hspace{4cm}}
\end{minipage}%
\vspace{2mm}
\line(1,0){500}
\textit{ Answer all of the following problems. You must \textbf{show all of your work} to receive full credit. This quiz is worth 10 points. }
\end{minipage}
\begin{minipage}[b][0cm][b]{\textwidth}
\author{} %leave empty
\date{} %leave empty
\title{} %leave empty
\vspace{-1cm}
\end{minipage}
}
\begin{document}
\maketitle
\vspace{-3.5cm}
1) I would like the vertical space between this line and \enquote{This quiz is worth 10 points} to be about half the amount it currently is.
\end{document}
答案1
为什么不利用这个fancyhdr
包呢?要更改斜体标题最后一行和实际文本第一行之间的间距,请headsep
根据您的喜好更改值。
\documentclass[12pt,letterpaper]{article}
\usepackage{titling}
\usepackage{graphicx,xcolor}
\usepackage[top=4.25cm, bottom=2cm, left=2cm, right=2cm,headheight=65pt,headsep=15pt]{geometry}
\usepackage{amsmath,amsthm,amsfonts,amssymb,amscd,mathrsfs}
\usepackage{lastpage, enumerate, fancyhdr}
\usepackage{tabularx,calc,booktabs} %<----- added
\usepackage{csquotes}
\usepackage{hyperref}
\allowdisplaybreaks
\setlength\parindent{0pt}
\raggedbottom
%\usepackage{showframe}
\lhead{\begin{tabularx}{\linewidth}{@{}l>{\raggedleft\arraybackslash}X@{}}
Calculus II --- Quiz 8 \\
November 24, 2019 & Full Name: \underline{\hspace{4cm}}\\
\midrule
\multicolumn{2}{@{}p{\textwidth}@{}}{\textit{Answer all of the following problems. You must \textbf{show all of your work} to receive full credit. This quiz is worth 10 points.}}
\end{tabularx}}
\renewcommand{\headrulewidth}{0pt}
\pagestyle{fancy}
\begin{document}
1) I would like the vertical space between this line and \enquote{This quiz is worth 10 points} to be about half the amount it currently is.
\end{document}
答案2
删除最后一个(空的)小页面并使用\maketitlehookd
。无关:我借此机会稍微简化了你的序言。
\documentclass[12pt,letterpaper]{article}
\usepackage{titling}
\usepackage{graphicx,xcolor}
\usepackage[margin=2cm, headheight=50pt, headsep=0pt]{geometry}
\usepackage{amsmath, amsthm, amssymb, amscd, mathrsfs}
\usepackage{lastpage, enumerate, fancyhdr}
\usepackage{hyperref}
\usepackage{csquotes}
\allowdisplaybreaks
\setlength\parindent{0pt}
\raggedbottom
%\usepackage{showframe}
\setlength{\droptitle}{-10cm}%
\renewcommand\maketitlehooka{%
\begin{minipage}[t][10cm][b]{\textwidth}
\begin{minipage}{.35\textwidth}
Calculus II --- Quiz 8 \\ November 24, 2019
\end{minipage}%
\begin{minipage}{.65\textwidth}
\raggedleft
\vspace{5mm} Full Name: \underline{\hspace{4cm}}
\end{minipage}%
\vspace{2mm}
\line(1,0){500}
\textit{ Answer all of the following problems. You must \textbf{show all of your work} to receive full credit. This quiz is worth 10 points. }
\end{minipage}
}
\author{} %leave empty
\date{} %leave empty
\title{} %leave empty
\renewcommand{\maketitlehookd}{\vspace{-7\baselineskip}}
\begin{document}
\maketitle
1) I would like the vertical space between this line and \enquote{This quiz is worth 10 points} to be about half the amount it currently is.
\end{document}