No detallar en un moderncv /cventry modificado

No detallar en un moderncv /cventry modificado

Recibo este error al intentar itemizerenovar \cventryen moderncv:

Use of \@@array doesn't match its definition. \end{itemize}}

Mi modificado cventryse ve así:

\renewcommand*{\cventry}[7][.25em]{
    \begin{tabular}{@{}>{\raggedleft}p{.2\textwidth-\tabcolsep}p{.8\textwidth-\tabcolsep}@{}}%
        {\bfseries #2} & {\bfseries #3} \\%
        {\itshape #5} & {\itshape #4}\\%
        \ifthenelse{\equal{#7}{}}%
        {\end{tabular}}%
    {{} & {#7}\\\end{tabular}}%
\par\addvspace{#1}}

Esto es lo que quiero hacer:

\cventry{2016--2019}{Did this and that, including these tasks:%
    \begin{itemize}%
        \item 1;
        \item 2, with sub-items:
        \begin{itemize}%
            \item Sub-item (a)
            \item Sub-item (b)
        \end{itemize}
        \item item 3.
\end{itemize}}
}

Hago llamadas \usepackage{array}.

Probé las alternativas propuestas por @gonzalo-medina en este post:Listas con viñetas en moderncv cventry.

No me funcionaron. Sigo recibiendo el mismo error. ¿Quizás esto suceda porque estoy usando una versión modificada de \cventry?


Actualización sobre la solicitud de @mensch

Aquí el fragmento compilable:

\documentclass[11pt,a4paper,sans]{moderncv}   
\moderncvstyle{banking}          
\moderncvcolor{blue}      
\usepackage[scale=0.80]{geometry}
%__________________________________________________________________________________
% Customization:
%\usepackage{fontspec}%Rendering must be done with XeLatex, not with PDFLatex.
\renewcommand\rmdefault{cmr} %Sets roman default font to Computer Modern
\usepackage{microtype}
\usepackage{array}
%This is @gonzalo-medina's suggestion:
\usepackage{enumitem}
%The following resets the way of cv entries:
\usepackage{array}
\setlength{\tabcolsep}{1ex}
\renewcommand*{\cventry}[7][.25em]{
\begin{tabular}{@{}>{\raggedleft}p{.2\textwidth-\tabcolsep}p{.8\textwidth-\tabcolsep}@{}}%
    {\bfseries #2} & {\bfseries #3} \\%
    {\itshape #5} & {\itshape #4}\\%
    \ifthenelse{\equal{#7}{}}%
    {\end{tabular}}%
{{} & {#7}\\\end{tabular}}%
\par\addvspace{#1}}
%__________________________________________________________________________________
% personal data
\name{Carl}{Sagan}
\title{\large \textbf{Populists Buster}}                 
%----------------------------------------------------------------------------------
%            content
%----------------------------------------------------------------------------------
\begin{document}
%\begin{CJK*}{UTF8}{gbsn}                          % to typeset your resume in Chinese using CJK
%-----       resume       ---------------------------------------------------------
\makecvtitle
\section{Experience}
\subsection{Vocational}
\cventry{year--year}{Job title}{Employer}{City}{}{General description no longer than 1--2 lines.\newline{}%
Detailed achievements:%
\begin{itemize}[label=\textbullet]%
\item Achievement 1;
\item Achievement 2, with sub-achievements:
  \begin{itemize}%
  \item Sub-achievement (a);
  \item Sub-achievement (b), with sub-sub-achievements (don't do this!);
    \begin{itemize}
    \item Sub-sub-achievement i;
    \item Sub-sub-achievement ii;
    \item Sub-sub-achievement iii;
    \end{itemize}
  \item Sub-achievement (c);
  \end{itemize}
\item Achievement 3.
\end{itemize}
}
\cventry{year--year}{Job title}{Employer}{City}{}{Description line 1\newline{}Description line 2}

\end{document}

Lo estoy ejecutando en el último moderncvpaquete disponible en suRepositorio CTAN aquí.

Respuesta1

Creo que hay un malentendido y una línea de código incorrecta, pero hagámoslo paso a paso:

1. Malentendido

La definición estándar de comando \cventryes

\renewcommand*{\cventry}[7][.25em]{%
  \cvitem[#1]{#2}{%
    {\bfseries#3}%
    \ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
    \ifthenelse{\equal{#5}{}}{}{, #5}%
    \ifthenelse{\equal{#6}{}}{}{, #6}%
    .\strut%
    \ifx&#7&%
    \else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}

Sólo para el último parámetro ( #7) se utiliza una minipágina, que le permite utilizar itemizeetc.

Entonces, para el comando usado, cventrydebe finalizar el tabular e imprimir luego dentro de un argumento de minipágina 7 ( #7):

\newcommand*{\mycventry}[7][.25em]{
\begin{tabular}{@{}>{\raggedleft}p{.2\textwidth-\tabcolsep}p{.8\textwidth-\tabcolsep}@{}}%
    {\bfseries #2} & {\bfseries #3} \\%
    {\itshape #5} & {\itshape #4}\\%
    \end{tabular} % <===================================================
    \ifx&#7&%%
    \else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}% else <=============
    \fi
\par\addvspace{#1}}

2. Error de código

Su código usado dentro de su comando\cventy

\ifthenelse{\equal{#7}{}}%
{\end{tabular}}%

devuelve un error, use en su lugar

\ifx&#7&%%
        \else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}% else <=============
        \fi

Mostré el código corregido aquí.

Entonces, con el siguiente MWE (vea que definí un nuevo comando \mycventrypara poder mostrar la diferencia entre el código \cventryde clase original moderncvy el nuevo comando definido \mycventrycon su tabla y lista(s) insertada(s)):

\documentclass[11pt,a4paper,sans]{moderncv}   
\moderncvstyle{banking}          
\moderncvcolor{blue}      
\usepackage[scale=0.80]{geometry}
%__________________________________________________________________________________
% Customization:
%\usepackage{fontspec}%Rendering must be done with XeLatex, not with PDFLatex.
\renewcommand\rmdefault{cmr} %Sets roman default font to Computer Modern
\usepackage{microtype}
\usepackage{array}
%This is @gonzalo-medina's suggestion:
\usepackage{enumitem}
%The following resets the way of cv entries:
\usepackage{array}
\setlength{\tabcolsep}{1ex}

\newcommand*{\mycventry}[7][.25em]{% <==================================
\begin{tabular}{@{}>{\raggedleft}p{.2\textwidth-\tabcolsep}p{.8\textwidth-\tabcolsep}@{}}%
    {\bfseries #2} & {\bfseries #3} \\%
    {\itshape #5} & {\itshape #4}\\%
    \end{tabular} % <===================================================
    \ifx&#7&%% <========================================================
    \else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}%
    \fi
\par\addvspace{#1}}
%__________________________________________________________________________________
% personal data
\name{Carl}{Sagan}
\title{\large \textbf{Populists Buster}}                 
%----------------------------------------------------------------------------------
%            content
%----------------------------------------------------------------------------------
\begin{document}
%\begin{CJK*}{UTF8}{gbsn}                          % to typeset your resume in Chinese using CJK
%-----       resume       ---------------------------------------------------------
\makecvtitle
\section{Experience}
\subsection{Vocational}
\cventry{year--year}{Job title}{Employer}{City}{}{General description no longer than 1--2 lines.\newline{}%
Detailed achievements:%
\begin{itemize}[label=\textbullet]%
\item Achievement 1;
\item Achievement 2, with sub-achievements:
  \begin{itemize}%
  \item Sub-achievement (a);
  \item Sub-achievement (b), with sub-sub-achievements (don't do this!);
    \begin{itemize}
    \item Sub-sub-achievement i;
    \item Sub-sub-achievement ii;
    \item Sub-sub-achievement iii;
    \end{itemize}
  \item Sub-achievement (c);
  \end{itemize}
\item Achievement 3.
\end{itemize}
}
\mycventry{year--year}{Job title}{Employer}{City}{}{Description line 1\newline{}Description line 2} % <==========
\mycventry{year--year}{Job title}{Employer}{City}{}{General description no longer than 1--2 lines.\newline{}% <=============
Detailed achievements:%
\begin{itemize}[label=\textbullet]%
\item Achievement 1;
\item Achievement 2, with sub-achievements:
  \begin{itemize}%
  \item Sub-achievement (a);
  \item Sub-achievement (b), with sub-sub-achievements (don't do this!);
    \begin{itemize}
    \item Sub-sub-achievement i;
    \item Sub-sub-achievement ii;
    \item Sub-sub-achievement iii;
    \end{itemize}
  \item Sub-achievement (c);
  \end{itemize}
\item Achievement 3.
\end{itemize}
}
\end{document}

Obtendrá el siguiente pdf sin mensajes de error:

pdf resultante

información relacionada