I'm kinda new to latex and try to align a minipage
to the top-line of a multiline section heading.
The code to produce a new entry is:
%%% When? - Where? - What? - Details? %%%
\newcommand{\datedsubsectionmod}[4]{%
\cvsubsection[#2]{#3 \hfill \small{\textlf{\scshape{#2}}}}%
\begin{minipage}[b][][t]{5cm}
\vspace*{-.7ex}\hspace*{-3cm}\footnotesize #1
\end{minipage}
\raggedright
\begin{small}
#4
\end{small}
}
Does someone with more Latex experience can does have an idea how to achieve this?
Thanks everyone in advance! :)
Backstory
I'm trying to use Latex for my next CV and used the following template I found on Overleaf. I need to make some adjustments to account for an CV entry where the title spans over multiple lines. The date to the relevant entry is aligned at the bottom but I would be nicer to have it at the top.
The template uses a minipage to place the data next to it. I tried to change the b
and t
modifies however had no luck with it.
The cvsubsection
seems to define a section
-like command, however I'm new to Latex and I might guess wrong here. The definition is:
\newcounter{cvsubsection}
\titleclass{\cvsubsection}{straight}[\part]
\titleformat{\cvsubsection}
{\raggedright}
{}{0em}
{}
\titlespacing*{\cvsubsection}{0pt}{3.5ex plus 1ex minus .2ex}{-2.5ex}
Update
I found a way to achieve kinda the layout I was looking for. Instead of placing the name of the university in the heading I put it in a separate minipage. This now has the effect that the heading stays within one line and the minipages are right below and can be top-aligned to each other. Then, by experimenting with negative \vspace{}
something good looking can be produced.
The modified command is
\newcommand{\datedsubsectionmod}[4]{%
\cvsubsection[#2]{#3}% \hfill \small{\textlf{\scshape{#2}}}}%
\begin{minipage}[t][][t]{5cm}
\vspace*{-1.7ex}\hspace*{-3cm}\footnotesize #1
\end{minipage}%
\hspace*{0.5cm}%
\begin{minipage}[t][][t]{8cm}
\begin{flushright}
\vspace*{-1.7ex}\small{\textlf{\scshape{#2}}}
\end{flushright}
\end{minipage}\vspace*{.7ex}
\raggedright
\begin{small}
#4
\end{small}
}
which produces this result