2

I have asked a question in RTL tableofcontents) in arabic (or polyglossia package) beamer and gotten my answer well by Seloumi. After thank him, I have another question. How I can change position (and contents) of the black and blue header in Warsaw beamer theme as well as the direction of the text in them??

enter image description here

4

You'll need a redefinition of the headline template (as defined in the split outer theme used by Warsaw) to swap the two beamercolorboxes used there for the navigation bars:

\documentclass[10pt]{beamer}
\usetheme{Warsaw}
\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]{B Nazanin}%
\newfontfamily\arabicfontsf[Script=Arabic,Scale=1]{B Nazanin}%
\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}%
}}
%*************************************************************************
%\addtobeamertemplate{block begin}{}{\justifying} %new code
%*************************************************************************
% change toc format ======================================================

\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%
}

\makeatletter
\defbeamertemplate*{headline}{arabic split theme}
{%
  \leavevmode%
  \@tempdimb=2.4375ex%
  \ifnum\beamer@subsectionmax<\beamer@sectionmax%
    \multiply\@tempdimb by\beamer@sectionmax%
  \else%
    \multiply\@tempdimb by\beamer@subsectionmax%
  \fi%
  \ifdim\@tempdimb>0pt%
    \advance\@tempdimb by 1.825ex%
    \begin{beamercolorbox}[wd=.5\paperwidth,ht=\@tempdimb]{subsection in head/foot}%
      \vbox to\@tempdimb{\vfil\insertsubsectionnavigation{.5\paperwidth}\vfil}%
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=.5\paperwidth,ht=\@tempdimb]{section in head/foot}%
      \vbox to\@tempdimb{\vfil\insertsectionnavigation{.5\paperwidth}\vfil}%
    \end{beamercolorbox}%
  \fi%
}
\makeatother

%=================================================================

\begin{document}
%\selectlanguage{arabic}
\title{\textarabic{بعنوان عنوان نعنوان }}
\author{AUTHOR}
\date{\today}

\section{\textarabic{مقدمه}}
\begin{frame} \ar{متن فارسی .....} \end{frame}
\subsection{\textarabic{مایع }}
\begin{frame} \ar{متن فارسی .....} \end{frame}
\section{\textarabic{سیستمهای فرمیونی همبسته:مایع}}
\begin{frame} \ar{متن فارسی .....} \end{frame}
\subsection{\textarabic{متن فارسی .....}}
\begin{frame} \ar{متن فارسی .....} \end{frame}

\end{document}

A zoomed-in image of the new headline:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.