0

the following command

\newcommand{\twentyitem}[5]{%
    \\ \parbox[t][][t]{18mm}{\raggedright \small #1}& 
    \parbox[t]{0.83\textwidth}{%
        \textbf{#2}%
        \hfill%
        {\emph{\scriptsize#3}}\\%
        #4\\%
        \emph{\small#5}
    }\\
}

results in the following style

enter image description here

As can be seen, the bold text (argument #2) is followed by \hfill and finally, argument #3 is displayed on the right side of the screen.

What I want is the date to be shown aligned with the first row of the bold text, i.e. one row higher than right now. Of course, this is related to the \hfill command. However, I am not sure how to achieve my goal.

One can download the template here and the relevant file is twentysecondcv.cls where the function can be found in rows 294-301. Note, however, the function is slightly different to the one posted above, but the problem I am facing is identical.

Could anyone help me rewrite this function?

Any help is appreciated!

David Carlisle
  • 757,742
m0byn
  • 17
  • Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for the users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – samcarter_is_at_topanswers.xyz Dec 11 '23 at 15:41
  • 1
    I am aware that a MWE is always the best way to go. However, the template I use involves several documents linked. As I am not sure how to create a MWE in such circumstances I decided to link the files and also explicitly mark the relevant lines of code. If you are willing to teach me how to create a MWE in such a situation I am more than motivated to edit the question and learn! – m0byn Dec 11 '23 at 15:58
  • Linking to the class is a good starting point. However the question itself should also contain a small, but compilable test, which shows how to use this class. This way, users could directly start to work on a solution without having to create a test file first. – samcarter_is_at_topanswers.xyz Dec 11 '23 at 16:02
  • with no code shown it's only a guess but probably replace \textbf{#2}% by \textbf{\begin{tabular}[t]{@{}l@{}}#2\end{tabular}}% – David Carlisle Dec 11 '23 at 16:13
  • Have you tried putting the date in a \smash{\raisebox{up}{date}} ? – rallg Dec 11 '23 at 16:23
  • @DavidCarlisle this is exactly what I was looking for! If you write that as an answer I would mark it as solved! – m0byn Dec 11 '23 at 16:30
  • Is this inside a tabular? You have a line ending with &. – John Kormylo Dec 11 '23 at 22:14
  • Actually no. I was wondering the same. However, as I am not that skilled in LaTeX programming I thought it might be related to the \parbox command – m0byn Dec 12 '23 at 14:19

1 Answers1

1

with no code shown it's only a guess but probably replace \textbf{#2}% by \textbf{\begin{tabular}[t]{@{}l@{}}#2\end{tabular}}%

David Carlisle
  • 757,742