Índice RTL multicols no beamer

Índice RTL multicols no beamer

Quero usar Multicols para índice no Beamer para documento árabe, o problema de começar na coluna esquerda e não na coluna direita aqui é meu MWE:

    % !TeX TS-program = xelatex
\documentclass[10pt]{beamer}
\usetheme{Warsaw}
\usepackage{multicol}%
\usepackage{enumitem}
\usepackage{fontspec}
\usepackage{polyglossia}
\setbeamertemplate{section in toc}[circle]
\setbeamertemplate{frametitle continuation}{\gdef\beamer@frametitle{}} % framebreaks without numbering
\setbeamertemplate{frametitle}[default][right]% align the frametitle to the right
%\setdefaultlanguage{english}
\setmainlanguage{english}
\setotherlanguage{arabic}
\setmainfont{Times New Roman}
\setotherlanguage[calendar=gregorian,numerals=maghrib]{arabic}
\newfontfamily\arabicfont[Script=Arabic,Scale=1]{Times New Roman}%
\newfontfamily\arabicfontsf[Script=Arabic,Scale=1]{Times New Roman}%
\graphicspath{{pics/}}
%
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\newcommand{\ar}{\textarabic} % to change the laguage in the section and frame title to persian
% This work as: \a{متن فارسی}
%~~~~~~~~~~~~~~~~define bullet for enumerate~~~~~~~~~~~~~
\newcommand{\myenum}[1]
{
\par\vspace{3pt}\LR{\hspace*{3pt}%
\begin{pgfpicture}{-1ex}{-0.65ex}{1ex}{1ex}
\usebeamercolor[fg]{item projected}
{\pgftransformscale{1.8}\pgftext{\normalsize \pgfuseshading{bigsphere}}}
{\pgftransformshift{\pgfpoint{0pt}{0.5pt}}
\pgftext{\usebeamerfont*{item projected}\textcolor{white}{#1}}}
\end{pgfpicture}%
\hspace{1pt}%
}}
%~~~~~~~~~~~~~~~~~~define bullet for itemize~~~~~~~~~~~~~~~
\newcommand{\myitem}{\par\vspace{3pt}\hspace{5mm}\LR{\hspace*{3pt}%
\begin{pgfpicture}{-1ex}{-0.65ex}{1ex}{1ex}
\usebeamercolor[fg]{item projected}
{\pgftransformscale{1.1}\pgftext{\normalsize\pgfuseshading{bigsphere}}}
\end{pgfpicture}%
\hspace{1pt}%
}}
%~~~~~~~~~~~~~~~~~~~~~~~~~~
\newcommand{\myitemII}{\par\vspace{3pt}\hspace{5mm}\LR{\hspace*{3pt}%
\begin{pgfpicture}{-1ex}{-0.65ex}{1ex}{1ex}
\usebeamercolor[fg]{item projected}
{\pgftransformscale{1.8}\pgftext{\normalsize\pgfuseshading{bigsphere}}}
\end{pgfpicture}%
\hspace{1pt}%
}}
\setbeamertemplate{section in toc}{%
\setRTL \myenum{\inserttocsectionnumber}
\inserttocsection\par
}
\setbeamertemplate{subsection in toc}{%
\setRTL \myitem
\inserttocsubsection\par%
}
\setbeamertemplate{subsubsection in toc}{%
\setRTL \rightskip=3ex\myitem
\inserttocsubsection\par%
}
\begin{document}
%\selectlanguage{arabic}
\title{\textarabic{بعنوان عنوان نعنوان }}
\author{AUTHOR}
\date{\today}
\frame{\titlepage}
\frame{
\frametitle{\textarabic{فهرست مطالب}}
\begin{minipage}{1.\textwidth}
\begin{Arabic}
\begin{multicols}{2} 
\tableofcontents
\end{multicols}
\end{Arabic}
\end{minipage}
}
\section{Title}
\subsection{Title}
\subsubsection{Title}
\section{Title}
\subsection{Title}
\subsubsection{Title}
\section{Title}
\subsection{Title}
\subsubsection{Title}
\section{Title}
\subsection{Title}
\subsubsection{Title}
\section{Title}
\subsection{Title}
\subsubsection{Title}
\section{Title}
\subsection{Title}
\subsubsection{Title}
\section{Title}
\subsection{Title}
\subsubsection{Title}
\section{Title}
\subsection{Title}
\subsubsection{Title}
\frame{
\frametitle{\textarabic{سیستمهای فرمیونی همبسته:مایع}}
\begin{minipage}{.95\textwidth}
\begin{Arabic}
\begin{itemize}[label=\protect\myitemII, rightmargin=0mm]
\item
\ar{متن فارسی .....}
\ar{متن فارسی .....}
\item
\ar{متن فارسی .....}
\item
\ar{متن فارسی .....}
\item
\ar{متن فارسی .....}
\end{itemize}           
\ar{متن فارسی .....}            
\end{Arabic}
\end{minipage}
}
\end{document}

culunas invertidas

Responder1

Se você não se importa em especificar manualmente o ponto de interrupção, você pode fazer:

    % !TeX TS-program = xelatex
\documentclass[10pt]{beamer}
\usetheme{Warsaw}
\usepackage{multicol}%
\usepackage{enumitem}
\usepackage{fontspec}
\usepackage{polyglossia}
\setbeamertemplate{section in toc}[circle]
\setbeamertemplate{frametitle continuation}{\gdef\beamer@frametitle{}} % framebreaks without numbering
\setbeamertemplate{frametitle}[default][right]% align the frametitle to the right
%\setdefaultlanguage{english}
\setmainlanguage{english}
\setotherlanguage{arabic}
\setmainfont{Times New Roman}
\setotherlanguage[calendar=gregorian,numerals=maghrib]{arabic}
\newfontfamily\arabicfont[Script=Arabic,Scale=1]{Times New Roman}%
\newfontfamily\arabicfontsf[Script=Arabic,Scale=1]{Times New Roman}%
\graphicspath{{pics/}}
%
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\newcommand{\ar}{\textarabic} % to change the laguage in the section and frame title to persian
% This work as: \a{متن فارسی}
%~~~~~~~~~~~~~~~~define bullet for enumerate~~~~~~~~~~~~~
\newcommand{\myenum}[1]
{
\par\vspace{3pt}\LR{\hspace*{3pt}%
\begin{pgfpicture}{-1ex}{-0.65ex}{1ex}{1ex}
\usebeamercolor[fg]{item projected}
{\pgftransformscale{1.8}\pgftext{\normalsize \pgfuseshading{bigsphere}}}
{\pgftransformshift{\pgfpoint{0pt}{0.5pt}}
\pgftext{\usebeamerfont*{item projected}\textcolor{white}{#1}}}
\end{pgfpicture}%
\hspace{1pt}%
}}
%~~~~~~~~~~~~~~~~~~define bullet for itemize~~~~~~~~~~~~~~~
\newcommand{\myitem}{\par\vspace{3pt}\hspace{5mm}\LR{\hspace*{3pt}%
\begin{pgfpicture}{-1ex}{-0.65ex}{1ex}{1ex}
\usebeamercolor[fg]{item projected}
{\pgftransformscale{1.1}\pgftext{\normalsize\pgfuseshading{bigsphere}}}
\end{pgfpicture}%
\hspace{1pt}%
}}
%~~~~~~~~~~~~~~~~~~~~~~~~~~
\newcommand{\myitemII}{\par\vspace{3pt}\hspace{5mm}\LR{\hspace*{3pt}%
\begin{pgfpicture}{-1ex}{-0.65ex}{1ex}{1ex}
\usebeamercolor[fg]{item projected}
{\pgftransformscale{1.8}\pgftext{\normalsize\pgfuseshading{bigsphere}}}
\end{pgfpicture}%
\hspace{1pt}%
}}
\setbeamertemplate{section in toc}{%
\setRTL \myenum{\inserttocsectionnumber}
\inserttocsection\par
}
\setbeamertemplate{subsection in toc}{%
\setRTL \myitem
\inserttocsubsection\par%
}
\setbeamertemplate{subsubsection in toc}{%
\setRTL \rightskip=3ex\myitem
\inserttocsubsection\par%
}
\begin{document}

\begin{frame}
\frametitle{\textarabic{فهرست مطالب}}
\begin{columns}[onlytextwidth]
    \begin{column}{.45\textwidth}
        \begin{Arabic}
            \flushright
            \tableofcontents[sections=5-]
        \end{Arabic}
    \end{column}
    \begin{column}{.45\textwidth}
        \begin{Arabic}
            \flushright
            \tableofcontents[sections=-4]
        \end{Arabic}
    \end{column}    
\end{columns}
\end{frame}

\section{Title}
\subsection{Title}
\subsubsection{Title}
\section{Title}
\subsection{Title}
\subsubsection{Title}
\section{Title}
\subsection{Title}
\subsubsection{Title}
\section{Title}
\subsection{Title}
\subsubsection{Title}
\section{Title}
\subsection{Title}
\subsubsection{Title}
\section{Title}
\subsection{Title}
\subsubsection{Title}
\section{Title}
\subsection{Title}
\subsubsection{Title}
\section{Title}
\subsection{Title}
\subsubsection{Title}

\begin{frame}
content...
\end{frame}
\end{document}

insira a descrição da imagem aqui

Responder2

Apesar da afirmação no comentário de que \RLmulticolcolumnsnão funciona, funciona (pelo menos não consigo ver onde falha ou por que poderia). Tudo que você precisa fazer é adicioná-lo ao quadro com o índice, por exemplo,

\frame{
\frametitle{\textarabic{فهرست مطالب}}
\begin{minipage}{1.\textwidth}
\begin{Arabic}
\RLmulticolcolumns    % <--- here to act only in this frame
\begin{multicols}{2} 
\tableofcontents
\end{multicols}
\end{Arabic}
\end{minipage}
}

Obtemos então a seguinte saída:

insira a descrição da imagem aqui

e aqui está o código completo que usei conforme solicitado (com TL 2017) para obter a saída acima, mas na verdade é simplesmente o exemplo original com uma única linha adicionada:

    % !TeX TS-program = xelatex
\documentclass[10pt]{beamer}
\usetheme{Warsaw}
\usepackage{multicol}%
\usepackage{enumitem}
\usepackage{fontspec}
\usepackage{polyglossia}
\setbeamertemplate{section in toc}[circle]
\setbeamertemplate{frametitle continuation}{\gdef\beamer@frametitle{}} % framebreaks without numbering
\setbeamertemplate{frametitle}[default][right]% align the frametitle to the right
%\setdefaultlanguage{english}
\setmainlanguage{english}
\setotherlanguage{arabic}
\setmainfont{Times New Roman}
\setotherlanguage[calendar=gregorian,numerals=maghrib]{arabic}
\newfontfamily\arabicfont[Script=Arabic,Scale=1]{Times New Roman}%
\newfontfamily\arabicfontsf[Script=Arabic,Scale=1]{Times New Roman}%
\graphicspath{{pics/}}
%
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\newcommand{\ar}{\textarabic} % to change the laguage in the section and frame title to persian
% This work as: \a{متن فارسی}
%~~~~~~~~~~~~~~~~define bullet for enumerate~~~~~~~~~~~~~
\newcommand{\myenum}[1]
{
\par\vspace{3pt}\LR{\hspace*{3pt}%
\begin{pgfpicture}{-1ex}{-0.65ex}{1ex}{1ex}
\usebeamercolor[fg]{item projected}
{\pgftransformscale{1.8}\pgftext{\normalsize \pgfuseshading{bigsphere}}}
{\pgftransformshift{\pgfpoint{0pt}{0.5pt}}
\pgftext{\usebeamerfont*{item projected}\textcolor{white}{#1}}}
\end{pgfpicture}%
\hspace{1pt}%
}}
%~~~~~~~~~~~~~~~~~~define bullet for itemize~~~~~~~~~~~~~~~
\newcommand{\myitem}{\par\vspace{3pt}\hspace{5mm}\LR{\hspace*{3pt}%
\begin{pgfpicture}{-1ex}{-0.65ex}{1ex}{1ex}
\usebeamercolor[fg]{item projected}
{\pgftransformscale{1.1}\pgftext{\normalsize\pgfuseshading{bigsphere}}}
\end{pgfpicture}%
\hspace{1pt}%
}}
%~~~~~~~~~~~~~~~~~~~~~~~~~~
\newcommand{\myitemII}{\par\vspace{3pt}\hspace{5mm}\LR{\hspace*{3pt}%
\begin{pgfpicture}{-1ex}{-0.65ex}{1ex}{1ex}
\usebeamercolor[fg]{item projected}
{\pgftransformscale{1.8}\pgftext{\normalsize\pgfuseshading{bigsphere}}}
\end{pgfpicture}%
\hspace{1pt}%
}}
\setbeamertemplate{section in toc}{%
\setRTL \myenum{\inserttocsectionnumber}
\inserttocsection\par
}
\setbeamertemplate{subsection in toc}{%
\setRTL \myitem
\inserttocsubsection\par%
}
\setbeamertemplate{subsubsection in toc}{%
\setRTL \rightskip=3ex\myitem
\inserttocsubsection\par%
}
\begin{document}
%\selectlanguage{arabic}
\title{\textarabic{بعنوان عنوان نعنوان }}
\author{AUTHOR}
\date{\today}
\frame{\titlepage}
\frame{
\frametitle{\textarabic{فهرست مطالب}}
\begin{minipage}{1.\textwidth}
\begin{Arabic}
\RLmulticolcolumns
\begin{multicols}{2} 
\tableofcontents
\end{multicols}
\end{Arabic}
\end{minipage}
}
\section{Title}
\subsection{Title}
\subsubsection{Title}
\section{Title}
\subsection{Title}
\subsubsection{Title}
\section{Title}
\subsection{Title}
\subsubsection{Title}
\section{Title}
\subsection{Title}
\subsubsection{Title}
\section{Title}
\subsection{Title}
\subsubsection{Title}
\section{Title}
\subsection{Title}
\subsubsection{Title}
\section{Title}
\subsection{Title}
\subsubsection{Title}
\section{Title}
\subsection{Title}
\subsubsection{Title}
\frame{
\frametitle{\textarabic{سیستمهای فرمیونی همبسته:مایع}}
\begin{minipage}{.95\textwidth}
\begin{Arabic}
\begin{itemize}[label=\protect\myitemII, rightmargin=0mm]
\item
\ar{متن فارسی .....}
\ar{متن فارسی .....}
\item
\ar{متن فارسی .....}
\item
\ar{متن فارسی .....}
\item
\ar{متن فارسی .....}
\end{itemize}           
\ar{متن فارسی .....}            
\end{Arabic}
\end{minipage}
}
\end{document}

informação relacionada