Dr. Manuel Kuehner
- I want that all text in `columns`, `footnote` (incl. `[frame]` option), and `itemize` (and `description`) are set in a way that word breaks are likely to happen.
- This is a follow-up to https://tex.stackexchange.com/questions/678286 which teaches us that `\rightskip=0pt` is the solution and a cross-post, see https://tex.stackexchange.com/questions/678385.
- **Q:** How can I modify the **default behavior** `columns`, `footnote` (incl. `[frame]` option), and `itemize` (and `description`) to behave as shown in the manually modified code example?
## MWE ##
\documentclass{beamer}
\usepackage[english]{babel}
\newcommand{\myPHText}{Lorem ipsum is placeholder text commonly used in the graphic, print, and publishing industries for previewing layouts and visual mockups.}
\begin{document}
\begin{frame}
\frametitle{Frame Title}
\begin{columns}
\column[T]{0.50\textwidth}
%\rightskip=0pt % <-- Modified
\myPHText%
\footnote{%
%\rightskip=0pt % <-- Modified
\myPHText}%
\footnote[frame]{%
%\rightskip=0pt % <-- Modified
\myPHText \myPHText}
\column[T]{0.50\textwidth}
\begin{itemize}
%\rightskip=0pt % <-- Modified
\item \myPHText
\item \myPHText
\end{itemize}
\end{columns}
\end{frame}
\end{document}
[![enter image description here][1]][1]
## Manually (= Locally) Modified Code with Desired Output ##
\documentclass{beamer}
\usepackage[english]{babel}
\newcommand{\myPHText}{Lorem ipsum is placeholder text commonly used in the graphic, print, and publishing industries for previewing layouts and visual mockups.}
\begin{document}
\begin{frame}
\frametitle{Frame Title}
\begin{columns}
\column[T]{0.50\textwidth}
\rightskip=0pt % <-- Modified
\myPHText%
\footnote{%
\rightskip=0pt % <-- Modified
\myPHText}%
\footnote[frame]{%
\rightskip=0pt % <-- Modified
\myPHText \myPHText}
\column[T]{0.50\textwidth}
\begin{itemize}
\rightskip=0pt % <-- Modified
\item \myPHText
\item \myPHText
\end{itemize}
\end{columns}
\end{frame}
\end{document}
[![enter image description here][2]][2]
## Related ##
- https://tex.stackexchange.com/questions/44556
[1]: https://i.stack.imgur.com/QG4Xk.png
[2]: https://i.stack.imgur.com/nYk4n.png
Top Answer
samcarter
Beamer uses `\raggedright` in a lot of places. Here are some alterations which alter the behaviour of normal text, items, columns and footnotes:
```
\documentclass{beamer}
\usepackage[english]{babel}
\newcommand{\myPHText}{Lorem ipsum is placeholder text commonly used in the graphic, print, and publishing industries for previewing layouts and visual mockups.}
\usepackage{ragged2e}
\makeatletter
% remove \raggedright from the footnote template
\setbeamertemplate{footnote}
{
\parindent 1em\noindent%
% \raggedright
\hbox to 1.8em{\hfil\insertfootnotemark}\insertfootnotetext\par%
}
% switch normal text to justified
\apptocmd{\frame}{}{\justifying}{}
% swich columns to justified text
\renewcommand<>\beamer@columncom[2][\beamer@colmode]{%
\beamer@colclose%
\def\beamer@colclose{\end{minipage}\hfill\end{actionenv}\ignorespaces}%
\begin{actionenv}#3%
\setkeys{beamer@col}{#1}%
\begin{minipage}[\beamer@colalign]{#2}%
\leavevmode%
%\raggedright
\justifying% NEW
\beamer@colheadskip\ignorespaces}
% switching itemize etc to justified
\AddToHook{cmd/beamer@enum@/after}{\justifying}
\AddToHook{cmd/@@description/after}{\justifying}
\AddToHook{cmd/itemize/after}{\justifying}
\makeatother
\begin{document}
\begin{frame}
\frametitle{Frame Title}
\myPHText
\begin{columns}
\column[T]{0.50\textwidth}
\myPHText%
\footnote{%
\myPHText}%
\footnote[frame]{%
\myPHText \myPHText}
\column[T]{0.50\textwidth}
\begin{itemize}
\item \myPHText
\item \myPHText
\end{itemize}
\end{columns}
\end{frame}
\end{document}
```
Answer #2
samcarter
This might be a bit drastic, but if you'd like to switch off all occurrences of `\raggedright` in beamer, maybe just switch off `\raggedright` itself? [What could possibly go wrong :)](https://starecat.com/content/wp-content/uploads/what-could-possibly-go-wrong-cutting-fail.jpg)
```
\documentclass{beamer}
\usepackage[english]{babel}
\newcommand{\myPHText}{Lorem ipsum is placeholder text commonly used in the graphic, print, and publishing industries for previewing layouts and visual mockups.}
\renewcommand{\raggedright}{}
\begin{document}
\begin{frame}
\frametitle{Frame Title}
\begin{columns}
\column[T]{0.50\textwidth}
\myPHText%
\footnote{%
\myPHText}%
\footnote[frame]{%
\myPHText \myPHText}
\column[T]{0.50\textwidth}
\begin{itemize}
\item \myPHText
\item \myPHText
\end{itemize}
\end{columns}
\end{frame}
\end{document}
```
