Indentation text at beamer

I am trying to indent just text in beamer, but I did not get it. I would like to indent the text at the all document. The problem is that the frame title has been indented and I do not want that. How can I fix it? If anyone knows, I will be very glad.

\usepackage[utf8x]{inputenc}
\usepackage{ragged2e}
\justifying
\setbeamersize{text margin left=1.8em,text margin right=1.8em}
\setlength{\parindent}{2em}


The layout that I would like to see:

• Including large blocks of text is a bad way to create a presentation, and one could argue that this is part of beamer's way of incentivizing you not to do that. – David Z Aug 12 '15 at 19:09
• The problem here is that invoking \setlength{\parindent}{2em} you will have to "correct" not only the frame title but also some other elements such as blocks. Why do you want first line indentation in a presentation, anyway? – Gonzalo Medina Aug 12 '15 at 21:14

1 Answer

The problem here is that invoking

\setlength{\parindent}{2em}


you are affecting not only the frame title but also some other elements such as blocks. You can then use \addtobeamertemplate to "correct" each element for which you don't want to apply the indentation; my example code below shows this for the frametitle, block begin and blobk example begin templates, but probably you will need to do the same for some other templates.

Why do you want first line indentation in a presentation, in the first place?

\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}


The result:

• Thanks!! It worked! I just want to make a pattern. That's it. – Mallet Aug 19 '15 at 22:55
• And if I don't indent the first line, but keep the rest? Thanks! – Mallet Mar 27 '16 at 21:15