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[export]{adjustbox}
\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?
Best Answer
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 formatsadjustbox
is one of the most useful package to do operation with boxes, here it is an extremely simple usage.\includegraphics
comes fromgraphicx
, invoked byadjustbox
. Thedemo
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 enginethe command
\vfill
is used to put stretchable vertical distance between consecutive objects, it is not a dimension, so it doesn't work insiderule
.\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