Re: [NTG-context] RTL problem with figure numbers

2016-01-18 Thread Hans Hagen

On 1/18/2016 7:12 AM, Mohammad Hossein Bateni wrote:

I just found a solution to the last question:

\defineseparatorset[dashsep][][{--}]
\setuphead[section][sectionseparatorset=dashsep]


maybe collect all the r2l thing son the wiki so that eventually we can 
figure out some presets


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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
___

Re: [NTG-context] RTL problem with figure numbers

2016-01-18 Thread Mohammad Hossein Bateni
That's on my agenda.  I'll explore things a little more and hopefully will
set up such a page in a few weeks.

On Mon, Jan 18, 2016 at 5:13 AM, Hans Hagen  wrote:

> On 1/18/2016 7:12 AM, Mohammad Hossein Bateni wrote:
>
>> I just found a solution to the last question:
>>
>> \defineseparatorset[dashsep][][{--}]
>> \setuphead[section][sectionseparatorset=dashsep]
>>
>
> maybe collect all the r2l thing son the wiki so that eventually we can
> figure out some presets
>
> Hans
>
>
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | 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
>
> ___
>
___
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
___

Re: [NTG-context] RTL problem with figure numbers

2016-01-17 Thread Mohammad Hossein Bateni
Thanks, this works for figures.

I couldn't get the same to work for chapters, sections, etc.

\setuphead[chapter,section][conversion=lefttorightnumber]

This does not have any effect.


The solution I had in the first email of this thread (see below) has
another issue, which I discovered later.

\setuphead[chapter,title,section,subject][numbercommand=\righttoleft]

The 12th section in the first chapter is written as 1.12 instead of 12.1; I
want the latter because of r2l align.

Another question: how do I change the separator to something else, say --?
I have played with separator and separatorset, but neither seems to work.


On Sat, Jan 9, 2016 at 11:17 AM, Wolfgang Schuster <
schuster.wolfg...@gmail.com> wrote:

> Mohammad Hossein Bateni 
> 3. Januar 2016 um 20:46
> Hi,
>
> Again this has been partly discussed on the list and solutions were
> already there but I didn't see anyone mention the issue with figures.
>
> In the following MWE we have 20 pages of a simple text with a section, a
> footnote and a figure on each page.  The page numbers and footnote numbers
> are fine.  Section numbers need some care to appear correctly.  I couldn't
> figure out a similar mechanism for figure numbers, though.  The example
> does not use Indic numbers, which does not have any effect on the problem.
>
>
> \setupdirections[bidi=global,method=two]
> \setupalign[r2l]
>
> %% If we don't provide the numbercommand, we'll see reverse numbering
> starting from 10.
> \setuphead[chapter,title,section,subject][numbercommand=\righttoleft]
> %% The following does not accept any numbercommand but it has
> numberconversion.
> %% As a result figure numbers are shown in reverse.
> \setupcaptions[numberstopper={:}]
> %% Footnotes are fine and accept conversion.
> %% Page numbers are also okay.
>
> \starttext
>
> \dorecurse{20}{
>
> \section{Test}
> This is a very simple text.
> And we have a footnote\footnote{Footnote text}.
>
> \placefigure
> [][]
> {Test figure.}
> {\centerline{FIGURE BODY}}
>
> \page
> }
>
> \stoptext
>
> You can use processors.
>
> \setupalign[righttoleft]
>
> \defineprocessor [lefttoright][style=\lefttoright]
> \defineconversionset[lefttorightnumber][][lefttoright->n]
>
> \setupcaption[figure][numberconversionset=lefttorightnumber]
>
> \starttext
>
> \chapter{Chapter}
>
> \dorecurse{20}{\placefigure{Dummy
> figure}{\blackrule[width=8cm,height=2cm]}}
>
> \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://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] RTL problem with figure numbers

2016-01-17 Thread Mohammad Hossein Bateni
I just found a solution to the last question:

\defineseparatorset[dashsep][][{--}]
\setuphead[section][sectionseparatorset=dashsep]

On Mon, Jan 18, 2016 at 1:01 AM, Mohammad Hossein Bateni 
wrote:

