ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mohammad Hossein Bateni <bateni@gmail.com>
To: ntg-context@ntg.nl
Subject: Re: Footnote rules for bidi document
Date: Sun, 3 Jan 2016 14:58:28 -0500	[thread overview]
Message-ID: <CAMHZ1dZdiO-QPR5i2gnvn7cBR1_BEEKroZXtTAN7JTWm2UHEng@mail.gmail.com> (raw)
In-Reply-To: <CAMHZ1dY9tZF1SCW4ygfiCZN7+qrPYebYL9+hSt3583tdx0E_yg@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2827 bytes --]

I just found out that
  \definenote[afootnote][rule={on,right}]
instead of
  \definenote[afootnote][rule=right]
works and places the footnote rule on the right-hand side.

Still wondering about how to get automatic right/left rules.

On Sun, Jan 3, 2016 at 1:22 PM, Mohammad Hossein Bateni <bateni@gmail.com>
wrote:

> Hi,
>
> 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.
>
> \starttext
>
> \definenote[afootnote][paragraph=no,rule=right]
>
> \startalignment[r2l]
> righttoleft text\afootnote{\input ward }
> \input tufte
> \stopalignment
>
> \startalignment[l2r]
> lefttoright text\afootnote{\input ward}
> \input tufte
> \stopalignment
>
> \stoptext
>
> 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
> output.
>
> Back to the main question, I can define my own rule as follows:
>
> \unprotect
> \def\myfootrule{%
>  \ifvmode
>       \dontleavehmode \hskip.8\hsize\blackrule
>         [\c!color=\noteparameter\c!rulecolor,
>          \c!width=.2\hsize,
>          \c!height=\noteparameter\c!rulethickness,
>          \c!depth=\zeropoint]%
>       \endgraf
>       \kern\strutdepth
>     \fi}
> \protect
>
> Then I can use
>
> \definenote[afootnote][paragraph=no,rule=command,rulecommand=\myfootrule]
>
> 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!
> —MHB
>

[-- Attachment #1.2: Type: text/html, Size: 3887 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2016-01-03 19:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-03 18:22 Mohammad Hossein Bateni
2016-01-03 19:58 ` Mohammad Hossein Bateni [this message]
2016-01-03 22:25   ` Hans Hagen
2016-01-04  0:00     ` Mohammad Hossein Bateni
2016-01-04 14:36       ` Hans Hagen
2016-01-04 16:21         ` Mohammad Hossein Bateni
2016-01-09  2:15           ` Mohammad Hossein Bateni
2016-01-09 13:07             ` Hans Hagen
2016-01-09 15:21               ` Mohammad Hossein Bateni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMHZ1dZdiO-QPR5i2gnvn7cBR1_BEEKroZXtTAN7JTWm2UHEng@mail.gmail.com \
    --to=bateni@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).