aboutsummaryrefslogtreecommitdiff
path: root/arabluatex.dtx
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2016-03-24 15:26:51 +0100
committerRobert Alessi <alessi@robertalessi.net>2016-03-24 15:26:51 +0100
commit605e4673b5b10138450b89bf2a9fc4d490657099 (patch)
tree449955d75ef7fddb196dbd34f4eea505ae018d96 /arabluatex.dtx
parent8c37ec58aa19fd927323a5914be7e9e88ed907c6 (diff)
downloadarabluatex-605e4673b5b10138450b89bf2a9fc4d490657099.tar.gz
bugfix: wrong redefinition of \thefootnote; still documenting
Diffstat (limited to 'arabluatex.dtx')
-rw-r--r--arabluatex.dtx81
1 files changed, 47 insertions, 34 deletions
diff --git a/arabluatex.dtx b/arabluatex.dtx
index 1a5ac78..0541b69 100644
--- a/arabluatex.dtx
+++ b/arabluatex.dtx
@@ -41,12 +41,13 @@
41\setsansfont{Libertinus Sans} 41\setsansfont{Libertinus Sans}
42\setmonofont[Scale=.9]{Libertinus Mono} 42\setmonofont[Scale=.9]{Libertinus Mono}
43\usepackage{arabluatex}[2016/01/26] 43\usepackage{arabluatex}[2016/01/26]
44\usepackage{varioref}
44\usepackage{hypdoc} 45\usepackage{hypdoc}
45\hypersetup{colorlinks, allcolors=blue} 46\hypersetup{colorlinks, allcolors=blue}
46\usepackage{multicol} 47\usepackage{multicol}
47\usepackage{paralist} 48\usepackage{paralist}
48\setdefaultitem{\textendash}{\textendash}{\textendash}{\textendash} 49\setdefaultitem{\textendash}{\textendash}{\textendash}{\textendash}
49\usepackage{varioref} 50\usepackage{cleveref}
50\usepackage{quoting} 51\usepackage{quoting}
51\quotingsetup{noorphans, rightmargin=0pt} 52\quotingsetup{noorphans, rightmargin=0pt}
52\renewcommand*{\quotingfont}{\footnotesize} 53\renewcommand*{\quotingfont}{\footnotesize}
@@ -184,31 +185,32 @@
184% say so---it will eventually provide all of its valuable qualities to 185% say so---it will eventually provide all of its valuable qualities to
185% the \LuaLaTeX\ users. 186% the \LuaLaTeX\ users.
186% 187%
187% \package{arabtex} dates back to 1992. As far as I know, it was then the 188% \package{arabtex} dates back to 1992. As far as I know, it was then
188% first and only way to typeset Arabic texts with \TeX\ and \LaTeX. To 189% the first and only way to typeset Arabic texts with \TeX\ and
189% achieve this, \package{arabtex} provided---and still does---an Arabic 190% \LaTeX. To achieve this, \package{arabtex} provided---and still
190% font in \emph{Nasḫī} style and a macro package that defined its own 191% does---an Arabic font in \emph{Nasḫī} style and a macro package that
191% input notation which was, as the author stated, \enquote{both 192% defined its own input notation which was, as the author stated,
192% machine, and human, readable, and suited for electronic transmission 193% \enquote{both machine, and human, readable, and suited for
193% and e-mail communication}.\footnote{\textcite[2]{pkg:arabtex}.} Even 194% electronic transmission and e-mail
194% if the same can be said about Unicode, Arab\TeX\ \textsc{ASCII} 195% communication}.\footnote{\textcite[2]{pkg:arabtex}.} Even if the
195% input notation still surpasses Unicode input, in my opinion, when it 196% same can be said about Unicode, Arab\TeX\ \textsc{ASCII} input
196% comes to typesetting complex documents, such as scientific documents 197% notation still surpasses Unicode input, in my opinion, when it comes
197% or critical editions where footnotes and other kind of annotations 198% to typesetting complex documents, such as scientific documents or
198% can be particulary abundant. It must also be said that most text 199% critical editions where footnotes and other kind of annotations can
199% editors have trouble in displaying Arabic script connected with 200% be particulary abundant. It must also be said that most text editors
200% preceding or following \LaTeX\ commands: it often happens that 201% have trouble in displaying Arabic script connected with preceding or
201% commands seem misplaced, not to mention punctuation marks, or 202% following \LaTeX\ commands: it often happens that commands seem
202% opening or closing braces, brackets or parentheses that are 203% misplaced, not to mention punctuation marks, or opening or closing
203% unexpectedly displayed in the wrong direction. Of course, some text 204% braces, brackets or parentheses that are unexpectedly displayed in
204% editors provide ways to get around such difficulties by inserting 205% the wrong direction. Of course, some text editors provide ways to
205% invisible Unicode characters, such as LEFT-TO-RIGHT or RIGHT-TO-LEFT 206% get around such difficulties by inserting invisible Unicode
206% MARKS (\texttt{U+200E}, \texttt{U+200F}), RTL/LTR \enquote{embed} 207% characters, such as LEFT-TO-RIGHT or RIGHT-TO-LEFT MARKS
208% (\texttt{U+200E}, \texttt{U+200F}), RTL/LTR \enquote{embed}
207% characters (\texttt{U+202B}, \texttt{U+202A}) and RLO/LRO 209% characters (\texttt{U+202B}, \texttt{U+202A}) and RLO/LRO
208% \enquote{bidi-override} characters (\texttt{U+202E}, 210% \enquote{bidi-override} characters (\texttt{U+202E},
209% \texttt{U+202D}).\footnote{Gáspár Sinai's Yudit probably has the 211% \texttt{U+202D}).\footnote{Gáspár Sinai's Yudit probably has the
210% best Unicode support. See \url{http://www.yudit.org}.} Nonetheless, it 212% best Unicode support. See \url{http://www.yudit.org}.} Nonetheless,
211% remains that inserting all the time these invisible characters in 213% it remains that inserting all the time these invisible characters in
212% complex documents rapidly becomes confusing and cumbersome. 214% complex documents rapidly becomes confusing and cumbersome.
213% 215%
214% The great advantage of Arab\TeX\ notation is that it is immune from 216% The great advantage of Arab\TeX\ notation is that it is immune from
@@ -413,7 +415,7 @@ consonants, though three of them are also used as vowels
413% 415%
414%\section{Standard Arab\TeX\ input} 416%\section{Standard Arab\TeX\ input}
415%\subsection{Consonants} 417%\subsection{Consonants}
416% Table\vref{tab:arabtex-consonants} gives the Arab\TeX\ equivalents for 418% \Cref{tab:arabtex-consonants} gives the Arab\TeX\ equivalents for
417% all of the Arabic consonants. 419% all of the Arabic consonants.
418% \newcommand{\dmg}[1]{% 420% \newcommand{\dmg}[1]{%
419% \SetTranslitConvention{dmg}% 421% \SetTranslitConvention{dmg}%
@@ -464,7 +466,7 @@ consonants, though three of them are also used as vowels
464% 466%
465% \subsection{Vowels} 467% \subsection{Vowels}
466% \subsubsection{Long vowels} 468% \subsubsection{Long vowels}
467% Table\vref{tab:arabtex-long-vowels} gives the Arab\TeX\ equivalents for 469% \Cref{tab:arabtex-long-vowels} gives the Arab\TeX\ equivalents for
468% the Arabic long vowels. 470% the Arabic long vowels.
469% \begin{longtable}{llll} 471% \begin{longtable}{llll}
470% \toprule 472% \toprule
@@ -507,7 +509,7 @@ consonants, though three of them are also used as vowels
507% \end{quoting} 509% \end{quoting}
508% 510%
509% \subsubsection{Short vowels} 511% \subsubsection{Short vowels}
510% Table\vref{tab:arabtex-short-vowels} gives the Arab\TeX\ equivalents for 512% \Cref{tab:arabtex-short-vowels} gives the Arab\TeX\ equivalents for
511% the Arabic short vowels. 513% the Arabic short vowels.
512% \begin{longtable}{llll} 514% \begin{longtable}{llll}
513% \toprule 515% \toprule
@@ -804,7 +806,6 @@ consonants, though three of them are also used as vowels
804% \end{quote} 806% \end{quote}
805% 807%
806% \subparagraph{The euphonic \arb[trans]{ta^sdId}} 808% \subparagraph{The euphonic \arb[trans]{ta^sdId}}
807% \label{euphonic-tashdid}
808% always follows a vowelless consonant which is passed over in 809% always follows a vowelless consonant which is passed over in
809% pronunciation and assimilated to a following consonant. It may be 810% pronunciation and assimilated to a following consonant. It may be
810% found \parencite[i. 15 B--16 C]{Wright}:--- 811% found \parencite[i. 15 B--16 C]{Wright}:---
@@ -817,7 +818,7 @@ consonants, though three of them are also used as vowels
817% \iffalse 818% \iffalse
818%<*example> 819%<*example>
819% \fi 820% \fi
820\begin{arabluacode}[text only] 821\begin{arabluacode}[text only]\label{euphonic-tashdid}
821 Unlike \package{arabtex} and \package{arabxetex}, 822 Unlike \package{arabtex} and \package{arabxetex},
822 \package{arabluatex} \emph{never requires the solar letter to be 823 \package{arabluatex} \emph{never requires the solar letter to be
823 written twice}, as it automatically generates the euphonic 824 written twice}, as it automatically generates the euphonic
@@ -868,7 +869,7 @@ consonants, though three of them are also used as vowels
868% |al-.hamdu| |li-l-l_ahi| \arb[fullvoc]{al-.hamdu li-l-l_ahi} 869% |al-.hamdu| |li-l-l_ahi| \arb[fullvoc]{al-.hamdu li-l-l_ahi}
869% \arb[trans]{al-.hamdu li-l-l_ahi}. 870% \arb[trans]{al-.hamdu li-l-l_ahi}.
870% \end{quote} 871% \end{quote}
871% As said above in section\vref{fullvoc-mode}, |fullvoc| is the mode 872% As said above on \cpageref{fullvoc-mode}, |fullvoc| is the mode
872% in which \package{arabluatex} expresses the \arb[trans]{sukUn} and 873% in which \package{arabluatex} expresses the \arb[trans]{sukUn} and
873% the \arb[trans]{wa.slaT}. \package{arabluatex} will take care of 874% the \arb[trans]{wa.slaT}. \package{arabluatex} will take care of
874% doing this automatically provided that the vowel which is to be 875% doing this automatically provided that the vowel which is to be
@@ -1011,12 +1012,21 @@ consonants, though three of them are also used as vowels
1011% col. 1]{Lane}. Finally, the first \arb[novoc]{l} is made quiescent 1012% col. 1]{Lane}. Finally, the first \arb[novoc]{l} is made quiescent
1012% and incorporated into the other, hence the \arb[trans]{ta^sdId} 1013% and incorporated into the other, hence the \arb[trans]{ta^sdId}
1013% above it. As \package{arabluatex} never requires a solar letter to 1014% above it. As \package{arabluatex} never requires a solar letter to
1014% be written twice (see above, section\vref{euphonic-tashdid}), the 1015% be written twice (see above, \vpageref{euphonic-tashdid}), the
1015% name of God is therefore encoded |al-l_ahu| or |'l-l_ahu|:--- 1016% name of God is therefore encoded |al-l_ahu| or |'l-l_ahu|:---
1016% \begin{quote} 1017% \begin{quote}
1017% |al-l_ahu| \arb[fullvoc]{al-l_ahu} \arb[trans]{al-l_ahu}, 1018% |al-l_ahu| \arb[fullvoc]{al-l_ahu} \arb[trans]{al-l_ahu},
1018% \verb+yA|+ |al-l_ahu| \arb[fullvoc]{yA| al-l_ahu} \arb[trans]{yA| 1019% \verb+yA|+\footnote{\label{fn:pipe-allah-01}Note the
1019% al-l_ahu}, \verb+'a-fa|-al-l_ahi+ |la-ta.g`alanna| 1020% \enquote{pipe} character \enquote*{\textbar} here after |yA| and
1021% below after |fa| before footnote mark \ref{fn:pipe-allah-02}: it
1022% is needed by the |dmg| transliteration mode as in this mode any
1023% vowel at the commencement of a word preceded by a word that ends
1024% with a vowel, either short or long, is absorbed by this vowel
1025% viz. \arb[trans]{`al_A 'l-.tarIqi}. See ** on the \enquote{pipe}
1026% and ** on |dmg| mode.} |al-l_ahu| \arb[fullvoc]{yA| al-l_ahu}
1027% \arb[trans]{yA| al-l_ahu},
1028% \verb+'a-fa|+\footnote{\label{fn:pipe-allah-02}See
1029% \cref{fn:pipe-allah-01}.}|-al-l_ahi| |la-ta.g`alanna|
1020% \arb[fullvoc]{'a-fa|-al-l_ahi la-ta.g`alanna} 1030% \arb[fullvoc]{'a-fa|-al-l_ahi la-ta.g`alanna}
1021% \arb[trans]{'a-fa|-al-l_ahi la-ta.g`alanna}, |bi-'l-l_ahi| 1031% \arb[trans]{'a-fa|-al-l_ahi la-ta.g`alanna}, |bi-'l-l_ahi|
1022% \arb[fullvoc]{bi-'l-l_ahi} \arb[trans]{bi-'l-l_ahi}, |wa-'l-l_ahi| 1032% \arb[fullvoc]{bi-'l-l_ahi} \arb[trans]{bi-'l-l_ahi}, |wa-'l-l_ahi|
@@ -1157,10 +1167,13 @@ consonants, though three of them are also used as vowels
1157% \end{environment} 1167% \end{environment}
1158% \begin{macrocode} 1168% \begin{macrocode}
1159\DeclareDocumentCommand{\Marginpar}{m}{\marginpar{\textdir TLT #1}} 1169\DeclareDocumentCommand{\Marginpar}{m}{\marginpar{\textdir TLT #1}}
1160\RenewDocumentCommand{\thefootnote}{}{\bgroup\textdir
1161 TLT\arabic{footnote}\egroup}
1162\DeclareDocumentCommand{\LRfootnote}{m}{\bgroup\pardir 1170\DeclareDocumentCommand{\LRfootnote}{m}{\bgroup\pardir
1163 TLT\LR{\footnote{#1}}\egroup} 1171 TLT\LR{\footnote{#1}}\egroup}
1172\NewDocumentCommand{\FixArbFtnmk}{}{%
1173 \@ifpackageloaded{scrextend}%
1174 {\AtBeginDocument{\deffootnote{2em}{1.6em}{\LR{\thefootnotemark}.\enskip}}}%
1175 {\RequirePackage{scrextend}
1176 \AtBeginDocument{\deffootnote{2em}{1.6em}{\LR{\thefootnotemark}.\enskip}}}}
1164\endinput 1177\endinput
1165% \end{macrocode} 1178% \end{macrocode}
1166% 1179%