I'm using a template to write my resume (unfortunately I cannot find the source anymore, but I think it's a variation of liantze/AltaCV), and I wanted to extend it with a section formatted for projects, using minipages.
I'd like to get 3 columns:
- left one, containing the project title and some other info (date, course etc.);
- center one, containing the project description;
- right one, containing an image.
However, for some reason I can't figure out, the image is getting displayed above the other minipages.
What I'm getting
Desired result
Code
Class file (.cls)
I added the following:
\newcommand{\mygraphic}[1]{
\includegraphics[width=.5\linewidth]{#1}}
\newlength{\projectExtendedLeft}
\newlength{\projectExtendedCenter}
\newlength{\projectExtendedRight}
\setlength{\projectExtendedLeft}{0.2\textwidth}
\setlength{\projectExtendedCenter}{0.49\textwidth}
\setlength{\projectExtendedRight}{0.3\textwidth}
\newcommand{\projectExtended}[5]{%
\begin{minipage}[t]{\projectExtendedLeft}% minipage for left column with name/date/course
% PROJECT TITLE ---------------------------------------------------------------
\begin{minipage}[t]{\projectExtendedLeft}
{\Large \color{emphasis} #1}
\end{minipage}
\vspace{0.5em}
\par
% PROJECT DATE ----------------------------------------------------------------
\begin{minipage}[t]{3mm}% wrap marker in minipage to allow multi-line dates
\makebox[3mm][c]{\faCalendar}
\end{minipage}%
\hspace{0.5 em}%
\begin{minipage}[t]{\dimexpr \projectExtendedLeft-3mm-0.5em}% wrap date in minipage to allow multi-line dates
#2
\end{minipage}%
\par
\vspace{0.1em}
% PROJECT COURSE --------------------------------------------------------------
\begin{minipage}[t]{3mm}% wrap marker in minipage to allow multi-line courses
\makebox[3mm][c]{\faBook}
\end{minipage}%
\hspace{0.5em}%
\begin{minipage}[t]{\dimexpr \projectExtendedLeft-3mm-0.5em}% wrap place in minipage to allow multi-line courses
#3
\end{minipage}%
\end{minipage}%
\hspace{1em}%
% PROJECT DESCRIPTION -------------------------------------------------------------
\begin{minipage}[t]{\projectExtendedCenter}% minipage for description
#4
\par \normalsize
\vspace{0.5em}
\end{minipage}\hfill
% PROJECT IMAGE -------------------------------------------------------------------
\begin{minipage}[t]{\projectExtendedRight}% minipage for picture
\centering
\mygraphic{#5}
\label{fig:prova}
\end{minipage}%
}
Main (.tex)
\section{Other Projects}
\projectExtended{\href{https://github.com/mikyll}{\textbf{Project Name}}}
{From - To}
{\href{https://www.unibo.it/}{Course Name}}
{Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.}
{gfx/walle-placeholder.jpg}
I'm not much experienced in LaTeX, so let me know if you need further details to investigate the problem.



\includegraphicsis at the bottom of the image. Alignmenttforminipageor\parboxdoes mean: align the baseline of the top element with the baseline outside the box. So you need to move the baseline of the\includegraphicsupwards. You can do this either using\raiseboxor using packageadjustbox. See also https://tex.stackexchange.com/q/34166/277964 – cabohah May 07 '23 at 14:22