ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Idris Samawi Hamid ادريس سماوي حامد" <Idris.Hamid@colostate.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: reverse page order and reverse page numbering in one part of a book
Date: Wed, 22 Jul 2015 05:58:04 -0600	[thread overview]
Message-ID: <op.x16bi2aiejo439@ishamid-pc> (raw)
In-Reply-To: <780F44E4-6EB1-4E36-87D2-7408B5AC2F1D@fastmail.fm>

Dear Talal,
Salaam. See below:

On Wed, 22 Jul 2015 03:49:29 -0600, talazem@fastmail.fm  
<talazem@fastmail.fm> wrote:

> Dear all,
>
> I am producing a book that is divided into two sections. The book is  
> published in English, and thus it runs left to right. Part one is an  
> academic study in English. Part two is a critical edition of an Arabic  
> text. The book is exactly 100 pages long, with fifty pages going to the  
> English study, and fifty pages to the Arabic edition.
>
> In Part One (which includes all the front matter of the book, such as  
> the table of contents, etc.): the page ordering runs left-to-right, the  
> pagination runs from 1 to 50, and the page numbers should be printed in  
> Arabic numerals.
>
> However, in Part Two (the Arabic text): the page ordering should run  
> right-to-left, the page numbers should run in “reverse” pagination (in  
> which “page 1" of the critical edition begins at the “back” of the  
> book), and the page numbers should be printed in Hindi numerals.
>
> In other words, the structure of the book’s pages would be as follows  
> (ellipses used to jump):
>
> 1
> 2
> 3
> …
> 48
> 49
> 50
> ٥٠
> ٤٩
> ٤٨
> …
> ٣
> ٢
> ١
>
> I would like the Table of Contents then to look something like this:
>
> Forward . . . . . . v
> English Study . . . 1
> Arabic Edition. . . ١
> Index of names. . . ٥٠
>
> So my question is: is this currently possible in ConTeXt, to produce a  
> single PDF, with such a TOC, from one file? Or am I bringing on too much  
> of a headache upon myself, and it is easier to produce two separate  
> files — but if so, how would one produce a TOC that includes the parts  
> and page numbers of both documents?

For getting the Arabic pages to go the other way, I would leave that to  
the printer and/or post-pdf processing. After all, ConTeXt doesn't care  
about whether the book itself reads RTL or LTR. OTOH, you may have to  
reverse some of the \setuplayout parameters (such as margin and backspace)  
for the Arabic portion of the book.

I'm sure you've seen Arthur Jeffery, Materials for the History of the Text  
of the Quran, for a nicely typeset example of what you are trying to do.  
Or even Revelation and Falsification edited by Kohlberg [a very misleading  
and sensationalist title by the way]. If you want to have two books in  
one, you *may* want to rethink this: Just have an Arabic TOC in the Arabic  
section (entirely RTL of course) and an English TOC in the English  
section. The English TOC need only point to the fact that the Arabic  
edition comes afterwards, and the Arabic TOC could do the same.

That said: You could typeset both books as distinct products or components  
within a single project file - see page 20 of cont-eni.pdf (I once did two  
books this way). Then you can do cross-references between both books. IIRC  
you can then take the TOC in one product or component and place it in the  
other. So in the English book you can place the Arabic TOC and vice versa.  
Of course you will want to define a separate TOC control sequence for  
each. So you can get, e.g.

\starttitle[title=Table of Contents]
\start \LATINFONTOPTIONS
\placeENGLISHcontent
\stop
\start \ARABICFONTOPTIONS
\placeARABICcontent
\stop
\stoptitle

which gives you exactly what you want. After all is said and done, the  
printer can reverse the order of the Arabic pages but that will not affect  
your TOC.

Note that your example has English section names mapped to Arabic/Hindi  
page numerals (again, I would prefer a purely Arabic TOC). But your  
section titles in the Edition will not be in English. ConTeXt allows you  
to use dummy names for section title that will end up in your TOC, and  
this is documented in the manual I'm sure.

Tangent: We need to start looking at the needs of Arabic indices in  
ConTeXt. Alan Braslau and Hans Hagen are already working on a new  
bibliography module that will eventually support RTL needs as well.

Best wishes
Idris
-- 
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523
___________________________________________________________________________________
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:[~2015-07-22 11:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-22  9:49 talazem
2015-07-22 11:58 ` Idris Samawi Hamid ادريس سماوي حامد [this message]
2015-07-22 12:45   ` Alan BRASLAU
2015-07-22 12:54     ` Thomas A. Schmitz
2015-07-22 13:47       ` Alan BRASLAU
2015-07-22 14:28         ` Thomas A. Schmitz
2015-07-24 10:15           ` Hans Hagen
2015-07-24 10:18         ` Hans Hagen

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=op.x16bi2aiejo439@ishamid-pc \
    --to=idris.hamid@colostate.edu \
    --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).