Beamer 过度用于 RTL 演示文稿中的目录

Beamer 过度用于 RTL 演示文稿中的目录

有同样的问题Beamer 目录过度\pausesections使用这个技巧可以使 LTR正常工作(在目录中同时显示两列):

\makeatletter
\newcommand{\trickbeamer}[1]{%
    \advance\beamer@slideinframe by #1 %
}%
\makeatother

但不适用于 RTL 演示:

% !TeX TS-program = xelatex

\documentclass{beamer}

% solve the issue in the mentioned quetion
\makeatletter
\newcommand{\trickbeamer}[1]{%
    \advance\beamer@slideinframe by #1 %
}%
\makeatother
%%

\useinnertheme[shadow=true]{rounded}

\usepackage{fontspec}
\usepackage{polyglossia}
\setdefaultlanguage[numerals=maghrib, calendar=gregorian]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic]{Arial}
\newfontfamily\arabicfontsf[Script=Arabic]{Arial}
\newfontfamily\arabicfonttt[Script=Arabic]{Arial}
\newfontfamily\amiri[Script=Arabic]{Arial}

\makeatletter
\defbeamertemplate{section in toc}{myball}{
\leavevmode\leftskip=2.75ex%
  \llap{%
    \normalsize%
    \begin{pgfpicture}{-1ex}{-0.7ex}{1ex}{1ex}
      \pgftext{\beamer@usesphere{section number projected}{tocsphere}}
      \pgftext{%
        \usebeamerfont*{section number projected}%
        \usebeamercolor{section number projected}%
        \color{fg!90!bg}%
        \inserttocsectionnumber}
    \end{pgfpicture}%
    \kern1.25ex}%
    \raggedleft \inserttocsection\par
}
[action]
{\setbeamerfont{section number projected}{size=\scriptsize}}

\defbeamertemplate{subsection in toc}{myball}
{\leavevmode\leftskip=5ex%
  \llap{\raise0.1ex\beamer@usesphere{subsection number projected}{bigsphere}\kern1ex}%
  \raggedleft \inserttocsubsection\par%
}


\setbeamertemplate{sections/subsections in toc}[myball]
\makeatother

\begin{document}
%%============multicolumns TOC ==============
%\setbeamertemplate{section in toc}[circle]
\begin{frame}{Outline}%to allow TOC break
\begin{minipage}{.9\textwidth}
\begin{columns}[onlytextwidth]
    \begin{column}{.45\textwidth}
       \begin{Arabic}             
            \tableofcontents[pausesections,sections=5-, subsubsectionstyle=hide/hide,hideothersubsections]%hideothersubsections                 
       \end{Arabic}
    \end{column}
    \begin{column}{.45\textwidth}
       \begin{Arabic}
            \tableofcontents[pausesections,sections=-4, subsubsectionstyle=hide/hide, hideothersubsections]%hideothersubsections
        \end{Arabic}
    \end{column}    
\end{columns}
\end{minipage}
\end{frame}
%============End multicolumns TOC ==============

\frame{Content}
\section{Test one and Test Two}
\section{Test o Two}
\begin{frame}
content
\end{frame}
\section{Test Two}
\section{Test one and Test Two test test}
\begin{frame}{Content}
content
\end{frame}
\section{Test Three}
\section{Test one and Test Two}
\section{Test one and Test Two}
\section{Test one and Test Two}
\begin{frame}{Content}
content
\end{frame}
\end{document}

enter image description here

答案1

仅在序言中定义一个命令是没有帮助的,您也必须使用它。

% !TeX TS-program = xelatex

\documentclass{beamer}

% solve the issue in the mentioned quetion
\makeatletter
\newcommand{\trickbeamer}[1]{%
    \advance\beamer@slideinframe by #1 %
}%
\makeatother
%%

\useinnertheme[shadow=true]{rounded}

\usepackage{fontspec}
\usepackage{polyglossia}
\setdefaultlanguage[numerals=maghrib, calendar=gregorian]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic]{Arial}
\newfontfamily\arabicfontsf[Script=Arabic]{Arial}
\newfontfamily\arabicfonttt[Script=Arabic]{Arial}
\newfontfamily\amiri[Script=Arabic]{Arial}

\makeatletter
\defbeamertemplate{section in toc}{myball}{
\leavevmode\leftskip=2.75ex%
  \llap{%
    \normalsize%
    \begin{pgfpicture}{-1ex}{-0.7ex}{1ex}{1ex}
      \pgftext{\beamer@usesphere{section number projected}{tocsphere}}
      \pgftext{%
        \usebeamerfont*{section number projected}%
        \usebeamercolor{section number projected}%
        \color{fg!90!bg}%
        \inserttocsectionnumber}
    \end{pgfpicture}%
    \kern1.25ex}%
    \raggedleft \inserttocsection\par
}
[action]
{\setbeamerfont{section number projected}{size=\scriptsize}}

\defbeamertemplate{subsection in toc}{myball}
{\leavevmode\leftskip=5ex%
  \llap{\raise0.1ex\beamer@usesphere{subsection number projected}{bigsphere}\kern1ex}%
  \raggedleft \inserttocsubsection\par%
}


\setbeamertemplate{sections/subsections in toc}[myball]
\makeatother

\begin{document}
%%============multicolumns TOC ==============
%\setbeamertemplate{section in toc}[circle]
\begin{frame}{Outline}%to allow TOC break
\begin{minipage}{.9\textwidth}
\begin{columns}[onlytextwidth]
    \trickbeamer{-4}
    \begin{column}{.45\textwidth}
       \begin{Arabic}             
            \tableofcontents[pausesections,sections=5-, subsubsectionstyle=hide/hide,hideothersubsections]%hideothersubsections                 
       \end{Arabic}
    \end{column}
        \trickbeamer{4}
    \begin{column}{.45\textwidth}
       \begin{Arabic}
            \tableofcontents[pausesections,sections=-4, subsubsectionstyle=hide/hide, hideothersubsections]%hideothersubsections
        \end{Arabic}
    \end{column}    
\end{columns}
\end{minipage}
\end{frame}
%============End multicolumns TOC ==============

\frame{Content}
\section{Test one and Test Two}4
\section{Test o Two}
\begin{frame}
content
\end{frame}
\section{Test Two}
\section{Test one and Test Two test test}
\begin{frame}{Content}
content
\end{frame}
\section{Test Three}
\section{Test one and Test Two}
\section{Test one and Test Two}
\section{Test one and Test Two}
\begin{frame}{Content}
content
\end{frame}
\end{document}

相关内容