ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* bidi in footnotes
@ 2018-06-20 21:22 Idris Samawi Hamid ادريس سماوي حامد
  2018-06-20 21:27 ` Mohammad Hossein Bateni
  2018-06-21  4:31 ` Otared Kavian
  0 siblings, 2 replies; 16+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2018-06-20 21:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

Dear gang,

In the attached/following example, bidi is not applied in the footnote:

\setupdirections[bidi=global]

\starttext
\definedfont[file:almfixed.otf*arabic at 14pt]
Test امتحان test
\startfootnote
\definedfont[file:almfixed.otf*arabic at 14pt]
Test امتحان test
\stopfootnote{}
\stoptext

Is there something else that I need to do? Thanks in advance!

[Also: Is there a way to not have to declare \definedfont twice?]

Best wishes
Idris
-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512

[-- Attachment #2: scratch.tex --]
[-- Type: application/x-tex, Size: 224 bytes --]

[-- Attachment #3: scratch.pdf --]
[-- Type: application/pdf, Size: 8329 bytes --]

[-- Attachment #4: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: bidi in footnotes
  2018-06-20 21:22 bidi in footnotes Idris Samawi Hamid ادريس سماوي حامد
@ 2018-06-20 21:27 ` Mohammad Hossein Bateni
  2018-06-21  4:31 ` Otared Kavian
  1 sibling, 0 replies; 16+ messages in thread
From: Mohammad Hossein Bateni @ 2018-06-20 21:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

maybe something like this would help:

\startsetups[bidi:footnotes]
\setupdirections[bidi=on]
\stopsetups
\setupnotes[footnote][setups=bidi:footnotes]

but I did not test it now.

‪On Wed, Jun 20, 2018 at 5:26 PM ‫Idris Samawi Hamid ادريس سماوي حامد‬‎ <
Idris.Hamid@colostate.edu> wrote:‬

> Dear gang,
>
> In the attached/following example, bidi is not applied in the footnote:
>
> \setupdirections[bidi=global]
>
> \starttext
> \definedfont[file:almfixed.otf*arabic at 14pt]
> Test امتحان test
> \startfootnote
> \definedfont[file:almfixed.otf*arabic at 14pt]
> Test امتحان test
> \stopfootnote{}
> \stoptext
>
> Is there something else that I need to do? Thanks in advance!
>
> [Also: Is there a way to not have to declare \definedfont twice?]
>
> Best wishes
> Idris
> --
> Idris Samawi Hamid, Professor
> Department of Philosophy
> Colorado State University
> Fort Collins, CO
> 80512___________________________________________________________________________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
>
> ___________________________________________________________________________________

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

[-- Attachment #2: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: bidi in footnotes
  2018-06-20 21:22 bidi in footnotes Idris Samawi Hamid ادريس سماوي حامد
  2018-06-20 21:27 ` Mohammad Hossein Bateni
@ 2018-06-21  4:31 ` Otared Kavian
  2018-06-21 12:20   ` Idris Samawi Hamid ادريس سماوي حامد
  1 sibling, 1 reply; 16+ messages in thread
From: Otared Kavian @ 2018-06-21  4:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Idriss,

As Mohammad Hossein pointed out, adding a setups solves both problems you mentioned (font declaration and bidi in footnotes):

%%%%% begin test-bidi-footnote.tex
\setupdirections[bidi=global] 
\startsetups[bidi:footnotes]
\setupdirections[bidi=on]
\definedfont[file:almfixed.otf*arabic at 14pt]
\stopsetups
\setupnotes[footnote][setups=bidi:footnotes]

\starttext
\definedfont[file:almfixed.otf*arabic at 14pt]
Test امتحان test
\startfootnote
Test امتحان test
\stopfootnote{}
\stoptext 
%%%%% end test-bidi-footnote.tex

Best regards: OK

> On 20 Jun 2018, at 23:22, ⁨Idris Samawi Hamid ادريس سماوي حامد⁩ <⁨Idris.Hamid@colostate.edu⁩> wrote:
> 
> Dear gang,
> 
> In the attached/following example, bidi is not applied in the footnote:
> 
> \setupdirections[bidi=global]
> 
> \starttext
> \definedfont[file:almfixed.otf*arabic at 14pt]
> Test امتحان test
> \startfootnote
> \definedfont[file:almfixed.otf*arabic at 14pt]
> Test امتحان test
> \stopfootnote{}
> \stoptext
> 
> Is there something else that I need to do? Thanks in advance!
> 
> [Also: Is there a way to not have to declare \definedfont twice?]
> 
> Best wishes
> Idris
> -- 
> Idris Samawi Hamid, Professor
> Department of Philosophy
> Colorado State University
> Fort Collins, CO 80512<scratch.tex><scratch.pdf>___________________________________________________________________________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: bidi in footnotes
  2018-06-21  4:31 ` Otared Kavian
@ 2018-06-21 12:20   ` Idris Samawi Hamid ادريس سماوي حامد
  2018-06-21 13:24     ` Mohammad Hossein Bateni
  2018-06-21 14:36     ` Alan Braslau
  0 siblings, 2 replies; 16+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2018-06-21 12:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen

Salaam, Mohammad Hossein, Otared,

On Wed, 20 Jun 2018 15:27:56 -0600, Mohammad Hossein Bateni  
<bateni@gmail.com> wrote:

> \startsetups[bidi:footnotes]
> \setupdirections[bidi=on]
> \stopsetups
> \setupnotes[footnote][setups=bidi:footnotes]

On Wed, 20 Jun 2018 22:31:05 -0600, Otared Kavian <otared@gmail.com> wrote:

> %%%%% begin test-bidi-footnote.tex
> \setupdirections[bidi=global]
> \startsetups[bidi:footnotes]
> \setupdirections[bidi=on]
> \definedfont[file:almfixed.otf*arabic at 14pt]
> \stopsetups
> \setupnotes[footnote][setups=bidi:footnotes]
>
> \starttext
> \definedfont[file:almfixed.otf*arabic at 14pt]
> Test امتحان test
> \startfootnote
> Test امتحان test
> \stopfootnote{}
> \stoptext
> %%%%% end test-bidi-footnote.tex

Many thanks. Question: Is this use of setups now the "official" or  
preferred way to handle footnote typography options? On the surface, it  
appears to be overkill. For the declaration

\setupdirections[bidi=global]

shouldn't that mean that bidi is applied, well, globally?

For \definedfont the behavior is less surprising, since that is obviously  
a local command. But is setups the official way to globalize the command  
(aside from typescripts or simplefonts)?

Best wishes
Idris

>> On 20 Jun 2018, at 23:22, ⁨Idris Samawi Hamid ادريس سماوي حامد⁩  
>> <⁨Idris.Hamid@colostate.edu⁩> wrote:
>>
>> Dear gang,
>>
>> In the attached/following example, bidi is not applied in the footnote:
>>
>> \setupdirections[bidi=global]
>>
>> \starttext
>> \definedfont[file:almfixed.otf*arabic at 14pt]
>> Test امتحان test
>> \startfootnote
>> \definedfont[file:almfixed.otf*arabic at 14pt]
>> Test امتحان test
>> \stopfootnote{}
>> \stoptext
>>
>> Is there something else that I need to do? Thanks in advance!
>>
>> [Also: Is there a way to not have to declare \definedfont twice?]


-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: bidi in footnotes
  2018-06-21 12:20   ` Idris Samawi Hamid ادريس سماوي حامد
@ 2018-06-21 13:24     ` Mohammad Hossein Bateni
  2018-06-21 14:36     ` Alan Braslau
  1 sibling, 0 replies; 16+ messages in thread
From: Mohammad Hossein Bateni @ 2018-06-21 13:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen


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

I believe, you would need the setups, even if you had set up typescripts.
For some reason, the environments for footnotes and marginnotes are
different from that of the main content's.

I got this solution from Wolfgang/Hans two years ago, so I suppose it's the
officially recommended way.

I do not know how heavy setupdirections is, but this method, I guess,
applies that command *once per page*.  It might be too much, but it's the
price you pay for correct bidi formatting.  For example, I hate to see that
I need to babysit page numbers (LTR) within Farsi text (RTL) in headers but
that's life.

‪On Thu, Jun 21, 2018 at 8:22 AM ‫Idris Samawi Hamid ادريس سماوي حامد‬‎ <
Idris.Hamid@colostate.edu> wrote:‬

> Salaam, Mohammad Hossein, Otared,
>
> On Wed, 20 Jun 2018 15:27:56 -0600, Mohammad Hossein Bateni
> <bateni@gmail.com> wrote:
>
> > \startsetups[bidi:footnotes]
> > \setupdirections[bidi=on]
> > \stopsetups
> > \setupnotes[footnote][setups=bidi:footnotes]
>
> On Wed, 20 Jun 2018 22:31:05 -0600, Otared Kavian <otared@gmail.com>
> wrote:
>
> > %%%%% begin test-bidi-footnote.tex
> > \setupdirections[bidi=global]
> > \startsetups[bidi:footnotes]
> > \setupdirections[bidi=on]
> > \definedfont[file:almfixed.otf*arabic at 14pt]
> > \stopsetups
> > \setupnotes[footnote][setups=bidi:footnotes]
> >
> > \starttext
> > \definedfont[file:almfixed.otf*arabic at 14pt]
> > Test امتحان test
> > \startfootnote
> > Test امتحان test
> > \stopfootnote{}
> > \stoptext
> > %%%%% end test-bidi-footnote.tex
>
> Many thanks. Question: Is this use of setups now the "official" or
> preferred way to handle footnote typography options? On the surface, it
> appears to be overkill. For the declaration
>
> \setupdirections[bidi=global]
>
> shouldn't that mean that bidi is applied, well, globally?
>
> For \definedfont the behavior is less surprising, since that is obviously
> a local command. But is setups the official way to globalize the command
> (aside from typescripts or simplefonts)?
>
> Best wishes
> Idris
>
> >> On 20 Jun 2018, at 23:22, ⁨Idris Samawi Hamid ادريس سماوي حامد⁩
> >> <⁨Idris.Hamid@colostate.edu⁩> wrote:
> >>
> >> Dear gang,
> >>
> >> In the attached/following example, bidi is not applied in the footnote:
> >>
> >> \setupdirections[bidi=global]
> >>
> >> \starttext
> >> \definedfont[file:almfixed.otf*arabic at 14pt]
> >> Test امتحان test
> >> \startfootnote
> >> \definedfont[file:almfixed.otf*arabic at 14pt]
> >> Test امتحان test
> >> \stopfootnote{}
> >> \stoptext
> >>
> >> Is there something else that I need to do? Thanks in advance!
> >>
> >> [Also: Is there a way to not have to declare \definedfont twice?]
>
>
> --
> Idris Samawi Hamid, Professor
> Department of Philosophy
> Colorado State University
> Fort Collins, CO 80512
>
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
>
> ___________________________________________________________________________________

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

[-- Attachment #2: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: bidi in footnotes
  2018-06-21 12:20   ` Idris Samawi Hamid ادريس سماوي حامد
  2018-06-21 13:24     ` Mohammad Hossein Bateni
@ 2018-06-21 14:36     ` Alan Braslau
  2018-06-22 19:01       ` Idris Samawi Hamid ادريس سماوي حامد
  1 sibling, 1 reply; 16+ messages in thread
From: Alan Braslau @ 2018-06-21 14:36 UTC (permalink / raw)
  To: Idris Samawi Hamid ادريس
	سماوي حامد
  Cc: mailing list for ConTeXt users, Hans Hagen

On Thu, 21 Jun 2018 06:20:45 -0600
Idris Samawi Hamid ادريس سماوي حامد <Idris.Hamid@colostate.edu> wrote:

> Many thanks. Question: Is this use of setups now the "official" or  
> preferred way to handle footnote typography options? On the surface,
> it appears to be overkill. For the declaration
> 
> \setupdirections[bidi=global]
> 
> shouldn't that mean that bidi is applied, well, globally?

The same holds for \setupalign[verytolerant], for example, that does
not get applied to a (figure,table) caption...

These environments (captions, footnotes, ...) inherit their settings
and then live independently.

Alan
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: bidi in footnotes
  2018-06-21 14:36     ` Alan Braslau
@ 2018-06-22 19:01       ` Idris Samawi Hamid ادريس سماوي حامد
  2018-06-22 20:13         ` Wolfgang Schuster
  2018-06-23 10:04         ` Hans Hagen
  0 siblings, 2 replies; 16+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2018-06-22 19:01 UTC (permalink / raw)
  To: Alan Braslau; +Cc: mailing list for ConTeXt users, Hans Hagen

On Thu, 21 Jun 2018 08:36:52 -0600, Alan Braslau  
<braslau.list@comcast.net> wrote:

> On Thu, 21 Jun 2018 06:20:45 -0600
> Idris Samawi Hamid ادريس سماوي حامد <Idris.Hamid@colostate.edu> wrote:
>
>> Many thanks. Question: Is this use of setups now the "official" or
>> preferred way to handle footnote typography options? On the surface,
>> it appears to be overkill. For the declaration
>>
>> \setupdirections[bidi=global]
>>
>> shouldn't that mean that bidi is applied, well, globally?
>
> The same holds for \setupalign[verytolerant], for example, that does
> not get applied to a (figure,table) caption...
>
> These environments (captions, footnotes, ...) inherit their settings
> and then live independently.

Many thanks. Is there (Hans? Wolfgang?) available somewhere

1. a complete list of these environments whose typographical settings are  
decoupled from the rest of the document?

2. a complete list of those typographical settings (bidi, whitespace,  
etc,) which are have to explicitly setup for such environments?

If not, such lists should be compiled in lieu of trial and error -)

Best wishes
Idris
-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: bidi in footnotes
  2018-06-22 19:01       ` Idris Samawi Hamid ادريس سماوي حامد
@ 2018-06-22 20:13         ` Wolfgang Schuster
  2018-06-23 12:17           ` Idris Samawi Hamid ادريس سماوي حامد
  2018-06-23 12:31           ` Idris Samawi Hamid ادريس سماوي حامد
  2018-06-23 10:04         ` Hans Hagen
  1 sibling, 2 replies; 16+ messages in thread
From: Wolfgang Schuster @ 2018-06-22 20:13 UTC (permalink / raw)
  To: Idris Samawi Hamid ادريس
	سماوي حامد
  Cc: mailing list for ConTeXt users, Hans Hagen


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


> Idris Samawi Hamid ادريس سماوي حامد <mailto:Idris.Hamid@colostate.edu>
> 22. Juni 2018 um 21:01
> On Thu, 21 Jun 2018 08:36:52 -0600, Alan Braslau 
> <braslau.list@comcast.net> wrote:
>
>
> Many thanks. Is there (Hans? Wolfgang?) available somewhere
>
> 1. a complete list of these environments whose typographical settings 
> are decoupled from the rest of the document?

The problem you mentioned isn’t limited to bidi but applies also to 
linbreaking for east asian languages (e.g. chinese) and fixing it makes 
sense.


The reason why you have to re-enable the functions is that certain 
environment disable a number of Lua attributes to avoid side effects, 
e.g. to change the footnote color when you change the text color at the 
page break.


One way to fix this is to make the attributes of the affected commands 
global which means they won’t be reseted, e.g. change the line 
(typo-dir.mkiv)

     \definesystemattribute[directions][public]

to

     \definesystemattribute[directions][public,global]


Another way is to re-enable the commands in footnotes etc.

     \appendtoks
         \ifcase\directionsbidimode \else
             \setdirection[\number\directionsbidimode]%
         \fi
     \to \everybeforenoteinsert


There are three parts in context where attributes are disabled which 
affects bidi:

1. Note inserts which affects \footnote.

2. Margin data which affects \inmargin etc.

3. The output routine which affects header and footer lines.


2. a complete list of those typographical settings (bidi, whitespace, 
etc,) which are have to explicitly setup for such environments?


Whitespace etc. are unrelated to the problem above and can be changed 
with the normal setup-commands.


Wolfgang

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

[-- Attachment #2: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: bidi in footnotes
  2018-06-22 19:01       ` Idris Samawi Hamid ادريس سماوي حامد
  2018-06-22 20:13         ` Wolfgang Schuster
@ 2018-06-23 10:04         ` Hans Hagen
  1 sibling, 0 replies; 16+ messages in thread
From: Hans Hagen @ 2018-06-23 10:04 UTC (permalink / raw)
  To: Idris Samawi Hamid ادريس
	سماوي حامد,
	Alan Braslau
  Cc: mailing list for ConTeXt users, Hans Hagen

On 6/22/2018 9:01 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
> On Thu, 21 Jun 2018 08:36:52 -0600, Alan Braslau 
> <braslau.list@comcast.net> wrote:
> 
>> On Thu, 21 Jun 2018 06:20:45 -0600
>> Idris Samawi Hamid ادريس سماوي حامد <Idris.Hamid@colostate.edu> wrote:
>>
>>> Many thanks. Question: Is this use of setups now the "official" or
>>> preferred way to handle footnote typography options? On the surface,
>>> it appears to be overkill. For the declaration
>>>
>>> \setupdirections[bidi=global]
>>>
>>> shouldn't that mean that bidi is applied, well, globally?
>>
>> The same holds for \setupalign[verytolerant], for example, that does
>> not get applied to a (figure,table) caption...
>>
>> These environments (captions, footnotes, ...) inherit their settings
>> and then live independently.
> 
> Many thanks. Is there (Hans? Wolfgang?) available somewhere
> 
> 1. a complete list of these environments whose typographical settings 
> are decoupled from the rest of the document?
> 
> 2. a complete list of those typographical settings (bidi, whitespace, 
> etc,) which are have to explicitly setup for such environments?
> 
> If not, such lists should be compiled in lieu of trial and error -)
long ago i was working with someone on a wrapup of where/how to 
use/apply directional layout and bidi and such ... seems to be stalled 
forever

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: bidi in footnotes
  2018-06-22 20:13         ` Wolfgang Schuster
@ 2018-06-23 12:17           ` Idris Samawi Hamid ادريس سماوي حامد
  2018-06-23 12:32             ` Idris Samawi Hamid ادريس سماوي حامد
  2018-06-23 13:10             ` Wolfgang Schuster
  2018-06-23 12:31           ` Idris Samawi Hamid ادريس سماوي حامد
  1 sibling, 2 replies; 16+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2018-06-23 12:17 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users, Hans Hagen

On Fri, 22 Jun 2018 14:13:22 -0600, Wolfgang Schuster  
<schuster.wolfgang@gmail.com> wrote:

> 2. a complete list of those typographical settings (bidi, whitespace,  
> etc,) which are have to explicitly setup for such environments?

> Whitespace etc. are unrelated to the problem above and can be changed  
> with the normal setup-commands.

Counterexample to whitespace attached and below:

\setupwhitespace[big]

\starttext
\input ward \par \input ward
\startfootnote
\input ward \par \input ward
\stopfootnote{}
\stoptext

Whitespace is applied in the main text but not in the footnotes. How is  
this case different from global declaration of bidi etc.? It seems these  
elements really do live in their own world now..

Again, what are the general classes of commands and guidelines governing  
what declarations are globally applied and which are not?

-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: bidi in footnotes
  2018-06-22 20:13         ` Wolfgang Schuster
  2018-06-23 12:17           ` Idris Samawi Hamid ادريس سماوي حامد
@ 2018-06-23 12:31           ` Idris Samawi Hamid ادريس سماوي حامد
  1 sibling, 0 replies; 16+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2018-06-23 12:31 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users, Hans Hagen

On Fri, 22 Jun 2018 14:13:22 -0600, Wolfgang Schuster  
<schuster.wolfgang@gmail.com> wrote:

>
>> Idris Samawi Hamid ادريس سماوي حامد <mailto:Idris.Hamid@colostate.edu>
>> 22. Juni 2018 um 21:01
>> On Thu, 21 Jun 2018 08:36:52 -0600, Alan Braslau
>> <braslau.list@comcast.net> wrote:
>>
>>
>> Many thanks. Is there (Hans? Wolfgang?) available somewhere
>>
>> 1. a complete list of these environments whose typographical settings
>> are decoupled from the rest of the document?
>
> The problem you mentioned isn’t limited to bidi but applies also to
> linbreaking for east asian languages (e.g. chinese) and fixing it makes
> sense.
>
>
> The reason why you have to re-enable the functions is that certain
> environment disable a number of Lua attributes to avoid side effects,
> e.g. to change the footnote color when you change the text color at the
> page break.
>
>
> One way to fix this is to make the attributes of the affected commands
> global which means they won’t be reseted, e.g. change the line
> (typo-dir.mkiv)
>
>      \definesystemattribute[directions][public]
>
> to
>
>      \definesystemattribute[directions][public,global]
>
>
> Another way is to re-enable the commands in footnotes etc.
>
>      \appendtoks
>          \ifcase\directionsbidimode \else
>              \setdirection[\number\directionsbidimode]%
>          \fi
>      \to \everybeforenoteinsert
>
>
> There are three parts in context where attributes are disabled which
> affects bidi:
>
> 1. Note inserts which affects \footnote.
>
> 2. Margin data which affects \inmargin etc.
>
> 3. The output routine which affects header and footer lines.

This helps: many thanks for this detailed explanation!

-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: bidi in footnotes
  2018-06-23 12:17           ` Idris Samawi Hamid ادريس سماوي حامد
@ 2018-06-23 12:32             ` Idris Samawi Hamid ادريس سماوي حامد
  2018-06-23 13:10             ` Wolfgang Schuster
  1 sibling, 0 replies; 16+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2018-06-23 12:32 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users, Hans Hagen

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

oops, attached

On Sat, 23 Jun 2018 06:17:27 -0600, Idris Samawi Hamid ادريس سماوي حامد  
<Idris.Hamid@colostate.edu> wrote:

> On Fri, 22 Jun 2018 14:13:22 -0600, Wolfgang Schuster  
> <schuster.wolfgang@gmail.com> wrote:
>
>> 2. a complete list of those typographical settings (bidi, whitespace,  
>> etc,) which are have to explicitly setup for such environments?
>
>> Whitespace etc. are unrelated to the problem above and can be changed  
>> with the normal setup-commands.
>
> Counterexample to whitespace attached and below:
>
> \setupwhitespace[big]
>
> \starttext
> \input ward \par \input ward
> \startfootnote
> \input ward \par \input ward
> \stopfootnote{}
> \stoptext
>
> Whitespace is applied in the main text but not in the footnotes. How is  
> this case different from global declaration of bidi etc.? It seems these  
> elements really do live in their own world now..
>
> Again, what are the general classes of commands and guidelines governing  
> what declarations are globally applied and which are not?
>


-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512

[-- Attachment #2: scratch.pdf --]
[-- Type: application/pdf, Size: 15000 bytes --]

[-- Attachment #3: scratch.tex --]
[-- Type: application/x-tex, Size: 133 bytes --]

[-- Attachment #4: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: bidi in footnotes
  2018-06-23 12:17           ` Idris Samawi Hamid ادريس سماوي حامد
  2018-06-23 12:32             ` Idris Samawi Hamid ادريس سماوي حامد
@ 2018-06-23 13:10             ` Wolfgang Schuster
  2018-06-23 21:49               ` Idris Samawi Hamid ادريس سماوي حامد
  1 sibling, 1 reply; 16+ messages in thread
From: Wolfgang Schuster @ 2018-06-23 13:10 UTC (permalink / raw)
  To: Idris Samawi Hamid ادريس
	سماوي حامد
  Cc: mailing list for ConTeXt users, Hans Hagen


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


> Idris Samawi Hamid ادريس سماوي حامد <mailto:Idris.Hamid@colostate.edu>
> 23. Juni 2018 um 14:17
> On Fri, 22 Jun 2018 14:13:22 -0600, Wolfgang Schuster 
> <schuster.wolfgang@gmail.com> wrote:
>
>> 2. a complete list of those typographical settings (bidi, whitespace, 
>> etc,) which are have to explicitly setup for such environments?
>
>> Whitespace etc. are unrelated to the problem above and can be changed 
>> with the normal setup-commands.
>
> Counterexample to whitespace attached and below:
>
> \setupwhitespace[big]
>
> \starttext
> \input ward \par \input ward
> \startfootnote
> \input ward \par \input ward
> \stopfootnote{}
> \stoptext
>
> Whitespace is applied in the main text but not in the footnotes. How 
> is this case different from global declaration of bidi etc.? It seems 
> these elements really do live in their own world now..

This would lead to other side effects shown in the following example.

When you use the global whitespace settings in footnotes you get the 
same space between each footnote entry. What can be done is to add a 
whitespace key to setupnote which is easier than using setups-environment.

\definedescription[Spaced][before=,after=]

\starttext

\startSpaced
First entry.
\stopSpaced

\startSpaced
Second entry.
\stopSpaced

\blank[2*line]

\setupwhitespace[big]

\startSpaced
Third entry.
\stopSpaced

\startSpaced
Fourth entry.
\stopSpaced

\stoptext

Wolfgang

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

[-- Attachment #2: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: bidi in footnotes
  2018-06-23 13:10             ` Wolfgang Schuster
@ 2018-06-23 21:49               ` Idris Samawi Hamid ادريس سماوي حامد
  2018-06-27  8:03                 ` Wolfgang Schuster
  0 siblings, 1 reply; 16+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2018-06-23 21:49 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users, Hans Hagen

On Sat, 23 Jun 2018 07:10:27 -0600, Wolfgang Schuster  
<schuster.wolfgang@gmail.com> wrote:

>> Idris Samawi Hamid ادريس سماوي حامد <mailto:Idris.Hamid@colostate.edu>
>> 23. Juni 2018 um 14:17
>> On Fri, 22 Jun 2018 14:13:22 -0600, Wolfgang Schuster
>> <schuster.wolfgang@gmail.com> wrote:
>>
>>> 2. a complete list of those typographical settings (bidi, whitespace,
>>> etc,) which are have to explicitly setup for such environments?
>>
>>> Whitespace etc. are unrelated to the problem above and can be changed
>>> with the normal setup-commands.
>>
>> Counterexample to whitespace attached and below:
>>
>> \setupwhitespace[big]
>>
>> \starttext
>> \input ward \par \input ward
>> \startfootnote
>> \input ward \par \input ward
>> \stopfootnote{}
>> \stoptext
>>
>> Whitespace is applied in the main text but not in the footnotes. How
>> is this case different from global declaration of bidi etc.? It seems
>> these elements really do live in their own world now..
>
> This would lead to other side effects shown in the following example.

Yes, ok.

> When you use the global whitespace settings in footnotes you get the
> same space between each footnote entry. What can be done is to add a
> whitespace key to setupnote which is easier than using  
> setups-environment.

Could this be a feature request then? So

\setupnote[whitespace=big,bidi=on]

[Although in the case of bidi I still think that one declaration of  
bidi=global at the beginning of the document should radiate to all other  
elements, except as otherwise configured through their \setup<command>'s  
etc.]

Many thanks for the explanations.

Best wishes
Idris
-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: bidi in footnotes
  2018-06-23 21:49               ` Idris Samawi Hamid ادريس سماوي حامد
@ 2018-06-27  8:03                 ` Wolfgang Schuster
  2018-06-27 19:24                   ` Idris Samawi Hamid ادريس سماوي حامد
  0 siblings, 1 reply; 16+ messages in thread
From: Wolfgang Schuster @ 2018-06-27  8:03 UTC (permalink / raw)
  To: Idris Samawi Hamid ادريس
	سماوي حامد
  Cc: mailing list for ConTeXt users


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


> Idris Samawi Hamid ادريس سماوي حامد <mailto:Idris.Hamid@colostate.edu>
> 23. Juni 2018 um 23:49
> On Sat, 23 Jun 2018 07:10:27 -0600, Wolfgang Schuster 
> <schuster.wolfgang@gmail.com> wrote:
>
>> When you use the global whitespace settings in footnotes you get the
>> same space between each footnote entry. What can be done is to add a
>> whitespace key to setupnote which is easier than using 
>> setups-environment.
>
> Could this be a feature request then? So
>
> \setupnote[whitespace=big,bidi=on]
I forgot that you can set the whitespace also with the style-key from 
\setupnotation.

\setupnotation[footnote][style={\setupwhitespace[line]}]

\starttext
\input ward\footnote{\input{knuth}}
\stoptext

Wolfgang

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

[-- Attachment #2: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: bidi in footnotes
  2018-06-27  8:03                 ` Wolfgang Schuster
@ 2018-06-27 19:24                   ` Idris Samawi Hamid ادريس سماوي حامد
  0 siblings, 0 replies; 16+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2018-06-27 19:24 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

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

On Wed, 27 Jun 2018 02:03:32 -0600, Wolfgang Schuster  
<schuster.wolfgang@gmail.com> wrote:

>
>> Idris Samawi Hamid ادريس سماوي حامد <mailto:Idris.Hamid@colostate.edu>
>> 23. Juni 2018 um 23:49
>> On Sat, 23 Jun 2018 07:10:27 -0600, Wolfgang Schuster
>> <schuster.wolfgang@gmail.com> wrote:
>>
>>> When you use the global whitespace settings in footnotes you get the
>>> same space between each footnote entry. What can be done is to add a
>>> whitespace key to setupnote which is easier than using
>>> setups-environment.
>>
>> Could this be a feature request then? So
>>
>> \setupnote[whitespace=big,bidi=on]
> I forgot that you can set the whitespace also with the style-key from
> \setupnotation.
>
> \setupnotation[footnote][style={\setupwhitespace[line]}]
>
> \starttext
> \input ward\footnote{\input{knuth}}
> \stoptext

Many thanks. Although bidi is not technically a "style" option, and one  
may be accused of mixing apples and oranges here, decided to test - see  
attached and below:

=======
\setupdirections[bidi=global]
\setupwhitespace[big]
\setupnotation[footnote][style={\setupwhitespace[big],\setupdirections[bidi=global]}]

\starttext
\definedfont[file:almfixed.otf*arabic at 14pt]
Test امتحان test \par Test امتحان test
\startfootnote
\definedfont[file:almfixed.otf*arabic at 14pt]
Test امتحان test \par Test امتحان test
\stopfootnote{}
\stoptext
=======

Why does bidi=global get applied to the second paragraph of the footnote,  
but not to the first?

Idris
-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512

[-- Attachment #2: scratch.tex --]
[-- Type: application/x-tex, Size: 388 bytes --]

[-- Attachment #3: scratch.pdf --]
[-- Type: application/pdf, Size: 8354 bytes --]

[-- Attachment #4: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-06-27 19:24 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-20 21:22 bidi in footnotes Idris Samawi Hamid ادريس سماوي حامد
2018-06-20 21:27 ` Mohammad Hossein Bateni
2018-06-21  4:31 ` Otared Kavian
2018-06-21 12:20   ` Idris Samawi Hamid ادريس سماوي حامد
2018-06-21 13:24     ` Mohammad Hossein Bateni
2018-06-21 14:36     ` Alan Braslau
2018-06-22 19:01       ` Idris Samawi Hamid ادريس سماوي حامد
2018-06-22 20:13         ` Wolfgang Schuster
2018-06-23 12:17           ` Idris Samawi Hamid ادريس سماوي حامد
2018-06-23 12:32             ` Idris Samawi Hamid ادريس سماوي حامد
2018-06-23 13:10             ` Wolfgang Schuster
2018-06-23 21:49               ` Idris Samawi Hamid ادريس سماوي حامد
2018-06-27  8:03                 ` Wolfgang Schuster
2018-06-27 19:24                   ` Idris Samawi Hamid ادريس سماوي حامد
2018-06-23 12:31           ` Idris Samawi Hamid ادريس سماوي حامد
2018-06-23 10:04         ` Hans Hagen

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).