aboutsummaryrefslogtreecommitdiff
path: root/arabluatex.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'arabluatex.dtx')
-rw-r--r--arabluatex.dtx76
1 files changed, 56 insertions, 20 deletions
diff --git a/arabluatex.dtx b/arabluatex.dtx
index 09b38e4..7bb8c5a 100644
--- a/arabluatex.dtx
+++ b/arabluatex.dtx
@@ -1295,7 +1295,7 @@ vowels (see §~3).
1295% \arb[voc]{mi'Una} \arb[trans]{mi'Una}, |mi'AtuN| 1295% \arb[voc]{mi'Una} \arb[trans]{mi'Una}, |mi'AtuN|
1296% \arb[voc]{mi'AtuN} \arb[trans]{mi'AtuN}, |mi'aN_A| 1296% \arb[voc]{mi'AtuN} \arb[trans]{mi'AtuN}, |mi'aN_A|
1297% \arb[voc]{mi'aN_A} \arb[trans]{mi'aN_A}. Of course, the 1297% \arb[voc]{mi'aN_A} \arb[trans]{mi'aN_A}. Of course, the
1298% \enquote*{pipe} character may be used to prevent this rule from 1298% \enquote*{pipe} character can be used to prevent this rule from
1299% being applied (see \vref{sec:pipe}): \verb+mi'a|TuN+ 1299% being applied (see \vref{sec:pipe}): \verb+mi'a|TuN+
1300% \arb[voc]{mi'a|TuN} \arb[trans]{mi'a|TuN}. 1300% \arb[voc]{mi'a|TuN} \arb[trans]{mi'a|TuN}.
1301% \end{quote} 1301% \end{quote}
@@ -1787,7 +1787,7 @@ vowels (see §~3).
1787% \end{compactenum} 1787% \end{compactenum}
1788% 1788%
1789% \paragraph{\texttt{fullvoc}} 1789% \paragraph{\texttt{fullvoc}}
1790% In this mode, \enquote{quoting} may be used to take away any short 1790% In this mode, \enquote{quoting} can be used to take away any short
1791% vowel (or \arb[trans]{tanwIn}, as seen above) or any 1791% vowel (or \arb[trans]{tanwIn}, as seen above) or any
1792% \arb[trans]{sukUn}:--- 1792% \arb[trans]{sukUn}:---
1793% \begin{quote}\label{ref:qrannun-full} 1793% \begin{quote}\label{ref:qrannun-full}
@@ -1949,7 +1949,7 @@ word that \cs{arbnull} is applied to.
1949% \label{sec:tatwil} 1949% \label{sec:tatwil}
1950% A double hyphen \meta{-\,-} stretches the ligature in which one 1950% A double hyphen \meta{-\,-} stretches the ligature in which one
1951% letter is bound to another. Although it is always better to rely on 1951% letter is bound to another. Although it is always better to rely on
1952% automatic stretching, this technique may be used to a modest extent, 1952% automatic stretching, this technique can be used to a modest extent,
1953% especially to increase legibility of letters and diacritics which 1953% especially to increase legibility of letters and diacritics which
1954% stand one above the other:-- 1954% stand one above the other:--
1955% \begin{quote} 1955% \begin{quote}
@@ -2263,12 +2263,12 @@ word that \cs{arbnull} is applied to.
2263% \package{footnotehyper} package which \package{arabluatex} will then 2263% \package{footnotehyper} package which \package{arabluatex} will then
2264% use to typeset any kind of footnote that is called from the 2264% use to typeset any kind of footnote that is called from the
2265% arguments of the \cs{bayt} command.\footnote{The \package{footnote} 2265% arguments of the \cs{bayt} command.\footnote{The \package{footnote}
2266% package may also be used for the same effect. However, it must be 2266% package can also be used for the same effect. However, it must be
2267% loaded \emph{after} \package{arabluatex}.} 2267% loaded \emph{after} \package{arabluatex}.}
2268% 2268%
2269% \paragraph{Line numbering} 2269% \paragraph{Line numbering}
2270% Inside the |arabverse| environment, the |linenumbers| environment of 2270% Inside the |arabverse| environment, the |linenumbers| environment of
2271% the \package{lineno} package may be used to have the lines of 2271% the \package{lineno} package can be used to have the lines of
2272% succeeding verses numbered. Please refer to the documentation of 2272% succeeding verses numbered. Please refer to the documentation of
2273% this package for more information or to the example below for a 2273% this package for more information or to the example below for a
2274% basic implementation of this technique. 2274% basic implementation of this technique.
@@ -2411,6 +2411,36 @@ word that \cs{arbnull} is applied to.
2411%</example> 2411%</example>
2412% \fi 2412% \fi
2413% 2413%
2414% \paragraph{Additional Arabic marks}
2415% In addition to common letters, many symbols and ligatures are
2416% encoded in the Arabic Unicode standard, such as honorifics
2417% consisting of complex ligatures, and annotation signs used in the
2418% \arb[trans]{\uc{qur'An}} or in classical poetry.
2419%
2420% \DescribeMacro{\arbmark}
2421% \NEWfeature{v1.11}\cs{arbmark}\marg{shorthand} can be used to insert
2422% such characters either in unicode or in romanized Arabic
2423% environments. It takes as argument a shorthand defined beforehand in
2424% a default list which consists of the following
2425% at the time of writing:\\
2426% \begin{longtable}{llp{.3\linewidth}p{.3\linewidth}}
2427% \captionlistentry{Additional Arabic marks}\\[-1em]
2428% \toprule
2429% Codepoint & Shorthand & Glyph & Transliteration \\ \midrule
2430% \endfirsthead
2431% \toprule
2432% Codepoint & Shorthand & Glyph & Transliteration \\ \midrule
2433% \endhead\label{tab:arabtex-additional-marks}%
2434% |FDFD| & |bismillah| & \arb{\arbmark{bismillah}} &
2435% \arbmark{bismillah} \\
2436% |FDF5| & |salam| & \arb{\arbmark{salam}} & \arbmark{salam} \\
2437% |FDFA| & |slm| & \arb{\arbmark{slm}} & \arbmark{slm} \\
2438% |FDFB| & |jalla| & \arb{\arbmark{jalla}} & \arbmark{jalla} \\
2439% \bottomrule
2440% \caption*{\Cref*{tab:arabtex-additional-marks}: Additional Arabic
2441% marks}
2442% \end{longtable}
2443%
2414% \section{Transliteration} 2444% \section{Transliteration}
2415% \label{sec:transliteration} 2445% \label{sec:transliteration}
2416% It may be more appropriate to speak of \enquote{romanization} than 2446% It may be more appropriate to speak of \enquote{romanization} than
@@ -2475,7 +2505,7 @@ word that \cs{arbnull} is applied to.
2475% the font-selecting commands of the \package{fontspec} or 2505% the font-selecting commands of the \package{fontspec} or
2476% \package{luaotfload} package. Of course, this font must have been 2506% \package{luaotfload} package. Of course, this font must have been
2477% defined properly. To take one example, here is how the \emph{Gentium 2507% defined properly. To take one example, here is how the \emph{Gentium
2478% Plus} font may be used for rendering transliterated text:--- 2508% Plus} font can be used for rendering transliterated text:---
2479% \iffalse 2509% \iffalse
2480%<*example> 2510%<*example>
2481% \fi 2511% \fi
@@ -2618,7 +2648,7 @@ Then as \Hunayn, \Razi.
2618% any point of the document. 2648% any point of the document.
2619% 2649%
2620% \DescribeMacro{\SetArbUp} Finally, \cs{SetArbUp}\marg{formatting 2650% \DescribeMacro{\SetArbUp} Finally, \cs{SetArbUp}\marg{formatting
2621% directives} may be used to customize the way \arb[trans]{'i`rAb} is 2651% directives} can be used to customize the way \arb[trans]{'i`rAb} is
2622% displayed. To take one example, here is how Arabic 2652% displayed. To take one example, here is how Arabic
2623% \arb[trans]{'i`rAb} may be rendered as subscript text:--- 2653% \arb[trans]{'i`rAb} may be rendered as subscript text:---
2624% \iffalse 2654% \iffalse
@@ -3019,7 +3049,7 @@ al-muqAtil-Ina.}, wa-kAnat 'ummI min `u.zamA'-i buyUt-i
3019% left-to-right and right-to-left footnotes respectively in Arabic 3049% left-to-right and right-to-left footnotes respectively in Arabic
3020% environments. Unlike \cs{footnote}\marg{text}, the arguments of both 3050% environments. Unlike \cs{footnote}\marg{text}, the arguments of both
3021% \cs{LRfootnote} and \cs{RLfootnote} are not expected to be Arabic 3051% \cs{LRfootnote} and \cs{RLfootnote} are not expected to be Arabic
3022% text. For example, \cs{LRfootnote} may be used to insert English 3052% text. For example, \cs{LRfootnote} can be used to insert English
3023% footnotes in running Arabic text:--- 3053% footnotes in running Arabic text:---
3024% \iffalse 3054% \iffalse
3025%<*example> 3055%<*example>
@@ -3058,7 +3088,7 @@ part of the predicate\ldots} "ibn-u \uc{`a}mr-iNU}
3058% general principle laid \vpageref{ref:cmd-inside-arabic} applies. 3088% general principle laid \vpageref{ref:cmd-inside-arabic} applies.
3059% 3089%
3060% \DescribeMacro{\setRL} \DescribeMacro{\setLR} \cs{setRL} and 3090% \DescribeMacro{\setRL} \DescribeMacro{\setLR} \cs{setRL} and
3061% \cs{setLR} may be used to change the direction of paragraphs, either 3091% \cs{setLR} can be used to change the direction of paragraphs, either
3062% form left to right or from right to left. As an example, an 3092% form left to right or from right to left. As an example, an
3063% easy way to typeset a right-to-left sectional title follows:--- 3093% easy way to typeset a right-to-left sectional title follows:---
3064% \iffalse 3094% \iffalse
@@ -3093,7 +3123,7 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a...
3093% command |\fvarabic| itself can see it. 3123% command |\fvarabic| itself can see it.
3094% 3124%
3095% \DescribeMacro{\MkArbBreak} The \cs{MkArbBreak}\marg{csv list of 3125% \DescribeMacro{\MkArbBreak} The \cs{MkArbBreak}\marg{csv list of
3096% commands} command may be used in the preamble to give any 3126% commands} command can be used in the preamble to give any
3097% \emph{single-argument} command---either new or already 3127% \emph{single-argument} command---either new or already
3098% existing---the precedence over \package{arabluatex} inside Arabic 3128% existing---the precedence over \package{arabluatex} inside Arabic
3099% environments. It takes as argument a comma-separated list of 3129% environments. It takes as argument a comma-separated list of
@@ -3181,7 +3211,7 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a...
3181% \package{paralist}. 3211% \package{paralist}.
3182% 3212%
3183% To take a first example, should one wish to typeset a list of 3213% To take a first example, should one wish to typeset a list of
3184% manuscripts, the |description| environment may be used like so:--- 3214% manuscripts, the |description| environment can be used like so:---
3185% \iffalse 3215% \iffalse
3186%<*example> 3216%<*example>
3187% \fi 3217% \fi
@@ -3245,7 +3275,7 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a...
3245% \fi% 3275% \fi%
3246% This option will prevent \package{babel-french} from interfering 3276% This option will prevent \package{babel-french} from interfering
3247% with the layout of the document. Then the package \package{paralist} 3277% with the layout of the document. Then the package \package{paralist}
3248% may be used to make the lists \enquote*{compact} as 3278% can be used to make the lists \enquote*{compact} as
3249% \package{babel-french} do. 3279% \package{babel-french} do.
3250% 3280%
3251% \subsection{\package{csquotes}} 3281% \subsection{\package{csquotes}}
@@ -3517,7 +3547,7 @@ wa-ya.sIru ta.hta 'l-jild-i
3517% \begin{macro}{\MkArbBreak} 3547% \begin{macro}{\MkArbBreak}
3518% \changes{v1.9}{2017/07/05}{New \cs{MkArbBreak} command for inserting 3548% \changes{v1.9}{2017/07/05}{New \cs{MkArbBreak} command for inserting
3519% user-defined macros in Arabic environments} 3549% user-defined macros in Arabic environments}
3520% The \cs{MkArbBreak}\marg{csv list of commands} command may be used 3550% The \cs{MkArbBreak}\marg{csv list of commands} command can be used
3521% to give any command---either new or already existing---the 3551% to give any command---either new or already existing---the
3522% precedence over \package{arabluatex} inside Arabic environments. It 3552% precedence over \package{arabluatex} inside Arabic environments. It
3523% is actually coded in Lua. 3553% is actually coded in Lua.
@@ -3546,7 +3576,7 @@ wa-ya.sIru ta.hta 'l-jild-i
3546% \end{macro} 3576% \end{macro}
3547% \end{macro} 3577% \end{macro}
3548% \begin{macro}{\SetInputScheme} 3578% \begin{macro}{\SetInputScheme}
3549% \changes{v1.4}{2016/07/05}{\cs{SetInputScheme} may be used to 3579% \changes{v1.4}{2016/07/05}{\cs{SetInputScheme} can be used to
3550% process other input schemes such as \enquote*{Buckwalter}} 3580% process other input schemes such as \enquote*{Buckwalter}}
3551% \package{arabluatex} is designed for processing Arab\TeX\ input 3581% \package{arabluatex} is designed for processing Arab\TeX\ input
3552% notation. \cs{SetInputScheme} may be used in the preamble or at 3582% notation. \cs{SetInputScheme} may be used in the preamble or at
@@ -3616,7 +3646,7 @@ wa-ya.sIru ta.hta 'l-jild-i
3616% \end{macrocode} 3646% \end{macrocode}
3617% \end{macro} 3647% \end{macro}
3618% \begin{macro}{\SetTranslitConvention} 3648% \begin{macro}{\SetTranslitConvention}
3619% \cs{SetTranslitConvention}\marg{convention} may be used to change 3649% \cs{SetTranslitConvention}\marg{convention} can be used to change
3620% the transliteration convention, which is |dmg| by default: 3650% the transliteration convention, which is |dmg| by default:
3621% \begin{macrocode} 3651% \begin{macrocode}
3622\def\al@trans@convention{dmg} 3652\def\al@trans@convention{dmg}
@@ -3635,7 +3665,7 @@ wa-ya.sIru ta.hta 'l-jild-i
3635% either in the preamble or at any point of the document in case one 3665% either in the preamble or at any point of the document in case one
3636% wishes to have the \arb[trans]{tanwIn} on the line. The default 3666% wishes to have the \arb[trans]{tanwIn} on the line. The default
3637% rule can be set back with \cs{ArbUpDflt} at any point of the 3667% rule can be set back with \cs{ArbUpDflt} at any point of the
3638% document. Finally \cs{SetArbUp} may be used to customize the way 3668% document. Finally \cs{SetArbUp} can be used to customize the way
3639% \arb[trans]{tanwIn} is displayed: this command takes the 3669% \arb[trans]{tanwIn} is displayed: this command takes the
3640% formatting directives as argument, like so: 3670% formatting directives as argument, like so:
3641% \cs{SetArbUp}\marg{code}. 3671% \cs{SetArbUp}\marg{code}.
@@ -3659,7 +3689,7 @@ wa-ya.sIru ta.hta 'l-jild-i
3659 {\luadirect{tex.sprint(uc(\luastringN{#1}))}} 3689 {\luadirect{tex.sprint(uc(\luastringN{#1}))}}
3660% \end{macrocode} 3690% \end{macrocode}
3661% \end{macro} 3691% \end{macro}
3662% \begin{macro}{\Uc} \cs{uc} may be used safely in all of the modes 3692% \begin{macro}{\Uc} \cs{uc} can be used safely in all of the modes
3663% that are provided by \package{arabluatex} as any of the |voc|, 3693% that are provided by \package{arabluatex} as any of the |voc|,
3664% |fullvoc| and |novoc| modes discard it on top of any other 3694% |fullvoc| and |novoc| modes discard it on top of any other
3665% functions to be run. \cs{Uc} does the same as \cs{uc} except 3695% functions to be run. \cs{Uc} does the same as \cs{uc} except
@@ -3744,9 +3774,9 @@ wa-ya.sIru ta.hta 'l-jild-i
3744% \end{macrocode} 3774% \end{macrocode}
3745% \end{macro} 3775% \end{macro}
3746% \begin{macro}{\arbmark} 3776% \begin{macro}{\arbmark}
3747% \changes{v1.10.4}{2018/03/29}{New command for inserting additional 3777% \changes{v1.11}{2018/03/29}{New command for inserting additional
3748% marks in Arabic environments} \cs{arbmark} takes one argument from a 3778% marks in Arabic environments} \cs{arbmark} takes one argument from a
3749% list of defined elements. 3779% list of defined elements. This command is coded in Lua.
3750% \begin{macrocode} 3780% \begin{macrocode}
3751\NewDocumentCommand{\arbmark}{m}{% 3781\NewDocumentCommand{\arbmark}{m}{%
3752 \bgroup% 3782 \bgroup%
@@ -3756,6 +3786,12 @@ wa-ya.sIru ta.hta 'l-jild-i
3756% \end{macrocode} 3786% \end{macrocode}
3757% \end{macro} 3787% \end{macro}
3758% \begin{macro}{\newarbmark} 3788% \begin{macro}{\newarbmark}
3789% \changes{v1.11}{2018/03/29}{Allows defining additional sets of Arabic
3790% marks} \cs{newarbmark} lets the user define additional Arabic
3791% marks. As \cs{arbmark}, this command is coded in Lua. It takes
3792% three arguments: the abbreviated form to be used as argument of
3793% \cs{arbmark}, the rendition in Arabic script and the rendition in
3794% romanized Arabic.
3759% \begin{macrocode} 3795% \begin{macrocode}
3760\NewDocumentCommand{\newarbmark}{m m m}{% 3796\NewDocumentCommand{\newarbmark}{m m m}{%
3761 \luadirect{newarbmark(\luastringN{#1}, \luastringN{#2}, \luastringN{#3})}} 3797 \luadirect{newarbmark(\luastringN{#1}, \luastringN{#2}, \luastringN{#3})}}
@@ -3839,7 +3875,7 @@ wa-ya.sIru ta.hta 'l-jild-i
3839% changing the default delimiter between hemistichs} A hemistich 3875% changing the default delimiter between hemistichs} A hemistich
3840% delimiter also may be defined. By default, it is set to the 3876% delimiter also may be defined. By default, it is set to the
3841% \enquote*{star} character: |*|. The 3877% \enquote*{star} character: |*|. The
3842% \cs{SetHemistichDelim}\marg{delimiter} command may be used at any 3878% \cs{SetHemistichDelim}\marg{delimiter} command can be used at any
3843% point of the document to change this default setting. 3879% point of the document to change this default setting.
3844% \end{macro} 3880% \end{macro}
3845% \begin{macrocode} 3881% \begin{macrocode}