I'd just defined a command, as below:
\newcommand{\Question}[1]{\textbf{?: #1}\\[5pt]}
Here is the snippet, in that I want to use an itemzie environment:
\documentclass[letter, 11pt]{article}
\newcommand{\Question}[1]{\textbf{?: #1}\\[5pt]}
\begin{document}
\section*{Question \#2}
\Question{Here is the question
\begin{itemize}
\item[2.1] first part
\item[2.2] second part
\end{itemize}
}
\end{document}
The compilation raises an error, as:
There's no line here to end.
So, as I add a character just at the end of the itemize environment, the error will be disappeared:
\Question{Here is the question
\begin{itemize}
\item[2.1] first part
\item[2.2] second part
\end{itemize}
.
}
Seemingly, the definition of Question command should be changed, but I don't know how I should do that.
! LaTeX Error: There's no line here to end.
which is a different message because of a different error, which did you want to ask about?{\bfseries#1}
instead of\textbf{}
. But i find a bit weird to have the whole uestion bold faced.\vspace{5pt}
.