0

how can I justify the text inside an alert block?

\begin{frame} 
\begin{alertblock}{hello} 
text to justify
\end{alertblock} 
\end{frame}
2
  • Inside one alertblock or inside all of them?
    – campa
    Jul 5 at 12:11
  • @campa inside them all please
    – Mary
    Jul 5 at 13:17
1

Adapting the answer from Justify content in beamer blocks you can redefine the block alerted begin beamer template

\documentclass{beamer}

\usepackage[nopar]{lipsum}% for dummy text
\usepackage{ragged2e}% for \justifying
\addtobeamertemplate{block alerted begin}{}{\justifying}

\begin{document}

\begin{frame}
\begin{block}{block}
\lipsum[66]
\end{block}

\begin{alertblock}{alertblock}
\lipsum[66]
\end{alertblock}
\end{frame}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.