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] TABLE: centering splitted TABLE

2018-06-21 Thread Wolfgang Schuster

Remove the alignment environment, floats are centered by default.

Wolfgang

Procházka Lukáš Ing. 
9. Juni 2018 um 20:33
Hello,

I have two questions about TABLEs. Suppose having the following code:


\setuplayout[page]

 



\starttext
  \startalignment[middle]
\dontleavehmode
\bTABLE[before=,after=,inbetween=]
  \bTABLEbody
\dorecurse{10}{
  \bTR
\bTD aaa\eTD
\bTD bbb\eTD
  \eTR
}
  \eTABLEbody
\eTABLE
\crlf
\bTABLE[before=,after=,inbetween=]
  \bTABLEbody
\bTR
  \bTD AAA\eTD
  \bTD BBB\eTD
\eTR
  \eTABLEbody
\eTABLE
  \stopalignment
  %
  \page
  \startalignment[middle]
\dontleavehmode
\bTABLE[split=yes]
  \bTABLEbody
\dorecurse{60}{
  \bTR
\bTD uuu\eTD
\bTD vvv\eTD
  \eTR
}
  \eTABLEbody
\eTABLE
  \stopalignment
\stoptext


- How to make the "uuu - vvv" table - which goes into several pages - 
centered on each page, like "aaa - bbb" (non splitting) table is?


- How to suppress the vertical space between the last row of "aaa - 
bbb" table and the first row of the "AAA - BBB" table?


(I'm trying to typeset some picture playing cards, so usual 
typographic rules don't apply here...)


Any help would be appreciated.

Best regards,

Lukas


___
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
___
Procházka Lukáš Ing. 
20. Juni 2018 um 07:43
Hello,

On Sat, 09 Jun 2018 20:33:30 +0200, Procházka Lukáš Ing. 
 wrote:



any reaction?

E.g.
"splitted TABLE cannot be centered on pages - the alg is not 
implemented, and won't be" or
"splitted TABLE cannot be centered on pages - the alg is not 
implemented, but will be" or
"splitted TABLE cannot be centered on pages - use xtable instead with 
[key=value]" or
"use \setupTABLE[something=here] - it will center splitted TABLE on 
each page"?


Best regards,

Lukas


Wolfgang Schuster 
20. Juni 2018 um 07:59


Place the table as float and disable the caption, e.g.

\startplacetable[location={split,force,none}]
...
\stopplacetable

Wolfgang
Procházka Lukáš Ing. 
21. Juni 2018 um 11:10
Hello,

thanks, it works:


  \startalignment[middle]
\startplacetable[location={split,force,none}]
  \bTABLE[split=repeat]
\bTABLEhead
  \bTR\bTH A\eTH\bTH B\eTH\eTR
\eTABLEhead
\bTABLEbody
  \dorecurse{60}{
\bTR
  \bTD uuu\eTD
  \bTD vvv\eTD
\eTR
  }
\eTABLEbody
  \eTABLE
\stopplacetable
  \stopalignment


Best regards,

Lukas


On Wed, 20 Jun 2018 07:59:28 +0200, Wolfgang Schuster 
 wrote:






___
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] TABLE: centering splitted TABLE; suppressing vertical space btw two TABLEs

2018-06-21 Thread Procházka Lukáš Ing .

Hello,

On Wed, 20 Jun 2018 13:13:08 +0200, Aditya Mahajan  wrote:


- How to suppress the vertical space between the last row of "aaa - bbb"
table and the first row of the "AAA - BBB" table?


(Untested) Try `\blank[none]` instead of `\crlf`.

Aditya


actually, \blank[none] was not "enough", \blank[-1pt] dismissed the empty space.

Thank you for inspiration.

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
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] TABLE: centering splitted TABLE

2018-06-21 Thread Procházka Lukáš Ing .

Hello,

thanks, it works:


  \startalignment[middle]
\startplacetable[location={split,force,none}]
  \bTABLE[split=repeat]
\bTABLEhead
  \bTR\bTH A\eTH\bTH B\eTH\eTR
\eTABLEhead
\bTABLEbody
  \dorecurse{60}{
\bTR
  \bTD uuu\eTD
  \bTD vvv\eTD
\eTR
  }
\eTABLEbody
  \eTABLE
\stopplacetable
  \stopalignment


Best regards,

Lukas


On Wed, 20 Jun 2018 07:59:28 +0200, Wolfgang Schuster 
 wrote:




Procházka Lukáš Ing. 
20. Juni 2018 um 07:43
Hello,

On Sat, 09 Jun 2018 20:33:30 +0200, Procházka Lukáš Ing.
 wrote:


any reaction?

E.g.
"splitted TABLE cannot be centered on pages - the alg is not
implemented, and won't be" or
"splitted TABLE cannot be centered on pages - the alg is not
implemented, but will be" or
"splitted TABLE cannot be centered on pages - use xtable instead with
[key=value]" or
"use \setupTABLE[something=here] - it will center splitted TABLE on
each page"?


Place the table as float and disable the caption, e.g.

\startplacetable[location={split,force,none}]
...
\stopplacetable

Wolfgang




--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
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] How to display widows/orphans

2018-06-21 Thread hanak
Hello,

I know, that letting context to solve all widow/orphans automatically
is possible like:

   \startsetups[grid][mypenalties]
 \setdefaultpenalties
 \setpenalties\widowpenalties{1}{1}
 \setpenalties\clubpenalties{1}{1}
   \stopsetups

   \setuplayout[grid=yes, setups=mypenalties]

or even only:

\widowpenalty=1
\clubpenalty=1

But this solution will let the page shorter (I will get one empty line
on the bottom of the page). I would prefer to solve the widow problem
manually, e.g. using \looseness=-1 or \looseness=1 on some
paragraphs.

In order to identify the problematic pages quickly, it would be nice to
see them in the log (on the console), similarly how I see e.g. 
overfull hboxes. If I have an overfull line, I see:

  pages   > flushing realpage 74, userpage 74
  Overfull \hbox (2.01712pt too wide) in paragraph at lines 3504--3510

Now I would like to see a widow like:

  pages   > flushing realpage 74, userpage 74
  Underfull \vbox ...

Is it something like this possible?

Thanks.
Pavel
___
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
___