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

Alan Munn amunn at gmx.com
Mon Jul 26 16:16:44 CEST 2010

On Jul 26, 2010, at 7:53 AM, talazem at fastmail.fm wrote:

> Hello Alan,
>
> Beautiful. Yes, it now works perfectly, and without any errors.
> Thank you so much.

Good.  I'm glad it does what you need.

>
> Perhaps even more importantly in the long run, I have learnt a bit
> about making newcommands for the footnote rules. In order for me to
> further this education on my own, where would I have had to look to
> know about how to write commands such as:
> 	\makeatletter
> 	\newcommand\lftfootnoterule{\left at footnoterule}
> 	\newcommand\rtfootnoterule{\right at footnoterule}
> 	\newcommand{\SelectAnoteRule}{[1]{rt}}
> 	\makeatother
>
> In the LaTeX Companions 2nd ed? In the TeXBook? In the manyfoot,
> bigfoot, or ednotes documentation? It was those commands in
> particular I knew I had to define, but I had no idea how (i.e. the
> form or the content), or how to cause them to interact with Bidi.

Well this is a tricky question to answer. In trying to solve your
problem, I started with your original document and the ednotes,
manyfoot and bidi documentation.  Since I couldn't get things to work
using user commands (i.e. strictly those in the user documentation,
specifically the bidi commands \rightfootnoterule and
\leftfootnoterule), I looked into the actual code of bidi, which led
me to the file footnote-xetex-bidi.def.  From there I got the relevant
bidi internal commands.  The rest was figured out by reading the
ednotes documentation; specifically the extensive comments in the
ednotes.sty file.

Unfortunately this procedure is not one I would recommend to anyone,
but it sometimes is what is needed to get conflicting packages to work
together.    It's a process of trial and error, intuition and
experience that is hard to come by from reading books.  You can learn
a lot from other people's code, though.

The other thing to keep in mind, is that just as I have helped you,
others have helped me (and will continue to do so, I'm sure).  So you
don't always have to be able to solve all of your own problems. :-)

Alan

--
Alan Munn
amunn at gmx.com