[latex3-commits] [git/LaTeX3-latex3-latex2e] master: Sample with beamer. (a5ab627)

Javier javier at dante.de
Mon Jan 29 19:46:21 CET 2018


Repository : https://github.com/latex3/latex2e
On branch  : master
Link       : https://github.com/latex3/latex2e/commit/a5ab6273af6ccb1df3e510f0aa3fe32041564d64

>---------------------------------------------------------------

commit a5ab6273af6ccb1df3e510f0aa3fe32041564d64
Author: Javier <javier at localhost>
Date:   Mon Jan 29 19:46:21 2018 +0100

    Sample with beamer.


>---------------------------------------------------------------

a5ab6273af6ccb1df3e510f0aa3fe32041564d64
 required/babel/samples/lua-arabic.pdf |  Bin 81949 -> 85575 bytes
 required/babel/samples/lua-arabic.tex |   32 +++++------
 required/babel/samples/lua-beamer.pdf |  Bin 0 -> 22271 bytes
 required/babel/samples/lua-beamer.tex |   99 +++++++++++++++++++++++++++++++++
 4 files changed, 114 insertions(+), 17 deletions(-)

diff --git a/required/babel/samples/lua-arabic.pdf b/required/babel/samples/lua-arabic.pdf
index 1d934f0..7c77630 100644
Binary files a/required/babel/samples/lua-arabic.pdf and b/required/babel/samples/lua-arabic.pdf differ
diff --git a/required/babel/samples/lua-arabic.tex b/required/babel/samples/lua-arabic.tex
index 524cbdd..6f1dec3 100644
--- a/required/babel/samples/lua-arabic.tex
+++ b/required/babel/samples/lua-arabic.tex
@@ -1,7 +1,7 @@
 %$LuaLaTeX -*- coding: utf-8 ; mode: latex; TeX-engine: luatex; -*-
 \documentclass[a4paper]{book}
 
-\usepackage[english, bidi=basic-r, layout=counters]{babel}
+\usepackage[english, bidi=basic-r, layout=counters.tabular]{babel}
 
 \babelprovide[import=ar, main]{arabic}
 
@@ -13,11 +13,14 @@
 \usepackage{microtype}
 \usepackage{graphicx}
 \usepackage{color}
-\usepackage{hyperref}
+\usepackage[unicode]{hyperref}
 \usepackage{multicol}
 \usepackage{booktabs}
 
-\title{كهرباء} \author{From Wikipedia}
+\title{كهرباء}
+\author{From Wikipedia\\%
+        Typeset with \textsf{babel}
+        \addfontfeatures{Numbers=ArabicOff} \csname bbl at version\endcsname}
 
 % Fix some bad kerns inserted by the font loader. I don't know where
 % the bug is and why the following workaroud fixes it. It just forces
@@ -219,21 +222,18 @@ Pseudodoxia Epidemica) الذي صدر عام 1646.
 \subsection{جدول التوزيع الإلكتروني}
 
 \foreignlanguage*{english}{Also from Wikipedia. These examples show
-the column order and some directions must be still sorted out. See the
-source for the workaroud used here. Furthermore, the way “New
-Caledonia” is split looks wrong (but actually “correct”).}
-
-\let\ortabular\tabular
-\def\tabular{\mathdir\pagedir\ortabular}
-
-\begingroup
+the column order and some directions must be still sorted out. A
+minimal experimental \texttt{tabular} (3.17.1171) is
+used. Furthermore, the way “New Caledonia” is split looks wrong (but
+actually “correct”).}
 
+\begin{table}
+\centering
+\caption{جدول التوزيع الإلكتروني}
 \addfontfeatures{Numbers=ArabicOff}
-
-\begin{center}
 \begin{tabular}{lllllllll}
 \toprule
