From fcf66e0c8c8c0f5d590d5ac4411b13977aef8a30 Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Sat, 23 Jan 2021 03:02:06 +0000
Subject: CTAN sync 202101230302

---
 macros/latex/contrib/moderncv/moderncvbodyiii.sty | 27 +++++++++++++++--------
 1 file changed, 18 insertions(+), 9 deletions(-)

(limited to 'macros/latex/contrib/moderncv/moderncvbodyiii.sty')

diff --git a/macros/latex/contrib/moderncv/moderncvbodyiii.sty b/macros/latex/contrib/moderncv/moderncvbodyiii.sty
index a2de047a55..85fff25478 100644
--- a/macros/latex/contrib/moderncv/moderncvbodyiii.sty
+++ b/macros/latex/contrib/moderncv/moderncvbodyiii.sty
@@ -1,5 +1,5 @@
 %% start of file `moderncvbodyiii.sty'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
 %
 % This work may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
 %                identification
 %-------------------------------------------------------------------------------
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvbodyiii}[2015/07/28 v2.0.0 modern curriculum vitae and letter body variant: 3]
+\ProvidesPackage{moderncvbodyiii}[2021/01/21 v2.1.0 modern curriculum vitae and letter body variant: 3]
 
 % rules type options: "fullrules", "shortrules", "mixedrules" (default) or "norules"
 \@initializeif{\if@fullrules}\@fullrulesfalse
@@ -37,7 +37,9 @@
 %-------------------------------------------------------------------------------
 %                required packages
 %-------------------------------------------------------------------------------
-
+% provides the commands for the skillmatrix as well as the command 
+% \recompute@cvskillmatrix@lengths
+\RequirePackage[moderncvbodyiii]{moderncvskillmatrix}
 
 %-------------------------------------------------------------------------------
 %                overall body definition
@@ -96,6 +98,7 @@
   \setlength{\doubleitemcolumnwidth}{0.5\doubleitemcolumnwidth}%
   \setlength{\listdoubleitemcolumnwidth}{\maincolumnwidth-\listitemsymbolwidth-\separatorcolumnwidth-\listitemsymbolwidth}%
   \setlength{\listdoubleitemcolumnwidth}{0.5\listdoubleitemcolumnwidth}%
+  \recompute@cvskillmatrix@lengths
   % regular lengths
   \setlength{\parskip}{0\p@}}
 
@@ -143,13 +146,13 @@
   \renewcommand*{\subsectionrule}{}\fi
 
 \renewcommand*{\cvitem}[3][.25em]{%
-  \ifthenelse{\equal{#2}{}}{}{\hintstyle{#2}: }{#3}%
+  \ifstrempty{#2}{}{\hintstyle{#2}: }{#3}%
   \par\addvspace{#1}}
 
 \renewcommand*{\cvdoubleitem}[5][.25em]{%
   \begin{minipage}[t]{\doubleitemcolumnwidth}\hintstyle{#2}: #3\end{minipage}%
   \hfill% fill of \separatorcolumnwidth
-  \begin{minipage}[t]{\doubleitemcolumnwidth}\ifthenelse{\equal{#4}{}}{}{\hintstyle{#4}: }#5\end{minipage}%
+  \begin{minipage}[t]{\doubleitemcolumnwidth}\ifstrempty{#4}{}{\hintstyle{#4}: }#5\end{minipage}%
   \par\addvspace{#1}}
 
 \renewcommand*{\cvlistitem}[2][.25em]{%
@@ -159,14 +162,20 @@
 \renewcommand*{\cvlistdoubleitem}[3][.25em]{%
   \cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listdoubleitemcolumnwidth}#2\end{minipage}%
   \hfill% fill of \separatorcolumnwidth
-  \ifthenelse{\equal{#3}{}}%
+  \ifstrempty{#3}%
     {}%
     {\listitemsymbol\begin{minipage}[t]{\listdoubleitemcolumnwidth}#3\end{minipage}}}}
 
 \renewcommand*{\cventry}[7][.25em]{
   \begin{tabular*}{\maincolumnwidth}{l@{\extracolsep{\fill}}r}%
-    {\bfseries #4} & {\bfseries #5}\\%
-    {\itshape #3\ifthenelse{\equal{#6}{}}{}{, #6}} & {\itshape #2}\\%
+    % skip the company name and location line if both are empty, allowing one to show multiple roles within the same company without repeating it
+    \ifboolexpr{%
+      test {\ifstrempty{#4}}
+      and
+      test {\ifstrempty{#5}}}%
+      {}%
+      {{\bfseries #4} & {\bfseries #5}\\}%
+    {\itshape #3\ifstrempty{#6}{}{, #6}} & {\itshape #2}\\%
   \end{tabular*}%
   \ifx&#7&%
   \else{\\%
@@ -179,7 +188,7 @@
 \@initializelength{\cvitemwithcommentmainlength}
 \@initializelength{\cvitemwithcommentcommentlength}
 \renewcommand*{\cvitemwithcomment}[4][.25em]{%
-  \savebox{\cvitemwithcommentmainbox}{\ifthenelse{\equal{#2}{}}{}{\hintstyle{#2}: }#3}%
+  \savebox{\cvitemwithcommentmainbox}{\ifstrempty{#2}{}{\hintstyle{#2}: }#3}%
   \setlength{\cvitemwithcommentmainlength}{\widthof{\usebox{\cvitemwithcommentmainbox}}}%
   \setlength{\cvitemwithcommentcommentlength}{\maincolumnwidth-\separatorcolumnwidth-\cvitemwithcommentmainlength}%
   \begin{minipage}[t]{\cvitemwithcommentmainlength}\usebox{\cvitemwithcommentmainbox}\end{minipage}%
-- 
cgit v1.2.3

