summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/lettrine/doc/lettrine-demo-arabic.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/lettrine/doc/lettrine-demo-arabic.tex')
-rw-r--r--macros/latex/contrib/lettrine/doc/lettrine-demo-arabic.tex38
1 files changed, 38 insertions, 0 deletions
diff --git a/macros/latex/contrib/lettrine/doc/lettrine-demo-arabic.tex b/macros/latex/contrib/lettrine/doc/lettrine-demo-arabic.tex
new file mode 100644
index 0000000000..0fd1799823
--- /dev/null
+++ b/macros/latex/contrib/lettrine/doc/lettrine-demo-arabic.tex
@@ -0,0 +1,38 @@
+%%% This example is adapted from
+%%% https://tex.stackexchange.com/questions/152184/lettrine-and-arabic-script/
+%%%
+%%% This file can be compiled either with LuaLaTeX or XeLaTeX.
+%%% The syntax for loading babel slightly differs between Lua- and Xe-LaTeX.
+%%% Compiling this file with XeLaTeX works within this directory which holds
+%%% a specific version of "lettrine-xetex-bidi.def", or requires to
+%%% remove the official file "lettrine-xetex-bidi.def" (v0.8).
+
+\documentclass{article}
+\usepackage{iftex}
+\usepackage{fontspec}
+\setmainfont{FreeSerif}
+\usepackage{lettrine}
+\renewcommand{\LettrineTextFont}{\upshape} % No small caps
+\renewcommand{\LettrineTestString}{۱‬‬} % No Latin letter
+\renewcommand{\LettrineSecondString}{‫ه‬‬‬‫د‬} % No Latin letter
+\ifluatex
+ \usepackage[bidi=basic]{babel}
+ \babelprovide[import, main]{persian}
+\fi
+\ifxetex
+ \usepackage[bidi=bidi-r]{babel}
+ \babelprovide[import, main]{persian}
+\fi
+\begin{document}
+\lettrine[lines=3]{۱‬‬}{} تقدیم به عالیجناب تئوفیلوس:\\
+تا به حال نویسندگان بسیاری به نوشتن شرح وقایعی كه در بین ما رخ داده است، اقدام کردهاند
+تا به حال نویسندگان بسیاری به نوشتن شرح وقایعی كه در بین ما رخ داده است، اقدام کردهاند
+تا به حال نویسندگان بسیاری به نوشتن شرح وقایعی كه در بین ما رخ داده است، اقدام کردهاند
+\end{document}
+
+%%% Local Variables:
+%%% coding: utf-8-unix
+%%% mode: latex
+%%% TeX-master: t
+%%% TeX-engine: luatex
+%%% End: