标题页未垂直居中

标题页未垂直居中

我注意到我的标题页没有垂直居中。我尝试了\vfill\vspace{\fill}\vspace*\usepackage{titling}

\documentclass[12pt, oneside]{article}

         \usepackage{graphicx}

\usepackage{geometry}
\geometry{a4paper}
\usepackage{float}
\usepackage[american]{babel}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[onehalfspacing]{setspace}

\begin{document}

\begin{titlepage}
\begin{center}

\begin{huge}
name of university \\
\end{huge}

\begin{figure}[H]
\centering
\includegraphics[width=0.5\textwidth]{Unilogo}
\end{figure}

\vspace{1cm}
{\Large name of institute} \\
\vspace{5mm}
Research focus \textit{research name} \\
Project \textit{project name} \\
\vspace{2cm}
\begin{large}
\textbf{title of thesis} \\
\end{large}
\vspace{5mm}
Master thesis in Biomedical Sciences \\
Submitted on Date \\
\vspace{1cm}
name \\
Matriculation number: \\
\vspace{2.5cm}
\begin{tabular}{rl}
{\bfseries Supervisors} & name and name\\
{\bfseries Examiners} & name and name \\
\end{tabular}

\end{center}
\end{titlepage}

\end{document}

答案1

当您有如下标记时

Submitted on Date \\
\vspace{1cm}
name 

name我猜想,在包含该内容的行之后添加了垂直空格,这不是预期的结果。

避免使用\\外部表格,并且始终在表格前留一个空行\vspace

Submitted on Date

\vspace{1cm}
name 

产生两行文本之间有空格的输出。

如果您有尺寸变化(例如,\huge始终在组结束前留一个空行),否则您将获得在正常尺寸基线上设置的巨大文本。

不要figure在标题页内使用,只需包含图形。

你可以使用\vspace*{\fill}

在此处输入图片描述

\documentclass[12pt, oneside]{article}
\usepackage{geometry}
\geometry{a4paper}
\usepackage{float}
\usepackage[american]{babel}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[onehalfspacing]{setspace}
\usepackage{graphicx}
\begin{document}

\begin{titlepage}
\vspace*{\fill}
\begin{center}

\begin{huge}
name of university

\end{huge}


\includegraphics[width=0.5\textwidth]{example-image}


\vspace{1cm}
{\Large name of institute

}

\vspace{5mm}
Research focus \textit{research name} \\
Project \textit{project name}

\vspace{1.5cm}

\begin{large}
\textbf{title of thesis}

\end{large}

\vspace{5mm}
Master thesis in Biomedical Sciences \\
Submitted on Date 

\vspace{1cm}
name \\
Matriculation number:

\vspace{1.5cm}
\begin{tabular}{rl}
{\bfseries Supervisors} & name and name\\
{\bfseries Examiners} & name and name \\
\end{tabular}

\end{center}
\vspace*{\fill}
\end{titlepage}

\end{document}

相关内容