! LaTeX 오류: 뭔가 잘못되었습니다. 아마도 \item이 누락되었을 수 있습니다. - \textbf를 추가할 때

! LaTeX 오류: 뭔가 잘못되었습니다. 아마도 \item이 누락되었을 수 있습니다. - \textbf를 추가할 때

C 템플릿을 다운로드하여 이를 사용하여 이력서를 작성하고 있습니다. "업무 경험" 섹션에서 나는 \textbf획득한 관련 기술에 따라 경험을 분류하기 위해 굵은 선을 추가하기로 결정했습니다. 첫 번째 rSubsection이력서(프로젝트 관리 참조)에서는 효과가 있었습니다. rSubsection아래에 표시된 두 번째(기술적 능력)에서는 첫 번째 \textbf줄에서 오류가 발생합니다. 두 번째(팀워크)는 잘 작동합니다!

\begin{rSection}{Working Experience} 
\begin{rSubsection}{University of city}{November 2021 - Present}{Postdoctoral Researcher}{city, country} 
\textbf{Project Management} 
\item Leading a research project 
\item Delivered project milestones on time. 
\end{rSubsection}

\begin{rSubsection}{University of city}{October 2016 - October 2019}{Imaging Scientist}{City, Country}

\textbf{Technical Skills} %the moment I use this line I get an error on the line below
\item Lab Maintenance: microscope setup, restocking of basic consumables.

\textbf{Teamwork}
\item Sharing expertise with undergraduate and postgraduate students

\end{rSubsection}

에러 메시지:

! LaTeX Error: Something's wrong--perhaps a missing \item.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.73 \item M
            aintenance: microscope setup, restocking of basic consumables.

템플릿 부분도 다음과 같습니다.

%   SECTION FORMATTING
%----------------------------------------------------------------------------------------

