seloumi / beamer-rl

Right to left beamer presentations using babel (lualatex engine)
6 stars 1 forks source link

Displaying notes #2

Closed Elfengour closed 3 years ago

Elfengour commented 3 years ago

Can not display notes on the left of the main presentation to be used with PDFpresenter or pympress.

\documentclass{beamer-rl}

\babelprovide[import=ar-DZ, main]{arabic}

\usetheme{CambridgeUS}
\usecolortheme{spruce}

\title{beamer-rl class}

\author{Salim Bou}

\institute[]{%
{\color{blue} Repository: } https://github.com/seloumi/beamer-rl \par 
{\color{blue} Bug tracker: } https://github.com/seloumi/beamer-rl/issues
}

\date{\today}
\usepackage{pgfpages}
\setbeamertemplate{note page}[plain]
\setbeameroption{show notes on second screen=right}
\begin{document}

\begin{frame}
\titlepage
\end{frame}

\begin{frame}{تجربة}
    Hi
    \note{نقاط}
\end{frame}
\begin{frame}{here we go}
    hello
    \note{نقاط}
\end{frame}
\begin{frame}{تجربة النقاط}
    دمج نقاط لا تظهر للحضور
    \note{نقاط}
\end{frame}
\end{document}
seloumi commented 3 years ago

The issue come from pgfpages package, it appears with TRT pages. I have posted a feature request to pgf package maintainer https://github.com/pgf-tikz/pgf/issues/911

seloumi commented 3 years ago

Waiting for the fixes in the package pgfpages you can use this workaround which patch keys second right , second left and \pgfpages@buildshipoutbox command.

\documentclass{beamer-rl}

\babelprovide[import=ar-DZ, main]{arabic}

\usetheme{CambridgeUS}
\usecolortheme{spruce}

\title{beamer-rl class}

\author{Salim Bou}

\institute[]{%
{\color{blue} Repository: } https://github.com/seloumi/beamer-rl \par 
{\color{blue} Bug tracker: } https://github.com/seloumi/beamer-rl/issues
}

\date{\today}
\usepackage{pgfpages}

\makeatletter
\define@key{pgfpagesuselayoutoption}{second right}[]%
{%
  \def\pgfpageoptionfirstcenter{\pgfpoint{-.5\paperwidth}{.5\paperheight}}% <--
  \def\pgfpageoptionsecondcenter{\pgfpoint{-1.5\paperwidth}{.5\paperheight}}% <--
  \def\pgfpageoptiontwoheight{\paperheight}%
  \def\pgfpageoptiontwowidth{2\paperwidth}%
}

\define@key{pgfpagesuselayoutoption}{second left}[]%
{%
  \def\pgfpageoptionfirstcenter{\pgfpoint{-1.5\paperwidth}{.5\paperheight}}% <--
  \def\pgfpageoptionsecondcenter{\pgfpoint{-.5\paperwidth}{.5\paperheight}}% <--
  \def\pgfpageoptiontwoheight{\paperheight}%
  \def\pgfpageoptiontwowidth{2\paperwidth}%
}

\bbl@sreplace\pgfpages@buildshipoutbox{-.5\pgfutil@tempdima}{.5\pgfutil@tempdima}
\makeatother

\setbeamertemplate{note page}[plain]
\setbeameroption{show notes on second screen=right}

\begin{document}

\begin{frame}
\titlepage
\end{frame}

\begin{frame}{تجربة}
    Hi
    \note{نقاط}
\end{frame}
\begin{frame}{here we go}
    hello
    \note{نقاط}
\end{frame}
\begin{frame}{تجربة النقاط}
    دمج نقاط لا تظهر للحضور
    \note{نقاط}
\end{frame}
\end{document} 
seloumi commented 3 years ago

Fixed with https://github.com/seloumi/beamer-rl/commit/7594dc50a04eec6265e1f71aad98d23d3a04a22c just change \usepackage{pgfpages} to \usepackage{pgfpages-rl}.