如何左对齐 itemize 元素

如何左对齐 itemize 元素

我希望所有项目都左对齐。可以吗?如何操作?

\begin{frame}{PNEI}
    \begin{itemize}
        \begin{center}
          \item \textcolor{red}{P}sico
          \item \textcolor{red}{N}euro
          \item \textcolor{red}{E}ndocrino
          \item \textcolor{red}{I}mmunologia
        \end{center}
   \end{itemize}
\end{frame}

短暂性脑缺血发作

雷纳托

答案1

删除center文本块中内容居中的环境,或者,如果您想要itemize居中但左对齐,请将其放置在固定宽度的框内(使用minipagevarwidth):

在此处输入图片描述

\documentclass{beamer}

\begin{document}

\begin{frame}{PNEI}

  \begin{itemize}
    \item \textcolor{red}{P}sico
    \item \textcolor{red}{N}euro
    \item \textcolor{red}{E}ndocrino
    \item \textcolor{red}{I}mmunologia
  \end{itemize}

  \centering
  \begin{minipage}{.265\linewidth}
    \begin{itemize}
      \item \textcolor{red}{P}sico
      \item \textcolor{red}{N}euro
      \item \textcolor{red}{E}ndocrino
      \item \textcolor{red}{I}mmunologia
    \end{itemize}
  \end{minipage}

\end{frame}

\end{document}

答案2

根据@egreg 评论:

\begin{frame}{PNEI}
    \begin{itemize}
        %\begin{center}
          \item \textcolor{red}{P}sico
          \item \textcolor{red}{N}euro
          \item \textcolor{red}{E}ndocrino
          \item \textcolor{red}{I}mmunologia
        %\end{center}
   \end{itemize}
\end{frame}

相关内容