Dear Anas Ghrab,

Thank you very much for your suggestion for Arabic verses. I will try out your code. In the meantime I've attached a plain TeX file containing Klaus Lagally's original macros for typesetting Arabic verses. They were included in his verses.sty macro in later versions of ArabTeX. It would be very nice to be able to use his verses.sty in ArabXeTeX.

And let me say also that I was very impressed with your Ph.D. dissertation. I downloaded it and saved it on a cd. When I was much younger I was fascinated by Middle Eastern music. I was a great fan of Umm Kulthum back in the fifties and sixties. Is the original .tex file of your dissertation available for download? I'd love to use it as a sample of an ArabXeTeX file. Or maybe you have other ArabXeTeX files you could send me as samples.

Sincerely yours,
Nicholas Heer

On Mon, 12 Nov 2012, Anas Ghrab wrote:

For the verses I put this small code in the header :
\newdimen\MesraLength % each verse has two mesra'
\MesraLength=.45\hsize % one may change this to other values
\newcommand{\vers}[2]{\begin{centering}
\beginR
\hbox to \MesraLength{#1}
\hskip 1.5cm
%\hfill
\hbox to \MesraLength{#2}
\endR
\vskip 0pt\end{centering}
}

By the way, I used ArabXeTeX for writing my PhD (Télécharger la totalité de
la thèse) which contains an important arabic part, but the best way I found
now to use arabic is Polyglossia + eledmac. As texts I'm working with now are
100% in arabic, the only remaining problem is the bibliography : Biblatex is
still without an arabic localization...
Even for a latin-based letters text, I think one doesn't need any
transcription-code anymore as one can write directly in UTF-8. The
translitteration codes of ArabTeX et ArabXeTeX were necessary when the use of
latin encoding was the only way to write translitteration letters.

Yours,

---
Anas Ghrab


Le Nov 12, 2012 à 1:20 AM, heer a écrit :


      Now that the subject of ArabXeTeX has come up, I have a question
      myself.  Is there any way of using the verses.sty macro from
      Lagally's ArabTeX in ArabXeTeX?  It doesn't seem to be possible
      to use both the ArabTeX and ArabXeTeX packages in the same file.
       There are very few Arabic or Persian texts that do not contain
      any verses at all, so it would be nice to be able to use
      ArabTeX's verses.sty when using ArabXeTeX.

      Nicholas Heer



      --------------------------------------------------
      Subscriptions, Archive, and List information, etc.:
      http://tug.org/mailman/listinfo/xetex



%\magnification=1200
\nopagenumbers
\input arabtex.tex 
%\input iso88596.sty
%\setcode{iso8859-6}
%\setverb
\hsize=6.5 true in
\accentshigh
\setnash

\font\normal=cmr10 scaled\magstep0
\font\bigger=cmr10 scaled\magstep1
\font\biggest=cmr10 scaled\magstep2
\font\large=cmr10 scaled\magstep3
\font\larger=cmr10 scaled\magstep4
\font\largest=cmr10 scaled\magstep5

%Arabic font sizes:
\font\onetennash=xnsh14 scaled \magstep1
\font\twotennash=xnsh14 scaled \magstep2
\font\threetennash=xnsh14 scaled \magstep3
\font\fourtennash=xnsh14 scaled \magstep4
\font\fivetennash=xnsh14 scaled \magstep5
%bold face font sizes:
\font\onetennashbf=xnsh14bf scaled \magstep1
\font\twotennashbf=xnsh14bf scaled \magstep2
\font\threetennashbf=xnsh14bf scaled \magstep3
\font\fourtennashbf=xnsh14bf scaled \magstep4
\font\fivetennashbf=xnsh14bf scaled \magstep5


\newdimen \hvlength
\newdimen \hvsep
\newdimen \vindent

% define some verse dimensions, verse will be centered
\def \setversedim #1#2{% set length of half-verse, separation
\hvlength #1\relax \hvsep #2\relax 
\vindent \hsize \advance \vindent -\hvsep
\divide \vindent 2 \advance \vindent -\hvlength }

% macro for a verse with a connection
\def \connverses #1#2#3{% first half-verse, connection, second half-verse
\noindent \hspace \vindent
\spreadbox \hvlength {#1}% first block
\spreadbox \hvsep    {#2}% separator
\spreadbox \hvlength {#3}% second block
\par }

% macro for two half verses
\def \halfverses #1#2{% normal case
\connverses {#1}{\hfill}{#2}}

% make macros known to ArabTeX
\allowarab \halfverses
\allowarab \connverses

\setarab
\normal

\centerline{HEMISTICH BREAKS IN TYPESETTING ARABIC POETRY WITH ARAB\TeX}
\medskip

The Arabic text below contains the first ten lines of the {\it mu`allaqah\/} of
al-\d H\=arith ibn \d Hillizah.  The meter of this poem is {\it khaf\=\i f: 
f\=a`il\=atun, mustaf`i-lun, f\=a`il\=atun\/}.  Since many of its hemistich 
breaks come in the middle of words, certain typesetting problems may be 
encountered.

In the first and third lines of the poem the hemistich break comes between 
words, so no problems arise.  In the second and fourth lines the break comes in 
the middle of the words {\it shamm\=a'a\/} and {\it al-shurbub\/}.  Since 
these hemistich breaks come between letters that do not connect, the words can 
be spatially separated at the breaks.  In the fifth line the break comes in 
the middle of the word {\it al-yawm\/} between the {\it l\=am\/} and the {\it 
y\=a'\/}.  Since these two letters are normally connected, an extended 
connecting line can be used to indicate the hemistich break.  The sixth line 
is similar to the second and fourth lines.  In the seventh line the break 
again falls in the middle of a word between two letters which are normally 
connected.  In this case the break has been indicated not with an extended 
connecting line but by breaking the word in two with medial letters on either 
side of the intervening space.  In lines 9 and 10 the break occurs between the 
two {\it m\=\i m\/}s written as one letter under a {\it shaddah\/}.  Since a 
single letter cannot be split in writing the {\it m\=\i m\/} is centered in 
the space between the two hemistichs.  In line 9 it is connected to the last 
letter of the first hemistich, but in line 10 it is not. 

\bigskip


\setarabfont\threetennash

\centerline{<mu`allaqaTu al-.hAri_ti bni .hillizaT>}

\medskip

% define formatting of poetry
\setversedim {2.2in}{0.4in}

\setspace {3pt plus .7fil}
\setarabfont\twotennash
\begin {arabtext}
\halfverses {'A_danatnA bibaynihA 'asmA'u}
{rubba _tAwiN yumallu minhu al-_tawA'u}

\halfverses {b`da `ahdiN lanA bi-burqaTi ^sammA}
{-'a fa-'adnY diyArihA al-_hal.sA'u}

\halfverses {fa-al-mu.hayyAtu fa-al-.sifA.hu fa-'a`lY}
{_dI fitAqiN fa-`A_dibuN fa-al-wafA'u}

\halfverses {fa-riyA.du al-qa.tA fa-'awdiyaTu al-^sur}
{bubi fa-al-^su`batAni fa-al-'ablA'u}

\connverses {lA 'arY man `ahidtu fIhA fa-'abkI al-}
{-----} {-yawma dalhaN wamA yu.hIru al-bukA'u}

\halfverses {wa-bi-`aynayka 'awqadat hinduN al-nA}
{ra 'a.sIlaN tulwI bi-hA al-`alyA'u}

\halfverses {'awqadathA bayna al-`aqIqi fa-^sa_h.say-}
{-ni bi-`UdiN kamA yalU.hu al-.diy----A'u}

\halfverses {fa-tanawwarta nArahA min ba`IdiN}
{bi-_hazAzY hayhAti minka al-.salA'u}

\connverses {.gayra 'annI qad 'asta`Inu `alY al-ha-}
{----mmi \hfill} {'i_dA _haffa bi-al-_tawiyyi al-na^gA'u}

\connverses {bi-zafUfiN ka-'annahA hiqlaTuN 'u}
{\hfill mmu \hfill} {ri'AliN dawwiyyaTuN saqfA'u}

\end {arabtext}

\vfill

\hfill--- Nicholas Heer ([email protected])

\hfill--- formatting: Klaus Lagally ([email protected])

\end


--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex

Reply via email to