[Tex/LaTex] Beamer: Text Justification in blocks globally

beamerhorizontal alignment

I can get text justification in blocks by using \justifying. Is it possible to justify the text within each block globally without using \justifying in each block? Thanks

MWE

\documentclass{beamer}
\usetheme{default}


% For global Justification
%\usepackage{ragged2e}
%\justifying
\renewcommand{\raggedright}{\leftskip=0pt \rightskip=0pt plus 0cm} 


\begin{document}


\begin{frame}{Test}

\begin{block}{Test}
The brown fox jumped over the lazy dog. The brown fox jumped over the lazy dog. The brown fox jumped over the lazy dog. The brown fox jumped over the lazy dog. The brown fox jumped over the lazy dog. The brown fox jumped over the lazy dog. The brown fox jumped over the lazy dog. The brown fox jumped over the lazy dog. The brown fox jumped over the lazy dog. The brown fox jumped over the lazy dog. The brown fox jumped over the lazy dog.
\end{block}

\end{frame}


\end{document}

Best Answer

you could load the ragged2e package and add a \justifying at the end of the block begin template:

\documentclass{beamer}
\usepackage{ragged2e}   %new code
\usetheme{default}

\addtobeamertemplate{block begin}{}{\justifying}  %new code

\begin{document}
    \begin{frame}{Test}
        \begin{block}{Test}
            The brown fox jumped over the lazy dog. The brown fox jumped over the lazy dog. The brown fox jumped over the lazy dog. The brown fox jumped over the lazy dog. The brown fox jumped over the lazy dog. The brown fox jumped over the lazy dog. The brown fox jumped over the lazy dog. The brown fox jumped over the lazy dog. The brown fox jumped over the lazy dog. The brown fox jumped over the lazy dog. The brown fox jumped over the lazy dog.
        \end{block}
    \end{frame}
\end{document}

enter image description here

Related Question