# How to add a vertical line and figures on the titlepage?

I'm styling a titlepage for the first time and I'm having some problems. I'd like to achieve something like this:

The blue rectangles are logos. I've been trying to get it right for hours, but couldn't do any better than the code underneath.

\documentclass{article}

\usepackage{parskip}
\usepackage{float}

\textwidth 16cm \textheight 23cm
\evensidemargin 0cm \oddsidemargin 0cm

\begin{document}
\begin{titlepage}
\begin{figure}[h]
\includegraphics[width=5cm]{../my_image1.jpg}
\end{figure}
\hspace*{2cm} % Whitespace to the left of the title page
\rule{1pt}{\vfill} % Vertical line
\hspace*{1cm} % Whitespace between the vertical line and title page text
\parbox[b]{13cm}{
{\Huge\bfseries My title}
}
\begin{figure}[h]
\includegraphics[width=5cm]{../my_image2.jpg}
\end{figure}
\end{titlepage}

\end{document}


The problems are obvious:

• The \vfill doesn't work. I'm trying to draw the line from beneath the upper logo to the end of the page.

• The lower logo doesn't appear at the desired place.

I tried using minipages, but that didn't work out, as I don't have any experience with them. Would you like to tell me how to move on or give me some hints?

Indeed you can do it with minipage!
This is the closest i could get, it fits an a4 format, anyway. Just hard-coded:

Here comes a brief explanation (code is following):

• geometry helps to define margins and paper formats

• adjustbox is one of the most useful package to do operation with boxes, here it is an extremely simple usage. \includegraphics comes from graphicx, invoked by adjustbox. The demo option puts black rectangles instead of the argument of \includegraphics

• xcolor provides the command \color

• as it's already being said, figure can cause some problems because it generates "mobile" images, whose position is determined by the engine

• the command \vfill is used to put stretchable vertical distance between consecutive objects, it is not a dimension, so it doesn't work inside rule. \vfill is a replacement for \vskip\fill, and \fill is the dimension (apparently it doesn't work as argument of \rule either, this I cannot explain...)

I suggest you see more documentation about minipage, which is extremely useful to give a structure to the page. It allows to create custom boxes quite easily, they are extremely useful to house images and text.
Here lies a useful minimal overview on minipage at page 3:
http://www.ncl.ac.uk/maths/students/teaching/latex/session5.pdf

\documentclass{article}

\usepackage{xcolor}

\usepackage[a4paper,top=25mm,left=20mm,textwidth=170mm,textheight=249.7mm]{geometry}

\begin{document}
\begin{titlepage}
\color[rgb]{.4,.4,1}
\hspace{5mm}
\includegraphics[width=5cm,height=15mm]{../my_image1.jpg}

\bigskip

\hspace{20mm}
\begin{minipage}{10mm}
\color[rgb]{.7,.7,1}
\rule{1pt}{226mm}
\end{minipage}
\begin{minipage}{133mm}
\vspace{10mm}
\color{black}
\sffamily
\Huge\bfseries My title

\vspace{30mm}

Some more text
\large

\vspace{140mm}

Some more text
\hspace{30mm} % or \hfill, if you want the square sticked
\color[rgb]{.4,.4,1} %                        to the right margin
\includegraphics[width=3cm,height=3cm]{../my_image2.jpg}
\end{minipage}
\end{titlepage}
\end{document}


Adjust all dimensions suitably by yourself to suit your needs. This uses tabular:

\documentclass{article}
\usepackage{graphicx,xcolor}
\usepackage[pass]{geometry}
\begin{document}
\newgeometry{left=4cm}
\begin{titlepage}
\hspace*{-2cm}\includegraphics[width=5cm]{example-image-a}

\vfill
\begin{tabular}[t]{l@{\hspace{1cm}}l}
\textcolor{blue!70!black}{\rule[-0.75\textheight]{1pt}{0.75\textheight}} % Vertical line
&
\begin{tabular}[t]{p{0.85\textwidth}}
\\
{\Huge\bfseries My title} \\[3cm]
{\Large Some more text} \\[6.5cm]
some more text \hfill \includegraphics[width=5cm]{example-image}
\end{tabular}
\end{tabular}

\end{titlepage}
\restoregeometry

\end{document}


Possibly something like this?

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{calc}
\begin{document}
\newsavebox{\firstlogo}
\sbox{\firstlogo}{\includegraphics[width=5cm]{../my_image1.jpg}}
\newlength{\firstlogoht}
\settototalheight{\firstlogoht}{\usebox{\firstlogo}}
\newsavebox{\titletext}
\sbox{\titletext}{%
\parbox{\textwidth-30mm-1pt}{%
\Huge\sffamily My title\bigskip\par
Some more text\par}}
\newsavebox{\lowertext}
\sbox{\lowertext}{%
\parbox{\textwidth-30mm-1pt}{%
\large\sffamily Some more text\hfill \includegraphics[width=5cm]{../my_image2.jpg}}}
\newlength{\titletextht}
\newlength{\lowertextht}
\settototalheight{\titletextht}{\usebox{\titletext}}
\settototalheight{\lowertextht}{\usebox{\lowertext}}
\begin{titlepage}
\setlength{\parindent}{0pt}%
\begin{minipage}{\textwidth}%
\usebox{\firstlogo}
\end{minipage}\par
\begin{minipage}{30mm}%
\hspace*{20mm}\rule{1pt}{\textheight-\firstlogoht}% Vertical line
\end{minipage}%
\begin{minipage}{\textwidth-30mm-1pt}%
\vspace*{20pt}%
\usebox{\titletext}\par
\vspace*{\dimexpr\textheight-\firstlogoht-\titletextht-\lowertextht-20pt}
\usebox{\lowertext}
\end{minipage}
\end{titlepage}
\end{document}


Note that this is one place where you really, really do not want your logos to be moved to wherever LaTeX thinks fit so you do not want them to float. Hence, don't use the figure environment (which defines a float).