diff options
Diffstat (limited to 'samples')
-rw-r--r-- | samples/template-01.tex | 107 |
1 files changed, 98 insertions, 9 deletions
diff --git a/samples/template-01.tex b/samples/template-01.tex index fba7173..3d5f27d 100644 --- a/samples/template-01.tex +++ b/samples/template-01.tex | |||
@@ -1,20 +1,109 @@ | |||
1 | \documentclass[paper=letter, DIV=classic]{scrartcl} | 1 | \documentclass[paper=letter, DIV=classic, headings=small]{scrartcl} |
2 | |||
3 | \usepackage{fontspec} | ||
4 | \setmainfont{CMU Serif} | ||
5 | \setsansfont{CMU Sans Serif} | ||
6 | \setmonofont{CMU Typewriter Text} | ||
7 | 2 | ||
8 | \usepackage{ccicons} | 3 | \usepackage{ccicons} |
4 | \usepackage{paralist} | ||
9 | 5 | ||
10 | \usepackage[trans]{arabluatex} | 6 | \usepackage{arabluatex} |
7 | |||
8 | \usepackage{hyperref} | ||
9 | \hypersetup{colorlinks, linkcolor=blue, breaklinks} | ||
11 | 10 | ||
12 | \title{\textsf{arabluatex} sample file} | 11 | \subject{\textsf{arabluatex} sample files} |
12 | \title{The Basics} | ||
13 | \author{Robert Alessi\thanks{\cczero\ This file is public domain.}} | 13 | \author{Robert Alessi\thanks{\cczero\ This file is public domain.}} |
14 | 14 | ||
15 | \begin{document} | 15 | \begin{document} |
16 | \maketitle | 16 | \maketitle |
17 | 17 | ||
18 | Test: \arb{da_hala 'l-^gAmi`aTa mubtasimaN} | 18 | \begin{abstract} |
19 | This file demonstrates the basic features of \texttt{arabluatex}. | ||
20 | \end{abstract} | ||
21 | |||
22 | \section{The less, the better} | ||
23 | \label{sec:less-better} | ||
24 | \textsf{arabluatex} is loaded by one single line in the preamble: | ||
25 | \begin{verbatim} | ||
26 | \usepackage{arabluatex} | ||
27 | \end{verbatim} | ||
28 | That said, there are two subsequent requirements: | ||
29 | \begin{compactenum} | ||
30 | \item An Arabic font: \textsf{arabluatex} tries to load the | ||
31 | \textsf{Amiri} Arabic font which is already part of | ||
32 | \textsf{texlive}. | ||
33 | \item A Roman font that has all the characters that are needed for | ||
34 | the transliteration of the Arabic. | ||
35 | \end{compactenum} | ||
36 | |||
37 | Once these requirements are met, one may insert Arabic words in | ||
38 | left-to-right paragraphs like so: \verb|\arb{da_hala mubtasimaN}|, | ||
39 | \arb{da_hala mubtasimaN}. Or insert running paragraphs of Arabic text | ||
40 | inside the \verb|arab| environment, like so:--- | ||
41 | \begin{verbatim} | ||
42 | \begin{arab} | ||
43 | 'at_A .sadIquN 'il_A ju.hA ya.tlubu min-hu .himAra-hu li-yarkaba-hu | ||
44 | fI safraTiN qa.sIraTiN fa-qAla la-hu: sawfa 'u`Idu-hu 'ilay-ka fI | ||
45 | 'l-masA'-i wa-'adfa`u la-ka 'ujraTaN. fa-qAla ju.hA: 'anA 'AsifuN | ||
46 | jiddaN 'annI lA 'asta.tI`u 'an 'u.haqqiqa la-ka ra.gbata-ka | ||
47 | fa-'l-.himAr-u laysa hunA 'l-yawm-a. wa-qabla 'an yutimma ju.hA | ||
48 | kalAma-hu bada'a 'l-.himAr-u yanhaqu fI 'i.s.tabli-hi. fa-qAla la-hu | ||
49 | .sadIqu-hu: 'innI 'asma`u .himAra-ka yA ju.hA yanhaqu. fa-qAla la-hu | ||
50 | ju.hA: .garIbuN 'amru-ka yA .sadIqI 'a-tu.saddiqu 'l-.himAr-a | ||
51 | wa-tuka_d_diba-nI? | ||
52 | \end{arab} | ||
53 | \end{verbatim} | ||
54 | \begin{arab} | ||
55 | 'at_A .sadIquN 'il_A ju.hA ya.tlubu min-hu .himAra-hu li-yarkaba-hu | ||
56 | fI safraTiN qa.sIraTiN fa-qAla la-hu: sawfa 'u`Idu-hu 'ilay-ka fI | ||
57 | 'l-masA'-i wa-'adfa`u la-ka 'ujraTaN. fa-qAla ju.hA: 'anA 'AsifuN | ||
58 | jiddaN 'annI lA 'asta.tI`u 'an 'u.haqqiqa la-ka ra.gbata-ka | ||
59 | fa-'l-.himAr-u laysa hunA 'l-yawm-a. wa-qabla 'an yutimma ju.hA | ||
60 | kalAma-hu bada'a 'l-.himAr-u yanhaqu fI 'i.s.tabli-hi. fa-qAla la-hu | ||
61 | .sadIqu-hu: 'innI 'asma`u .himAra-ka yA ju.hA yanhaqu. fa-qAla la-hu | ||
62 | ju.hA: .garIbuN 'amru-ka yA .sadIqI 'a-tu.saddiqu 'l-.himAr-a | ||
63 | wa-tuka_d_diba-nI? | ||
64 | \end{arab} | ||
65 | |||
66 | \section{Options} | ||
67 | \label{sec:options} | ||
68 | \textsf{arabluatex} may be loaded with four mutually exclusive options:--- | ||
69 | \begin{compactdesc} | ||
70 | \item[voc] To have every short vowel written. This option is loaded by | ||
71 | default. | ||
72 | \item[fullvoc] To have the \arb[trans]{sukUn} and the | ||
73 | \arb[trans]{wa.slaT} expressed in addition to what \verb|voc| | ||
74 | already does. | ||
75 | \item[novoc] To have all the diacritics discarded. | ||
76 | \item[trans] To have the Arabic transliterated into one of the | ||
77 | accepted standards. | ||
78 | \end{compactdesc} | ||
79 | \begin{verbatim} | ||
80 | % <preamble> | ||
81 | \usepackage{arabluatex} % this loads 'voc' by default | ||
82 | \usepackage[voc]{arabluatex} | ||
83 | \usepackage[fullvoc]{arabluatex} | ||
84 | \usepackage[novoc]{arabluatex} | ||
85 | \usepackage[trans]{arabluatex} | ||
86 | \end{verbatim} | ||
87 | |||
88 | At any point of the document, any mode can be set locally, like so:--- | ||
89 | \begin{verbatim} | ||
90 | English paragraph: To have the \arb[trans]{sukUn} and the | ||
91 | \arb[trans]{wa.slaT} expressed... | ||
92 | |||
93 | \begin{arab}[trans] % Arabic paragraph | ||
94 | 'at_A .sadIquN 'il_A \cap{j}u.hA ya.tlubu min-hu .himAra-hu | ||
95 | li-yarkaba-hu fI safraTiN qa.sIraTiN fa-qAla la-hu: sawfa 'u`Idu-hu | ||
96 | 'ilay-ka fI 'l-masA'-i wa-'adfa`u la-ka 'ujraTaN. | ||
97 | \end{arab} | ||
98 | \end{verbatim} | ||
99 | |||
100 | English paragraph: To have the \arb[trans]{sukUn} and the | ||
101 | \arb[trans]{wa.slaT} expressed... | ||
102 | |||
103 | \begin{arab}[trans] % Arabic paragraph | ||
104 | 'at_A .sadIquN 'il_A \cap{j}u.hA ya.tlubu min-hu .himAra-hu | ||
105 | li-yarkaba-hu fI safraTiN qa.sIraTiN fa-qAla la-hu: sawfa 'u`Idu-hu | ||
106 | 'ilay-ka fI 'l-masA'-i wa-'adfa`u la-ka 'ujraTaN. | ||
107 | \end{arab} | ||
19 | 108 | ||
20 | \end{document} | 109 | \end{document} |