From 17be6d449481e7580f18825b342fbef97d13b067 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Tue, 6 Nov 2018 10:56:20 +0100 Subject: make \aemph use ulem instead of \overline and \underline --- arabluatex.dtx | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'arabluatex.dtx') diff --git a/arabluatex.dtx b/arabluatex.dtx index 5ccf530..89ab60a 100644 --- a/arabluatex.dtx +++ b/arabluatex.dtx @@ -2053,8 +2053,9 @@ word that \cs{arbnull} is applied to. % Arabic environments. In that case, \package{arabluatex} does not % print the stroke as a distinctive mark over the number for it is % not surrounded by other Arabic words. In case one nonetheless -% wishes to print the stroke, he can use the \cs{aemph} command that -% is described below in \vref{sec:emphasis}:--- +% wishes to print the stroke, he can either use the \cs{aemph} +% command that is described below in \vref{sec:emphasis} or insert +% the \arb[trans]{'ab^gad} number in |\arb[novoc]{}|:--- % \begin{quote} % |The| |\arb[trans]{'abjad}| |number| |for| |1874| |is| % |\abjad{1874}| The \arb[trans]{'abjad} number for 1874 is @@ -2063,6 +2064,10 @@ word that \cs{arbnull} is applied to. % |The| |\arb[trans]{'abjad}| |number| |for| |1874| |is| % |\aemph*{\abjad{1874}}| The \arb[trans]{'abjad} number for 1874 % is \aemph*{\abjad{1874}}. +% +% |The| |\arb[trans]{'abjad}| |number| |for| |1874| |is| +% |\arb[novoc]{\abjad{1874}}| The \arb[trans]{'abjad} number for +% 1874 is \arb[novoc]{\abjad{1874}}. % \end{quote} % \end{quoting} % @@ -4349,6 +4354,7 @@ wa-ya.sIru ta.hta 'l-jild-i \RequirePackage{environ} \RequirePackage{adjustbox} \RequirePackage{xstring} +\RequirePackage[normalem]{ulem} % \end{macrocode} % The following boolean will be set to |true| in |RL| mode: % \begin{macrocode} @@ -4420,11 +4426,17 @@ wa-ya.sIru ta.hta 'l-jild-i % \end{macro} % \begin{macro}{\aemph} Arabic emphasis. Needs to be redefined as % well. The function is actually coded in Lua. +% \changes{v1.16}{2018/11/06}{Now uses \textsf{ulem}} % \begin{macro}{\aemph*} The \enquote*{starred} version of this % command alway puts the stroke over its argument. % \changes{v1.9.2}{2017/10/24}{Starred version which always puts the -% stroke over its argument} +% stroke over its argument}As of v1.16 \package{arabluatex} uses +% \package{ulem} to render the strokes, thus allowing line breaks +% and manual hyphenation for transliterated Arabic. % \begin{macrocode} +\def\oline{\@ifstar\@oline\@@oline} +\newcommand{\@oline}[1]{$\overline{\text{#1}}$} +\def\@@oline{\bgroup \ULdepth=-3ex \ULset} \AtBeginDocument{\ifdef{\aemph}% {\RenewDocumentCommand{\aemph}{s m}{% \IfBooleanTF{#1}{% @@ -4845,12 +4857,12 @@ wa-ya.sIru ta.hta 'l-jild-i \ifdefined\abjad% \RenewDocumentCommand{\abjad}{m}% {\ifbool{al@rlmode}% - {\aemph{\luadirect{tex.sprint(abjadify(\luastring{#1}))}}} + {\oline*{\luadirect{tex.sprint(abjadify(\luastring{#1}))}}} {\luadirect{tex.sprint(abjadify(\luastring{#1}))}}} \else% \NewDocumentCommand{\abjad}{m}% {\ifbool{al@rlmode}% - {\aemph{\luadirect{tex.sprint(abjadify(\luastring{#1}))}}} + {\oline*{\luadirect{tex.sprint(abjadify(\luastring{#1}))}}} {\luadirect{tex.sprint(abjadify(\luastring{#1}))}}} \fi} % \end{macrocode} -- cgit v1.2.3