I want to print a piece of verbatim within an item of an itemize environment, as below:
\documentclass[letter, 11pt]{article}
\usepackage{enumitem}
\usepackage{pifont}
\usepackage{listings}
\newcommand{\Question}[1]{{\bfseries?: #1\par\vspace{5pt}}}
\newcommand{\Answer}[1]{\noindent\ding{51}: #1}
\begin{document}
\section*{Problem \#1}
\Question{content
}
\Answer{
\begin{itemize}
\item[1] Some content.\\
My Verbatim:
\begin{lstlisting}
G = VVVVVVVVVVVVVVVVVVVVVVVVVVV
PROJ = PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
\end{lstlisting}
\end{itemize}
}
\end{document}
But there is an error:
! Paragraph ended before \lst@next was complete
.
I did even try the frame
solution, presented here, but it does still not work:
\documentclass[letter, 11pt]{article}
\usepackage{enumitem}
\usepackage{pifont}
\usepackage{listings}
\newcommand{\Question}[1]{{\bfseries?: #1\par\vspace{5pt}}}
\newcommand{\Answer}[1]{\noindent\ding{51}: #1}
\begin{document}
\section*{Problem \#1}
\Question{content
}
\Answer{
\begin{itemize}
\item[1] Some content.\\
My Verbatim:
\begin{frame}[fragile]
\begin{lstlisting}
G = VVVVVVVVVVVVVVVVVVVVVVVVVVV
PROJ = PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
\end{lstlisting}
\end{frame}
\end{itemize}
}
\end{document}
command
form. Is it possible, at all?