[NTG-context] Footnote rules for bidi document

Mohammad Hossein Bateni bateni at gmail.com
Sun Jan 3 19:22:45 CET 2016


This has been previously discussed on the list but I didn't find a
resolution to the issue.  It might as well be my fault since I didn't go
through the entire archive and I am needless to say new to CONTEXT.

In a bidi text (Persian/English in my case), I would like the footnote rule
to be placed on the right-hand side if and only if the first line of the
footnote text is RTL.  Is there a way this information can be obtained
within a user-defined rulecommand.  Ideally I'd like a rule=autodir
attribute for notes in addition to the current left & right.

Speaking of which, the left & right rules do not seem to work, or I
misunderstand their point.  When used (either left or right), the footnote
rule disappears.



righttoleft text\afootnote{\input ward }
\input tufte

lefttoright text\afootnote{\input ward}
\input tufte


I see these defined in strc-not.mkvi
<http://repo.or.cz/w/context.git/blob/HEAD:/tex/context/base/strc-not.mkvi> and
still don't work with "% macros=mkvi" in the first line of the input file
and when the file has extension mkvi.  Is this some issue of mkiv vs mkvi?
For what it's worth, I don't notice a reference to MKVI in the compilation

Back to the main question, I can define my own rule as follows:

      \dontleavehmode \hskip.8\hsize\blackrule

Then I can use


to get a footnote rule on the right-hand side.  If I can figure out whether
the first line of the footnote text is RTL or LTR, an if-statement can do
the trick I want.
Somewhat related to this, I was wondering whether it's possible to define
two note commands, say \footnote and \afootnote, that use the same counter
but are otherwise completely different.

I use TeXLive 2015 on Mac OS X,
         CONTEXT 2015.05.18 12:26, and
         LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238).

Thanks a lot!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20160103/99598dc2/attachment.html>

More information about the ntg-context mailing list