From 5dfae640ea92ae28a2b8b8871ce89563d2b4cc8d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 18 Mar 2021 21:10:08 +0000 Subject: beamer-rl (18mar21) git-svn-id: svn://tug.org/texlive/trunk@58513 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/lualatex/beamer-rl/Example-of-use-ar.pdf | Bin 130512 -> 146943 bytes .../doc/lualatex/beamer-rl/Example-of-use-ar.tex | 197 ++++++++++++------- .../doc/lualatex/beamer-rl/Example-of-use-en.pdf | Bin 103537 -> 105529 bytes .../doc/lualatex/beamer-rl/Example-of-use-en.tex | 210 +++++++++++++-------- .../texmf-dist/doc/lualatex/beamer-rl/README.txt | 6 +- 5 files changed, 271 insertions(+), 142 deletions(-) (limited to 'Master/texmf-dist/doc') 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 Binary files a/Master/texmf-dist/doc/lualatex/beamer-rl/Example-of-use-ar.pdf and b/Master/texmf-dist/doc/lualatex/beamer-rl/Example-of-use-ar.pdf 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{\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{\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}{} +\end{codeblock} + \item يمكن اضافة كل الخيارات التي تتيحها الفئة \verb:beamer: عند استدعاء الفئة \verb:beamer-rl: @@ -128,11 +153,9 @@ \medskip -{\selectlanguage{nil} -\verb:\documentclass[babel={}]{beamer-rl}: -} - -\medskip +\begin{codeblock} +\documentclass[babel={}]{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)=(,) +\begin{codeblock} +\framezoom<1><2>[border=2](1cm,1cm)(2cm,2cm) +% (1cm,1cm)=(,) % (2cm,2cm)=(,) \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 Binary files a/Master/texmf-dist/doc/lualatex/beamer-rl/Example-of-use-en.pdf and b/Master/texmf-dist/doc/lualatex/beamer-rl/Example-of-use-en.pdf 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{\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{\usetheme{Warsaw}} +% import language +\babelprovide[import=ar-DZ, main]{arabic} + +\usetheme{Madrid} + \begin{document} ... \end{document} - -\end{verbatim} +\end{codeblock} \end{frame} @@ -113,6 +131,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}{} +\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={}]{beamer-rl}: -} - -\medskip +\begin{codeblock} +\documentclass[babel={}]{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)=(,) +\begin{codeblock} +\framezoom<1><2>[border=2](1cm,1cm)(2cm,2cm) +% (1cm,1cm)=(,) % (2cm,2cm)=(,) \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: -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 -- cgit v1.2.3