From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/93212 Path: news.gmane.org!not-for-mail From: Mohammad Hossein Bateni Newsgroups: gmane.comp.tex.context Subject: Footnote rules for bidi document Date: Sun, 3 Jan 2016 13:22:45 -0500 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5362351043107195352==" X-Trace: ger.gmane.org 1451845424 28415 80.91.229.3 (3 Jan 2016 18:23:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Jan 2016 18:23:44 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sun Jan 03 19:23:28 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 1aFnJP-00063Y-IG for gctc-ntg-context-518@m.gmane.org; Sun, 03 Jan 2016 19:23:27 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id E48955C83; Sun, 3 Jan 2016 19:23:01 +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 HcBU5oPckveg; Sun, 3 Jan 2016 19:23:01 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 298A85CAC; Sun, 3 Jan 2016 19:23:01 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C66EE5C9B for ; Sun, 3 Jan 2016 19:22:59 +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 jAeKNrzl-9-J for ; Sun, 3 Jan 2016 19:22:58 +0100 (CET) Original-Received: from mail-ob0-f175.google.com (mail-ob0-f175.google.com [209.85.214.175]) (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 A15BA5C83 for ; Sun, 3 Jan 2016 19:22:48 +0100 (CET) Original-Received: by mail-ob0-f175.google.com with SMTP id wp13so99887013obc.1 for ; Sun, 03 Jan 2016 10:22:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=CrlJnZ6MuWoVdlujxPZ2TBSm84MSmwdF1Ze9e9rApkI=; b=sAG4kP3oRpawP9W9w0JdW3l8im5GN1BFjH4c74eExnkA+J0UZHtjagJ2F1ntxT7ypi FmN8j+Y1nuIq8O35O/A9ukCzgCNNegk/PXZ44XenVJnF4IcLhq95e4xXdL8LuuTB3PCP 6JjqaAuma5sLYbA18o7lgb3TF0D+w/9xhJuALe7RczFWFtPRE/aCECtcQNs47yk8rzID Bf5Z0m5UApCI/jHBUGMLubWvCMD5lQ/GpgmV8jHO11X4m2IMA2ftudwS9lGucmLAuN2j 01UaJYS4TDvg6oiBMUq2NJvskpV+r/rrWTCGdQcy7smcwCIDF5bAo1r29QRDqhrae/nY fWew== X-Received: by 10.60.174.130 with SMTP id bs2mr59158347oec.42.1451845365981; Sun, 03 Jan 2016 10:22:45 -0800 (PST) Original-Received: by 10.202.57.86 with HTTP; Sun, 3 Jan 2016 10:22:45 -0800 (PST) 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:93212 Archived-At: --===============5362351043107195352== Content-Type: multipart/alternative; boundary=047d7bd6c6564ee986052872178a --047d7bd6c6564ee986052872178a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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=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 footnote 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 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=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\myfootr= ule] 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! =E2=80=94MHB --047d7bd6c6564ee986052872178a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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 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 i= s RTL.=C2=A0 Is there a way this information can be obtained within a user-= defined rulecommand.=C2=A0 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.=C2=A0 When used (either left or right), the fo= otnote rule disappears.

\starttext

\definenote[a= footnote][paragraph=3Dno,rule=3Dright]

\startalignment[r2l]
right= toleft text\afootnote{\input ward }
\input tufte
\stopalignment
\startalignment[l2r]
lefttoright text\afootnote{\input ward}
\input= tufte
\stopalignment

\stoptext

I see these de= fined in=C2=A0strc-not.mkvi=C2=A0and still don't work wi= th "% macros=3Dmkvi" in the 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't notice a reference to MKVI in the = compilation output.

Back to the main question, I c= an define my own rule as follows:

\unprotect
\def\myfootrule{%=C2=A0\ifvmode
=C2=A0 =C2=A0 =C2=A0 \dontleavehmode \hskip.8\hsize\blac= krule
=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\noteparameter\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 \kern\strutdepth
=C2=A0 =C2=A0 \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.=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.

Somewhat related t= o this, I was wondering whether it's possible to define two note comman= ds, say \footnote and \afootnote, that use the same counter but are otherwi= se 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=94= MHB
--047d7bd6c6564ee986052872178a-- --===============5362351043107195352== 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= --===============5362351043107195352==--