0

I want to justify my text in beamer, however when I've used the item, the text is not justified. Could you help me with that? here is a minimal example. Thank you.

\documentclass{beamer}
\mode<presentation> {
\usefonttheme[onlymath]{serif} 
\usepackage{amsmath}
\usepackage{epstopdf}
\usepackage{amssymb}
\usepackage{tabu}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{booktabs}
\usepackage{setspace}
\usepackage{algcompatible}
\usepackage{mathrsfs}
\usepackage{color}
\usepackage{float}
\usepackage{mathtools}
\usepackage{mathrsfs}
\usepackage{verbatim}
\usepackage{graphicx}
\usepackage{mathtools} 
\usepackage{epsfig,cite}
\usepackage[numbers,sort&compress]{natbib}
\usepackage{cases}
\usepackage{stackengine}
\usepackage{graphicx} 
\usepackage{booktabs} 
\usepackage{ thmtools, amssymb}
\usepackage{commath}
\setbeamerfont{caption}{size=\tiny}
\newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}}
\usepackage{subfig}
\usepackage{lipsum}

\usepackage{ragged2e}
\usepackage{etoolbox}
\apptocmd{\frame}{}{\justifying}{} 
\usetheme{Madrid}}



\begin{document}
\begin{frame}
\begin{itemize}
    \item \lipsum[2]
    \item \lipsum[1]
\end{itemize}

\end{frame}
\end{document}
7
  • please post the code in a form that shows the problem (this has no \documentclass. Unrelated but no document written in last 25 years should be using epsfig package. Jun 24 at 15:45
  • \begin{itemize}\justifying works, but do you really use all those packages in a single presentation? How long is your talk?? :-) Jun 24 at 15:53
  • Thanks for the comments. I don't know that I will use all of them or not. I should present for 1 hour.
    – Meskaj
    Jun 24 at 15:59
  • ``` \begin{itemize}\justifying``` does not work for me. I don't know why
    – Meskaj
    Jun 24 at 16:02
  • 1
    Just adding \justifying to your file produces this output Note it is a really bad idea to add every package on CTAN just in case, it slows down processing and makes weird errors due to package clashes almost inevitable. Start from an empty preamble and only add a package if you use it. Jun 24 at 16:09
0

Despite having written an answer to a question yesterday saying there is no good use for \justifyng tracing where beamer has set ragged and making it not do is probably more trouble than it is worth, and you can simply use

\begin{itemize}\justifying

to reset text justification within the list.

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.