[XeTeX] custom footnote rules w/ ednotes, polyglossia & bidi

Talal Al-Azem talal at alazem.org
Sat Jul 24 16:04:30 CEST 2010


> footnote mechanism in bidi is pretty complex and it almost provides
> everything you need. We can not support every single footnote package in
> bidi. So you can not expect that ednote package works perfectly with bidi
> unless its author has done some bidi-aware macro programming. bidi gives you
> absolute controls for footnotes and footnote rules. You should read the bidi
> package documentation.
> 
> -- 
> Best wishes,
> Vafa Khalighi
> 
Dear Vafa,

Thank you for your response. And, since this is the first time I'm posting here, allow me to thank you for all of your excellent work with Bidi and other such packages.

Your comment above is, of course, correct. I have printed out and read the documentation for bidi 1.1.4a and for the other packaged as well. However, I posted my question here in the hope of getting some help and guidance in the matter, since I need to use ednotes and polyglossia (and of course, through it, bidi) but I am not sure how to deal with this one issue. 

Maybe my question can be rephrased. 

1. I am looking for help on how to change the direction of main footnote rule separator for only one section or chapter. Placing "\setRTLmarginpar" at the beginning of the document, of course, sets the footnotes of the entire document RTL. Which is not what I want; I just want this for a certain section (a chapter, etc.).

2. Ednotes uses the manyfoot package. I am asking how to make one level of footnote rule go right to left. I am sure it's all there in the documentation of Bidi and manyfoot, but I'm not having much luck.

Again, if anyone could lend some help on how to achieve this, I would be most grateful.

Kind regards,
Talal

p.s. The following is a small tex example, slightly different than the one I've sent before, in that I have managed to get three different lengths of footnote rules for each of levels A, B, and C. I would like help in making the footnote rule (separator) of level B go from right to left, if that is possible. Many thanks again.

%
% Ulysses LaTeX Export, for Theses, Using Ociamthesis & Unicode
%

\TeXXeTstate=1

\documentclass[11pt,oneside,a4paper,openright]{memoir}
\usepackage{fontspec}

%%% EDNOTES %%%
\usepackage[modulo,right,perpage,para*]{ednotes}

%%% POLYGLOSSIA %%% (includes bidi.sty)
\usepackage{polyglossia}
\setmainlanguage{english}
%\setotherlanguage{arabic}
\usepackage{bidi}

%%% Ednotes commands %%%
\modulolinenumbers[1]

\makeatletter%
\renewcommand{\footnoterule}{\kern-3\p@
  \hrule width \textwidth \kern 2.6\p@}
\makeatother

\makeatletter%
\newcommand{\footnoteruletwo}{\kern-3\p@
 \hrule width 50mm \kern 2.6\p@}
\makeatother

\makeatletter%
\newcommand{\footnoterulethree}{\kern-3\p@
\hrule width 20mm \kern 2.6\p@}
\makeatother

