答案1
这里的问题是调用
\setlength{\parindent}{2em}
您不仅会影响框架标题,还会影响其他元素(例如块)。然后,您可以使用\addtobeamertemplate
“更正”您不想应用缩进的每个元素;下面的示例代码显示了frametitle
、block begin
和blobk example begin
模板的这一操作,但您可能需要对其他一些模板执行相同操作。
首先,为什么需要在演示文稿中缩进第一行?
\documentclass{beamer}
\usetheme{CambridgeUS}
\usepackage{ragged2e}
\justifying
\setbeamersize{text margin left=1.8em,text margin right=1.8em}
\setlength{\parindent}{2em}
\addtobeamertemplate{frametitle}{\setlength{\parindent}{0em}}{}
\addtobeamertemplate{block begin}{\setlength{\parindent}{0em}}{\setlength{\parindent}{2em}}
\addtobeamertemplate{block example begin}{\setlength{\parindent}{0em}}{\setlength{\parindent}{2em}}
\begin{document}
\begin{frame}
\frametitle{A test title}
\framesubtitle{A test subtitle}
Some test text with some additional information to span more than one line test text with some additional information to span more than one line.
\begin{block}{A test block}
Some test text inside a block with some additional information to span more than one line.
\end{block}
\begin{exampleblock}{A test block}
Some test text inside a block
\end{exampleblock}
\end{frame}
\end{document}
结果: