From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/93421 Path: news.gmane.org!not-for-mail From: Mohammad Hossein Bateni Newsgroups: gmane.comp.tex.context Subject: Re: Page Numbers change after 9 to 01 - 11 -21 - 31 and so on. Date: Tue, 19 Jan 2016 06:16:47 -0500 Message-ID: References: <569E0DE0.9020506@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3457832704496428111==" X-Trace: ger.gmane.org 1453202264 30440 80.91.229.3 (19 Jan 2016 11:17:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 Jan 2016 11:17:44 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jan 19 12:17:32 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aLUI0-0003wG-3d for gctc-ntg-context-518@m.gmane.org; Tue, 19 Jan 2016 12:17:32 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 319C86053; Tue, 19 Jan 2016 12:17:04 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ozREBYXijXYp; Tue, 19 Jan 2016 12:17:02 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 92E995FB3; Tue, 19 Jan 2016 12:17:02 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id E73A65F54 for ; Tue, 19 Jan 2016 12:17:01 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RoGTNKthYHiW for ; Tue, 19 Jan 2016 12:17:00 +0100 (CET) Original-Received: from mail-oi0-f54.google.com (mail-oi0-f54.google.com [209.85.218.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id B91E55EE2 for ; Tue, 19 Jan 2016 12:16:49 +0100 (CET) Original-Received: by mail-oi0-f54.google.com with SMTP id p187so173291842oia.2 for ; Tue, 19 Jan 2016 03:16:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=01YAqPSxSVizQvWGdImhYejr5LMpiJ3uvW1HjmWojsM=; b=LbentqLE+jp5VYU5YchTgV6Vdd4CXJ4GLzg76qLN1vvfwIkPCYmvabD4ppa67Xiyhr UeuFHVHYAKd/pyWFceQP1nKTG75g7xbm6E2noudgvZ/AQhJ5JS7ohOFGGpul0rdaHWl6 nsXFoJx7zRHl+ht6rj3B3DpHXxti6QmVS51BBtq6lSIPpP4mJDurcV3W+bpPCNMrsSG9 BYYP4dmvkH/uLNbl0j62qGtCXU8ZFoiSYtQbaymCT8i7SwzTpzX5h8z9LLoNgl2RWEBq qdn3kt9NacVXrf3Rn1CM9SjG2PS8gDkAAUkYeiNre6Z+Q7GKFJ0rb9EDypRTl0qwptT3 VnKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=01YAqPSxSVizQvWGdImhYejr5LMpiJ3uvW1HjmWojsM=; b=A0emlvvIq2KlGfsT4ssrm2czrfICMT2guDb02B9wVvxxVnFlalmMzr/CSEQn/FHOfm HBjhrZHhBxaeo0XpwsDeabq4EmYQzVafGh/AcVxS/yW/8tXOEpXjfIg95Jf8XEg76tOD yxG+ZBGWM3Ab2Xk66GrZ7naPX6g7RhWEsXOtwObrxYedkveWq5q5U3nDAeR8AkuE72lY 4vPtAMhA2L0i71dzP5wOegwikWIBV5+jjO38vI/Y/BNaer3COAxKgfkYKwLJih8bK7z9 XL6YuxDFuLspI1CkBNV5k7JcrPuin9m2W5hBXCFq5WdSeh9k9qTq5iBPspdlEJgt6WtI lEkw== X-Gm-Message-State: ALoCoQnEC32v3OLC5sJPaxpPx+HIOhDQa4DWH5qfDDDZ/tg+h/W865DCfYvgyxSKu8HNhxBPFDgrgaqzdc6npBtjQxWVJ/d42A== X-Received: by 10.202.75.205 with SMTP id y196mr22401327oia.130.1453202207480; Tue, 19 Jan 2016 03:16:47 -0800 (PST) Original-Received: by 10.202.188.132 with HTTP; Tue, 19 Jan 2016 03:16:47 -0800 (PST) In-Reply-To: <569E0DE0.9020506@gmail.com> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:93421 Archived-At: --===============3457832704496428111== Content-Type: multipart/alternative; boundary=001a11c165e85d242c0529ae01b7 --001a11c165e85d242c0529ae01b7 Content-Type: text/plain; charset=UTF-8 That should work for Ibn Saeed, but it's not a complete solution. For example it does not work if one wants to write "page x of y" instead, with "page" and "y" written in Arabic/Persian. Then the text of the header is partly LTR and part RTL. This is still simple and I can use my hacky solution and mix \lefttoright and \righttoleft to get it right. But is it possible to extend the \setupdirections[bidi=on] to apply to parts other than the main text? I just noticed this does not apply to footnotes either. Having numbers in the TRL footnote text produces incorrect typesetting. On Tue, Jan 19, 2016 at 5:20 AM, Wolfgang Schuster < schuster.wolfgang@gmail.com> wrote: > Ibn Saeed > 19. Januar 2016 um 04:54 > > Mohammad Hossein Bateni gmail.com> writes: > > > One hacky way to fix it is the following: > > \setupheadertexts [{\getmarking[chapter]}] > > [{\lefttoright\pagenumber}] [{\lefttoright\pagenumber}] > [{\getmarking[chapter]}] > > Ideally \setupdirections[bidi] or something like that should be used, as I > > mentioned in the other thread; that'll fix a bunch of other problems, as > well > > I did enable \setupdirections[bidi=global] and it did not help. > > Here is how it was solved. I could not use your solution as it would move > the position of the page number of the even page on top of the chapter name. > > So here is the solution derived from your answer, which works for my > scenario. > > \setupheader[margin][ > style=\righttoleft, > state=normal > ] > > \setupheadertexts > [{\righttoleft\getmarking[chapter]}] [{\pagenumber}] > [{\pagenumber}] [{\righttoleft\getmarking[chapter]}] > > > As Hans told you you can change the style for the header text in the left > side only: > > \setupheader[leftstyle=\righttoleft] > > \setupheadertexts > [chapter] [pagenumber] > [pagenumber] [chapter] > > \setuppagenumbering[alternative=doublesided] > > \starttext > \dorecurse{10}{\expanded{\chapter{Chapter \recurselevel}}} > \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 > > ___________________________________________________________________________________ > --001a11c165e85d242c0529ae01b7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
That should work for Ibn Saeed, but it's not a complet= e solution.=C2=A0 For example it does not work if one wants to write "= page x of y" instead, with "page" and "y" written = in Arabic/Persian.=C2=A0 Then the text of the header is partly LTR and part= RTL.

