summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-03-18 21:10:08 +0000
committerKarl Berry <karl@freefriends.org>2021-03-18 21:10:08 +0000
commit5dfae640ea92ae28a2b8b8871ce89563d2b4cc8d (patch)
treeec848633c1df40adfdff802b50dcc2e76ba0ba31 /Master
parent5113551720a19f3f230632cb1d326d3a0f1f531c (diff)
beamer-rl (18mar21)
git-svn-id: svn://tug.org/texlive/trunk@58513 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/lualatex/beamer-rl/Example-of-use-ar.pdfbin130512 -> 146943 bytes
-rw-r--r--Master/texmf-dist/doc/lualatex/beamer-rl/Example-of-use-ar.tex197
-rw-r--r--Master/texmf-dist/doc/lualatex/beamer-rl/Example-of-use-en.pdfbin103537 -> 105529 bytes
-rw-r--r--Master/texmf-dist/doc/lualatex/beamer-rl/Example-of-use-en.tex210
-rw-r--r--Master/texmf-dist/doc/lualatex/beamer-rl/README.txt6
-rw-r--r--Master/texmf-dist/tex/lualatex/beamer-rl/beamer-rl.cls206
6 files changed, 322 insertions, 297 deletions
diff --git a/Master/texmf-dist/doc/lualatex/beamer-rl/Example-of-use-ar.pdf b/Master/texmf-dist/doc/lualatex/beamer-rl/Example-of-use-ar.pdf
index b64a2f91f22..ecec4cb867b 100644
--- a/Master/texmf-dist/doc/lualatex/beamer-rl/Example-of-use-ar.pdf
+++ b/Master/texmf-dist/doc/lualatex/beamer-rl/Example-of-use-ar.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/lualatex/beamer-rl/Example-of-use-ar.tex b/Master/texmf-dist/doc/lualatex/beamer-rl/Example-of-use-ar.tex
index beb958a7b79..7354c5805ef 100644
--- a/Master/texmf-dist/doc/lualatex/beamer-rl/Example-of-use-ar.tex
+++ b/Master/texmf-dist/doc/lualatex/beamer-rl/Example-of-use-ar.tex
@@ -1,8 +1,11 @@
-\documentclass[arabic,babel={layout=lists}]{beamer-rl}
+\documentclass[arabic,babel={layout=lists.counters}]{beamer-rl}
\usepackage{hologo} % pdflatex, xelatex, lualatex logos
+\usepackage{listings}
+
+\usepackage{tikz}
\babelprovide[import=ar-DZ, main]{arabic}
-\babelfont{sf}{Amiri}
+\babelfont{alm}[Script=Arabic,Scale=.88]{ALM Fixed}
% Themes without Navigation Bars
%\mode<presentation>{\usetheme{default}}
@@ -59,6 +62,20 @@
\def\cs#1{\babelsublr{\texttt{\textbackslash#1}}}
+\lstset{language=TeX,basicstyle=\small\ttfamily,escapeinside={(*@}{@*)},aboveskip=3pt,belowskip=3pt}
+
+\lstnewenvironment{codeblock}{%
+\selectlanguage{nil}
+\smallskip\hfill%
+\beamercolorbox[wd=\linewidth,sep=.2ex,dp=.5ex]{title}
+}{%
+\endbeamercolorbox
+\hfill
+\smallskip
+%\end{verbatim}
+}
+
+
\begin{document}
\parskip=6pt
@@ -86,7 +103,7 @@
\verb|babel| وخصوصا الكتابة بالاتجاهين (\verb|bidi| writing)
هذه الفئة (class) تعدل في بعض اوامر وتعليمات beamer لغرض انشاء عروض من اليمين إلى اليسار (العربية على سبيل المثال)، الفئة تستدعي \verb|babel| مع الخيار
-\verb|bidi=basic-r|
+\verb|bidi=basic|
والمعالجة تتطلب استخدام
\hologo{LuaLaTeX}
@@ -97,19 +114,18 @@
\begin{frame}[fragile]
\frametitle{كيفية استعمال الفئة}
-\selectlanguage{nil}
-
-\begin{verbatim}
+\begin{codeblock}
\documentclass{beamer-rl}
-\babelprovide[import=ar-DZ, main]{arabic}
-\babelfont{sf}{Amiri}
-\mode<presentation>{\usetheme{Warsaw}}
+% import languages
+\babelprovide[import=ar-DZ, main]{arabic}
+
+\usetheme{CambridgeUS}
+
\begin{document}
...
\end{document}
-
-\end{verbatim}
+\end{codeblock}
\end{frame}
@@ -119,6 +135,15 @@
\frametitle{بعض الملاحظات}
\begin{itemize}
+
+\item
+الفئة تعرف خط الأميري (\verb:Amiri:) ضمنيا كخط أساسي للكتابة
+\babelsublr{sans serif}، يمكن تغيير ذلك مع بداية الوثيقة باستعمال التعليمة
+
+\begin{codeblock}
+\babelfont{sf}{<font name>}
+\end{codeblock}
+
\item
يمكن اضافة كل الخيارات التي تتيحها الفئة \verb:beamer: عند استدعاء الفئة \verb:beamer-rl:
@@ -128,11 +153,9 @@
\medskip
-{\selectlanguage{nil}
-\verb:\documentclass[babel={<babel options>}]{beamer-rl}:
-}
-
-\medskip
+\begin{codeblock}
+\documentclass[babel={<babel options>}]{beamer-rl}
+\end{codeblock}
\item
الفئة
@@ -164,46 +187,44 @@ RTL context & \selectlanguage{nil}\blacktriangleright & \selectlanguage{nil}\bla
للفئة يمكن من استدعاء قاموس عربي لترجمة بعض المفردات مثل
\verb:example: ،\verb:definition: ،\verb:theorem: ....
+\begin{codeblock}
+\documentclass[arabic]{beamer-rl}
+\end{codeblock}
-\medskip
-
-{\selectlanguage{nil}
-\verb:\documentclass[arabic]{beamer-rl}:
-}
-
-\medskip
-
\item
في بعض الحالات يمكن استعمال التعليمة
\cs{babelsublr} التي توفرها الحزمة \verb:bebel:
لادراج نص من اليسار لليمين (لاتيني) في وسط نص من اليمين لليسار،
على سبيل المثال في حال الحاجة إلى ادراج رسم
\verb:pspicture: ضمن نص من اليمين لليسار.
-
-\medskip
-{\selectlanguage{nil}
-\verb:\bebelsublr{LTR context ... }:
-}
+\begin{codeblock}
+\bebelsublr{LTR context ... }
+\end{codeblock}
\end{itemize}
+\end{frame}
+
+\section{أمثلة}
+
+\begin{frame}[plain]{}
+
+\fontsize{70}{60}\selectfont\centerline{أمثـلة}
\end{frame}
-\section{أمثلة}
\subsection{الإطارات}
\begin{frame}[fragile]
\frametitle{الإطارات}
-{\selectlanguage{nil}
-\verb:\setbeamertemplate{blocks}[default]:
-}
-
+\begin{codeblock}
\setbeamertemplate{blocks}[default]
+\end{codeblock}
+\setbeamertemplate{blocks}[default]
\begin{block}{أورستد}
لاحظ هانز أورستد في 21 أبريل 1820 وهو يُعد أحد التجارب أن إبرة
@@ -211,9 +232,9 @@ RTL context & \selectlanguage{nil}\blacktriangleright & \selectlanguage{nil}\bla
دائرة كهربائية يُعدها.
\end{block}
-{\selectlanguage{nil}
-\verb:\setbeamertemplate{blocks}[rounded][shadow=true]:
-}
+\begin{codeblock}
+\setbeamertemplate{blocks}[rounded][shadow=true]
+\end{codeblock}
\setbeamertemplate{blocks}[rounded][shadow=true]
@@ -227,52 +248,98 @@ RTL context & \selectlanguage{nil}\blacktriangleright & \selectlanguage{nil}\bla
\subsection{القوائم}
-\begin{frame}[fragile]
-\frametitle{enumerate, itemize}
+\begin{frame}[fragile,allowframebreaks]
+\frametitle{القوائم}
+\begin{columns}[t,onlytextwidth]
+
+\begin{column}{2cm}
+\begin{enumerate}
+\item أولا
+\item ثانيا
+\end{enumerate}
+\end{column}
+\begin{column}{8.8cm}
+\begin{codeblock}
+\setbeamertemplate{enumerate item}[ball]
\begin{enumerate}
-\item فيزياء تطبيقية
-\item فيزياء تجريبية
-\item فيزياء نظرية
+\item (*@\almfamily أولا @*)
+\item (*@\almfamily ثانيا @*)
\end{enumerate}
+\end{codeblock}
+\end{column}
+
+\end{columns}
+\vfill
\setbeamertemplate{itemize item}[triangle]
-{\selectlanguage{nil}
-\verb|\setbeamertemplate{itemize item}[triangle]|
-}
+\begin{columns}[t,onlytextwidth]
+\begin{column}{2cm}
+\begin{itemize}
+\item أولا
+\item ثانيا
+\end{itemize}
+\end{column}
+\begin{column}{8.8cm}
+\begin{codeblock}
+% in RTL context
+\setbeamertemplate{itemize item}[triangle]
\begin{itemize}
-\item فيزياء تطبيقية
-\item فيزياء تجريبية
-\item فيزياء نظرية
+\item (*@\almfamily أولا @*)
+\item (*@\almfamily ثانيا @*)
\end{itemize}
+\end{codeblock}
+\end{column}
+
+\end{columns}
+
+\framebreak
\selectlanguage{nil}
-\shapemode=2
+\begin{columns}[t]
+\begin{column}{2cm}
+\begin{itemize}
+\item First
+\item Second
+\end{itemize}
+\end{column}
+\begin{column}{8.8cm}
+\begin{codeblock}
+% in LTR context
+\setbeamertemplate{itemize item}[triangle]
\begin{itemize}
-\item first item
-\item second item
-\item third item
+\item First
+\item Second
\end{itemize}
+\end{codeblock}
+\end{column}
+\end{columns}
\end{frame}
\subsection{الروابط}
-\begin{frame}
+\begin{frame}[fragile]
\frametitle{الروابط}
\begin{itemize}
\item<1-> العنصر الأول.
\item<2-> العنصر الثاني.
-\item<3-> العنصر الثالث.
\end{itemize}
-\hyperlink{jumptosecond}{\beamerreturnbutton{الرجوع إلى الشريحة الثانية}}
-\hypertarget<2>{jumptosecond}{}
+\hyperlink{jumptosecond}{\beamerreturnbutton{الرجوع إلى الشريحة الأولى}}
+\hypertarget<1>{jumptosecond}{}
-\end{frame}
+\pause
+\begin{codeblock}
+\hyperlink{jumptofirst}
+{\beamergotobutton{(*@\almfamily الرجوع إلى الشريحة الأولى@*)}}
+\hypertarget<1>{jumptofirst}{}
+\end{codeblock}
+
+\end{frame}
\subsection{النظريات}
@@ -297,20 +364,20 @@ number not in the first $p$ numbers.\qedhere
\subsection{التكبير}
+
\begin{frame}[fragile]
\frametitle{التكبير}
-\framezoom<1><2>[border=2](3cm,2cm)(2cm,2cm)
-\pgfimage[height=5cm]{example-image}
+\framezoom<1><2>[border=2](1cm,1cm)(2cm,2cm)
+\pgfimage[height=4cm]{example-image}
-\selectlanguage{nil}
-
-\begin{verbatim}
-\framezoom<1><2>[border=2](3cm,2cm)(2cm,2cm)
-% (3cm,2cm)=(<upper right x>,<upper right y>)
+\begin{codeblock}
+\framezoom<1><2>[border=2](1cm,1cm)(2cm,2cm)
+% (1cm,1cm)=(<upper right x>,<upper right y>)
% (2cm,2cm)=(<zoom area width>,<zoom area depth>)
\pgfimage[height=5cm]{example-image}
-\end{verbatim}
+\end{codeblock}
+
\end{frame}
\end{document}
diff --git a/Master/texmf-dist/doc/lualatex/beamer-rl/Example-of-use-en.pdf b/Master/texmf-dist/doc/lualatex/beamer-rl/Example-of-use-en.pdf
index e80315dae6d..2fa964af5a2 100644
--- a/Master/texmf-dist/doc/lualatex/beamer-rl/Example-of-use-en.pdf
+++ b/Master/texmf-dist/doc/lualatex/beamer-rl/Example-of-use-en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/lualatex/beamer-rl/Example-of-use-en.tex b/Master/texmf-dist/doc/lualatex/beamer-rl/Example-of-use-en.tex
index 08276708038..200ffe04f96 100644
--- a/Master/texmf-dist/doc/lualatex/beamer-rl/Example-of-use-en.tex
+++ b/Master/texmf-dist/doc/lualatex/beamer-rl/Example-of-use-en.tex
@@ -1,9 +1,9 @@
\documentclass[arabic,babel={layout=lists}]{beamer-rl}
\usepackage{hologo} % pdflatex, xelatex, lualatex logos
+\usepackage{verbatim}
\babelprovide[import=ar-DZ, main]{arabic}
\babelprovide[import,language=Default]{english}
-\babelfont{sf}{Amiri}
% Themes without Navigation Bars
%\mode<presentation>{\usetheme{default}}
@@ -53,11 +53,30 @@
{\color{blue} Bug tracker: } https://github.com/seloumi/beamer-rl/issues
}
-
\date{{\selectlanguage{english} \today}}
\setbeamercovered{transparent=10}
+% reduce space above and below verbatim env
+\makeatletter
+\preto{\@verbatim}{\topsep=0pt \partopsep=0pt }
+\makeatother
+
+\newenvironment{codeblock}{%
+\selectlanguage{nil}
+\smallskip\hfill%
+\beamercolorbox[wd=\linewidth,sep=.3ex,dp=1ex]{block body}
+\endgraf
+\verbatim
+}{%
+\endverbatim
+\endbeamercolorbox
+\hfill
+\smallskip
+%\end{verbatim}
+}
+
+
\begin{document}
\parskip=6pt
@@ -76,12 +95,12 @@
\begin{frame}[fragile]
\frametitle{Introduction}
-Creating beamer presentation for right to left language (like arabic) using \hologo{pdfLaTeX} or \hologo{XeLaTeX} still poses many problems due to bugs not currently resolved especially for colors and hyperlinks
+Creating beamer presentation for right to left languages (like arabic) using \hologo{pdfLaTeX} or \hologo{XeLaTeX} still poses many problems due to bugs not currently resolved especially for colors and hyperlinks
The \hologo{LuaTeX} team set solutions for these issues thanks to them and to \textit{Javier~Bezos} for his works on the package \verb|babel| and \verb|bidi| writing
-This class provides patchs of some beamer templates and commands
-for right to left presentation, this package call babel with \verb|bidi=basic-r| option and require lualatex engine
+This class provides patchs of some beamer templates and commands to create
+ right to left beamer presentation, the class call babel with \verb|bidi=basic| option and require \hologo{LuaLaTeX} engine
\end{frame}
@@ -90,19 +109,18 @@ for right to left presentation, this package call babel with \verb|bidi=basic-r|
\begin{frame}[fragile]
\frametitle{How to use beamer-rl}
-\selectlanguage{nil}
-
-\begin{verbatim}
+\begin{codeblock}
\documentclass{beamer-rl}
-\babelprovide[import=ar-DZ, main]{arabic}
-\babelfont{sf}{Amiri}
-\mode<presentation>{\usetheme{Warsaw}}
+% import language
+\babelprovide[import=ar-DZ, main]{arabic}
+
+\usetheme{Madrid}
+
\begin{document}
...
\end{document}
-
-\end{verbatim}
+\end{codeblock}
\end{frame}
@@ -114,6 +132,14 @@ for right to left presentation, this package call babel with \verb|bidi=basic-r|
\begin{itemize}
\item
+The class define \verb:Amiri: as default sans serif font, we can
+modify this in the preambule with
+
+\begin{codeblock}
+\babelfont{sf}{<font name>}
+\end{codeblock}
+
+\item
All options provided by \verb:beamer: can be added with \verb:beamer-rl:
@@ -121,13 +147,9 @@ Additional options can also be passed to package
\verb:babel:
with \verb:beamer-rl: like this
-\medskip
-
-{\selectlanguage{nil}
-\verb:\documentclass[babel={<babel options>}]{beamer-rl}:
-}
-
-\medskip
+\begin{codeblock}
+\documentclass[babel={<babel options>}]{beamer-rl}
+\end{codeblock}
\item
The \verb:beamer-rl: class swap the definition of \verb:\blacktriangleright: with \verb:\blacktriangleleft: in RTL context
@@ -150,49 +172,45 @@ RTL context & \selectlanguage{nil}\blacktriangleright & \selectlanguage{nil}\bla
\bigskip
-
\item
Class option \verb:arabic: call an Arabic dictionary to translate strings like \verb:theorem:, \verb:example:, \verb:definition: ....
-\medskip
-
-{\selectlanguage{nil}
-\verb:\documentclass[arabic]{beamer-rl}:
-}
-
-\medskip
-
+\begin{codeblock}
+\documentclass[arabic]{beamer-rl}
+\end{codeblock}
\item
In some cases you need to use \verb:\babelsublr: command from \verb:bebel:
package to insert a left to right text within your right to left text, e.g if you need to insert a \verb:pspicture: drawing in RTL context
-\medskip
-
-{\selectlanguage{nil}
-\verb:\bebelsublr{LTR context ... }:
-}
+\begin{codeblock}
+\bebelsublr{LTR context ... }
+\end{codeblock}
\end{itemize}
-
\end{frame}
-
\section{Examples}
+
+\begin{frame}[plain]{}
+
+\fontsize{70}{60}\selectfont\centerline{Examples}
+
+\end{frame}
+
\subsection{Blocks}
\begin{frame}[fragile]
\frametitle{Blocks}
-{\selectlanguage{nil}
-\verb:\setbeamertemplate{blocks}[default]:
-}
-
+\begin{codeblock}
\setbeamertemplate{blocks}[default]
+\end{codeblock}
+\setbeamertemplate{blocks}[default]
\begin{block}{Lorem}
\selectlanguage{nil}
@@ -201,9 +219,9 @@ package to insert a left to right text within your right to left text, e.g if yo
electric current from a battery was switched on and off.
\end{block}
-{\selectlanguage{nil}
-\verb:\setbeamertemplate{blocks}[rounded][shadow=true]:
-}
+\begin{codeblock}
+\setbeamertemplate{blocks}[rounded][shadow=true]
+\end{codeblock}
\setbeamertemplate{blocks}[rounded][shadow=true]
@@ -218,51 +236,98 @@ package to insert a left to right text within your right to left text, e.g if yo
\subsection{Lists}
-\begin{frame}[fragile]
+\begin{frame}[fragile,allowframebreaks]
\frametitle{enumerate, itemize}
+\begin{columns}[t,onlytextwidth]
+
+\begin{column}{2cm}
+\begin{enumerate}
+\item First
+\item Second
+\end{enumerate}
+\end{column}
+\begin{column}{8.8cm}
+\begin{codeblock}
+\setbeamertemplate{enumerate item}[ball]
\begin{enumerate}
-\item first item
-\item second item
-\item third item
+\item First
+\item Second
\end{enumerate}
+\end{codeblock}
+\end{column}
-\setbeamertemplate{itemize item}[triangle]
+\end{columns}
-{\selectlanguage{nil}
-\verb|\setbeamertemplate{itemize item}[triangle]|
-}
+\vfill
+\setbeamertemplate{itemize item}[triangle]
+\begin{columns}[t,onlytextwidth]
+\begin{column}{2cm}
\begin{itemize}
-\item first item
-\item second item
-\item third item
+\item First
+\item Second
\end{itemize}
+\end{column}
+\begin{column}{8.8cm}
+\begin{codeblock}
+% in RTL context
+\setbeamertemplate{itemize item}[triangle]
+\begin{itemize}
+\item First
+\item Second
+\end{itemize}
+\end{codeblock}
+\end{column}
+
+\end{columns}
+
+\framebreak
\selectlanguage{nil}
-\shapemode=2
+\begin{columns}[t]
+\begin{column}{2cm}
\begin{itemize}
-\item first item
-\item second item
-\item third item
+\item First
+\item Second
\end{itemize}
-
+\end{column}
+\begin{column}{8.5cm}
+\begin{codeblock}
+% in LTR context
+\setbeamertemplate{itemize item}[triangle]
+\begin{itemize}
+\item First
+\item Second
+\end{itemize}
+\end{codeblock}
+\end{column}
+\end{columns}
\end{frame}
\subsection{Hyperlinks}
-\begin{frame}
+\begin{frame}[fragile]
\frametitle{Hyperlinks}
\begin{itemize}
-\item<1-> First item.
-\item<2-> Second item.
-\item<3-> Third item.
+\item<1-> First.
+\item<2-> Second.
\end{itemize}
-\hyperlink{jumptosecond}{\beamergotobutton{return to second slide}}
-\hypertarget<2>{jumptosecond}{}
+
+\hyperlink{jumptofirst}{\beamergotobutton{return to first slide}}
+\hypertarget<1>{jumptofirst}{}
+
+\pause
+
+\begin{codeblock}
+\hyperlink{jumptofirst}
+{\beamergotobutton{return to first slide}}
+\hypertarget<1>{jumptofirst}{}
+\end{codeblock}
+
\end{frame}
@@ -292,19 +357,16 @@ number not in the first $p$ numbers.\qedhere
\begin{frame}[fragile]
\frametitle{Zooming}
-\framezoom<1><2>[border=2](3cm,2cm)(2cm,2cm)
-\pgfimage[height=5cm]{example-image}
+\framezoom<1><2>[border=2](1cm,1cm)(2cm,2cm)
+\pgfimage[height=4cm]{example-image}
-\selectlanguage{nil}
-
-\begin{verbatim}
-\framezoom<1><2>[border=2](3cm,2cm)(2cm,2cm)
-% (3cm,2cm)=(<upper right x>,<upper right y>)
+\begin{codeblock}
+\framezoom<1><2>[border=2](1cm,1cm)(2cm,2cm)
+% (1cm,1cm)=(<upper right x>,<upper right y>)
% (2cm,2cm)=(<zoom area width>,<zoom area depth>)
\pgfimage[height=5cm]{example-image}
-\end{verbatim}
+\end{codeblock}
\end{frame}
-
\end{document}
diff --git a/Master/texmf-dist/doc/lualatex/beamer-rl/README.txt b/Master/texmf-dist/doc/lualatex/beamer-rl/README.txt
index e6b53616f93..c796202f1f4 100644
--- a/Master/texmf-dist/doc/lualatex/beamer-rl/README.txt
+++ b/Master/texmf-dist/doc/lualatex/beamer-rl/README.txt
@@ -1,5 +1,5 @@
The beamer-rl class
-v1.4a
+v1.4b
This class provides patchs of some beamer templates and commands
for right to left presentation, the class require babel with lualatex engine
@@ -9,12 +9,12 @@ please use the issue tracker:
<https://github.com/seloumi/beamer-rl/issues>
-Current version release date: 2020/08/21
+Current version release date: 2021/03/15
___________________
Salim Bou
-Copyright (c) 2019-2020
+Copyright (c) 2019-2021
It may be distributed and/or modified under the LaTeX Project Public License,
version 1.3c or higher (your choice). The latest version of
this license is at: http://www.latex-project.org/lppl.txt
diff --git a/Master/texmf-dist/tex/lualatex/beamer-rl/beamer-rl.cls b/Master/texmf-dist/tex/lualatex/beamer-rl/beamer-rl.cls
index 7a6bdc1143e..c85b7c769e2 100644
--- a/Master/texmf-dist/tex/lualatex/beamer-rl/beamer-rl.cls
+++ b/Master/texmf-dist/tex/lualatex/beamer-rl/beamer-rl.cls
@@ -1,6 +1,6 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{beamer-rl}
-[2020/08/04 v1.4a LaTeX class to patch beamer for right to left presentation with babel]
+[2021/03/12 v1.4b LaTeX class to patch beamer for right to left presentation with babel]
\RequirePackage{kvoptions}
\RequirePackage{kvsetkeys}
@@ -32,12 +32,12 @@
\ifluatex
\else
-\ClassError{beamer-rl}{beamer-rl require luatex}
+\ClassError{beamer-rl}{beamer-rl require lualatex}
\fi
\LoadClass[hyperref={unicode}]{beamer}
-\RequirePackage[nil,bidi=basic-r]{babel}
+\RequirePackage[nil,bidi=basic]{babel}
\def\reset@temp#1#2{\expandafter\let\csname beamer@@tmpop@#1@#2\endcsname\relax}
\def\@@defbeamertemplate#1#2{\reset@temp{#1}{#2}\defbeamertemplate{#1}{#2}}
@@ -90,11 +90,15 @@
%
\vskip4bp
\setbox\bmb@box=\hbox{%
- \begin{minipage}[b]{\bmb@width}%
+ \begin{minipage}[b]{\bmb@width}%
\usebeamercolor[fg]{\bmb@upper}%
#2%
\end{minipage}}%
\ifdim\wd\bmb@box=0pt%
+ \ifcase\bbl@thetextdir\relax
+ \else%
+ \bmb@dimc=\bmb@width%
+ \fi% <--
\setbox\bmb@box=\hbox{}%
\ht\bmb@box=1.5pt%
\bmb@prevheight=-4.5pt%
@@ -111,12 +115,8 @@
\bmb@temp=\bmb@width%
\bmb@dima=\bmb@temp\advance\bmb@dima by2.2bp%
\bmb@dimb=\bmb@temp\advance\bmb@dimb by4bp%
- \bmb@dimc=0pt%
- \ifdim\wd\bmb@box=0pt
- \bmb@dimc=\bmb@width%
- \fi
- \hbox{%
- \textdir TLT\begin{pgfpicture}{0bp}{+-\ht\bmb@box}{\bmb@dimc}{+-\ht\bmb@box}
+ \hbox dir TLT {%
+ \begin{pgfpicture}{0bp}{+-\ht\bmb@box}{\bmb@dimc}{+-\ht\bmb@box}
\ifdim\wd\bmb@box=0pt%
\color{lower.bg}%
\else%
@@ -153,11 +153,6 @@
\nointerlineskip%
\vskip-0.5pt%
\fi%
- \ifbmb@shadow%
- \setbox\bmb@boxshadow=\hbox{\pgfuseshading{bmb@shadow}}%
- \setbox\bmb@boxshadowball=\hbox{\pgfuseshading{bmb@shadowball}}%
- \setbox\bmb@boxshadowballlarge=\hbox{\pgfuseshading{bmb@shadowballlarge}}%
- \fi%
\setbox\bmb@colorbox=\hbox{{\pgfpicturetrue\pgfsetcolor{lower.bg}}}%
\setbox\bmb@box=\hbox\bgroup\begin{minipage}[b]{\bmb@width}%
\vskip2pt%
@@ -166,113 +161,10 @@
\colorlet{structure}{upper.bg}%
%\color{.}%
}
-
- \def\endbeamerboxesrounded{%
- \end{minipage}\egroup%
- \wd\bmb@box=\bmb@width%
- \bmb@temp=\dp\bmb@box%
- \advance\bmb@temp by.5pt%
- \setbox\bmb@box=\hbox{\raise\bmb@temp\hbox{\box\bmb@box}}%
- \dp\bmb@box=0pt%
- \bmb@temp=\wd\bmb@box%
- \bmb@dima=\bmb@temp\advance\bmb@dima by2.2bp%
- \bmb@dimb=\bmb@temp\advance\bmb@dimb by4bp%
- \hbox{%
- \textdir TLT\begin{pgfpicture}{0bp}{0bp}{0bp}{0bp}
- \ifbmb@shadow%
- {\pgftransformshift{\pgfpoint{4bp}{-3bp}}\pgftext{\copy\bmb@boxshadowball}}
- \begin{pgfscope}
- {%
- \advance\bmb@temp by-1bp%
- \pgfpathrectangle{\pgfpoint{\bmb@temp}{-7bp}}{\pgfpoint{9bp}{9bp}}%
- \pgfusepath{clip}
- }%
- {\pgftransformshift{\pgfpoint{\bmb@temp}{1bp}}\pgftext{\box\bmb@boxshadowballlarge}}
- \end{pgfscope}
- \begin{pgfscope}
- \advance\bmb@temp by-4bp%
- \pgfpathrectangle{\pgfpoint{4bp}{-7bp}}{\pgfpoint{\bmb@temp}{5bp}}
- \pgfusepath{clip}
- {\pgftransformshift{\pgfpoint{4bp}{-7bp}}\pgftext[left,base]{\copy\bmb@boxshadow}}%
- \end{pgfscope}
- \begin{pgfscope}
- \advance\bmb@temp by 4bp%
- \bmb@dima=\ht\bmb@box%
- \advance\bmb@dima by\bmb@prevheight%
- \advance\bmb@dima by 4bp%
- \pgfpathrectangle{\pgfpoint{\bmb@temp}{1bp}}{\pgfpoint{4bp}{\bmb@dima}}
- \pgfusepath{clip}
- \advance\bmb@dima by-4bp%
- {\pgftransformshift{\pgfpoint{\bmb@temp}{\bmb@dima}}\pgftext{\box\bmb@boxshadowball}}
- \advance\bmb@dima by-1bp%
- \pgfpathrectangle{\pgfpoint{\bmb@temp}{1bp}}{\pgfpoint{4bp}{\bmb@dima}}
- \pgfusepath{clip}
- \advance\bmb@temp by4bp%
- {\pgftransformshift{\pgfpoint{\bmb@temp}{-3bp}}%
- \pgftransformrotate{90}%
- \pgftext[left,base]{\box\bmb@boxshadow}}%
- \end{pgfscope}
- \fi%
- \unhbox\bmb@colorbox%
- \pgfpathqmoveto{-4bp}{1bp}
- \pgfpathqcurveto{-4bp}{-1.2bp}{-2.2bp}{-3bp}{0bp}{-3bp}
- \pgfpathlineto{\pgfpoint{\the\bmb@temp}{-3bp}}
- \pgfpathcurveto%
- {\pgfpoint{\the\bmb@dima}{-3bp}}%
- {\pgfpoint{\the\bmb@dimb}{-1.2bp}}%
- {\pgfpoint{\the\bmb@dimb}{1bp}}%
- {
- \bmb@dima=\ht\bmb@box%
- \pgfpathlineto{\pgfpoint{\bmb@dimb}{\bmb@dima}}
- \pgfpathlineto{\pgfpoint{-4bp}{\bmb@dima}}
- \pgfusepath{fill}
- }
- \ifbmb@shadow%
- {
- \color{black!50!bg}
- \pgfsetlinewidth{0pt}
- \pgfpathmoveto{\pgfpoint{\bmb@dimb}{-.5bp}}
- \bmb@dima=\ht\bmb@box%
- \advance\bmb@dima by\bmb@prevheight%
- \advance\bmb@dima by 1bp%
- \pgfpathlineto{\pgfpoint{\bmb@dimb}{\bmb@dima}}
- \pgfusepath{stroke}
- \bmb@temp=\bmb@dima
- \advance\bmb@dima by 1bp%
- \color{black!31!bg}
- \pgfpathmoveto{\pgfpoint{\bmb@dimb}{\bmb@temp}}
- \pgfpathlineto{\pgfpoint{\bmb@dimb}{\bmb@dima}}
- \pgfusepath{stroke}
- \advance\bmb@dima by 1bp%
- \advance\bmb@temp by 1bp%
- \color{black!19!bg}
- \pgfpathmoveto{\pgfpoint{\bmb@dimb}{\bmb@temp}}
- \pgfpathlineto{\pgfpoint{\bmb@dimb}{\bmb@dima}}
- \pgfusepath{stroke}
- \advance\bmb@dima by 1bp%
- \advance\bmb@temp by 1bp%
- \color{black!6!bg}
- \pgfpathmoveto{\pgfpoint{\bmb@dimb}{\bmb@temp}}
- \pgfpathlineto{\pgfpoint{\bmb@dimb}{\bmb@dima}}
- \pgfusepath{stroke}
- \advance\bmb@dima by 1.5bp%
- \advance\bmb@temp by 1bp%
- \color{bg}
- \pgfpathmoveto{\pgfpoint{\bmb@dimb}{\bmb@temp}}
- \pgfpathlineto{\pgfpoint{\bmb@dimb}{\bmb@dima}}
- \pgfusepath{stroke}
- }
- \fi
- \end{pgfpicture}%
- \box\bmb@box%
- }%
- \ifbmb@shadow%
- \vskip4bp minus 2bp%
- \else%
- \vskip2bp%
- \fi%
- \egroup% of \vbox\bgroup
-}
+
+\bbl@sreplace\endbeamerboxesrounded{\begin{pgfpicture}}%
+ {\textdir TLT\begin{pgfpicture}}%
+
%% beamerbaseauxtemplates
@@ -347,7 +239,7 @@
}
\def\insertgotosymbol{%
- \begin{pgfpicture}{1pt}{0pt}{6pt}{5pt}
+\begin{pgfpicture}{1pt}{0pt}{6pt}{5pt}
\pgfuseobject{\ifcase\bbl@thepardir beamergotosymbol\else beamerreturnsymbol\fi}%
\end{pgfpicture}}
@@ -360,7 +252,7 @@
}
\def\insertreturnsymbol{%
- \begin{pgfpicture}{1pt}{0pt}{6pt}{5pt}
+\begin{pgfpicture}{1pt}{0pt}{6pt}{5pt}
\pgfuseobject{\ifcase\bbl@thepardir beamerreturnsymbol\else beamergotosymbol\fi}%
\end{pgfpicture}}
@@ -388,7 +280,7 @@
}
\def\insertskipsymbol{%
- \begin{pgfpicture}{-1pt}{0pt}{6pt}{5pt}
+\begin{pgfpicture}{-1pt}{0pt}{6pt}{5pt}
\pgfuseobject{\ifcase\bbl@thepardir beamerskipsymbol\else beamerskipsymbolrl\fi}%
\end{pgfpicture}}
@@ -466,16 +358,17 @@
\dp\@tempboxa=0pt%
\setbox\beamer@framebox=\vbox to\beamer@frametextheight{{%
\ifbeamer@plainframe\beamer@leftmargin=\Gm@lmargin\fi%
+ \ifcase\bbl@thepardir \else\multiply\@tempdimb by -1\relax\fi%
\begin{oldpgfpicture}{\beamer@leftmargin}{-\beamer@frametextheight}{\beamer@leftmargin}{0pt}
- \pgftext[left,top]{\box\@tempboxa}
- \pgfpathrectangle{\pgfpoint{0pt}{-\@tempdimc}}{\pgfpoint{\ifcase\bbl@thepardir \else-\fi\@tempdimb}{\@tempdimc}}%
+ \pgftext[left,top]{\box\@tempboxa}
+ \pgfpathrectangle{\pgfpoint{0pt}{-\@tempdimc}}{\pgfpoint{\@tempdimb}{\@tempdimc}}%
\pgfusepath{clip}
\begingroup
- \pgftransformscale{\beamer@temp}
+ \pgftransformscale{\beamer@temp}
\@tempdima=#4\relax%
\@tempdimb=#5\relax%
{\pgftransformshift{\pgfpoint{-\@tempdima}{\@tempdimb}}%
- \pgftext[left,top]{\vbox{\vbox{}\nointerlineskip\unvbox\beamer@framebox}}}
+ \pgftext[left,top]{\vbox{\vbox{}\nointerlineskip\unvbox\beamer@framebox }}}
\endgroup
\end{oldpgfpicture}%
}}%
@@ -498,30 +391,33 @@
% Shrink stuff
%
-\def\beamer@shrinkframebox{%
- \@tempdima=\ht\beamer@framebox%
-% \ifdim\@tempdima>\beamer@frametextheight%
- \@tempcnta=\@tempdima%
- \divide\@tempcnta by 65536\relax%
- \@tempdimc=\beamer@frametextheight%
- \divide\@tempdimc by\@tempcnta\relax%
- \ifdim\@tempdimc>\beamer@shrinkfactor pt%
- \@tempdimc=\beamer@shrinkfactor pt%
- \else%
- \@tempdima=-100\@tempdimc%
- \advance\@tempdima by100pt%
- \ClassWarning{beamer}{Frame text is shrunk by a factor of %
- \strip@pt\@tempdima\space percent instead of
- \beamer@shrinkpercentage\space percent}%
- \fi%
- \edef\beamer@factortemp{\strip@pt\@tempdimc}%
- \setbox\beamer@framebox=\vbox to\beamer@frametextheight{%
- \begin{oldpgfpicture}{0pt}{-\beamer@frametextheight}{0pt}{0pt}
- {\pgftransformscale{\beamer@factortemp}%
- \pgftext[left,top]{\box\beamer@framebox}}%
- \end{oldpgfpicture}%
- }%
-% \fi%
-}
-\endinput
+ \bbl@sreplace\beamer@shrinkframebox{\vbox}%
+ {\vbox dir TLT}%
+
+% Temporary workaround for issue of \shapemode bug
+% https://github.com/latex3/babel/issues/13
+% this work fine with lists inside frame, if they are included within \vbox
+% may be we need to insert \shapemode=2 or \shapemode=0 manualy at beginning of list
+% \begin{enumerate} \shapemode=.. & \begin{itemize} \shapemode=..
+
+\newcounter{beginframepardir}
+
+\let\oldframe\frame
+\def\frame{\setcounter{beginframepardir}{\bbl@getluadir{par}}
+% 0 for TLT 1 for TRT
+\oldframe}
+
+\redefbeamertemplate*{itemize/enumerate body begin}{default}{\ifnum\value{beginframepardir}=\bbl@getluadir{par} \else\shapemode=2\fi}
+
+\redefbeamertemplate*{description body begin}{default}{\ifnum\value{beginframepardir}=\bbl@getluadir{par} \else\shapemode \tw@\fi}
+
+% Use Amiri as default sans serif font
+
+\font\sffont@rl="Amiri" at 10pt
+\ifx\sffont@rl\nullfont
+\else
+\babelfont{sf}{Amiri}
+\fi
+
+\endinput \ No newline at end of file