ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mohammad Hossein Bateni <bateni@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: RTL problem with figure numbers
Date: Mon, 18 Jan 2016 01:12:11 -0500	[thread overview]
Message-ID: <CAMHZ1dbf5FcsTHr37O5NVZ9zGinsZt2eKU6xj5ZpyS8mk=Aneg@mail.gmail.com> (raw)
In-Reply-To: <CAMHZ1dbiW-B_RDiMvUcDVV7Y=f+-Pa7zfSOyOze59U7q04CdkQ@mail.gmail.com>


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

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 <bateni@gmail.com>
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.wolfgang@gmail.com> wrote:
>
>> Mohammad Hossein Bateni <bateni@gmail.com>
>> 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
>>
>> ___________________________________________________________________________________
>>
>
>

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

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2016-01-18  6:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-03 19:46 Mohammad Hossein Bateni
2016-01-03 22:27 ` Hans Hagen
2016-01-04  4:56   ` Mohammad Hossein Bateni
2016-01-09  2:37     ` Mohammad Hossein Bateni
2016-01-09 13:09       ` Hans Hagen
2016-01-09 16:17 ` Wolfgang Schuster
2016-01-18  6:01   ` Mohammad Hossein Bateni
2016-01-18  6:12     ` Mohammad Hossein Bateni [this message]
2016-01-18 10:13       ` Hans Hagen
2016-01-18 18:24         ` Mohammad Hossein Bateni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMHZ1dbf5FcsTHr37O5NVZ9zGinsZt2eKU6xj5ZpyS8mk=Aneg@mail.gmail.com' \
    --to=bateni@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).