> Thanks, this works for figures.
>
> I couldn't get the same to work for chapters, sections, etc.
>
> \setuphead[chapter,section][conversion=lefttorightnumber]
>
> This does not have any effect.
>
>
> The solution I had in the first email of this thread (see below) has
> another issue, which I discovered later.
>
> \setuphead[chapter,title,section,subject][numbercommand=\righttoleft]
>
> The 12th section in the first chapter is written as 1.12 instead of 12.1;
> I want the latter because of r2l align.
>
> Another question: how do I change the separator to something else, say
> --?  I have played with separator and separatorset, but neither seems to
> work.
>
>
> On Sat, Jan 9, 2016 at 11:17 AM, Wolfgang Schuster <
> schuster.wolfg...@gmail.com> wrote:
>
>> Mohammad Hossein Bateni 
>> 3. Januar 2016 um 20:46
>> Hi,
>>
>> Again this has been partly discussed on the list and solutions were
>> already there but I didn't see anyone mention the issue with figures.
>>
>> In the following MWE we have 20 pages of a simple text with a section, a
>> footnote and a figure on each page.  The page numbers and footnote numbers
>> are fine.  Section numbers need some care to appear correctly.  I couldn't
>> figure out a similar mechanism for figure numbers, though.  The example
>> does not use Indic numbers, which does not have any effect on the problem.
>>
>>
>> \setupdirections[bidi=global,method=two]
>> \setupalign[r2l]
>>
>> %% If we don't provide the numbercommand, we'll see reverse numbering
>> starting from 10.
>> \setuphead[chapter,title,section,subject][numbercommand=\righttoleft]
>> %% The following does not accept any numbercommand but it has
>> numberconversion.
>> %% As a result figure numbers are shown in reverse.
>> \setupcaptions[numberstopper={:}]
>> %% Footnotes are fine and accept conversion.
>> %% Page numbers are also okay.
>>
>> \starttext
>>
>> \dorecurse{20}{
>>
>> \section{Test}
>> This is a very simple text.
>> And we have a footnote\footnote{Footnote text}.
>>
>> \placefigure
>> [][]
>> {Test figure.}
>> {\centerline{FIGURE BODY}}
>>
>> \page
>> }
>>
>> \stoptext
>>
>> You can use processors.
>>
>> \setupalign[righttoleft]
>>
>> \defineprocessor [lefttoright][style=\lefttoright]
>> \defineconversionset[lefttorightnumber][][lefttoright->n]
>>
>> \setupcaption[figure][numberconversionset=lefttorightnumber]
>>
>> \starttext
>>
>> \chapter{Chapter}
>>
>> \dorecurse{20}{\placefigure{Dummy
>> figure}{\blackrule[width=8cm,height=2cm]}}
>>
>> \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://tex.aanhet.net
>> archive  : http://foundry.supelec.fr/projects/contextrev/
>> 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] RTL problem with figure numbers

2016-01-09 Thread Hans Hagen

On 1/9/2016 3:37 AM, Mohammad Hossein Bateni wrote:

Do you think the solution here is adding a numbercommand key to floats
as well which can be set to \righttoleft?  Or is the need to do the same
for chapter, section, etc. also a bug which should be fixed?


actually i don't like to use the numbercommand for this ... we need some 
more fundamental approach ... so first we need to investigate where/what 
is needed



—MHB

On Sun, Jan 3, 2016 at 11:56 PM, Mohammad Hossein Bateni
> wrote:

No difference with latest beta from context-garden:
CONTEXT current version: 2015.12.31 16:49
LuaTeX, Version beta-0.87.0 (TeX Live 2016/dev)

The 10th page of the PDF output is attached.

On Sun, Jan 3, 2016 at 5:27 PM, Hans Hagen > wrote:

On 1/3/2016 8:46 PM, Mohammad Hossein Bateni wrote:

I use TeXLive 2015 on Mac OS X,
   CONTEXT 2015.05.18 12 :26, and
   LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev
5238).


use the version from contextgarden as things might have evolved

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

___





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




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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
___

Re: [NTG-context] RTL problem with figure numbers

2016-01-09 Thread Wolfgang Schuster

Mohammad Hossein Bateni 
3. Januar 2016 um 20:46
Hi,

Again this has been partly discussed on the list and solutions were 
already there but I didn't see anyone mention the issue with figures.


In the following MWE we have 20 pages of a simple text with a section, 
a footnote and a figure on each page.  The page numbers and footnote 
numbers are fine.  Section numbers need some care to appear 
correctly.  I couldn't figure out a similar mechanism for figure 
numbers, though.  The example does not use Indic numbers, which does 
not have any effect on the problem.



\setupdirections[bidi=global,method=two]
\setupalign[r2l]

%% If we don't provide the numbercommand, we'll see reverse numbering 
starting from 10.

\setuphead[chapter,title,section,subject][numbercommand=\righttoleft]
%% The following does not accept any numbercommand but it has 
numberconversion.

