
ドキュメントのタイトルとタイトル ページの名前を垂直に揃えたいです。現在の LaTeX は次のようになります。
\documentclass[a4paper]{article}
\title{ ... }}
\author{ ... }
\date{{ ... }}
\begin{document}
\begin{titlepage}
\maketitle
\end{titlepage}
\end{document}
しかし、これではコンテンツがドキュメントの上半分に表示されてしまいます。これを垂直方向に中央揃えにしたいと思います。この郵便受けを使用するように求められます。しかし、タイトル ページで\vplace
どのように使用すればよいかわかりません。\vplace
私は試した
\begin{vplace}[1]
\begin{titlepage}
\maketitle
\end{titlepage}
\end{vplace}
そしてまた
\begin{vplace}[1]
\title{ ... }}
\author{ ... }
\date{{ ... }}
\end{vplace}
しかし、次のようなエラーが発生しますEnvironment vplace undefined
。クラスが必要なようですmemoir
。しかし、Overleaf はドキュメント クラスを認識しませんmemoir
。ドキュメント クラスで同じことを実現するにはどうすればよいでしょうか?
答え1
パッケージにはコマンドtitling
をカスタマイズするためのツールが含まれていますmaketitle
。次に例を示します。
\documentclass[a4paper]{article}
\usepackage{showframe}
\renewcommand{\ShowFrameLinethickness}{0.3pt}
\usepackage{titling}
\setlength{\droptitle}{-9.5ex}
\renewcommand{\maketitlehooka}{\vfill\bfseries}
\renewcommand{\maketitlehookb}{\normalfont}
\renewcommand{\maketitlehookd}{\vfill\clearpage}
\title{The Quangle-Wangle’s Hat}
\author{Edward Lear}
\date{(1876)}
\begin{document}
\begin{titlingpage}
\maketitle
\end{titlingpage}
\end{document}
答え2
個人的には、TiKz
配置をより適切に制御でき(私の観点)、計算コードが理解しやすいため、これを選択します。TiKz
オプションについては、編集を参照してください。
\documentclass[]{article}
\title{Project Title}
\date{2016-31-01}
\author{Author Name}
%\usepackage[showframe]{geometry}
\usepackage{titling}
\renewcommand\maketitlehooka{\null\mbox{}\vfill}
\renewcommand\maketitlehookd{\vfill\null}
\begin{document}
\begin{titlingpage}
\maketitle
\end{titlingpage}
\end{document}
編集 --- tikz を使用したタイトルページ
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{titlepage}
\begin{tikzpicture}[remember picture, overlay]
\draw[line width = 2pt] ($(current page.north west) + (1in,-1in)$)
rectangle ($(current page.south east) + (-1in,1in)$);
\draw[line width = 1pt, blue] ($(current page.center) + (-1in,0in)$) --
($(current page.center) + (1in,0in)$)node[pos=0.5,above](){%
\textbf{\LARGE Escola Secundária Domingos Sequeira}\\[4.5cm]
};
\end{tikzpicture}
\vfill
% Bottom of the page
\centering{\bf \large \today}
\end{titlepage}
\end{document}