From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/93214 Path: news.gmane.org!not-for-mail From: Mohammad Hossein Bateni Newsgroups: gmane.comp.tex.context Subject: Re: Footnote rules for bidi document Date: Sun, 3 Jan 2016 14:58:28 -0500 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6797897632469409560==" X-Trace: ger.gmane.org 1451851152 14221 80.91.229.3 (3 Jan 2016 19:59:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Jan 2016 19:59:12 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sun Jan 03 20:59:00 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aFonr-0006Ru-6I for gctc-ntg-context-518@m.gmane.org; Sun, 03 Jan 2016 20:58:59 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 483C95CD2; Sun, 3 Jan 2016 20:58:44 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tXLdq-RBXsQR; Sun, 3 Jan 2016 20:58:43 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 78A905CD3; Sun, 3 Jan 2016 20:58:43 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id BF8745CD3 for ; Sun, 3 Jan 2016 20:58:41 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FaSgVvci4mmP for ; Sun, 3 Jan 2016 20:58:40 +0100 (CET) Original-Received: from mail-oi0-f51.google.com (mail-oi0-f51.google.com [209.85.218.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 71BEB5CD2 for ; Sun, 3 Jan 2016 20:58:30 +0100 (CET) Original-Received: by mail-oi0-f51.google.com with SMTP id o124so245309249oia.1 for ; Sun, 03 Jan 2016 11:58:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=17Yx/kn2uA4oJIC83ONxAq4i+KYE1FhECDVA7lxso/0=; b=jR7zKXBWXWAYxsGM5kqMYCthakpIOCZ2oOS4jb3y8W+XtpsmCfE9Lkao75AmZQw9gj J/JPyOZTwLWHeVR8kwMwjUCGXZDR9AzG4DLV85wLatRfE9dQiH7DyZp1/jeNOsLpl2uK D+NmsJb8FCXS1DS5QjlE02txOixMrcMbFJ1aVH7HY6UVm53U7Xwra8TLEe1j3pcCMP4F NKrBKbtQ8hX28SKDYIhTloHx3PK7bBAHMDuFkozhwPaW5ydlVATQLsZR7ZBjPqH62KjV 7SjXnPWjlf2WQIU9FGIah6asBdIxBPSgfLMMRFHDAvxE4sRoQJYLqGgmBgCzVjrp6eoF sIKw== X-Received: by 10.202.83.74 with SMTP id h71mr55995467oib.115.1451851108940; Sun, 03 Jan 2016 11:58:28 -0800 (PST) Original-Received: by 10.202.57.86 with HTTP; Sun, 3 Jan 2016 11:58:28 -0800 (PST) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:93214 Archived-At: --===============6797897632469409560== Content-Type: multipart/alternative; boundary=001a113d12a49d80930528736da8 --001a113d12a49d80930528736da8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I just found out that \definenote[afootnote][rule=3D{on,right}] instead of \definenote[afootnote][rule=3Dright] 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 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 obtaine= d > within a user-defined rulecommand. Ideally I'd like a rule=3Dautodir > 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 footnot= e > rule disappears. > > \starttext > > \definenote[afootnote][paragraph=3Dno,rule=3Dright] > > \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 > and > still don't work with "% macros=3Dmkvi" in the first line of the input fi= le > 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 compilatio= n > 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=3D\noteparameter\c!rulecolor, > \c!width=3D.2\hsize, > \c!height=3D\noteparameter\c!rulethickness, > \c!depth=3D\zeropoint]% > \endgraf > \kern\strutdepth > \fi} > \protect > > Then I can use > > \definenote[afootnote][paragraph=3Dno,rule=3Dcommand,rulecommand=3D\myfoo= trule] > > 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-statemen= t > 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 counte= r > 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! > =E2=80=94MHB > --001a113d12a49d80930528736da8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I just found out that=C2=A0
=C2=A0 \definenote[afootnote][rule=3D{on,right}]
instead of
=C2=A0 \definenote[afootnote][rule=3Dright]
works and places the footnote rule= on the right-hand side.
=
Still wondering abou= t how to get automatic right/left rules.

On Sun, Jan 3, 2016 at 1:22 PM, M= ohammad 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.=C2=A0 It might as well be my fault since I didn't go through th= e entire archive and I am needless to say new to CONTEXT.

In a bidi text (Persian/English in my case), I would like the footn= ote rule to be placed on the right-hand side if and only if the first line = of the footnote text is RTL.=C2=A0 Is there a way this information can be o= btained within a user-defined rulecommand.=C2=A0 Ideally I'd like a rul= e=3Dautodir 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.=C2=A0 When used (either = left or right), the footnote rule disappears.

\starttex= t

\definenote[afootnote][paragraph=3Dno,rule=3Dright]

\starta= lignment[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=C2=A0strc-not.m= kvi=C2=A0and still don't work with "% macros=3Dmkvi" in t= he first line of the input file and when the file has extension mkvi.=C2=A0= Is this some issue of mkiv vs mkvi?=C2=A0 For what it's worth, I don&#= 39;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{%
=C2=A0\ifvmode
=C2=A0 =C2=A0 =C2= =A0 \dontleavehmode \hskip.8\hsize\blackrule
=C2=A0 =C2=A0 =C2=A0 =C2=A0= [\c!color=3D\noteparameter\c!rulecolor,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0\c!width=3D.2\hsize,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\c!height=3D\n= oteparameter\c!rulethickness,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\c!depth= =3D\zeropoint]%
=C2=A0 =C2=A0 =C2=A0 \endgraf
=C2=A0 =C2=A0 =C2=A0 \k= ern\strutdepth
=C2=A0 =C2=A0 \fi}
\protect

T= hen I can use

\definenote[afootnote][paragraph=3Dno,rule=3Dcom= mand,rulecommand=3D\myfootrule]

to get a footnote rule on the right-h= and side.=C2=A0 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.

Somewh= at 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,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CONTEXT 2015.05.18 12:26= , and
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0LuaTeX, Version beta-0.80.0 (TeX= Live 2015) (rev 5238).

Thanks a lot!
=E2=80=94MHB
=

--001a113d12a49d80930528736da8-- --===============6797897632469409560== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============6797897632469409560==--