aboutsummaryrefslogtreecommitdiff
path: root/arabluatex.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'arabluatex.dtx')
-rw-r--r--arabluatex.dtx151
1 files changed, 149 insertions, 2 deletions
diff --git a/arabluatex.dtx b/arabluatex.dtx
index 736c44d..7f5246c 100644
--- a/arabluatex.dtx
+++ b/arabluatex.dtx
@@ -1932,6 +1932,153 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu
1932% \end{arab} 1932% \end{arab}
1933% \SetTranslitConvention{dmg} 1933% \SetTranslitConvention{dmg}
1934% 1934%
1935% \section{Buckwalter input scheme}
1936% \label{sec:buckwalter-scheme}
1937% \NEWfeature{v1.4} Even though \package{arabluatex} is primarily
1938% designed to process the Arab\TeX\ notation, it can also process the
1939% Buckwalter input scheme to a large extent.\footnote{See
1940% \url{http://www.qamus.org/transliteration.htm}} The Buckwalter
1941% scheme is actually processed in two steps, as it is first converted
1942% into Arab\TeX. Then, once this is accomplished, the Arab\TeX\ scheme
1943% is processed through the above described functions. In this way, the
1944% Buckwalter input scheme can make the most of the
1945% \package{arabluatex} special features that are presented in
1946% \vref{sec:options}.
1947%
1948% \DescribeMacro{\SetInputScheme} The input scheme, which is set to
1949% |arabtex| by default, may be changed at any point of the document by
1950% the command \cs{SetInputScheme}\marg{scheme}, where \meta{scheme}
1951% may be either |arabtex| or |buckwalter|. This command is also
1952% accepted in the preamble should one wish to set the input scheme
1953% globally, like so:---
1954% \iffalse
1955%<*example>
1956% \fi
1957\begin{arabluaverbatim}
1958\usepackage{arabluatex}
1959\SetInputScheme{buckwalter}
1960\end{arabluaverbatim}
1961% \iffalse
1962%</example>
1963% \fi
1964%
1965% \paragraph{Limitations}
1966% To date, the following two limitations apply:
1967% \begin{compactenum}[(a)]
1968% \item The braces |{| and |}|, which are used in Buckwalter scheme to
1969% encode \arb[novoc]{"a} and \arb[novoc]{y"'}, must be replaced with
1970% square brackets viz. |[| and |]| respectively.
1971% \item The underscore character |_|, which is used in Buckwalter
1972% scheme to encode the Arabic \arb[trans]{ta.twIl} must be replaced
1973% with a double hyphen |--| (see above \vref{sec:tatwil}).
1974% \end{compactenum}
1975%
1976% \Cref{tab:buckwalter-scheme} gives the Buckwalter equivalents that
1977% are currently used by \package{arabluatex}. The additional
1978% characters that are defined in \vref{tab:additional-arabic-codings}
1979% are also available.
1980% \begin{longtable}{llll}
1981% \captionlistentry{Buckwalter scheme}\\[-1em]
1982% \toprule
1983% Letter & \multicolumn{2}{l}{Transliteration\footnotemark}
1984% & Buckwalter notation \\
1985% & \texttt{dmg} & \texttt{loc} & \\ \midrule
1986% \endfirsthead
1987% \toprule
1988% Letter & \multicolumn{2}{l}{Transliteration}
1989% & Buckwalter notation \\
1990% & \texttt{dmg} & \texttt{loc} & \\ \midrule
1991% \endhead \footnotetext{See \vref{sec:transliteration}.}
1992% \label{tab:buckwalter-scheme}
1993% \arb[novoc]{a} & \dmg{a} & \loc{a} & \verb|A| \\
1994% \arb[novoc]{b} & \dmg{b} & \loc{b} & |b| \\
1995% \arb[novoc]{t} & \dmg{t} & \loc{t} & |t| \\
1996% \arb[novoc]{_t} & \dmg{_t} & \loc{_t} & |v|\\
1997% \arb[novoc]{j} & \dmg{j} & \loc{j} & |j| \\
1998% \arb[novoc]{.h} & \dmg{.h} & \loc{.h} & |H| \\
1999% \arb[novoc]{x} & \dmg{x} & \loc{x} & |x|\\
2000% \arb[novoc]{d} & \dmg{d} & \loc{d} & |d| \\
2001% \arb[novoc]{_d} & \dmg{_d} & \loc{_d} & |*| \\
2002% \arb[novoc]{r} & \dmg{r} & \loc{r} & |r| \\
2003% \arb[novoc]{z} & \dmg{z} & \loc{z} & |z| \\
2004% \arb[novoc]{s} & \dmg{s} & \loc{s} & |s| \\
2005% \arb[novoc]{^s} & \dmg{^s} & \loc{^s} & |$| \\
2006% \arb[novoc]{.s} & \dmg{.s} & \loc{.s} & |S| \\
2007% \arb[novoc]{.d} & \dmg{.d} & \loc{.d} & |D| \\
2008% \arb[novoc]{.t} & \dmg{.t} & \loc{.t} & |T| \\
2009% \arb[novoc]{.z} & \dmg{.z} & \loc{.z} & |Z| \\
2010% \arb[novoc]{`} & \dmg{`} & \loc{`} & |E| \\
2011% \arb[novoc]{.g} & \dmg{.g} & \loc{.g} & |g| \\
2012% \arb[novoc]{f} & \dmg{f} & \loc{f} & |f| \\
2013% \arb[novoc]{q} & \dmg{q} & \loc{q} & |q| \\
2014% \arb[novoc]{k} & \dmg{k} & \loc{k} & |k| \\
2015% \arb[novoc]{l} & \dmg{l} & \loc{l} & |l| \\
2016% \arb[novoc]{m} & \dmg{m} & \loc{m} & |m| \\
2017% \arb[novoc]{n} & \dmg{n} & \loc{n} & |n| \\
2018% \arb[novoc]{h} & \dmg{h} & \loc{h} & |h| \\
2019% \arb[novoc]{w} & \dmg{w} & \loc{w} & |w| \\
2020% \arb[novoc]{y} & \dmg{y} & \loc{y} & |y| \\
2021% \arb[novoc]{T} & \dmg{aT} & \loc{aT} & |p| \\
2022% \midrule
2023% \arb[novoc]{|"'} & \dmg{|"'} & \loc{|"'} & \verb|'| \\
2024% \arb[novoc]{A"'} & \dmg{A"'} & \loc{A"'} & \verb+|+ \\
2025% \arb[novoc]{a"'} & \dmg{a"'} & \loc{a"'} & \verb|>| \\
2026% \arb[novoc]{w"'} & \dmg{w"'} & \loc{w"'} & \verb|&| \\
2027% \arb[novoc]{i"'} & \dmg{i"'} & \loc{i"'} & \verb|<| \\
2028% \arb[novoc]{y"'} & \dmg{y"'} & \loc{y"'} & \verb|]| \\
2029% \midrule
2030% \arb[novoc]{BB} & --- & --- & \verb|~| \\
2031% \arb[novoc]{"a} & ' & ' & |[| \\
2032% \midrule
2033% \arb[voc]{Ba} & \dmg{Ba} & \loc{Ba} & \verb|a| \\
2034% \arb[voc]{Bu} & \dmg{Bu} & \loc{Bu} & \verb|u| \\
2035% \arb[voc]{Bi} & \dmg{Bi} & \loc{Bi} & \verb|i| \\
2036% \arb[voc]{BaN} & \dmg{BaN} & \loc{BaN} & \verb|F| \\
2037% \arb[voc]{BuN} & \dmg{BuN} & \loc{BuN} & \verb|N| \\
2038% \arb[voc]{BiN} & \dmg{BiN} & \loc{BiN} & \verb|K| \\
2039% \arb[voc]{B"} & --- & --- & \verb|o| \\
2040% \midrule
2041% \arb[novoc]{B_a} & \dmg{B_a} & \loc{B_a} & |`| \\
2042% \midrule
2043% \arb[novoc]{--} & --- & --- & |--| (\arb[trans]{ta.twIl})\\
2044% \bottomrule
2045% \caption*{\Cref*{tab:buckwalter-scheme}: Buckwalter scheme}
2046% \end{longtable}
2047%
2048% \paragraph{Transliteration}
2049% The Buckwalter notation can also be transliterated into any accepted
2050% romanization standard of Arabic. See above
2051% \vref{sec:transliteration} for more information. However, it should
2052% be pointed out again that only accurate coding produces accurate
2053% transliteration. It is therefore at the very least highly advisable
2054% to use the hyphen for tying the definite article and the inseparable
2055% particles (viz. prepositions, adverbs and conjunctions) to words,
2056% like so:--- \SetInputScheme{buckwalter}
2057% \begin{quote}
2058% |Al-EaAlamu| \arb{Al-EaAlam-u} \arb[trans]{Al-EaAlam-u},
2059% |Al-$~amsu| \arb{Al-$~ams-u} \arb[trans]{Al-$~ams-u},
2060% |bi-SinaAEapi| |Al-T~ib~i|, \arb{bi-SinaAEap-i Al-T~ib~-i}
2061% \arb[trans]{bi-SinaAEap-i Al-T~ib~-i}.
2062%
2063% |wa-Al-l~`hi| \arb{wa-Al-l~`h-i} \arb[trans]{wa-Al-l~`h-i},
2064% |Al-Hamdu| |li-l~`hi| \arb{Al-Hamd-u li-l~`h-i}
2065% \arb[trans]{Al-Hamd-u li-l~`h-i}.
2066% \end{quote}
2067% \SetInputScheme{arabtex}
2068%
2069% Similary, it is not advisable to use \verb+|+ and |[| to encode the
2070% \arb[trans]{'alif-u 'l-mamdUdaT-i} and the \arb[trans]{'alif-u
2071% 'l-wa.sl-i} for such signs can be generated by \package{arabluatex}.
2072% Besides, as they do not \emph{per se} convey any morphological
2073% information on what they are derived from, they cannot be
2074% transliterated accurately. To take one example, %
2075% \SetInputScheme{buckwalter}%
2076% |<ilY Al-[ntiqaADi| gives \arb{>ilY Al-[ntiqaADi} as expected, but
2077% only |<ilY Al-intiqADi| can be transliterated as \arb[trans]{<ilY
2078% Al-intiqaADi} with the correct vowel \meta{i} in place of the %
2079% \SetInputScheme{arabtex}%
2080% \arb[trans]{'alif-u 'l-wa.sl-i}.
2081%
1935% \section{\LaTeX\ Commands in Arabic environments} 2082% \section{\LaTeX\ Commands in Arabic environments}
1936% \label{sec:commands-in-arb} 2083% \label{sec:commands-in-arb}
1937% \paragraph{General principle} \label{ref:cmd-inside-arabic}\LaTeX\ 2084% \paragraph{General principle} \label{ref:cmd-inside-arabic}\LaTeX\
@@ -1942,7 +2089,7 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu
1942% as their arguments:--- 2089% as their arguments:---
1943% \begin{quote} 2090% \begin{quote}
1944% |\abjad{45}| |kitAbu-hu| |\emph{fI| |'l-\cap{`AdAt-i}}| 2091% |\abjad{45}| |kitAbu-hu| |\emph{fI| |'l-\cap{`AdAt-i}}|
1945% \arb[voc]{\abjad{45} kitAbu-hu \emph{fI l-\cap{`AdAt-i}}} 2092% \arb[voc]{\abjad{45} kitAbu-hu \emph{fI 'l-\cap{`AdAt-i}}}
1946% \arb[trans]{\abjad{45} kitAbu-hu \emph{fI 2093% \arb[trans]{\abjad{45} kitAbu-hu \emph{fI
1947% 'l-\cap{`AdAt-i}}}.\footnote{This is odd in Arabic script, but 2094% 'l-\cap{`AdAt-i}}}.\footnote{This is odd in Arabic script, but
1948% using such features as \cs{emph} or \cs{textbf} is a matter of 2095% using such features as \cs{emph} or \cs{textbf} is a matter of
@@ -2263,7 +2410,7 @@ wa-ya.sIru ta.hta 'l-jild-i
2263 {\NewDocumentCommand{\aemph}{m}{$\overline{\text{#1}}$}}} 2410 {\NewDocumentCommand{\aemph}{m}{$\overline{\text{#1}}$}}}
2264% \end{macrocode} 2411% \end{macrocode}
2265% \begin{macro}{\SetInputScheme} 2412% \begin{macro}{\SetInputScheme}
2266% \changes{v1.4}{2016/06/30}{\cs{SetInputScheme} may be used to 2413% \changes{v1.4}{2016/07/04}{\cs{SetInputScheme} may be used to
2267% process other input schemes such as \enquote*{Buckwalter}} 2414% process other input schemes such as \enquote*{Buckwalter}}
2268% \package{arabluatex} is designed for processing Arab\TeX\ input 2415% \package{arabluatex} is designed for processing Arab\TeX\ input
2269% notation. \cs{SetInputScheme} may be used in the preamble or at 2416% notation. \cs{SetInputScheme} may be used in the preamble or at