0

I'm trying to update my CV using an overleaf template, and the template sets out "education" items in a table, according to the code snippet below. I would like the text in all columns (in particular the right hand column) to be top aligned, but the [t] doesn't seem to have any effect. How can I make this top aligned?

What I have enter image description here

What I want[![enter image description here][2]][2]

\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}

\newcommand*{\cventrymsci}[4]{%
  \vspace{-2.0mm}
  \setlength\tabcolsep{0pt}
  \setlength{\extrarowheight}{0pt}
  \begin{tabular*}{\textwidth}[t]{@{\extracolsep{\fill}} L{\textwidth - 4.5cm} R{4.5cm}}
      \ifempty{#2#3}
      {\entrytitlestyle{#1} & \entrydatestyle{#4} \\}
      {\entrytitlestyle{#1} & \entrylocationstyle{#2} \\
      \entrypositionstyle{#4} & \entrydatestyle{#3} \\}
    %\multicolumn{2}{L{\textwidth}}{\descriptionstyle{#5}}
  \end{tabular*}%
5
  • 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. Commented Nov 8, 2023 at 16:26
  • 1
    [t] aligns the table as a whole with text on the same line but your table is full width so has nothing on the same line so [t] does not do much. The alignment of text within the cells depends on code you have not shown. Commented Nov 8, 2023 at 16:30
  • @DavidCarlisle I've added the code for where I believe the column styles are defined, if more context is needed I'll create a link to the project
    – Beth Long
    Commented Nov 8, 2023 at 17:07
  • 1
    well as I suspected you used m instead of p But in general you should always post complete small documents that show the problem and allow answers to be tested, not whole projects and not disconnected fragments. Commented Nov 8, 2023 at 17:09
  • Thank you that works perfectly, if you post it as an answer I’ll mark it as solved
    – Beth Long
    Commented Nov 8, 2023 at 17:18

1 Answer 1

2

You used m for vertical centred columns, you want the default p column type for top aligned parboxes.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .