ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: R2L footnotes
Date: Mon, 8 Aug 2011 16:57:19 +0200	[thread overview]
Message-ID: <AAB0D9F2-6CBF-4C43-9C84-B915E4789A44@googlemail.com> (raw)
In-Reply-To: <20110806200537.GA14901@khaled-laptop>


Am 06.08.2011 um 22:05 schrieb Khaled Hosny:

> There are two issues with right-to-left fontnotes, 1) the footnote
> number gets somewhere in the middle of the footnote text instead of
> being in the right margin 2) the footnote rule is left aligned:
> 
> \setupalign[r2l]
> \starttext
> Text\footnote{Note}
> \stoptext

strc-not.mkiv:

\def\letcurrentnoterulecommand{\expandafter\let\csname\??vn\c!rule:c:\currentnote\endcsname}
+\def\letcurrentnoterulealign  {\expandafter\let\csname\??vn\c!rule:a:\currentnote\endcsname}

\appendtoks
    \letvalue{\??vn\c!rule:c:\currentnote}\currentnoterulecommandnormal
    \letvalue{\??vn\c!rule:a:\currentnote}\lefttoright
\to \everysetupnote

\appendtoks
- \processallactionsinset[\noteparameter\c!rule]
+ \normalexpanded{\noexpand\processallactionsinset[\noteparameter\c!rule]}
    [     \v!on=>\letcurrentnoterulecommand\currentnoterulecommandnormal,
      \v!normal=>\letcurrentnoterulecommand\currentnoterulecommandnormal,
-       \v!left=>\letcurrentnoterulecommand\lefttoright,
-      \v!right=>\letcurrentnoterulecommand\righttoleft,
+       \v!left=>\letcurrentnoterulealign  \lefttoright,
+      \v!right=>\letcurrentnoterulealign  \righttoleft,
         \v!off=>\letcurrentnoterulecommand\relax,
     \s!default=>\letcurrentnoterulecommand\relax,
     \s!unknown=>\letcurrentnoterulecommand\currentnoterulecommandunknown]%
\to \everysetupnote

Example:

\setupalign[r2l]
\setupnote[footnote][rule={on,right}]
\setupnotedefinition[footnote][location=left,command={\smash[w]}] % !!!
\starttext \showframe
Text\footnote{Note}
\stoptext

Wolfgang

___________________________________________________________________________________
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:[~2011-08-08 14:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-06 20:05 Khaled Hosny
2011-08-08 14:57 ` Wolfgang Schuster [this message]
2011-08-08 16:06   ` Khaled Hosny
2011-08-08 16:44     ` Wolfgang Schuster
2011-08-08 22:02       ` Hans Hagen
2011-08-08 23:51       ` Hans Hagen
2011-08-23 20:58         ` Khaled Hosny
2011-08-24  4:19           ` Wolfgang Schuster
2011-08-24  4:29             ` Khaled Hosny
2011-08-08 21:59     ` Hans Hagen
2011-08-08 21:58   ` Hans Hagen

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=AAB0D9F2-6CBF-4C43-9C84-B915E4789A44@googlemail.com \
    --to=schuster.wolfgang@googlemail.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).