Skip to content

Commit

Permalink
Fix cvskill overflow and alignment
Browse files Browse the repository at this point in the history
Fixes issues related to cvskill flowing off page and fixes vertical alignment of table when skill items wrap
  • Loading branch information
dcsim authored Jun 28, 2024
1 parent e6efa6b commit add5bc0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions awesome-cv.cls
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
%-------------------------------------------------------------------------------
% Needed to make fixed length table
\RequirePackage{array}
\RequirePackage{tabularx}
% Needed to handle list environment
\RequirePackage{enumitem}
% Needed to handle text alignment
Expand Down Expand Up @@ -426,6 +427,7 @@
% Commands for utilities
%-------------------------------------------------------------------------------
% Use to align an element of tabular table
\renewcommand{\tabularxcolumn}{p}
\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}}
Expand Down Expand Up @@ -722,18 +724,17 @@
\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}}}
\tabularx{\textwidth}{r>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}X}
}{%
\end{tabular*}
\end{center}
\endtabularx\par
}

% Define a line of cv information(skill)
% Usage: \cvskill{<type>}{<skillset>}
\newcommand*{\cvskill}[2]{%
\skilltypestyle{#1} & \skillsetstyle{#2} \\
\skilltypestyle{#1} & \leavevmode\skillsetstyle{#2} \\
}

% Define an environment for cvitems(for cventry)
Expand Down

0 comments on commit add5bc0

Please sign in to comment.