This is still simple and I can use my hacky soluti= on and mix \lefttoright and \righttoleft to get it right.=C2=A0 But is it p= ossible to extend the \setupdirections[bidi=3Don] to apply to parts other t= han the main text?=C2=A0 I just noticed this does not apply to footnotes ei= ther.=C2=A0 Having numbers in the TRL footnote text produces incorrect type= setting.

On Tue, Jan 19, 2016 at 5:20 AM, Wolfgang Schuster <= ;schuster.= wolfgang@gmail.com> wrote:
19.=20 Januar 2016 um 04:54
Moha=
mmad Hossein Bateni <bateni <at> gmail.com> writes:

One hacky way to fix it is the followi=
ng:

\setupheadertexts=C2=A0 =C2=A0 =C2=A0 =C2=A0 [{\getmarking[chapter]}]=C2=A0=
 =C2=A0=20
[{\lefttoright\pagenumber}]=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 [{\lefttoright\pagenumber}]=C2=A0 =C2=A0 =C2=A0 =C2=A0=20
[{\getmarking[chapter]}]
Ideally \setupdirections[bidi] or some=
thing like that should be used, as I=20
mentioned in the other thread; that'll fix a bu=
nch of other problems, as=20
well

I did enable \setupdirections[bidi=3Dglobal] and it did not help.

Here is how it was solved. I could not use your solution as it would move=
=20
the position of the page number of the even page on top of the chapter name=
.

So here is the solution derived from your answer, which works for my=20
scenario.

\setupheader[margin][
	style=3D\righttoleft,=20
	state=3Dnormal
	]    =20

\setupheadertexts
        [{\righttoleft\getmarking[chapter]}]    [{\pagenumber}]
        [{\pagenumber}]        [{\righttoleft\getmarking[chapter]}]

As Hans told you you can change the style for the header text in the=20 left side only:

\setupheader[leftstyle=3D\righttoleft]

\setupheadertexts
=C2=A0 [chapter]=C2=A0=C2=A0=C2=A0 [pagenumber]
=C2=A0 [pagenumber] [chapter]

\setuppagenumbering[alternative=3Ddoublesided]

\starttext
\dorecurse{10}{\expanded{\chapter{Chapter \recurselevel}}}
\stoptext

Wolfgang

_______________________________________________________________________= ____________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-context@ntg.nl / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context" rel=3D"noreferrer= " target=3D"_blank">http://www.ntg.nl/mailman/listinfo/ntg-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://tex.aanhet.net
archive=C2=A0 : http://foundry.supelec.fr/projects/con= textrev/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________

--001a11c165e85d242c0529ae01b7-- --===============3457832704496428111== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============3457832704496428111==--