RTL 语言中的 Box of theorem 在 Beamer 中

RTL 语言中的 Box of theorem 在 Beamer 中

我希望定理环境既有英语又有 RTL 语言(阿拉伯语),这意味着定理框位于右侧

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

答案1

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

在此处输入图片描述

相关内容