%% As a result figure numbers are shown in reverse.
\setupcaptions[numberstopper={:}]
%% Footnotes are fine and accept conversion.
%% Page numbers are also okay.

\starttext

\dorecurse{20}{

\section{Test}
This is a very simple text.
And we have a footnote\footnote{Footnote text}.

\placefigure
[][]
{Test figure.}
{\centerline{FIGURE BODY}}

\page
}

\stoptext

You can use processors.

\setupalign[righttoleft]

\defineprocessor [lefttoright][style=\lefttoright]
\defineconversionset[lefttorightnumber][][lefttoright->n]

\setupcaption[figure][numberconversionset=lefttorightnumber]

\starttext

\chapter{Chapter}

\dorecurse{20}{\placefigure{Dummy figure}{\blackrule[width=8cm,height=2cm]}}

\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] RTL problem with figure numbers

2016-01-08 Thread Mohammad Hossein Bateni
Do you think the solution here is adding a numbercommand key to floats as
well which can be set to \righttoleft?  Or is the need to do the same for
chapter, section, etc. also a bug which should be fixed?

—MHB

On Sun, Jan 3, 2016 at 11:56 PM, Mohammad Hossein Bateni 
wrote:

> No difference with latest beta from context-garden:
> CONTEXT current version: 2015.12.31 16:49
> LuaTeX, Version beta-0.87.0 (TeX Live 2016/dev)
>
> The 10th page of the PDF output is attached.
>
> On Sun, Jan 3, 2016 at 5:27 PM, Hans Hagen  wrote:
>
>> On 1/3/2016 8:46 PM, Mohammad Hossein Bateni wrote:
>>
>> I use TeXLive 2015 on Mac OS X,
>>>   CONTEXT 2015.05.18 12:26, and
>>>   LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238).
>>>
>>
>> use the version from contextgarden as things might have evolved
>>
>> 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
>>
>> ___
>
>
>
___
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
___

Re: [NTG-context] RTL problem with figure numbers

2016-01-03 Thread Hans Hagen

On 1/3/2016 8:46 PM, Mohammad Hossein Bateni wrote:


I use TeXLive 2015 on Mac OS X,
  CONTEXT 2015.05.18 12:26, and
  LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238).


use the version from contextgarden as things might have evolved

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
___

Re: [NTG-context] RTL problem with figure numbers

2016-01-03 Thread Mohammad Hossein Bateni
No difference with latest beta from context-garden:
CONTEXT current version: 2015.12.31 16:49
LuaTeX, Version beta-0.87.0 (TeX Live 2016/dev)

The 10th page of the PDF output is attached.

On Sun, Jan 3, 2016 at 5:27 PM, Hans Hagen  wrote:

> On 1/3/2016 8:46 PM, Mohammad Hossein Bateni wrote:
>
> I use TeXLive 2015 on Mac OS X,
>>   CONTEXT 2015.05.18 12:26, and
>>   LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238).
>>
>
> use the version from contextgarden as things might have evolved
>
> 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
>
> ___


test-p10.pdf.gz
Description: GNU Zip compressed data
___
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
___

[NTG-context] RTL problem with figure numbers

2016-01-03 Thread Mohammad Hossein Bateni
Hi,

Again this has been partly discussed on the list and solutions were already
there but I didn't see anyone mention the issue with figures.

In the following MWE we have 20 pages of a simple text with a section, a
footnote and a figure on each page.  The page numbers and footnote numbers
are fine.  Section numbers need some care to appear correctly.  I couldn't
figure out a similar mechanism for figure numbers, though.  The example
does not use Indic numbers, which does not have any effect on the problem.


\setupdirections[bidi=global,method=two]
\setupalign[r2l]

%% If we don't provide the numbercommand, we'll see reverse numbering
starting from 10.
\setuphead[chapter,title,section,subject][numbercommand=\righttoleft]
%% The following does not accept any numbercommand but it has
numberconversion.
%% As a result figure numbers are shown in reverse.
\setupcaptions[numberstopper={:}]
%% Footnotes are fine and accept conversion.
%% Page numbers are also okay.

\starttext

\dorecurse{20}{

\section{Test}
This is a very simple text.
And we have a footnote\footnote{Footnote text}.

\placefigure
[][]
{Test figure.}
{\centerline{FIGURE BODY}}

\page
}

\stoptext


I use TeXLive 2015 on Mac OS X,
 CONTEXT 2015.05.18 12:26, and
 LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238).

Thanks a lot!
—MHB
___
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
___