From 605e4673b5b10138450b89bf2a9fc4d490657099 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Thu, 24 Mar 2016 15:26:51 +0100 Subject: bugfix: wrong redefinition of \thefootnote; still documenting --- arabluatex.dtx | 81 ++++++++++++++++++++++++++++++++++------------------------ 1 file 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 @@ \setsansfont{Libertinus Sans} \setmonofont[Scale=.9]{Libertinus Mono} \usepackage{arabluatex}[2016/01/26] +\usepackage{varioref} \usepackage{hypdoc} \hypersetup{colorlinks, allcolors=blue} \usepackage{multicol} \usepackage{paralist} \setdefaultitem{\textendash}{\textendash}{\textendash}{\textendash} -\usepackage{varioref} +\usepackage{cleveref} \usepackage{quoting} \quotingsetup{noorphans, rightmargin=0pt} \renewcommand*{\quotingfont}{\footnotesize} @@ -184,31 +185,32 @@ % say so---it will eventually provide all of its valuable qualities to % the \LuaLaTeX\ users. % -% \package{arabtex} dates back to 1992. As far as I know, it was then the -% first and only way to typeset Arabic texts with \TeX\ and \LaTeX. To -% achieve this, \package{arabtex} provided---and still does---an Arabic -% font in \emph{Nasḫī} style and a macro package that defined its own -% input notation which was, as the author stated, \enquote{both -% machine, and human, readable, and suited for electronic transmission -% and e-mail communication}.\footnote{\textcite[2]{pkg:arabtex}.} Even -% if the same can be said about Unicode, Arab\TeX\ \textsc{ASCII} -% input notation still surpasses Unicode input, in my opinion, when it -% comes to typesetting complex documents, such as scientific documents -% or critical editions where footnotes and other kind of annotations -% can be particulary abundant. It must also be said that most text -% editors have trouble in displaying Arabic script connected with -% preceding or following \LaTeX\ commands: it often happens that -% commands seem misplaced, not to mention punctuation marks, or -% opening or closing braces, brackets or parentheses that are -% unexpectedly displayed in the wrong direction. Of course, some text -% editors provide ways to get around such difficulties by inserting -% invisible Unicode characters, such as LEFT-TO-RIGHT or RIGHT-TO-LEFT -% MARKS (\texttt{U+200E}, \texttt{U+200F}), RTL/LTR \enquote{embed} +% \package{arabtex} dates back to 1992. As far as I know, it was then +% the first and only way to typeset Arabic texts with \TeX\ and +% \LaTeX. To achieve this, \package{arabtex} provided---and still +% does---an Arabic font in \emph{Nasḫī} style and a macro package that +% defined its own input notation which was, as the author stated, +% \enquote{both machine, and human, readable, and suited for +% electronic transmission and e-mail +% communication}.\footnote{\textcite[2]{pkg:arabtex}.} Even if the +% same can be said about Unicode, Arab\TeX\ \textsc{ASCII} input +% notation still surpasses Unicode input, in my opinion, when it comes +% to typesetting complex documents, such as scientific documents or +% critical editions where footnotes and other kind of annotations can +% be particulary abundant. It must also be said that most text editors +% have trouble in displaying Arabic script connected with preceding or +% following \LaTeX\ commands: it often happens that commands seem +% misplaced, not to mention punctuation marks, or opening or closing +% braces, brackets or parentheses that are unexpectedly displayed in +% the wrong direction. Of course, some text editors provide ways to +% get around such difficulties by inserting invisible Unicode +% characters, such as LEFT-TO-RIGHT or RIGHT-TO-LEFT MARKS +% (\texttt{U+200E}, \texttt{U+200F}), RTL/LTR \enquote{embed} % characters (\texttt{U+202B}, \texttt{U+202A}) and RLO/LRO % \enquote{bidi-override} characters (\texttt{U+202E}, % \texttt{U+202D}).\footnote{Gáspár Sinai's Yudit probably has the -% best Unicode support. See \url{http://www.yudit.org}.} Nonetheless, it -% remains that inserting all the time these invisible characters in +% best Unicode support. See \url{http://www.yudit.org}.} Nonetheless, +% it remains that inserting all the time these invisible characters in % complex documents rapidly becomes confusing and cumbersome. % % 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 % %\section{Standard Arab\TeX\ input} %\subsection{Consonants} -% Table\vref{tab:arabtex-consonants} gives the Arab\TeX\ equivalents for +% \Cref{tab:arabtex-consonants} gives the Arab\TeX\ equivalents for % all of the Arabic consonants. % \newcommand{\dmg}[1]{% % \SetTranslitConvention{dmg}% @@ -464,7 +466,7 @@ consonants, though three of them are also used as vowels % % \subsection{Vowels} % \subsubsection{Long vowels} -% Table\vref{tab:arabtex-long-vowels} gives the Arab\TeX\ equivalents for +% \Cref{tab:arabtex-long-vowels} gives the Arab\TeX\ equivalents for % the Arabic long vowels. % \begin{longtable}{llll} % \toprule @@ -507,7 +509,7 @@ consonants, though three of them are also used as vowels % \end{quoting} % % \subsubsection{Short vowels} -% Table\vref{tab:arabtex-short-vowels} gives the Arab\TeX\ equivalents for +% \Cref{tab:arabtex-short-vowels} gives the Arab\TeX\ equivalents for % the Arabic short vowels. % \begin{longtable}{llll} % \toprule @@ -804,7 +806,6 @@ consonants, though three of them are also used as vowels % \end{quote} % % \subparagraph{The euphonic \arb[trans]{ta^sdId}} -% \label{euphonic-tashdid} % always follows a vowelless consonant which is passed over in % pronunciation and assimilated to a following consonant. It may be % found \parencite[i. 15 B--16 C]{Wright}:--- @@ -817,7 +818,7 @@ consonants, though three of them are also used as vowels % \iffalse %<*example> % \fi -\begin{arabluacode}[text only] +\begin{arabluacode}[text only]\label{euphonic-tashdid} Unlike \package{arabtex} and \package{arabxetex}, \package{arabluatex} \emph{never requires the solar letter to be written twice}, as it automatically generates the euphonic @@ -868,7 +869,7 @@ consonants, though three of them are also used as vowels % |al-.hamdu| |li-l-l_ahi| \arb[fullvoc]{al-.hamdu li-l-l_ahi} % \arb[trans]{al-.hamdu li-l-l_ahi}. % \end{quote} -% As said above in section\vref{fullvoc-mode}, |fullvoc| is the mode +% As said above on \cpageref{fullvoc-mode}, |fullvoc| is the mode % in which \package{arabluatex} expresses the \arb[trans]{sukUn} and % the \arb[trans]{wa.slaT}. \package{arabluatex} will take care of % 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 % col. 1]{Lane}. Finally, the first \arb[novoc]{l} is made quiescent % and incorporated into the other, hence the \arb[trans]{ta^sdId} % above it. As \package{arabluatex} never requires a solar letter to -% be written twice (see above, section\vref{euphonic-tashdid}), the +% be written twice (see above, \vpageref{euphonic-tashdid}), the % name of God is therefore encoded |al-l_ahu| or |'l-l_ahu|:--- % \begin{quote} % |al-l_ahu| \arb[fullvoc]{al-l_ahu} \arb[trans]{al-l_ahu}, -% \verb+yA|+ |al-l_ahu| \arb[fullvoc]{yA| al-l_ahu} \arb[trans]{yA| -% al-l_ahu}, \verb+'a-fa|-al-l_ahi+ |la-ta.g`alanna| +% \verb+yA|+\footnote{\label{fn:pipe-allah-01}Note the +% \enquote{pipe} character \enquote*{\textbar} here after |yA| and +% below after |fa| before footnote mark \ref{fn:pipe-allah-02}: it +% is needed by the |dmg| transliteration mode as in this mode any +% vowel at the commencement of a word preceded by a word that ends +% with a vowel, either short or long, is absorbed by this vowel +% viz. \arb[trans]{`al_A 'l-.tarIqi}. See ** on the \enquote{pipe} +% and ** on |dmg| mode.} |al-l_ahu| \arb[fullvoc]{yA| al-l_ahu} +% \arb[trans]{yA| al-l_ahu}, +% \verb+'a-fa|+\footnote{\label{fn:pipe-allah-02}See +% \cref{fn:pipe-allah-01}.}|-al-l_ahi| |la-ta.g`alanna| % \arb[fullvoc]{'a-fa|-al-l_ahi la-ta.g`alanna} % \arb[trans]{'a-fa|-al-l_ahi la-ta.g`alanna}, |bi-'l-l_ahi| % \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 % \end{environment} % \begin{macrocode} \DeclareDocumentCommand{\Marginpar}{m}{\marginpar{\textdir TLT #1}} -\RenewDocumentCommand{\thefootnote}{}{\bgroup\textdir - TLT\arabic{footnote}\egroup} \DeclareDocumentCommand{\LRfootnote}{m}{\bgroup\pardir TLT\LR{\footnote{#1}}\egroup} +\NewDocumentCommand{\FixArbFtnmk}{}{% + \@ifpackageloaded{scrextend}% + {\AtBeginDocument{\deffootnote{2em}{1.6em}{\LR{\thefootnotemark}.\enskip}}}% + {\RequirePackage{scrextend} + \AtBeginDocument{\deffootnote{2em}{1.6em}{\LR{\thefootnotemark}.\enskip}}}} \endinput % \end{macrocode} % -- cgit v1.2.3