Problema con il comando \ item

Oct 15 2020

Ho il seguente documento (che è un curriculum):

\documentclass[letterpaper,11pt]{article}
\newlength{\outerbordwidth}
\pagestyle{empty}
\raggedbottom
\raggedright
\usepackage[svgnames]{xcolor}
\usepackage{framed}
\usepackage{tocloft}
\usepackage{graphicx}

% Special chars
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

%-----------------------------------------------------------
%Edit these values as you see fit

\setlength{\outerbordwidth}{3pt}  % Width of border outside of title bars
\definecolor{shadecolor}{gray}{0.75}  % Outer background color of title bars (0 = black, 1 = white)
\definecolor{shadecolorB}{gray}{0.93}  % Inner background color of title bars


%-----------------------------------------------------------
%Margin setup

\setlength{\evensidemargin}{-0.25in}
\setlength{\headheight}{0in}
\setlength{\headsep}{0in}
\setlength{\oddsidemargin}{-0.25in}
\setlength{\paperheight}{11in}
\setlength{\paperwidth}{8.5in}
\setlength{\tabcolsep}{0in}
\setlength{\textheight}{9.5in}
\setlength{\textwidth}{7in}
\setlength{\topmargin}{-0.3in}
\setlength{\topskip}{0in}
\setlength{\voffset}{0.1in}


%-----------------------------------------------------------
%Custom commands
\newcommand{\resitem}[1]{\item #1 \vspace{-2pt}}
\newcommand{\resheading}[1]{\vspace{8pt}
    \parbox{\textwidth}{\setlength{\FrameSep}{\outerbordwidth}
    \begin{shaded}
\setlength{\fboxsep}{0pt}\framebox[\textwidth][l]{\setlength{\fboxsep}{4pt}\fcolorbox{shadecolorB}{shadecolorB}{\textbf{\sffamily{\mbox{~}\makebox[6.762in][l]{\large #1} \vphantom{p\^{E}}}}}}
    \end{shaded}
    }\vspace{-5pt}
}
\newcommand{\ressubheading}[4]{
\begin{tabular*}{6.5in}{l@{\cftdotfill{\cftsecdotsep}\extracolsep{\fill}}r}
        \textbf{#1} & #2 \\
        \text{#3} & \textit{#4} \\
\end{tabular*}\vspace{-6pt}}
%-----------------------------------------------------------


\begin{document}

\begin{tabular*}{7in}{l@{\extracolsep{\fill}}r}
\textbf{\Large John Doe} \\
[email protected] \\
xx xx xx xx xx \\
Imaginary city COUNTRY \\
N\'{e}e le xx/xx/xxxx & \hfill
\smash{\includegraphics[width=2cm,height=3cm,keepaspectratio]{profil.png}} \\
\end{tabular*}
\\

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{Compétences}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{itemize}

    \item[] \ressubheading{Langages}{}{Node/Express, Typescript, PHP, SQL, Javascript, Python, HTML5, CSS3}{}
    \vspace{0.1cm}

\end{itemize}

\end{document}

In effetti, il documento ha altre due \begin{itemize}sezioni e ci sono più elementi itemizequi mostrati, ma non penso che sarebbe utile per la domanda.

Il problema è, per ogni riga che inizia con \item[]like:

\item[] \ressubheading{Langages}{}{Node/Express, Typescript, PHP, SQL, Javascript, Python, HTML5, CSS3}{}
    \vspace{0.1cm}

Ho cinque volte l'errore:

Missing control sequence inserted.
<inserted text> 

Ho già cercato questo errore e ho trovato molte risposte, ma ad essere sincero, sono lontano dall'essere un utente LaTex esperto e nessuna delle risposte che ho visto ha risolto il mio problema.

Uso il comando pdflatex doc.texper creare il pdf. Questo comando genera molti errori ma premendo invio per ogni errore, il pdf viene finalmente creato in modo pulito.

Tuttavia, vorrei non avere questi errori e anche imparare un po 'di più su LaTex ...

(Mi dispiace di non sapere quali tag usare per questa domanda, quindi l'ho messo itemizee enumitemma lo cambierei volentieri per qualcosa di più appropriato se un esperto mi dicesse i tag che dovrei usare con questa domanda)

Risposte

2 Werner Oct 15 2020 at 02:04

Il modello tenta erroneamente di inserire un riempimento a punti tra le due colonne del file \ressubheading. Poiché questo sembra una considerazione / problema del modello che potrebbe non essere necessario nel tuo caso d'uso, l'ho appena rimosso. In secondo luogo, c'è un uso di \textciò che richiede amsmath, che non era incluso. Invece, l'ho sostituito con \textsl.

\documentclass{article}

\usepackage[utf8]{inputenc}

\newcommand{\ressubheading}[4]{%
  \begin{tabular*}{6.5in}{ l r }
    \textbf{#1} & #2 \\
    \textsl{#3} & \textit{#4} \\
  \end{tabular*}}

\begin{document}

\begin{itemize}
  \item
    \ressubheading
      {Languages}
      {}
      {Node/Express, Typescript, PHP, SQL, Javascript, Python, HTML5, CSS3}
      {}

  \item
    \ressubheading
      {Devops \& Bonnes pratiques}
      {}
      {Docker, CI/CD via gitlab, TDD}
      {}

  \item
    \ressubheading
      {Base de données}
      {}
      {MySql, MongoDB}
      {}

  \item
    \ressubheading
      {Outils}
      {}
      {Git, Redmine, Visual Studio Code, SonarQube}
      {}
\end{itemize}

\end{document}

Quella sopra è una versione annacquata del tuo codice poiché è l'unico contenuto relativo al problema. Poiché non stai utilizzando il secondo e il quarto argomento nel modello, potrebbero esserci altre opzioni per la visualizzazione che ti interessa ottenere.