al-Jahiz.tex 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. %
  2. % This file is public domain
  3. % To compile this document, do:
  4. % 'lualatex --shell-escape al-Jahiz'
  5. %
  6. \documentclass[fontsize=12pt, paper=letter, DIV=classic]{scrartcl}
  7. \usepackage{fontspec}
  8. \setmainfont{Old Standard}
  9. \usepackage{newunicodechar}
  10. \newunicodechar{ǧ}{ǧ} % Old Standard does include ǧ/Ǧ
  11. \newunicodechar{Ǧ}{Ǧ} %
  12. \usepackage{filecontents}
  13. \usepackage{xcolor}
  14. \usepackage[outputdir=TMP]{minted}
  15. \definecolor{bg}{rgb}{0.95,0.95,0.95}
  16. \usepackage{ccicons}
  17. \usepackage{lineno}
  18. \usepackage{setspace}
  19. \onehalfspacing
  20. \usepackage{csquotes}
  21. \DeclareQuoteStyle{arabic}
  22. {\rmfamily\textquotedblright}{\rmfamily\textquotedblleft}
  23. {\rmfamily\textquoteright}{\rmfamily\textquoteleft}
  24. \usepackage[fullvoc]{arabluatex}
  25. \SetArbEasy
  26. \PassOptionsToPackage{pdfa}{hyperref}
  27. \usepackage{hyperxmp}
  28. \usepackage{hyperref}
  29. \hypersetup{colorlinks, linkcolor=blue, pdfauthor={Robert Alessi}}
  30. \begin{document}
  31. \begin{filecontents*}{dajaja.tex}
  32. \begin{linenumbers*}
  33. \begin{arab}
  34. kAna \uc{'a}bU 'l-\uc{h}u_dayli 'ahd_A 'il_A \uc{m}uwaysiN
  35. dajAjaTaN. wa-kAnat dajAjatu-hu 'llatI 'ahdA-hA dUna mA kAna
  36. yuttaxa_du li-\uc{m}uwaysiN. wa-l_akinna-hu bi-karami-hi
  37. wa-bi-.husni _hu\-luqi-hi 'a.zhara 'l-ta`ajjuba min simani-hA
  38. wa-.tIbi la.hmi-hA. wa-kAna <\uc{'a}bU 'l-\uc{h}u_dayli>
  39. yu`rafu bi-'l-'imsAki 'l-^sadIdi. fa-qAla: \enquote{wa-kayfa
  40. ra'ayta yA \uc{'a}bA \uc{`i}mrAna tilka 'l-dajA\-jaTa?}
  41. qAla: \enquote{kAnat `ajabaN mina 'l-`ajabi!} fa-yaqUlu:
  42. \enquote{wa-tadrI mA jinsu-hA? wa-tadrI mA sinnu-hA? fa-'inna
  43. 'l-dajAjaTa 'inna-mA ta.tIbu bi-'l-jinsi wa-'l-sinni. wa-tadrI
  44. bi-'ayyi ^say'iN kunnA nusamminu-hA? wa-fI 'ayyi makAniN kunnA
  45. na`lifu-hA?} fa-lA yazAlu fI h_a_dA wa-'l-'A_haru ya.d.haku
  46. .da.hkaN na`rifu-hu na.hnu wa-lA ya`rifu-hu \uc{'a}bU
  47. 'l-\uc{h}u_dayli.
  48. \end{arab}
  49. \begin{arab}
  50. wa-kAna \uc{'a}bU 'l-\uc{h}u_dayli 'aslama 'l-nAsi .sadraN
  51. wa-'awsa`a-hum _huluqaN wa-'ashala-hum suhUlaTaN. fa-'in _dakarUA
  52. dajAjaTaN, qAla: \enquote{'ayna kAnat yA \uc{'a}bA \uc{`i}mrAna
  53. min tilka 'l-dajA\-jaTi?} fa-'in _dakarUA ba.t.taTaN 'aw `anAqaN
  54. 'aw jazUraN 'aw baqaraTaN, qAla: \enquote{fa-'ayna kAnat h_a_dihi
  55. 'l-jazUru fI 'l-juzuri min tilka 'l-dajAjaTi fI 'l-dajAji!}
  56. wa-'ini istasmana \uc{'a}bU 'l-\uc{h}u_dayli ^say'aN mina
  57. 'l-.tayri wa-'l-bahA'imi, qAla: \enquote{lA wa-'l-l_ahi wa-lA tilka
  58. 'l-dajAjaTu!} wa-'in _dakarUA `u_dUbaTa 'l-^sa.hmi, qAla:
  59. \enquote{`u_dUbaTu 'l-^sa.hmi fI 'l-baqari wa-'l-ba.t.ti wa-bu.tUni
  60. 'l-samaki wa-'l-dajAji, wa-lA siyyamA _d_alika 'l-jinsu mina
  61. 'l-dajAji.} wa-'in _dakarUA mIlAda ^say'iN 'aw qudUma
  62. 'insAniN, qAla: \enquote{kAna _d_alika ba`da 'an 'ahdaytu-hA la-ka
  63. bi-sanaTiN, wa-mA kAna bayna qudUmi fulAniN wa-bayna 'l-ba`_taTi
  64. bi-tilka 'l-dajAjaTi 'illA yawmuN.} wa-kAnat ma_ta\-laN fI
  65. kulli ^say'iN wa-tArI_haN fI kulli ^say'iN.
  66. \end{arab}
  67. \end{linenumbers*}
  68. \bigskip
  69. \begin{arab}
  70. \uc{al-jA.hi.zu}, \aemph{\uc{k}itAbu 'l-\uc{b}u_halA'i}
  71. \end{arab}
  72. \end{filecontents*}
  73. \title{\large\arb{dajAjaTu \uc{'a}bI 'l-\uc{h}u_dayli
  74. 'l-\uc{`a}llAfi}}
  75. \author{}
  76. \date{}
  77. \titlehead{\textbf{\textsf{arabluatex sample file}} --- \cczero\ This
  78. file is public domain.\\
  79. \textsf{arabluatex} mode: \texttt{fullvoc} with
  80. \texttt{\textbackslash SetArbEasy}\\
  81. Full vocalization, the \arb[trans]{sukUn} and the
  82. \arb[trans]{wa.slaT} are expressed, the \arb[trans]{ta^sdId} is
  83. generated, but the \enquote*{classic} \arb[trans]{maddaT} is
  84. discarded (see source code on p.~\pageref{source}).}
  85. \maketitle
  86. \vspace{-1in}
  87. \doublespacing
  88. \setquotestyle{arabic}
  89. \input{dajaja}
  90. \makeatletter
  91. \def\al@mode{trans}
  92. \makeatother
  93. \SetTranslitConvention{dmg}
  94. \titlehead{\textsf{arabluatex} mode: \texttt{trans} with
  95. \texttt{\textbackslash SetTranslitConvention\{dmg\}} and
  96. \texttt{\textbackslash SetArbEasy}\\
  97. \emph{Deutsche Morgenländische Gesellschaft} (see source code on
  98. p.~\pageref{source})}
  99. \onehalfspacing
  100. \maketitle
  101. \vspace{-1in}
  102. \setquotestyle{english}
  103. \input{dajaja}
  104. \makeatletter
  105. \def\al@mode{trans}
  106. \makeatother
  107. \SetTranslitConvention{loc}
  108. \titlehead{\textsf{arabluatex} mode: \texttt{trans} with
  109. \texttt{\textbackslash SetTranslitConvention\{loc\}}\\
  110. \emph{Library of Congress} (see source code on p.~\pageref{source})}
  111. \maketitle
  112. \vspace{-1in}
  113. \setquotestyle{english}
  114. \input{dajaja}
  115. \makeatletter
  116. \def\al@mode{trans}
  117. \makeatother
  118. \SetTranslitConvention{arabica}
  119. \titlehead{\textsf{arabluatex} mode: \texttt{trans} with
  120. \texttt{\textbackslash SetTranslitConvention\{arabica\}}\\
  121. \emph{Journal of Arabic and Islamic Studies} (Arabica, see source code
  122. on p.~\pageref{source})}
  123. \maketitle
  124. \vspace{-1in}
  125. \setquotestyle{english}
  126. \input{dajaja}
  127. \makeatletter
  128. \def\al@mode{voc}
  129. \makeatother
  130. \singlespacing
  131. \SetTranslitConvention{dmg}
  132. \titlehead{}
  133. \title{\large Source code}
  134. \subtitle{}
  135. \maketitle
  136. \vspace{-1in}
  137. \phantomsection\label{source}
  138. Here follows the exact source code that has been used to produce the
  139. above presented outputs. Discretionary hyphens
  140. (\mintinline{latex}|\-|) may have been inserted at some points to
  141. prevent lines from overflowing into the right margin.
  142. \medskip
  143. \noindent\textbf{\texttt{preamble:}}
  144. \begin{minted}[linenos, bgcolor=bg]{latex}
  145. \usepackage{csquotes} % recommended for inline quotations
  146. \DeclareQuoteStyle{arabic} % then \setquotestyle{arabic} or
  147. % \setquotestyle{english} may be used
  148. {\rmfamily\textquotedblright}{\rmfamily\textquotedblleft}
  149. {\rmfamily\textquoteright}{\rmfamily\textquoteleft}
  150. \usepackage[fullvoc]{arabluatex} % 'voc', 'fullvoc', 'novoc' or 'trans'
  151. \SetTranslitConvention{dmg} % 'dmg', 'loc' or 'arabica'
  152. \SetArbEasy % ie. discard 'classic' maddah
  153. \title{\arb{dajAjaTu \uc{'a}bI 'l-\uc{h}u_dayli 'l-\uc{`a}llAfi}}
  154. \end{minted}
  155. \textbf{\texttt{document:}}
  156. \inputminted[linenos, firstnumber=last, bgcolor=bg]{latex}{TMP/dajaja.tex}
  157. \end{document}