1

I'm using the awesome-cv template and have a problem tuning the cvskills environment and skill command. The environment cvskills has a tabular environment within, and I'd like to vertically align cells to the top. This is how the original environment looks like:

\newenvironment{cvskills}{%
  \vspace{\acvSectionContentTopSkip}
  \vspace{-2.0mm}
  \begin{center}
    \setlength\tabcolsep{1ex}
    \setlength{\extrarowheight}{0pt}
    \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} r L{\textwidth * \real{0.9}}}
}{%
  \end{tabular*}
  \end{center}
}

When I add [t] just after \begin{tabular*}{\textwidth}, it does not align to cells content to the top, cannot understand why.

Moving on, I can replace the r command to right align the first cell by a new column type x (see below) that sets some space an effectively carries text to the top, but this solution is not perfect because it does not account for differences in the height of rows in the table.

\newcolumntype{x}[1]{>{\centering\arraybackslash\hspace{0pt}\vspace{15pt}}m{#1}}

Does anybody have ideas on how to make [t] work, or how to workaround this so cells (at least the left one) can be vertically aligned to the top, no matter the height of the cell? Thanks

1 Answer 1

2

Adding the following to the preamble of your document should result in the expected output:

\newcolumntype{T}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\renewenvironment{cvskills}{%
  \vspace{\acvSectionContentTopSkip}
  \vspace{-2.0mm}
  \begin{center}
    \setlength\tabcolsep{1ex}
    \setlength{\extrarowheight}{0pt}
    \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} r T{\textwidth * \real{0.9}}}
}{%
    \end{tabular*}
  \end{center}
}
1
  • Works like a charm. Thank you very! :D Jan 13 at 18:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.