% Defines the rSection environment for the large sections within the CV
\newenvironment{rSection}[1]{ % 1 input argument - section name
  \sectionskip
  \MakeUppercase{\bf #1} % Section title
  \sectionlineskip
  \hrule % Horizontal line
  \begin{list}{}{ % List for each individual item in the section
    \setlength{\leftmargin}{1.5em} % Margin within the section
  }
  \item[]
}{
  \end{list}
}

%----------------------------------------------------------------------------------------
%   WORK EXPERIENCE FORMATTING
%----------------------------------------------------------------------------------------

\newenvironment{rSubsection}[4]{ % 4 input arguments - company name, year(s) employed, job title and location
 {\bf #1} \hfill {#2} % Bold company name and date on the right
 \ifthenelse{\equal{#3}{}}{}{ % If the third argument is not specified, don't print the job title and location line
  \\
  {\em #3} \hfill {\em #4} % Italic job title and location
  }\smallskip
  \begin{list}{$\cdot$}{\leftmargin=0em} % \cdot used for bullets, no indentation
   \itemsep -0.5em \vspace{-0.5em} % Compress items in list together for aesthetics
  }{
  \end{list}
  \vspace{0.5em} % Some space after the list of bullet points
}

% The below commands define the whitespace after certain things in the document - they can be \smallskip, \medskip or \bigskip
\def\namesize{\huge} % Size of the name at the top of the document
\def\addressskip{\smallskip} % The space between the two address (or phone/email) lines
\def\sectionlineskip{\medskip} % The space above the horizontal line for each section 
\def\nameskip{\bigskip} % The space after your name at the top
\def\sectionskip{\medskip} % The space after the heading section

누락된 부분 이 없으므로 추가하는 \item에 문제가 있는 것이 틀림없지 \textbf만 어떻게 작동하는지 이해할 수 없을 때도 있고 그렇지 않을 때도 있습니다!

답변1

OP 코드는 rSection다음의 수정된 버전(환경 추가) 입니다.Steven B. Segletes가 제공한 코드에 대한 대답으로rSubsection에서 목록을 비활성화하는 방법은 무엇입니까?.

연결된 코드에서는 rSubsection환경에 텍스트나 테이블을 삽입할 수 있습니다. 뿐만 아니라 \item.

하지만 환경에서 가장 먼저 rSubsection해야 할 일은 \item.

를 사용하여 목록 항목에서 글머리 기호를 숨길 수 있습니다 \item[].

\normalfont모든 내용이 굵은 글씨로 표시되는 것을 방지하기 위해 환경 코드에 를 추가했습니다 rSection.

OP 코드에서 사용되지 않는 \namesize, \addressskip및 정의도 제거했습니다 .\nameskip

OP가 누락되었으므로 \usepackage{ifthen}추가합니다(에 필요함 \ifthenelse).

\documentclass[11pt]{article}
\usepackage{ifthen}
%   SECTION FORMATTING
%----------------------------------------------------------------------------------------

% Defines the rSection environment for the large sections within the CV
\newenvironment{rSection}[1]{ % 1 input argument - section name
  \sectionskip
  \MakeUppercase{\bf #1} % Section title
  \sectionlineskip
  \hrule % Horizontal line
  \begin{list}{}{ % List for each individual item in the section
    \setlength{\leftmargin}{1.5em} % Margin within the section
  }
  \normalfont\item[]
}{
  \end{list}
}

%----------------------------------------------------------------------------------------
%   WORK EXPERIENCE FORMATTING
%----------------------------------------------------------------------------------------

\newenvironment{rSubsection}[4]{ % 4 input arguments - company name, year(s) employed, job title and location
 {\bf #1} \hfill {#2} % Bold company name and date on the right
 \ifthenelse{\equal{#3}{}}{}{ % If the third argument is not specified, don't print the job title and location line
  \\
  {\em #3} \hfill {\em #4} % Italic job title and location
  }\smallskip
  \begin{list}{$\cdot$}{\leftmargin=0em} % \cdot used for bullets, no indentation
   \itemsep -0.5em \vspace{-0.5em} % Compress items in list together for aesthetics
  }{
  \end{list}
  \vspace{0.5em} % Some space after the list of bullet points
}

% The below commands define the whitespace after certain things in the document - they can be \smallskip, \medskip or \bigskip
\def\sectionlineskip{\medskip} % The space above the horizontal line for each section 
\def\sectionskip{\medskip} % The space after the heading section

\begin{document}

\begin{rSection}{Working Experience} 
\begin{rSubsection}{University of city}{November 2021 - Present}{Postdoctoral Researcher}{city, country} 
\item[] \textbf{Project Management} % added a \item[] because we need here an \item, but the bullet is hidden with the blank option []
\item Leading a research project 
\item Delivered project milestones on time. 
\end{rSubsection}

\begin{rSubsection}{University of city}{October 2016 - October 2019}{Imaging Scientist}{City, Country}

\item[] \textbf{Technical Skills} % added a \item[] because we need here an \item, but the bullet is hidden with the blank option []
\item Lab Maintenance: microscope setup, restocking of basic consumables.

\textbf{Teamwork} % \item[] not needed here. Moreover, without the `\item[]` here, a slight vertical space (welcomed) is added.
\item Sharing expertise with undergraduate and postgraduate students

\end{rSubsection}
\end{rSection} % <-- added (missing in the OP code)

\end{document}

여기에 이미지 설명을 입력하세요

메모:Steven B. Segletes의 코드는 다음에서 사용됩니다.이 튜토리얼LaTeX로 이력서를 작성하기 위해 Drshika Asher로부터 연락을 받았습니다. 이렇게 하면 다음과 같은 레이아웃이 제공됩니다.

여기에 이미지 설명을 입력하세요

(OP에서 제공한 코드와 관련이 없지만 Drshika Asher의 튜토리얼에서 마지막 코드 예제가 \item[]이전에 누락되었습니다 \textbf{Coursework:}. 또한 전체 코드가 포함된 제공된 Overleaf 프로젝트에서 일부 \item[]가 누락되었습니다: 100, 128, 133, 142행 ).

관련 정보