Re: [NTG-context] bidi + protrusion issue in LMTX

2020-03-03 Thread Hans Hagen

On 3/2/2020 8:30 PM, Joseph wrote:

Hi,

I found that in some cases bidi text seems to inhibit protrusion feature 
in text typesetting in LMTX (works fine with luatex 1.10).


MWE below (difference is in first paragraph, second is for comparison 
and is same in both):


\language[fr]

\mainlanguage[fr]

\definefontfamily[mainfont][serif][EBGaramond][features={protrusion=quality, 
expansion=quality}]

you best can do this if you also want kerns:

\definefontfeature[mydefault][default][protrusion=quality,expansion=quality]

\definefontfamily[mainfont][serif][EBGaramond][features=mydefault]

anyway, i'll look at it

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
___


[NTG-context] bidi + protrusion issue in LMTX

2020-03-02 Thread Joseph
Hi, I found that in some cases bidi text seems to inhibit protrusion feature in text typesetting in LMTX (works fine with luatex 1.10).MWE below (difference is in first paragraph, second is for comparison and is same in both): \language[fr]\mainlanguage[fr] \definefontfamily[mainfont][serif][EBGaramond][features={protrusion=quality, expansion=quality}] \setupbodyfont[mainfont, 14pt] \def\HSize{108.78508pt} % hardcoded from page layout \starttext \hsize=\HSize\setupalign[normal, hanging, morehyphenation, hz, verytolerant, stretch] ou/ vehement car {\setupalign[r2l]mehev} se prent aucunesfoispour hault/ excellent/ & puissant. ou/ vehement car vehem se prent aucunesfoispour hault/ excellent/ & puissant. \stoptext Best Joseph 
___
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
___


Re: [NTG-context] Bidi-related register problem

2019-01-27 Thread Hans Hagen

On 1/27/2019 7:15 PM, Rik Kabel wrote:

That allows the compilation to complete, but method=three breaks other 
stuff. Try this:


