我正在使用 beamer 类,并且想要删除在 itemize 环境中为项目创建的缩进。
我尝试过以下解决方案:
- enumitem usepackage - 只需加载它即可完全删除所有项目符号
- \setlength{\itemindent}{-1em} 位于项目之前。它只会删除项目第一行的缩进,但如果项目是多行的,则其他行仍会缩进。
这是我的 MWE:
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\begin{document}
\begin{frame}{Frame Title}
Some text
\begin{itemize}
%\setlength{\itemindent}{-1em}
\item first item
\item this is a second item which is longer and should hopefully go over more than one line
\end{itemize}
\end{frame}
\end{document}
答案1
这是您要找的布局吗?
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\begin{document}
\begin{frame}{Frame Title}
Some text
\settowidth{\leftmargini}{\usebeamertemplate{itemize item}}
\addtolength{\leftmargini}{\labelsep}
\begin{itemize}
\item first item
\item this is a second item which is longer and should hopefully go over more than one line
\end{itemize}
\end{frame}
\end{document}