-\multicolumn{1}{c}{الرقم} & العنصر & 1 & 2 & 3 & 4 & 5 & 6 & 7\\
+\multicolumn{1}{c}{الرقم} &  العنصر & 1 & 2 & 3 & 4 & 5 & 6 & 7\\
 \cmidrule(r){1-2}\cmidrule(r){3-9}
 1 & هيدروجين & 1\\
 2 & هيليوم & 2\\
@@ -245,9 +245,7 @@ Caledonia” is split looks wrong (but actually “correct”).}
 42 & موليبيدنيوم & 2 & 8 & 18 & 13 & 1\\
 \bottomrule
 \end{tabular}
-\end{center}
-
-\endgroup
+\end{table}
 
 \begin{center}
 \begin{tabular}{lp{8cm}}
diff --git a/required/babel/samples/lua-beamer.pdf b/required/babel/samples/lua-beamer.pdf
new file mode 100644
index 0000000..bbfb56f
Binary files /dev/null and b/required/babel/samples/lua-beamer.pdf differ
diff --git a/required/babel/samples/lua-beamer.tex b/required/babel/samples/lua-beamer.tex
new file mode 100644
index 0000000..6811681
--- /dev/null
+++ b/required/babel/samples/lua-beamer.tex
@@ -0,0 +1,99 @@
+\PassOptionsToPackage{unicode}{hyperref}
+\documentclass{beamer}
+
+\usepackage[nil,bidi=basic-r]{babel}
+
+\babelprovide[import=ar,main]{arabic}
+\babelfont{rm}{FreeSerif}
+\babelfont{sf}{FreeSerif}
+
+% See lua-arabic for an explanation of the following code, which is a
+% workaround for a bug in the default font loader.
+
+\directlua{
+
+function fixkerns (head)
+  if head and head.id == 9 then
+    snd = head.next
+    if snd and not (snd.id == node.id'dir') then
+      local d = node.new(node.id'dir')
+      d.dir = head.dir
+      head = node.insert_after(head, head, d)
+    end
+  end
+  return head
+end
+
+where = luatexbase.priority_in_callback('pre_linebreak_filter',
+        'luaotfload.node_processor')
+
+luatexbase.add_to_callback("pre_linebreak_filter", fixkerns, "fixkerns", where)
+}
+
+\mode<presentation>{\usetheme{Luebeck}}
+
+\title{ميكانيكا}
+
+\author{From Wikipedia}
+\date{\today}
+
+\begin{document}
+
+\begin{frame}
+\titlepage
+\end{frame}
+
+\begin{frame}
+\frametitle{\contentsname}
+\tableofcontents
+\end{frame}
+
+\section{تطبيقية}
+
+\begin{frame}
+\frametitle{أقسام}
+\begin{itemize}
+\item فيزياء تطبيقية
+\item فيزياء تجريبية
+\item فيزياء نظرية
+\end{itemize}
+\end{frame}
+
+\section{طاقة, حركة}
+
+\begin{frame}
+\frametitle{طاقة, حركة}
+\begin{itemize}
+\item ديناميكا حرارية
+\item ميكانيكا
+\begin{itemize}
+\item كلاسيكية
+\begin{itemize}
+\item لاغرانج
+\item هاملتوني
+\end{itemize}
+\item المتصل
+\item سماوية
+\end{itemize}
+\end{itemize}
+\end{frame}
+
+\section{Blocks}
+
+\begin{frame}
+\frametitle{Blocks}
+
+\begin{block}{Lorem}
+  \foreignlanguage*{nil}{On 21 April 1820, during a lecture, Ørsted
+  noticed a compass needle deflected from magnetic north when an
+  electric current from a battery was switched on and off.}
+\end{block}
+
+\begin{block}{أورستد}
+  لاحظ هانز أورستد في 21 أبريل 1820 وهو يُعد أحد التجارب أن إبرة
+  البوصلة تنحرف عن اتجاهها نحو الشمال عندما كان يغلق ويفتح التيار في
+  دائرة كهربائية يُعدها.
+\end{block}
+\end{frame}
+
+\end{document}





More information about the latex3-commits mailing list