%%Level B of footnotes. This customization is independant of ednotes, and relates to manyfoot directly:
\SelectFootnoteRule[1]{footnoteruleB}[\footnoteruletwo]
\DeclareNewFootnote[para]{B}
\newcommand{\NOTEB}[1]{\footnoteB{#1}}

%% Level C of footnotes. This customization is independant of ednotes, and relates to manyfoot directly:
\SelectFootnoteRule[1]{footnoteruleC}[\footnoterulethree]
\DeclareNewFootnote[para]{C}[roman]
\newcommand{\NOTEC}[1]{\footnoteC{#1}}

%%% Fonts %%%
\setromanfont[%
Mapping=tex-text,%
%Numbers=OldStyle,%
%Ligatures=Common%
]%
{Charis SIL}

%		DOCUMENT		%

\begin{document}
\begin{linenumbers}
\Anote{This is some text}{These are some words} which \Anote{is}{are} meant to fill up the page \Anote{sufficiently}{enough} to give an example of what \Anote{we'd like to do}{we need to happen}. This is some\NOTEB{Here's another stream}. more\NOTEB{And another one} text.\NOTEC{This marks the beginning of the main text of MSS RH.} I guess that's enough now.\NOTEC{Some more notes.}
\end{linenumbers}
\end{document}


> Dear all,
> 
> I am using Ednotes & Polyglossia (and thus Bidi) to produce a critical edition of an 
> Arabic text, in Memoir. Ednotes seems to call up the manyfoot package 
> automatically. I am having two problems: 
> 
> 1. I have three levels of footnotes. I want each footnote stream (A, 
> B, C) to have a different footnote rule (separator): for level A I 
> want the separator to go from right to left (i.e. it begins at the 
> right margin, since it is an Arabic text); for level B I want a normal 
> footnote rule at the left margin; and for level C I want no footnote 
> rule at all. 
> 
> I know I am supposed to place my custom footnote rule informtion 
> before "\declarenewfootnote" (per the documentation of the manyfoot 
> package), but I am unsure of what to include in the formula for 
> \selectfootnoterule (i.e. what to place, and where) in order to 
> achieve this. 
> 
> 2. As for level A's right to left separator, I only want this to occur 
> (i.e. for it to run from right to left) in this chapter of my 
> document. How can one define a footnote separator to be changed only 
> in one chapter or section, and not universally in the whole document? 
> 
> Many thanks for your help in advance. I have included a sample 
> document below.
> 
> Kind regards,
> Talal 
> 
> --- 
> 
> % 
> % Ulysses LaTeX Export, for Theses, Using Ociamthesis & Unicode 
> % 
> 
> \TeXXeTstate=1 
> 
> \documentclass[11pt,oneside,a4paper,openright]{memoir} 
> \usepackage{fontspec} 
> 
> %%% EDNOTES %%% 
> \usepackage[modulo,right,perpage,para*]{ednotes} 
> 
> %%% POLYGLOSSIA %%% (includes bidi.sty) 
> \usepackage{polyglossia} 
> \setmainlanguage{english} 
> \setotherlanguage{arabic} 
> 
> %%% Ednotes commands %%% 
> \modulolinenumbers[1] 
> \PrecedeLevelWith{A}{\setRL} 
> 
> %% The uncommented lines below are changed for typesetting the 
> apparatus in Arabic. 
> \renewcommand*{\linesfmt}[1]{\raisebox{1ex}{\linenumberfont #1}~}% 
> \renewcommand{\lemmafmt}[1]{#1~[ }% 
> 
> %%Level B of footnotes. This customization is independant of ednotes, 
> and relates to manyfoot directly: 
> \SetFootnoteHook{\unsetRL}%--> must appear immediately before 
> \DeclareNewFootnote 
> \selectfootnoterule[1]{brick}{\rule{0mm}{0mm}{\vspace*{5mm}}} 
> \DeclareNewFootnote[para]{B} 
> \newcommand{\NOTEB}[1]{\footnoteB{#1}} 
> 
> %% Level C of footnotes. This customization is independant of ednotes, 
> and relates to manyfoot directly: 
> \SetFootnoteHook{\unsetRL}%--> must appear immediately before 
> \DeclareNewFootnote 
> \DeclareNewFootnote[para]{C}[roman] 
> \newcommand{\NOTEC}[1]{\footnoteC{#1}} 
> 
> %%% Fonts %%% 
> \setromanfont[% 
> Mapping=tex-text,% 
> %Numbers=OldStyle,% 
> %Ligatures=Common% 
> ]% 
> {Charis SIL} 
> 
> %               DOCUMENT                % 
> 
> \begin{document} 
> \begin{linenumbers} 
> \Anote{This is some text}{These are some words} which \Anote{is}{are} 
> meant to fill up the page \Anote{sufficiently}{enough} to give an 
> example of what \Anote{we'd like to do}{we need to happen}. This is 
> some\NOTEB{Here's another stream}. more\NOTEB{And another one} text. 
> \NOTEC{This marks the beginning of the main text of MSS RH.} I guess 
> that's enough now.\NOTEC{Some more notes.} 
> \end{linenumbers} 
> \end{document}
> 





More information about the XeTeX mailing list