3

I want every new paragraph except the first one in a \begin{block} to be indented. This is the standard in other document classes. I already put \setlength\parindent{1cm} in my preamble, but this indents the first paragraph. It's a small thing, but I'd like to be consistent with the other document classes. I also have a problem with my Lemma and Theorem headers being indented along with the text, which is really bad. How do I do this in a beamer?

4
  • Use \noindent in the first paragraph.
    – Fran
    May 3, 2015 at 21:31
  • @Fran I don't want to type that at every paragraph. There has to be a way to set it globally. May 3, 2015 at 21:32
  • I suppose that redefine the environment, but I prefer the simple approach. After all, a presentation should not have many paragraphs.
    – Fran
    May 3, 2015 at 21:36
  • @Fran I'm making a poster with beamerposter, it has a lot of paragraphs May 3, 2015 at 21:37

1 Answer 1

2

Here would be my approach using beamer's "templating" capabilities and LaTeX's mechanism for disabling indentation after headings:

\documentclass{beamer}
\usetheme{Warsaw} % just to have some style around the content
\makeatletter
\addtobeamertemplate{block begin}{}{\setlength{\parindent}{1cm}\@afterindentfalse\@afterheading}
\makeatother

\begin{document}
\begin{block}{Test}
Test

Test
\end{block}
\begin{block}{Test}
Test

Test
\end{block}
\end{document}

enter image description here

3
  • No, the extra space without \ignorespaces is a spurious space in your code:-) the space after {Test} try putting % at end of that line. May 3, 2015 at 22:17
  • 2
    better as \makeatletter \addtobeamertemplate{block begin}{}{\setlength{\parindent}{1cm}\@afterindentfalse\@afterheading} \makeatletter though (then still works if there is a space or even a blank line before \lipsum) May 3, 2015 at 22:21
  • Thank you @DavidCarlisle, you've made me realize the errors of my ways yet again. :-) May 3, 2015 at 22:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .