Box des Theorems in RTL Sprachen im Beamer

Box des Theorems in RTL Sprachen im Beamer

Ich möchte sowohl die Theoremumgebung in Englisch als auch in RTL-Sprache (Arabisch) haben, was bedeutet, dass sich die Theorembox auf der rechten Seite befindet

\documentclass[hyperref={hyperfootnotes=false},10pt]{beamer}

%% to use arabic language and arabic fonts
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage[calendar=gregorian,numerals=maghrib]{arabic}
\newfontfamily\arabicfont[Script=Arabic, Scale=1.0]{Traditional Arabic}
\newfontfamily\arabicfontsf[Script=Arabic]{Amiri}
\newfontfamily\arabicfonttt[Script=Arabic, Scale=1.0]{Tahoma}
\setsansfont[Script=Arabic]{Simplified Arabic}

\makeatletter
\let\@footnotetext=\beamer@framefootnotetext
\makeatother

\begin{document}

\begin{frame}
\begin{frame}
\frametitle{Sample frame title}


\begin{block}{Definition}
this is theorem in english version
\end{block}

\begin{block}{\textarabic{تعريف }}
this is theorem in arabic version which the left box will be in right side of the theorem enviroment
\textarabic{نص التعريف}
\end{block}

\begin{alertblock}{Theorem}
this is theorem in english version
\end{alertblock}

\begin{alertblock}{\textarabic{مبرهنة}}
\textarabic{محتوى}
\end{alertblock}

\begin{examples}{Example}
bla bla 
\end{examples}
\begin{examples}{متال}
\textarabic{متال}
\end{examples}
\end{frame}

\end{document}

Antwort1

% !TeX TS-program = xelatex

\documentclass[hyperref={hyperfootnotes=false},10pt]{beamer}
\usecolortheme{orchid}

%% to use arabic language and arabic fonts
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage[calendar=gregorian,numerals=maghrib]{arabic}
\newfontfamily\arabicfont[Script=Arabic]{Times New Roman}
\newfontfamily\arabicfontsf[Script=Arabic]{Times New Roman}

\makeatletter
\let\@footnotetext=\beamer@framefootnotetext
\makeatother

\begin{document}

\begin{frame}
\frametitle{Sample frame title}

\begin{block}{Definition}
this is theorem in english version
\end{block}

{
\selectlanguage{arabic}
\begin{block}{\textarabic{تعريف }}
this is theorem in arabic version which the left box will be in right side of the theorem enviroment
\textarabic{نص التعريف}
\end{block}
}

\end{frame}

\end{document}

Bildbeschreibung hier eingeben

verwandte Informationen