LaTeX 中的自定义标题页

Custom titlepage in LaTeX

我正在尝试根据我组织的模板(在 Word 中)在 LaTeX 中创建自定义标题页。

我通过以下代码设法接近了它:

\documentclass{report}
\usepackage[a4paper,twoside,bindingoffset=0cm,nomarginpar,includeheadfoot,headheight=1.25cm,headsep=0cm,top=1cm,bottom=1.8cm,inner=1.75cm,outer=1.75cm,showframe]{geometry}
\usepackage{xcolor}
\usepackage{colortbl}
\usepackage{calc}
\usepackage{graphicx}
\usepackage{tabularx}
\definecolor{greenBE}{RGB}{141,182,60}
\definecolor{blueBE}{RGB}{0,111,144}

\title{La qualité de l'air en Région de Bruxelles-Capitale}
\newcommand{\subtitle}{Rapport annuel 2019}
\author{}

\usepackage{lipsum}

\begin{document}

\makeatletter
\begin{titlepage}
\thispagestyle{empty}
\newlength{\rulewidth}\setlength{\rulewidth}{3cm}%
\newlength{\logowidth}\setlength{\logowidth}{2.5cm}%
\newlength{\logoheight}\setlength{\logoheight}{\logowidth*\ratio{592pt}{1538pt}}% image size : 1538 x 592
\begingroup
\setlength{\tabcolsep}{0pt}
\renewcommand{\arraystretch}{0}
\noindent%
\begin{tabularx}{\textwidth}{p{\rulewidth}c>{\centering}X}
\cellcolor{blueBE}&\includegraphics[width=\logowidth]{ILLU_FR_LogoBE.jpg}&\cellcolor{greenBE}\color{white}{RAPPORT TECHNIQUE}
\end{tabularx}
\endgroup

\vspace*{3cm}

\color{blueBE}
\raggedleft\MakeUppercase{\Large\textbf{\@title}}\
~\
\raggedleft\large\textbf{\subtitle}

\vfill

\raggedleft\MakeUppercase{\Large\@date}\

\vspace*{4cm}

\noindent%
\color{blueBE}{\rule{\textwidth}{\logoheight}}
\end{titlepage}
\makeatother
\restoregeometry

\tableofcontents

\chapter{Prerequisites}\label{prerequisites}

\lipsum

\end{document}

和图像徽标 ILLU_FR_LogoBE.jpg

但是,您可以在下面注意到,第一页顶部的文本“RAPPORT TECHNIQUE”放大了行的高度。相反,我想将它垂直居中在徽标的中间。

我做错了什么?

非常感谢,

亚历山德罗

您可以使用 \usepackage[export]{adjustbox},然后对图形使用不同的 valign 选项。

\documentclass{report}
\usepackage[a4paper,twoside,bindingoffset=0cm,nomarginpar,includeheadfoot,headheight=1.25cm,headsep=0cm,top=1cm,bottom=1.8cm,inner=1.75cm,outer=1.75cm,showframe]{geometry}
\usepackage{xcolor}
\usepackage{colortbl}
\usepackage{calc}
\usepackage{graphicx}
\usepackage{tabularx}
\definecolor{greenBE}{RGB}{141,182,60}
\definecolor{blueBE}{RGB}{0,111,144}

\title{La qualité de l'air en Région de Bruxelles-Capitale}
\newcommand{\subtitle}{Rapport annuel 2019}
\author{}

\usepackage{lipsum}

\usepackage[export]{adjustbox}

\begin{document}

\makeatletter
\begin{titlepage}
\thispagestyle{empty}
\newlength{\rulewidth}\setlength{\rulewidth}{3cm}%
\newlength{\logowidth}\setlength{\logowidth}{2.5cm}%
\newlength{\logoheight}\setlength{\logoheight}{\logowidth*\ratio{592pt}{1538pt}}% image size : 1538 x 592
\begingroup
\setlength{\tabcolsep}{0pt}
%\renewcommand{\arraystretch}{0}
\noindent%
\begin{tabularx}{\textwidth}{p{\rulewidth}c>{\centering}X}
\cellcolor{blueBE}&\includegraphics[width=\logowidth,valign=t]{ILLU_FR_LogoBE.jpg}&\cellcolor{greenBE}\color{white}RAPPORT TECHNIQUE
\end{tabularx}%
\endgroup

\vspace*{3cm}

\color{blueBE}
\raggedleft\MakeUppercase{\Large\textbf{\@title}}\
~\
\raggedleft\large\textbf{\subtitle}

\vfill

\raggedleft\MakeUppercase{\Large\@date}\

\vspace*{4cm}

\noindent%
\color{blueBE}{\rule{\textwidth}{\logoheight}}
\end{titlepage}
\makeatother
\restoregeometry

\tableofcontents

\chapter{Prerequisites}\label{prerequisites}

\lipsum

\end{document}