ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: talazem@fastmail.fm
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: footnotes when using RtL (Arabic)
Date: Sun, 2 Aug 2015 11:02:43 +0100	[thread overview]
Message-ID: <88309209-0F41-422D-B09B-DAABDC37E8F4@fastmail.fm> (raw)
In-Reply-To: <B2C8DB27-2960-46C5-BEB0-A34A7148CC28@fastmail.fm>

[-- Attachment #1: Type: text/plain, Size: 524 bytes --]

Apologies: While the problem remains, I realise now that using "method=one" or "method=two" wasn’t having any effect because I had forgotten to add the option "align=righttoleft,” to "\setupnotations[lnote]”. Having done so, adding the method options do have an effect. But the output is still flawed; the beginning of the third note is missing at the end of the first line of the footnote, while its last few words can be seen on the second line of the footnote. See my new attachment (linenotes r2l 3,tex) below:


[-- Attachment #2: linenotes r2l 3.tex --]
[-- Type: application/octet-stream, Size: 1637 bytes --]

%%% Wolfgang & Hans' patch for R2L paragraphed footnotes (as of 20150731)
\unprotect

\unexpanded\def\leftorrightvbox{\ifconditional\displaylefttoright\expandafter\lefttorightvbox\else\expandafter\righttoleftvbox\fi}

\def\strc_notes_flush_global
 {\begingroup
  \useinterlinespaceparameter\noteparameter
  \doifelse{\noteparameter\c!paragraph}\v!yes
    {\leftorrightvbox
       {\starthboxestohbox
\iftrialtypesetting\unvcopy\else\unvbox\fi\currentnoteinsertionnumber
        \stophboxestohbox}}
{\iftrialtypesetting\unvcopied\else\unvboxed\fi\currentnoteinsertionnumber}%
  \endgroup}

\protect

%%% FONTS
\definefontfamily[mainface][serif][ALMFixed][features=arabic,range=arabic]
\setupbodyfont [mainface]

%%% BIDI

\setupdirections[bidi=global]

\startsetups[note:linenote]
  \setupdirections[bidi=global,method=two,fences=yes]
\stopsetups

\setupalign[r2l]

%%% FOOTNOTES

\definelinenote[lnote][%
	setups=note:linenote, 
	align=righttoleft,
	rule={on,right},
	paragraph=yes,
	frame=on,framecolor=yellow,
	]
\setupnotations[lnote][%
	align=righttoleft,
	alternative=serried,
	width=broad,
	distance=.5em,
	display=no,
	]

%%% THE DOCUMENT

\showframe
\starttext

هذه رسالة لطيفة ألفها العالم الكبير الفهامة النحرير.
\lnote{وهذه هي التعليقة الأولى (وهي طويلة) إلا أنها ليست صحيحة.}
هذه رسالة جامعة مانعة ألفها الشيخ الفاضل الرَّحلة.
\lnote{هذه تعليقة (ثانية).}
وهذه جملة ثالثة لأجل وضع نعليقة (جديدة).
\lnote{وهذه تعليقة (ثالثة).}

\stoptext

[-- Attachment #3: linenotes r2l 3.pdf --]
[-- Type: application/pdf, Size: 10002 bytes --]

[-- Attachment #4: Type: text/plain, Size: 1859 bytes --]




> On 2 Aug 2015, at 10:20, talazem@fastmail.fm wrote:
> 
> Thank you, Pablo, for bringing method=two to my attention. I’ve read what has been written about in on the mailing list. However, in my case, it does not solve the problem. On the document I’ve attached:
> - using method=default produces the error I raised yesterday;
> - using method=one (or method=two) seem to do nothing — the parentheses are still inversed, as if I hadn’t defined \setupdirections at all. See attached:
> 
> <linenotes r2l 2.tex><linenotes r2l 2.pdf>
> 
> 
> Talal
> 
>> On 2 Aug 2015, at 08:52, Pablo Rodriguez <oinos@gmx.es> wrote:
>> 
>> On 08/02/2015 12:36 AM, talazem@fastmail.fm wrote:
>>> I’ve run into a hiccup. In the previous MWE that worked with Woflgang and
>>> Hans’ patch, the notes were footnotes. However, if make them into
>>> linenotes, we run into a strange problem: the first note is typeset
>>> correctly, but all the remaining linenotes in that stream are typeset on
>>> the bottom left corner of the page. See attached files.
>> 
>> Hi Talal,
>> 
>> I experienced this issue before (although r2l languages are all Greek to
>> me :-().
>> 
>> \setupdirections[bidi=global, method=two] seems to fix the problem.
>> 
>> I hope it helps,
>> 
>> 
>> Pablo
>> -- 
>> http://www.ousia.tk
>> ___________________________________________________________________________________
>> 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
>> ___________________________________________________________________________________
> 


[-- Attachment #5: 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:[~2015-08-02 10:02 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-21 19:56 talazem
2015-07-30 13:00 ` talazem
2015-07-30 14:26   ` Pablo Rodriguez
2015-07-30 14:43     ` talazem
2015-07-30 15:08       ` Pablo Rodriguez
2015-07-30 17:54     ` Wolfgang Schuster
2015-07-30 18:15       ` Idris Samawi Hamid ادريس سماوي حامد
2015-07-30 18:17       ` talazem
2015-07-30 18:18       ` Pablo Rodriguez
2015-07-30 18:37       ` talazem
2015-07-30 19:04         ` Wolfgang Schuster
2015-07-30 23:51           ` talazem
2015-07-31  8:39             ` Hans Hagen
2015-07-31 11:07               ` talazem
2015-07-31 12:05                 ` Idris Samawi Hamid ادريس سماوي حامد
2015-07-31 14:47                 ` Hans Hagen
2015-08-01 22:36                 ` talazem
2015-08-02  7:52                   ` Pablo Rodriguez
2015-08-02  9:20                     ` talazem
2015-08-02 10:02                       ` talazem [this message]
2015-08-02 10:47                         ` Pablo Rodriguez
2015-08-02 11:09                           ` talazem
2015-08-02 11:11                           ` Pablo Rodriguez
2015-08-03 19:14                             ` talazem
  -- strict thread matches above, loose matches on Subject: below --
2010-10-05 12:48 Talal Al-Azem
2010-10-05 13:28 ` Wolfgang Schuster
2010-10-05 14:18   ` Talal Al-Azem
2010-10-05 14:53     ` Khaled Hosny
2010-10-05 15:07     ` Wolfgang Schuster
2010-10-05 15:18       ` Talal Al-Azem
2010-10-05 15:25       ` Hans Hagen
2010-10-05 15:55         ` Talal Al-Azem
2010-10-05 16:20           ` Hans Hagen
2010-10-05 21:19   ` Hans Hagen
2010-10-05 21:50     ` Talal Al-Azem

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=88309209-0F41-422D-B09B-DAABDC37E8F4@fastmail.fm \
    --to=talazem@fastmail.fm \
    --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).