summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/lettrine/lettrine-demo-arabic.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-01-20 21:08:05 +0000
committerKarl Berry <karl@freefriends.org>2024-01-20 21:08:05 +0000
commita8c780c3a68a007f347bab71ff7f0d22a59e9fee (patch)
treeb6706ae7ddc3a9c43470d77d1289d509963b2908 /Master/texmf-dist/doc/latex/lettrine/lettrine-demo-arabic.tex
parent5d17095d877f91c1b9365e78e280fb9ba368b035 (diff)
lettrine (20jan24)
git-svn-id: svn://tug.org/texlive/trunk@69508 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/lettrine/lettrine-demo-arabic.tex')
-rw-r--r--Master/texmf-dist/doc/latex/lettrine/lettrine-demo-arabic.tex38
1 files changed, 38 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/lettrine/lettrine-demo-arabic.tex b/Master/texmf-dist/doc/latex/lettrine/lettrine-demo-arabic.tex
new file mode 100644
index 00000000000..0fd17998239
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/lettrine/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: