Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I like to justify the texts inside the block using beamer. I cant do that in presentationenter image description here. Can any one please help me?

share|improve this question

2 Answers 2

up vote 16 down vote accepted

You can use \justifying from the ragged2e package; you can patch the \frame command to use \justyfing, but you will also have to invoke \justifying for some other environments which internally use \raggedleft (for example, the beamer blocks, and the list-like environments enumerate, itemize, etc.). A little example:

\documentclass{beamer}
\usepackage{ragged2e}
\usepackage{etoolbox}
\usepackage{lipsum}

\apptocmd{\frame}{}{\justifying}{} % Allow optional arguments after frame.

\begin{document}

\begin{frame}
\lipsum[2]
\end{frame}

\begin{frame}
\begin{block}{text}
\justifying
\lipsum[2]
\end{block}
\end{frame}

\end{document}

enter image description here

share|improve this answer
    
Thank you so much, I didnt invoke \justifying every time.....Also Can you please tell me- How can I write the block title at the center? –  Mahzabin May 13 '12 at 2:18
    
This fails when you use \begin{frame}{frametitle}...\end{frame}... the frame title is put in the frame body, not header. –  rubenvb Apr 8 at 12:22

You can use \parbox{}.

\documentclass{beamer}
\usepackage{lipsum}
\begin{document}

\begin{frame}
\lipsum[2]
\end{frame}

\begin{frame}
\begin{block}{text}
\parbox{\linewidth}{\lipsum[2]}
\end{block}
\end{frame}

\end{document}

It is a bit less exotic than the other answer's solution.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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