\starttext
\setupdirections [bidi=on,method=three]
\rightaligned{(( How is this?}
\stoptext

(I also see problems with boxes set in the margin where before they were 
set centered in the textblock, but cannot construct an example yet.)

small samples will help (after i updated the beta)

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
___

Re: [NTG-context] Bidi-related register problem

2019-01-27 Thread Rik Kabel

On 1/27/2019 12:07, Hans Hagen wrote:

On 1/27/2019 12:59 AM, Rik Kabel wrote:

Here is a much-closer-to minimal example.


  \setupregister   [index] [maxwidth=4cm]
  \setupdirections [bidi=on,method=two]
  \starttext
  .\index{Mairzy doats and dozy doats and liddle lamzy divey}
  \placeindex
  \stoptext

With the \setupdirections line removed, all is well. However, that 
line is otherwise required. Setting bidi off around \placeindex is 
not an option either, since some index entries require it.
Tricky ... i'll catch it but better use method tree then (later this 
year i might redo some r2l code)


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
-


That allows the compilation to complete, but method=three breaks other 
stuff. Try this:


   \starttext
   \setupdirections [bidi=on,method=three]
   \rightaligned{(( How is this?}
   \stoptext

(I also see problems with boxes set in the margin where before they were 
set centered in the textblock, but cannot construct an example yet.)


--
Rik

___
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
___

Re: [NTG-context] Bidi-related register problem

2019-01-27 Thread Hans Hagen

On 1/27/2019 12:59 AM, Rik Kabel wrote:

Here is a much-closer-to minimal example.


  \setupregister   [index] [maxwidth=4cm]
  \setupdirections [bidi=on,method=two]
  \starttext
  .\index{Mairzy doats and dozy doats and liddle lamzy divey}
  \placeindex
  \stoptext

With the \setupdirections line removed, all is well. However, that line 
is otherwise required. Setting bidi off around \placeindex is not an 
option either, since some index entries require it.
Tricky ... i'll catch it but better use method tree then (later this 
year i might redo some r2l code)


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
___

Re: [NTG-context] Bidi-related register problem

2019-01-26 Thread Rik Kabel

And shorter still, isolating the problem to something in \limitatetext:

 \setupdirections [bidi=on,method=two]
 \starttext
 \limitatetext {Mairzy doats and dozy doats and liddle lamzy divey} {4cm}
 \stoptext

--
Rik

___
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
___

Re: [NTG-context] Bidi-related register problem

2019-01-26 Thread Rik Kabel

Here is a much-closer-to minimal example.


 \setupregister   [index] [maxwidth=4cm]
 \setupdirections [bidi=on,method=two]
 \starttext
 .\index{Mairzy doats and dozy doats and liddle lamzy divey}
 \placeindex
 \stoptext

With the \setupdirections line removed, all is well. However, that line 
is otherwise required. Setting bidi off around \placeindex is not an 
option either, since some index entries require it.



--
Rik Kabel

___
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
___

[NTG-context] Bidi-related register problem

2019-01-24 Thread Rik Kabel
Recent betas have introduced a bidi-related problem with register 
processing.


In the following example, compilation generates a recoverable error when 
register processing has to trim an entry to fit maxwidth. The error is:


luatex warning  > node filter: error: 
...eXt/tex/texmf-context/tex/context/base/mkiv/typo-dub.lua:496: attempt to index 
local 'stacktop' (a nil value)

Removing the maxwidth constraint, or setting it to a much wider value, 
allows error-free compilation.


Without \setupdirections[bidi=on,method=two] there is no problem, but 
without it RTL texts are not handled properly. This is a recent change; 
bidi=global worked a few months ago. (I have not tried with LTR text in 
a default-RTL document).


   % macros=mkvi
   \defineregister[Mindex]
   \setupregister [Mindex]
   [n=2,
maxwidth=4cm,
balance=no]

   \starttexdefinition unexpanded MIndex
  \dosinglegroupempty\doMIndex
   \stoptexdefinition

   \starttexdefinition unexpanded doMIndex #MARKER
  \def\Marker{#MARKER}%
  \dosinglegroupempty\doMIndexFull
   \stoptexdefinition

   \starttexdefinition doMIndexFull #ITEM
  \doifelse{#ITEM}{}
{\expanded{\Mindex{\Marker}}}
{\expanded{\Mindex{\Marker+#ITEM}}}
   \stoptexdefinition

   \setupdirections [bidi=on,method=two]

   \setupbodyfont   [libertinus,11pt]

   \starttext

   \startparagraph
  \MIndex{One}{Mairzy doats and dozy doats and liddle lamzy divey}

  \input jojomayer

   \stopparagraph

   \startparagraph
   סלאם שלום
   \stopparagraph

   \placeregister[Mindex]
   \stoptext

--
Rik Kabel


___
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
___

Re: [NTG-context] bidi in footnotes

2018-06-27 Thread Idris Samawi Hamid ادريس سماوي حامد
On Wed, 27 Jun 2018 02:03:32 -0600, Wolfgang Schuster  
 wrote:





Idris Samawi Hamid ادريس سماوي حامد 
23. Juni 2018 um 23:49
On Sat, 23 Jun 2018 07:10:27 -0600, Wolfgang Schuster
 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

scratch.tex
Description: TeX document


scratch.pdf
Description: Adobe PDF document
___
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
___

Re: [NTG-context] bidi in footnotes

2018-06-27 Thread Wolfgang Schuster



Idris Samawi Hamid ادريس سماوي حامد 
23. Juni 2018 um 23:49
On Sat, 23 Jun 2018 07:10:27 -0600, Wolfgang Schuster 
 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
___
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
___

Re: [NTG-context] bidi in footnotes

2018-06-23 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sat, 23 Jun 2018 07:10:27 -0600, Wolfgang Schuster  
 wrote:



Idris Samawi Hamid ادريس سماوي حامد 
23. Juni 2018 um 14:17
On Fri, 22 Jun 2018 14:13:22 -0600, Wolfgang Schuster
 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'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
___

Re: [NTG-context] bidi in footnotes

2018-06-23 Thread Wolfgang Schuster



Idris Samawi Hamid ادريس سماوي حامد 
23. Juni 2018 um 14:17
On Fri, 22 Jun 2018 14:13:22 -0600, Wolfgang Schuster 
 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
___
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
___

Re: [NTG-context] bidi in footnotes

2018-06-23 Thread Idris Samawi Hamid ادريس سماوي حامد

oops, attached

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


On Fri, 22 Jun 2018 14:13:22 -0600, Wolfgang Schuster  
 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

scratch.pdf
Description: Adobe PDF document


scratch.tex
Description: TeX document
___
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
___

Re: [NTG-context] bidi in footnotes

2018-06-23 Thread Idris Samawi Hamid ادريس سماوي حامد
On Fri, 22 Jun 2018 14:13:22 -0600, Wolfgang Schuster  
 wrote:





Idris Samawi Hamid ادريس سماوي حامد 
22. Juni 2018 um 21:01
On Thu, 21 Jun 2018 08:36:52 -0600, Alan Braslau
 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
___

Re: [NTG-context] bidi in footnotes

2018-06-23 Thread Idris Samawi Hamid ادريس سماوي حامد
On Fri, 22 Jun 2018 14:13:22 -0600, Wolfgang Schuster  
 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
___

Re: [NTG-context] bidi in footnotes

2018-06-23 Thread Hans Hagen

On 6/22/2018 9:01 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
On Thu, 21 Jun 2018 08:36:52 -0600, Alan Braslau 
 wrote:



On Thu, 21 Jun 2018 06:20:45 -0600
Idris Samawi Hamid ادريس سماوي حامد  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
___

Re: [NTG-context] bidi in footnotes

2018-06-22 Thread Wolfgang Schuster



Idris Samawi Hamid ادريس سماوي حامد 
22. Juni 2018 um 21:01
On Thu, 21 Jun 2018 08:36:52 -0600, Alan Braslau 
 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
___
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
___

Re: [NTG-context] bidi in footnotes

2018-06-22 Thread Idris Samawi Hamid ادريس سماوي حامد
On Thu, 21 Jun 2018 08:36:52 -0600, Alan Braslau  
 wrote:



On Thu, 21 Jun 2018 06:20:45 -0600
Idris Samawi Hamid ادريس سماوي حامد  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
___

Re: [NTG-context] bidi in footnotes

2018-06-21 Thread Alan Braslau
On Thu, 21 Jun 2018 06:20:45 -0600
Idris Samawi Hamid ادريس سماوي حامد  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
___

Re: [NTG-context] bidi in footnotes

2018-06-21 Thread Mohammad Hossein Bateni
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.ha...@colostate.edu> wrote:‬

> Salaam, Mohammad Hossein, Otared,
>
> On Wed, 20 Jun 2018 15:27:56 -0600, Mohammad Hossein Bateni
>  wrote:
>
> > \startsetups[bidi:footnotes]
> > \setupdirections[bidi=on]
> > \stopsetups
> > \setupnotes[footnote][setups=bidi:footnotes]
>
> On Wed, 20 Jun 2018 22:31:05 -0600, Otared Kavian 
> 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.ha...@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
>
> ___
___
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
___

Re: [NTG-context] bidi in footnotes

2018-06-21 Thread Idris Samawi Hamid ادريس سماوي حامد

Salaam, Mohammad Hossein, Otared,

On Wed, 20 Jun 2018 15:27:56 -0600, Mohammad Hossein Bateni  
 wrote:



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


On Wed, 20 Jun 2018 22:31:05 -0600, Otared Kavian  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.ha...@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
___

Re: [NTG-context] bidi in footnotes

2018-06-20 Thread Otared Kavian
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.ha...@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
> ___

___
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
___

Re: [NTG-context] bidi in footnotes

2018-06-20 Thread Mohammad Hossein Bateni
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.ha...@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
>
> ___
___
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
___

[NTG-context] bidi in footnotes

2018-06-20 Thread Idris Samawi Hamid ادريس سماوي حامد

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
Description: TeX document


scratch.pdf
Description: Adobe PDF document
___
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
___

Re: [NTG-context] bidi protocols

2018-06-07 Thread Hans Hagen

On 6/7/2018 3:20 AM, Idris Samawi Hamid ادريس سماوي حامد wrote:

Greetings,

mtx-context | current version: 2018.06.02 22:34

In the following, bidi does not work:

===
\setupdirections[bidi=global]

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

\righttoleft
Test امتحان test
\stoptext
===

See attached. This used to work: Is there a new protocol or something 
that I'm missing? Thank you in advance.

fixed in next beta



-
  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
___

[NTG-context] bidi protocols

2018-06-06 Thread Idris Samawi Hamid ادريس سماوي حامد

Greetings,

mtx-context | current version: 2018.06.02 22:34

In the following, bidi does not work:

===
\setupdirections[bidi=global]

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

\righttoleft
Test امتحان test
\stoptext
===

See attached. This used to work: Is there a new protocol or something that  
I'm missing? Thank you in advance.


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

scratch.pdf
Description: Adobe PDF document


scratch.tex
Description: TeX document
___
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
___

[NTG-context] bidi

2013-09-13 Thread Hans Hagen

Hi,

-- experimental fix for framed inline direction (at some point we will 
come up with a more precise description .. also, only use the already 
posted boxing macros, don't rely on low level box + dir spec as context 
keep a state of directions independently of tex)


-- fix for marks on fonts like dejavumono that have fixed width glyphs 
(so also marks with widths but lacking positioning) .. beware: such 
fotns are monospaced so you get funny side effects with left/right 
spacing due to some characters not being centered in their 
wider-than-needed-as-fixed boundingbox .. also beware of bugs in mkmk 
(last night idris and i spend quit esome hours on nailing these issues 
down)


-- there is something fuzzy with arial, also in ms toolchains, at 
different scales, etc etc ... anyhow, for testing best use a decent 
font, like arabtype, not arial


-- not all complex bidi stuff will be solved in the bidi default 
methods, use method one or two if applicable


-- some more things done

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___