我可以向我的框架添加多个列表代码吗?

我可以向我的框架添加多个列表代码吗?

这是我的(它不起作用)代码:

      \documentclass{beamer}
      \usetheme[faculty=ped]{fibeamer}
      \usepackage[utf8]{inputenc}
      \usepackage{verbatim}
      \usepackage[main=english,portuges]{babel}        
      \usepackage{ragged2e}  
      \usepackage{tikz}     
      \usetikzlibrary{calc, shapes, backgrounds}  
      \usepackage{listings}  
      \frenchspacing
      \makeatletter
     \renewcommand\fibeamer@includeLogo[1][]{}
      \makeatother
      \begin{document}      
        \begin{darkframes}

\begin{frame}[fragile]{Variáveis}{Alguns Tipos de Variáveis}
\item int

\begin{lstlisting}[language=Python,tabsize=2]
  code1
\end{lstlisting}

\item float

\begin{lstlisting}[language=Python,tabsize=2]
  code2
\end{lstlisting}

\item bool

\end{frame}     

\end{darkframes}      

  \end{document}

我收到错误:

失控的论点?段落在 \lst@next 完成之前结束。 \par l.123 \end{frame}

答案1

\begin{itemize}...\end{itemize}不见了

\documentclass{beamer}
\usepackage{listings}  

\begin{document}      

\begin{frame}[fragile]{Variáveis}{Alguns Tipos de Variáveis}

\begin{itemize}
\item int

\begin{lstlisting}[language=Python,tabsize=2]
  code1
\end{lstlisting}

\item float

\begin{lstlisting}[language=Python,tabsize=2]
  code2
\end{lstlisting}

\item bool
\end{itemize}   

\end{frame}      

\end{document}

答案2

\begin{frame}[fragile]{Variáveis}{Alguns Tipos de Variáveis}

并且lstlisting不使用itemize

\begin{frame}[fragile]{Variáveis}{Alguns Tipos de Variáveis}
\textbullet\ int

\begin{lstlisting}[language=Python,tabsize=2]
  code1
\end{lstlisting}

\textbullet\ float

\begin{lstlisting}[language=Python,tabsize=2]
  code2
\end{lstlisting}

\textbullet\ bool

\end{frame}

相关内容