josephwright/beamer

in article mode, \newline fails if ragged2e is used

u-fischer opened this issue · 2 comments

In the second frame the \newline doesn't produce a new line anymore:

\documentclass{article}
\usepackage{ragged2e}
\usepackage{beamerarticle}

\begin{document}
\begin{frame}
aaaa\newline bbbb
\end{frame}

\begin{frame}
\RaggedRight
aaaa\newline bbbb
\end{frame}
\end{document}

image

The problem is that with \ragged2e \newline uses internally \@centercr which is redefined by beamer.

A possible fix would be to redefine the ragged2e definition to use the beamer variant of \@centercr:

\documentclass{article}
\usepackage{ragged2e}
\usepackage{beamerarticle}
\makeatletter
\def\@raggedtwoe@centercrNoindent{%
  \AddToHookNext{para/begin}{%
    \ifx\@raggedtwoe@everyselectfont\relax\else
      \OmitIndent
    \fi
  }%
   \beamer@origbreakcenter
}
\makeatother
\begin{document}
\begin{frame}
aaaa\newline bbbb
\end{frame}

\begin{frame}
\RaggedRight
aaaa\newline bbbb
\end{frame}
\end{document}

image

Thanks for the report!

fixed in f44f62e