<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Thanks, that works.<br>
    <br>
    Is there anyway to control the placement of the numbers? They look
    good besides the introductory material but once the text proper
    begins, they are pressed right up against the text.<br>
    <br>
    Here is a minimal example:<br>
    <br>
    \documentclass{article} <br>
    <br>
    \usepackage{pstricks}<br>
    \usepackage{pst-eps}<br>
    <br>
    \usepackage[Bpara,modulo,right,addpageno,perpage,para*]{ednotes}<br>
    <br>
    \modulolinenumbers[5]<br>
    <br>
    \usepackage{fontspec}<br>
    \usepackage[novoc,fdf2noalif]{arabxetex}<br>
\newfontfamily\arabicfont[Script=Arabic,Scale=1.4,WordSpace=2]{Scheherazade}<br>
    <br>
    % To make language switching faster:<br>
    % For some reason, \textroman was not working out-of-the-box...<br>
    \newcommand{\textroman}[1]{\LR{\rmfamily #1}}<br>
    % And we make some short-hands<br>
    \newcommand{\R}{\textroman}<br>
    \newcommand{\A}{\textarabic}% Lateef, Scheherazade<br>
    <br>
    \makeatletter<br>
    \@ifpackageloaded{color}{%<br>
    \def\makeLineNumberRight{%<br>
    \linenumberfont\hskip-\linenumbersep\hskip-\columnwidth<br>
    \hb@xt@\linenumberwidth{\hss\LineNumber}\hss}}{}<br>
    \makeatother<br>
    <br>
    \begin{document}<br>
    <br>
    \begin{arab}<br>
    \resetlinenumber\pagewiselinenumbers<br>
    \rightlinenumbers<br>
    <br>
    \begin{center}<br>
    %<br>
    \Anote{\A{\notinnote\Huge ktAb fY AlmsA.hT}}{\A{^gzu' fY msA.hT
    AlAr.dyn \R{(\textit{rubro col.})}.}}<br>
    <br>
    \medskip<br>
    {\Large l|l^sy_h Al`Alm ^s^gA` bn Aslm Alm`rwf b'ab--Y kAml} <br>
    <br>
    \medskip<br>
    {\Large r.hmh Al|llh bkrmh} <br>
    <br>
    \medskip<br>
    {\Large ^Amyn} <br>
    <br>
    \bigskip<br>
    \R{\marginpar{$(93\textsuperscript{\bf v})$}}<br>
    bsm Al|llh Alr.hmn Alr.hym \LR{\quad} w.sllY Al|llh `lY syydnA
    m.hmmd w^Alh<br>
    <br>
    \smallskip<br>
    \noindent <br>
    qAl ^s^gA` Abn Aslm Alm`rwf b'ab--Y kAml<br>
    <br>
    \bigskip<br>
    \centerline{\Large bAb msA.hT Al'ar.dyn}<br>
    \end{center}<br>
    <br>
    AmmA m`rfT <br>
    \Anote{\A{msA.hT}}{\A{.hsAb}.} <br>
    Al'ar.dyn flys ythyya' An <br>
    \Anote{\A{yqym}}{\A{nqym.}} <br>
    AlbrhAn `lY mA Arsm mnh kmA Aqmt"uh `lY k_tyr mn k"utbY wlw qddmt"u
    AlbrhAn `lY mA A_dkrh mnhA lA^gtm`t"u <br>
    \Anote{\A{`lY}}{\A{AlY.}}<br>
     k_tyr m|mmA fY $\!\!\rangle$ktAb$\langle\!\!$ Aqlyds wl.tAl AlktAb
    w`sr `lY Almt`llmyn A_d knt AnnmA w.d`t"u h_dA AlktAb l|lmbtd'iyn
    l|ld_hwl fY h_dh Al.snA`T wAlm.hbbyn lt`llmhA wAnnmA ArwY mA Arsmh
    mn AlmsA.hT rwAyT"aN <br>
    \Anote{\A{btrtyb .s.hy.h} \<<br>
    wn.zm mstw"iN wta'lyf .hsn\><br>
    \A{wqwl <br>
    \Anote{\A{brhAnY}}{\A{brhAn.}}}}{\A{\R{\it infra in cod.}
    \R{$\!\!$)} \A{fA_dA Astw`b} \R{({\it ante}}}}<br>
    fmn tmssk bAlAbwAb AltY ArwyhA wslk Al.tryq Al_dY <br>
    \Anote{\A{Abnyh}}{\A{Abnth.} \R{)}\A{Abnt} \R{{\it corr. ex}}\R{(}}<br>
     .s.h.h lh Al^gwAb wn^gA mn Al_h.ta' wAmn Alzl|l wshl `lyh m`rfT
    AlbrhAn. <br>
    <br>
    fAn ArAd AlbrhAn `lY _dlk w`lY mA twlld Al.hsAb mn msA'il AlhndsT
    WAlmsA.hT wAl`d|d w.gyr _dlk f`lyh bAln.zr fY ktAb Aqlyds fqd A.hkmh
    .gAyT AlA.hkAm wbnAh bAw_tq AlbnyAn  fA_dA Astw`b mA fyh wfhmh
    fhm"aN .s.hy.h"aN lA yd_hlh ryb wlA y_htl^gh ^skk wlA y^swbh dns `rf
    AqAmT AlbrhAn `lY AlhndsT wAlmsA.hT wAl`d|d w.gyr _dlk mn ^gmy`
    Alfnwn.\R{\ \ } wlA qwT AllA bAl|llh Al`lYY Al`.zym w.hsb"unA Al|llh
    wn`m Alwkyl.<br>
    <br>
    <br>
    \end{arab}<br>
    <br>
    \end{document}<br>
    <br>
    --------------------------<br>
    <br>
    Again it has to do with pstricks. When I comment out pstricks, the
    line numbers appear just fine, but when pstricks is loaded, they are
    moved in against the side of the text.<br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    On 11/09/22 14:27, VAFA KHALIGHI wrote:
    <blockquote
cite="mid:CAB6rp_YRvftg+S2Z4uaMB5F4LWijeo88zd_N0y4zUdbCSXf3gw@mail.gmail.com"
      type="cite">
      <meta http-equiv="Context-Type" content="text/html; charset=UTF-8">
      <div>Put it before \begin{document}, in addition you need to put
        \rightlinenumbers after \resetlinenumber\pagewiselinenumbers<br>
        <br>
        <div>On Thu, Sep 22, 2011 at 3:17 PM, Nathan Sidoli <span><<a
              moz-do-not-send="true"
              href="mailto:nathan.sidoli@utoronto.ca">nathan.sidoli@utoronto.ca</a>></span>
          wrote:<br>
          <blockquote>
            <div> Thanks for this. <br>
              <br>
              Where are you putting this code? <br>
              <br>
              I tried in various places in the preamble. Does it need to
              be put in one of the packages?
              <div>
                <div><br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  On 11/09/22 2:35, VAFA KHALIGHI wrote:
                  <blockquote type="cite">
                    <div>bidi does not support lineno.sty and you are on
                      your own if you decide to use it but here is the
                      fix:<br>
                      <br>
                      \makeatletter<br>
                      \@ifpackageloaded{color}{%<br>
                      <p>\def\makeLineNumberRight{% </p>
                      <p>
                        \linenumberfont\hskip-\linenumbersep\hskip-\columnwidth</p>
                      <p>
                        \hb@xt@\linenumberwidth{\hss\LineNumber}\hss}}{}</p>
                      <p>\makeatother<br>
                      </p>
                      <br>
                      If you are curious, why this happens, then I can
                      explain.<br>
                      <br>
                      <div>On Thu, Sep 22, 2011 at 1:24 AM, Nathan
                        Sidoli <span><<a moz-do-not-send="true"
                            href="mailto:nathan.sidoli@utoronto.ca">nathan.sidoli@utoronto.ca</a>></span>
                        wrote:<br>
                        <blockquote>
                          <div> Well, as you guessed, it does seem to be
                            something to do with the interaction between
                            bidi and pstricks.<br>
                            <br>
                            Here is a minimal example with no bidi,
                            which shows the line numbers along with a
                            figure, etc.<br>
                            <br>
                            -----------------------<br>
                            <br>
                            \documentclass{article} <br>
                            <br>
                            \usepackage{pstricks}<br>
                            \usepackage{pst-eps}<br>
                            <br>
                            <br>
\usepackage[Bpara,modulo,right,addpageno,perpage,para*]{ednotes}<br>
                            \modulolinenumbers[5]<br>
                            <br>
                            \begin{document}<br>
                            <br>
                            %\begin{arab}<br>
                            \resetlinenumber\pagewiselinenumbers<br>
                            <br>
                            \Anote{a lemma}{with a note.}<br>
                            <br>
                            \Anote{another line with another lemma}{and
                            the note.}<br>
                            <br>
                            \Anote{we have the same thing again}{and
                            there's a note.}<br>
                            <br>
                            \Anote{a fourth lemma}{a fourth note.}<br>
                            <br>
                            we should now have a line number<br>
                            <br>
                            \vspace{2em}<br>
                            <br>
                            \begin{center}<br>
                            \begin{pspicture}(0,0)(3,3)<br>
                            \psline[linewidth=1pt](0,0)(0,3)  %base<br>
                             \psline[linewidth=1pt](0,0)(3,0) %2e base <br>
                            \psline[linewidth=1pt](0,3)(3,3)  %3e base<br>
                            \psline[linewidth=1pt](3,0)(3,3)  %oblique 1<br>
                            \psline[linewidth=1pt](0,3)(3,0)  %oblique 1<br>
                            \rput(1.5,2.4){{lalala}}<br>
                            \rput(1.5,3.278){{lalala}}<br>
                            \rput*[0,0]{-45}(0.23,1.74){{dedum}}<br>
                            \rput*[0,0]{-90}(3.125,2.1){{dedum}}<br>
                            \rput*[0,0]{-90}(-0.7,2.1){{ladida}}<br>
                            \rput(1.5,-0.275){{ladidum}}<br>
                            \end{pspicture}<br>
                            \end{center}<br>
                            <br>
                            \end{document}<br>
                            <br>
                            ----------------<br>
                            <br>
                            In the next example, we have six lines of
                            Arabic text and we can toggle the marginal
                            line numbers on and off by commenting and
                            uncommenting pstricks.<br>
                            <br>
                            \documentclass{article} <br>
                            <br>
                            %\usepackage{pstricks}<br>
                            <br>
\usepackage[Bpara,modulo,right,addpageno,perpage,para*]{ednotes}<br>
                            \modulolinenumbers[5]<br>
                            <br>
                            <br>
                            \usepackage{fontspec}<br>
                            \usepackage[novoc,fdf2noalif]{arabxetex}<br>
\newfontfamily\arabicfont[Script=Arabic,Scale=1.4,WordSpace=2]{Scheherazade}<br>
                            <br>
                            % To make language switching faster:<br>
                            % For some reason, \textroman was not
                            working out-of-the-box...<br>
                            \newcommand{\textroman}[1]{\LR{\rmfamily
                            #1}}<br>
                            % And we make some short-hands<br>
                            \newcommand{\R}{\textroman}<br>
                            \newcommand{\A}{\textarabic}% Lateef,
                            Scheherazade<br>
                            <br>
                            \begin{document}<br>
                            <br>
                            %\begin{arab}<br>
                            \resetlinenumber\pagewiselinenumbers<br>
                            <br>
                            \begin{arab}<br>
                            \resetlinenumber\pagewiselinenumbers<br>
                            <br>
                            \begin{center}<br>
                            %<br>
                            \Anote{\A{\notinnote\Huge ktAb fY
                            AlmsA.hT}}{\A{^gzu' fY msA.hT AlAr.dyn
                            \R{(\textit{rubro col.})}.}}<br>
                            <br>
                            \medskip<br>
                            {\Large l|l^sy_h Al`Alm ^s^gA` bn Aslm
                            Alm`rwf b'ab--Y kAml} <br>
                            <br>
                            \medskip<br>
                            {\Large r.hmh Al|llh bkrmh} <br>
                            <br>
                            \medskip<br>
                            {\Large ^Amyn} <br>
                            <br>
                            \bigskip<br>
                            \R{\marginpar{$(93\textsuperscript{\bf
                            v})$}}<br>
                            bsm Al|llh Alr.hmn Alr.hym \LR{\quad} w.sllY
                            Al|llh `lY syydnA m.hmmd w^Alh<br>
                            <br>
                            \smallskip<br>
                            \noindent <br>
                            qAl ^s^gA` Abn Aslm Alm`rwf b'ab--Y kAml<br>
                            <br>
                            \bigskip<br>
                            \centerline{\Large bAb msA.hT Al'ar.dyn}<br>
                            \end{center}<br>
                            <br>
                            \end{arab}<br>
                            <br>
                            \end{document}
                            <div>
                              <div><br>
                                <br>
                                <br>
                                <br>
                                <br>
                                On 11/09/21 23:52, VAFA KHALIGHI wrote:
                                <blockquote type="cite">
                                  <div>do you have a minimal example?
                                    Can you create one where bidi is not
                                    loaded at all? maybe endnotes does
                                    not behave well with pstricks.<br>
                                    <br>
                                    <div>On Thu, Sep 22, 2011 at 12:48
                                      AM, Nathan Sidoli <span><<a
                                          moz-do-not-send="true"
                                          href="mailto:nathan.sidoli@utoronto.ca">nathan.sidoli@utoronto.ca</a>></span>
                                      wrote:<br>
                                      <blockquote>
                                        <div> I have tried loading them
                                          in every possible order, but
                                          as soon as I load pstricks the
                                          marginal numbers disappear. <br>
                                          <div>
                                            <div> <br>
                                              <br>
                                              On 11/09/21 23:43, VAFA
                                              KHALIGHI wrote:
                                              <blockquote type="cite">
                                                <div>No, I think it has
                                                  to do with something
                                                  that tikzpicture or
                                                  pspicture environment
                                                  are in LTR mode by
                                                  bidi. you can load
                                                  endnotes anywhere you
                                                  want but certainly
                                                  bidi gives you error
                                                  if you load tikz or
                                                  pstricks after bidi,
                                                  thus you only will
                                                  have to load tikz or
                                                  pstricks before bidi.<br>
                                                  <br>
                                                  <div>2011/9/22 Zdenek
                                                    Wagner <span><<a
moz-do-not-send="true" href="mailto:zdenek.wagner@gmail.com">zdenek.wagner@gmail.com</a>></span><br>
                                                    <blockquote>
                                                      2011/9/21 VAFA
                                                      KHALIGHI <<a
                                                        moz-do-not-send="true"
href="mailto:vafaklg@gmail.com">vafaklg@gmail.com</a>>:<br>
                                                      <div>> I am not
                                                        sure what is the
                                                        actual problem
                                                        but I can tell
                                                        you what bidi
                                                        does.<br>
                                                        > bidi does
                                                        the following:<br>
                                                        ><br>
                                                      </div>
                                                      Can it depend on
                                                      the order in which
                                                      the packages are
                                                      loaded? This is<br>
                                                      what I would try.
                                                      My feeling is that
                                                      the correct order
                                                      would be tikz,<br>
                                                      endnote, bidi.<br>
                                                      <div>
                                                        <div><br>
                                                          > 1- makes
                                                          l and r
                                                          logical such
                                                          that l means
                                                          always left
                                                          and r always
                                                          means<br>
                                                          > right (in
                                                          both RTL and
                                                          LTR).<br>
                                                          ><br>
                                                          > 2- bidi
                                                          automatically
                                                          puts
                                                          tikzpicture
                                                          and pspicture
                                                          envoronments
                                                          in LTR<br>
                                                          > mode
                                                          mainly for two
                                                          reasons:<br>
                                                          > a) RTL
                                                          picture
                                                          environment
                                                          does not make
                                                          sense.<br>
                                                          > b) XeTeX
                                                          in RTL mode,
                                                          with \special
                                                          has bugs and
                                                          tikz and
                                                          pstricks both
                                                          uses<br>
                                                          > \special
                                                          so we have no
                                                          other choice
                                                          but putting
                                                          pspicture and
                                                          tikzpicture<br>
                                                          > inside
                                                          LTR mode.<br>
                                                          ><br>
                                                          > On Thu,
                                                          Sep 22, 2011
                                                          at 12:26 AM,
                                                          Nathan Sidoli
                                                          <<a
                                                          moz-do-not-send="true"
href="mailto:nathan.sidoli@utoronto.ca">nathan.sidoli@utoronto.ca</a>><br>
                                                          > wrote:<br>
                                                          >><br>
                                                          >> I
                                                          realize this
                                                          is not
                                                          strictly
                                                          speaking a
                                                          XeTeX issue,
                                                          but I am<br>
                                                          >>
                                                          typesetting a
                                                          critical
                                                          edition of an
                                                          Arabic text
                                                          using XeLaTeX
                                                          with the<br>
                                                          >>
                                                          ednotes
                                                          package and I
                                                          want to be
                                                          able to make
                                                          the diagrams
                                                          for the text<br>
                                                          >> using
                                                          either
                                                          pstricks or
                                                          TikZ so that
                                                          the Arabic
                                                          fonts can be
                                                          changed in the<br>
                                                          >> text
                                                          and diagrams
                                                          simply by
                                                          toggling the
                                                          initial font
                                                          setting.<br>
                                                          >><br>
                                                          >> When
                                                          I load either
                                                          of these
                                                          graphics
                                                          packages,
                                                          however, the
                                                          line numbers<br>
                                                          >> in
                                                          the margins of
                                                          the Arabic
                                                          text
                                                          disappear.<br>
                                                          >><br>
                                                          >> Has
                                                          any one had a
                                                          similar
                                                          problem? Can
                                                          any one think
                                                          of a possible<br>
                                                          >>
                                                          solution?<br>
                                                          >><br>
                                                          >> I can
                                                          work on a
                                                          minimal
                                                          example, but
                                                          it will
                                                          probably not
                                                          be that
                                                          minimal.<br>
                                                          >><br>
                                                          >><br>
                                                          >><br>
                                                          >>
                                                          --------------------------------------------------<br>
                                                          >>
                                                          Subscriptions,
                                                          Archive, and
                                                          List
                                                          information,
                                                          etc.:<br>
                                                          >>  <a
                                                          moz-do-not-send="true"
href="http://tug.org/mailman/listinfo/xetex">http://tug.org/mailman/listinfo/xetex</a><br>
                                                          ><br>
                                                          ><br>
                                                          ><br>
                                                          ><br>
                                                          >
                                                          --------------------------------------------------<br>
                                                          >
                                                          Subscriptions,
                                                          Archive, and
                                                          List
                                                          information,
                                                          etc.:<br>
                                                          >  <a
                                                          moz-do-not-send="true"
href="http://tug.org/mailman/listinfo/xetex">http://tug.org/mailman/listinfo/xetex</a><br>
                                                          ><br>
                                                          ><br>
                                                          <br>
                                                          <br>
                                                          <br>
                                                        </div>
                                                      </div>
                                                      --<br>
                                                      Zdeněk Wagner<br>
                                                      <a
                                                        moz-do-not-send="true"
href="http://hroch486.icpf.cas.cz/wagner/">http://hroch486.icpf.cas.cz/wagner/</a><br>
                                                      <a
                                                        moz-do-not-send="true"
href="http://icebearsoft.euweb.cz">http://icebearsoft.euweb.cz</a><br>
                                                      <div>
                                                        <div><br>
                                                          <br>
                                                          <br>
--------------------------------------------------<br>
                                                          Subscriptions,
                                                          Archive, and
                                                          List
                                                          information,
                                                          etc.:<br>
                                                           <a
                                                          moz-do-not-send="true"
href="http://tug.org/mailman/listinfo/xetex">http://tug.org/mailman/listinfo/xetex</a><br>
                                                        </div>
                                                      </div>
                                                    </blockquote>
                                                  </div>
                                                  <br>
                                                </div>
                                                <br>
                                                <br>
                                                <pre>--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
  <a moz-do-not-send="true" href="http://tug.org/mailman/listinfo/xetex">http://tug.org/mailman/listinfo/xetex</a>
</pre>
                                              </blockquote>
                                              <br>
                                            </div>
                                          </div>
                                        </div>
                                        <br>
                                        <br>
                                        <br>
--------------------------------------------------<br>
                                        Subscriptions, Archive, and List
                                        information, etc.:<br>
                                         <a moz-do-not-send="true"
                                          href="http://tug.org/mailman/listinfo/xetex">http://tug.org/mailman/listinfo/xetex</a><br>
                                        <br>
                                      </blockquote>
                                    </div>
                                    <br>
                                  </div>
                                  <br>
                                  <br>
                                  <pre>--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
  <a moz-do-not-send="true" href="http://tug.org/mailman/listinfo/xetex">http://tug.org/mailman/listinfo/xetex</a>
</pre>
                                </blockquote>
                                <br>
                              </div>
                            </div>
                          </div>
                          <br>
                          <br>
                          <br>
--------------------------------------------------<br>
                          Subscriptions, Archive, and List information,
                          etc.:<br>
                           <a moz-do-not-send="true"
                            href="http://tug.org/mailman/listinfo/xetex">http://tug.org/mailman/listinfo/xetex</a><br>
                          <br>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                    <br>
                    <br>
                    <pre>--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
  <a moz-do-not-send="true" href="http://tug.org/mailman/listinfo/xetex">http://tug.org/mailman/listinfo/xetex</a>
</pre>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
            <br>
            <br>
            <br>
            --------------------------------------------------<br>
            Subscriptions, Archive, and List information, etc.:<br>
             <a moz-do-not-send="true"
              href="http://tug.org/mailman/listinfo/xetex">http://tug.org/mailman/listinfo/xetex</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">

--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
  <a class="moz-txt-link-freetext" href="http://tug.org/mailman/listinfo/xetex">http://tug.org/mailman/listinfo/xetex</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>