[XeTeX] Compatibility issues with ednotes and pstricks or TikZ
VAFA KHALIGHI
vafaklg at gmail.com
Thu Sep 22 07:27:03 CEST 2011
Put it before \begin{document}, in addition you need to put
\rightlinenumbers after \resetlinenumber\pagewiselinenumbers
On Thu, Sep 22, 2011 at 3:17 PM, Nathan Sidoli <nathan.sidoli at utoronto.ca>wrote:
> Thanks for this.
>
> Where are you putting this code?
>
> I tried in various places in the preamble. Does it need to be put in one of
> the packages?
>
>
>
>
>
>
>
> On 11/09/22 2:35, VAFA KHALIGHI wrote:
>
> bidi does not support lineno.sty and you are on your own if you decide to
> use it but here is the fix:
>
> \makeatletter
> \@ifpackageloaded{color}{%
>
> \def\makeLineNumberRight{%
>
> \linenumberfont\hskip-\linenumbersep\hskip-\columnwidth
>
> \hb at xt@\linenumberwidth{\hss\LineNumber}\hss}}{}
>
> \makeatother
>
> If you are curious, why this happens, then I can explain.
>
> On Thu, Sep 22, 2011 at 1:24 AM, Nathan Sidoli <nathan.sidoli at utoronto.ca>wrote:
>
> Well, as you guessed, it does seem to be something to do with the
> interaction between bidi and pstricks.
>
> Here is a minimal example with no bidi, which shows the line numbers along
> with a figure, etc.
>
> -----------------------
>
> \documentclass{article}
>
> \usepackage{pstricks}
> \usepackage{pst-eps}
>
>
> \usepackage[Bpara,modulo,right,addpageno,perpage,para*]{ednotes}
> \modulolinenumbers[5]
>
> \begin{document}
>
> %\begin{arab}
> \resetlinenumber\pagewiselinenumbers
>
> \Anote{a lemma}{with a note.}
>
> \Anote{another line with another lemma}{and the note.}
>
> \Anote{we have the same thing again}{and there's a note.}
>
> \Anote{a fourth lemma}{a fourth note.}
>
> we should now have a line number
>
> \vspace{2em}
>
> \begin{center}
> \begin{pspicture}(0,0)(3,3)
> \psline[linewidth=1pt](0,0)(0,3) %base
> \psline[linewidth=1pt](0,0)(3,0) %2e base
> \psline[linewidth=1pt](0,3)(3,3) %3e base
> \psline[linewidth=1pt](3,0)(3,3) %oblique 1
> \psline[linewidth=1pt](0,3)(3,0) %oblique 1
> \rput(1.5,2.4){{lalala}}
> \rput(1.5,3.278){{lalala}}
> \rput*[0,0]{-45}(0.23,1.74){{dedum}}
> \rput*[0,0]{-90}(3.125,2.1){{dedum}}
> \rput*[0,0]{-90}(-0.7,2.1){{ladida}}
> \rput(1.5,-0.275){{ladidum}}
> \end{pspicture}
> \end{center}
>
> \end{document}
>
> ----------------
>
> 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.
>
> \documentclass{article}
>
> %\usepackage{pstricks}
>
> \usepackage[Bpara,modulo,right,addpageno,perpage,para*]{ednotes}
> \modulolinenumbers[5]
>
>
> \usepackage{fontspec}
> \usepackage[novoc,fdf2noalif]{arabxetex}
>
> \newfontfamily\arabicfont[Script=Arabic,Scale=1.4,WordSpace=2]{Scheherazade}
>
> % To make language switching faster:
> % For some reason, \textroman was not working out-of-the-box...
> \newcommand{\textroman}[1]{\LR{\rmfamily #1}}
> % And we make some short-hands
> \newcommand{\R}{\textroman}
> \newcommand{\A}{\textarabic}% Lateef, Scheherazade
>
> \begin{document}
>
> %\begin{arab}
> \resetlinenumber\pagewiselinenumbers
>
> \begin{arab}
> \resetlinenumber\pagewiselinenumbers
>
> \begin{center}
> %
> \Anote{\A{\notinnote\Huge ktAb fY AlmsA.hT}}{\A{^gzu' fY msA.hT AlAr.dyn
> \R{(\textit{rubro col.})}.}}
>
> \medskip
> {\Large l|l^sy_h Al`Alm ^s^gA` bn Aslm Alm`rwf b'ab--Y kAml}
>
> \medskip
> {\Large r.hmh Al|llh bkrmh}
>
> \medskip
> {\Large ^Amyn}
>
> \bigskip
> \R{\marginpar{$(93\textsuperscript{\bf v})$}}
> bsm Al|llh Alr.hmn Alr.hym \LR{\quad} w.sllY Al|llh `lY syydnA m.hmmd w^Alh
>
> \smallskip
> \noindent
> qAl ^s^gA` Abn Aslm Alm`rwf b'ab--Y kAml
>
> \bigskip
> \centerline{\Large bAb msA.hT Al'ar.dyn}
> \end{center}
>
> \end{arab}
>
> \end{document}
>
>
>
>
>
> On 11/09/21 23:52, VAFA KHALIGHI wrote:
>
> 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.
>
> On Thu, Sep 22, 2011 at 12:48 AM, Nathan Sidoli <nathan.sidoli at utoronto.ca
> > wrote:
>
> I have tried loading them in every possible order, but as soon as I load
> pstricks the marginal numbers disappear.
>
>
> On 11/09/21 23:43, VAFA KHALIGHI wrote:
>
> 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.
>
> 2011/9/22 Zdenek Wagner <zdenek.wagner at gmail.com>
>
> 2011/9/21 VAFA KHALIGHI <vafaklg at gmail.com>:
> > I am not sure what is the actual problem but I can tell you what bidi
> does.
> > bidi does the following:
> >
> Can it depend on the order in which the packages are loaded? This is
> what I would try. My feeling is that the correct order would be tikz,
> endnote, bidi.
>
> > 1- makes l and r logical such that l means always left and r always means
> > right (in both RTL and LTR).
> >
> > 2- bidi automatically puts tikzpicture and pspicture envoronments in LTR
> > mode mainly for two reasons:
> > a) RTL picture environment does not make sense.
> > b) XeTeX in RTL mode, with \special has bugs and tikz and pstricks both
> uses
> > \special so we have no other choice but putting pspicture and tikzpicture
> > inside LTR mode.
> >
> > On Thu, Sep 22, 2011 at 12:26 AM, Nathan Sidoli <
> nathan.sidoli at utoronto.ca>
> > wrote:
> >>
> >> I realize this is not strictly speaking a XeTeX issue, but I am
> >> typesetting a critical edition of an Arabic text using XeLaTeX with the
> >> ednotes package and I want to be able to make the diagrams for the text
> >> using either pstricks or TikZ so that the Arabic fonts can be changed in
> the
> >> text and diagrams simply by toggling the initial font setting.
> >>
> >> When I load either of these graphics packages, however, the line numbers
> >> in the margins of the Arabic text disappear.
> >>
> >> Has any one had a similar problem? Can any one think of a possible
> >> solution?
> >>
> >> I can work on a minimal example, but it will probably not be that
> minimal.
> >>
> >>
> >>
> >> --------------------------------------------------
> >> Subscriptions, Archive, and List information, etc.:
> >> http://tug.org/mailman/listinfo/xetex
> >
> >
> >
> >
> > --------------------------------------------------
> > Subscriptions, Archive, and List information, etc.:
> > http://tug.org/mailman/listinfo/xetex
> >
> >
>
>
>
> --
> Zdeněk Wagner
> http://hroch486.icpf.cas.cz/wagner/
> http://icebearsoft.euweb.cz
>
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
> http://tug.org/mailman/listinfo/xetex
>
>
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
> http://tug.org/mailman/listinfo/xetex
>
>
>
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
> http://tug.org/mailman/listinfo/xetex
>
>
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
> http://tug.org/mailman/listinfo/xetex
>
>
>
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
> http://tug.org/mailman/listinfo/xetex
>
>
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
> http://tug.org/mailman/listinfo/xetex
>
>
>
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
> http://tug.org/mailman/listinfo/xetex
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20110922/87d96e50/attachment.html>
More information about the XeTeX
mailing list