[Tex/LaTex] Justify content in beamer blocks

beamerblockhorizontal alignment

I have a beamer presentation that contains different blocks, I need to justify all my paragraphs (right and left) how can I do that?

\documentclass[11pt]{beamer}
\begin{document}
\begin{frame}{Introduction}
    \begin{block}{}
         content that i want to justify
    \end{block}
 \end{frame}
\end{document}

Best Answer

You can use \addtobeamertemplate to add the \justifying command from the ragged2e package to the beginning of the block environment:

\documentclass[11pt]{beamer}
\usepackage{ragged2e} % For \justifying command
\usepackage{lipsum} % Only for demo text

\addtobeamertemplate{block begin}{}{\justifying} % Justify all blocks

\begin{document}
\begin{frame}{Introduction}
    \begin{block}{}
         \lipsum[12]
    \end{block}
 \end{frame}
\end{document}

Justified output